diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index f3af92d9e934b..32cc5684103a4 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -122,6 +122,7 @@ enabled: - test/functional/apps/home/config.ts - test/functional/apps/kibana_overview/config.ts - test/functional/apps/management/config.ts + - test/functional/apps/navigation/config.ts - test/functional/apps/saved_objects_management/config.ts - test/functional/apps/sharing/config.ts - test/functional/apps/status_page/config.ts @@ -305,6 +306,7 @@ enabled: - x-pack/test/functional/apps/ml/stack_management_jobs/config.ts - x-pack/test/functional/apps/monitoring/config.ts - x-pack/test/functional/apps/observability_logs_explorer/config.ts + - x-pack/test/functional/apps/dataset_quality/config.ts - x-pack/test/functional/apps/painless_lab/config.ts - x-pack/test/functional/apps/remote_clusters/config.ts - x-pack/test/functional/apps/reporting_management/config.ts @@ -445,24 +447,24 @@ enabled: - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group4.ts - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group5.ts - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts - - x-pack/performance/journeys/ecommerce_dashboard.ts - - x-pack/performance/journeys/ecommerce_dashboard_map_only.ts - - x-pack/performance/journeys/flight_dashboard.ts - - x-pack/performance/journeys/login.ts - - x-pack/performance/journeys/many_fields_discover.ts - - x-pack/performance/journeys/many_fields_lens_editor.ts - - x-pack/performance/journeys/many_fields_transform.ts - - x-pack/performance/journeys/tsdb_logs_data_visualizer.ts - - x-pack/performance/journeys/promotion_tracking_dashboard.ts - - x-pack/performance/journeys/web_logs_dashboard.ts - - x-pack/performance/journeys/data_stress_test_lens.ts - - x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts - - x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts - - x-pack/performance/journeys/dashboard_listing_page.ts - - x-pack/performance/journeys/tags_listing_page.ts - - x-pack/performance/journeys/cloud_security_dashboard.ts - - x-pack/performance/journeys/apm_service_inventory.ts - - x-pack/performance/journeys/infra_hosts_view.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_map_only.ts + - x-pack/performance/journeys_e2e/flight_dashboard.ts + - x-pack/performance/journeys_e2e/login.ts + - x-pack/performance/journeys_e2e/many_fields_discover.ts + - x-pack/performance/journeys_e2e/many_fields_lens_editor.ts + - x-pack/performance/journeys_e2e/many_fields_transform.ts + - x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts + - x-pack/performance/journeys_e2e/promotion_tracking_dashboard.ts + - x-pack/performance/journeys_e2e/web_logs_dashboard.ts + - x-pack/performance/journeys_e2e/data_stress_test_lens.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_saved_search_only.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_tsvb_gauge_only.ts + - x-pack/performance/journeys_e2e/dashboard_listing_page.ts + - x-pack/performance/journeys_e2e/tags_listing_page.ts + - x-pack/performance/journeys_e2e/cloud_security_dashboard.ts + - x-pack/performance/journeys_e2e/apm_service_inventory.ts + - x-pack/performance/journeys_e2e/infra_hosts_view.ts - x-pack/test/custom_branding/config.ts - x-pack/test/profiling_api_integration/cloud/config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/actions/trial_license_complete_tier/configs/ess.config.ts diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 13e0f4d795828..21a4326498fc9 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -1,7 +1,3 @@ #!/usr/bin/env bash -if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then - echo "Pipeline file triggered from outside the kibana executors, skipping post_command" -else - .buildkite/scripts/lifecycle/post_command.sh -fi +source .buildkite/scripts/lifecycle/post_command.sh diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 725591fdf19b4..58a2c5f0b499d 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -1,8 +1,3 @@ #!/usr/bin/env bash -if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then - echo "Pipeline file triggered from outside the kibana executors, skipping .buildkite/scripts/lifecycle/pre_command.sh" - export SONAR_LOGIN=$(vault read -field=token secret/ci/elastic-kibana/sonarqube) -else - source .buildkite/scripts/lifecycle/pre_command.sh -fi +source .buildkite/scripts/lifecycle/pre_command.sh diff --git a/.buildkite/package-lock.json b/.buildkite/package-lock.json index 523decc3f270c..401f25347ebc0 100644 --- a/.buildkite/package-lock.json +++ b/.buildkite/package-lock.json @@ -22,7 +22,7 @@ "@types/mocha": "^10.0.1", "@types/node": "^15.12.2", "chai": "^4.3.10", - "mocha": "^10.2.0", + "mocha": "^10.3.0", "nock": "^12.0.2", "ts-node": "^10.7.0", "typescript": "^4.6.4" @@ -529,12 +529,6 @@ "node": ">= 0.8" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -772,20 +766,19 @@ } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -802,28 +795,6 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -1082,9 +1053,9 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -1094,13 +1065,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -1115,10 +1085,6 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/ansi-colors": { @@ -1169,18 +1135,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/nock": { "version": "12.0.3", "resolved": "https://registry.npmjs.org/nock/-/nock-12.0.3.tgz", @@ -1271,15 +1225,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -1423,9 +1368,9 @@ ] }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2138,12 +2083,6 @@ "delayed-stream": "~1.0.0" } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2301,38 +2240,16 @@ "dev": true }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "minimatch": "^5.0.1", + "once": "^1.3.0" } }, "glob-parent": { @@ -2529,9 +2446,9 @@ } }, "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", "dev": true, "requires": { "ansi-colors": "4.1.1", @@ -2541,14 +2458,13 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", + "serialize-javascript": "^6.0.2", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "workerpool": "6.2.1", @@ -2595,12 +2511,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, "nock": { "version": "12.0.3", "resolved": "https://registry.npmjs.org/nock/-/nock-12.0.3.tgz", @@ -2659,12 +2569,6 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2741,9 +2645,9 @@ "dev": true }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" diff --git a/.buildkite/package.json b/.buildkite/package.json index 0321711b7480d..be91750b4e797 100644 --- a/.buildkite/package.json +++ b/.buildkite/package.json @@ -6,6 +6,9 @@ "test": "mocha", "test:watch": "mocha --watch" }, + "overrides": { + "serialize-javascript": "^6.0.2" + }, "dependencies": { "@octokit/rest": "^18.10.0", "axios": "^1.6.3", @@ -21,7 +24,7 @@ "@types/mocha": "^10.0.1", "@types/node": "^15.12.2", "chai": "^4.3.10", - "mocha": "^10.2.0", + "mocha": "^10.3.0", "nock": "^12.0.2", "ts-node": "^10.7.0", "typescript": "^4.6.4" diff --git a/.buildkite/pipelines/emergency_release.yml b/.buildkite/pipelines/emergency_release.yml index 07ab52417f9a0..ac359ab842a25 100644 --- a/.buildkite/pipelines/emergency_release.yml +++ b/.buildkite/pipelines/emergency_release.yml @@ -1,4 +1,5 @@ env: + SKIP_NODE_SETUP: true VERSION: ${BUILDKITE_COMMIT:0:12} EMERGENCY_RELEASE_REMOTE_SERVICE_CONFIG: https://raw.githubusercontent.com/elastic/serverless-gitops/main/gen/gpctl/kibana/emergency.yaml @@ -16,3 +17,4 @@ steps: env: REMOTE_SERVICE_CONFIG: "${EMERGENCY_RELEASE_REMOTE_SERVICE_CONFIG}" SERVICE_COMMIT_HASH: "${VERSION}" + DRY_RUN: "${DRY_RUN:-false}" diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 77ae40971a282..8452416e2a908 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -167,7 +167,7 @@ steps: queue: n2-4-virt depends_on: build timeout_in_minutes: 60 - parallelism: 6 + parallelism: 10 retry: automatic: - exit_status: '*' diff --git a/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml b/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml index 1217853275914..c24a1d504cd82 100644 --- a/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml +++ b/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml @@ -16,6 +16,7 @@ agents: memory: "8G" env: + SKIP_NODE_SETUP: true TEAM_CHANNEL: "#kibana-mission-control" ENVIRONMENT: ${ENVIRONMENT?} diff --git a/.buildkite/pipelines/sonarqube.yml b/.buildkite/pipelines/sonarqube.yml index 827c52815c1fa..61e275011140b 100644 --- a/.buildkite/pipelines/sonarqube.yml +++ b/.buildkite/pipelines/sonarqube.yml @@ -1,3 +1,7 @@ +env: + SKIP_NODE_SETUP: true + +steps: - label: ":sonarqube: Continuous Code Inspection" agents: image: docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest diff --git a/.buildkite/scripts/common/env.sh b/.buildkite/scripts/common/env.sh index 5823490ccab5e..0cdd9451171e8 100755 --- a/.buildkite/scripts/common/env.sh +++ b/.buildkite/scripts/common/env.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo '--- Setup environment vars' + export CI=true KIBANA_DIR=$(pwd) diff --git a/.buildkite/scripts/common/setup_buildkite_deps.sh b/.buildkite/scripts/common/setup_buildkite_deps.sh new file mode 100644 index 0000000000000..3d826d274694c --- /dev/null +++ b/.buildkite/scripts/common/setup_buildkite_deps.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo '--- Install/build buildkite dependencies' + +if [[ "$(type -t retry)" != "function" ]]; then + source "$(dirname "${BASH_SOURCE[0]}")/util.sh" +fi + +# `rm -rf ; npm install -g ts-node` will cause ts-node bin files to be messed up +# but literally just calling `npm install -g ts-node` a second time fixes it +# this is only on newer versions of npm +npm_install_global ts-node +if ! ts-node --version; then + npm_install_global ts-node + ts-node --version; +fi + +cd '.buildkite' +retry 5 15 npm ci +cd - diff --git a/.buildkite/scripts/common/setup_job_env.sh b/.buildkite/scripts/common/setup_job_env.sh new file mode 100644 index 0000000000000..6b07beebcfa9c --- /dev/null +++ b/.buildkite/scripts/common/setup_job_env.sh @@ -0,0 +1,181 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo '--- Job Environment Setup' + +if [[ "$(type -t vault_get)" != "function" ]]; then + source .buildkite/scripts/common/vault_fns.sh +fi + +# Set up general-purpose tokens and credentials +{ + BUILDKITE_TOKEN="$(vault_get buildkite-ci buildkite_token_all_jobs)" + export BUILDKITE_TOKEN + + GITHUB_TOKEN=$(vault_get kibanamachine github_token) + export GITHUB_TOKEN + + KIBANA_CI_GITHUB_TOKEN=$(vault_get kibana-ci-github github_token) + export KIBANA_CI_GITHUB_TOKEN + + KIBANA_DOCKER_USERNAME="$(vault_get container-registry username)" + export KIBANA_DOCKER_USERNAME + + KIBANA_DOCKER_PASSWORD="$(vault_get container-registry password)" + export KIBANA_DOCKER_PASSWORD +} + +# Set up a custom ES Snapshot Manifest if one has been specified for this build +{ + ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST --default '')} + export ES_SNAPSHOT_MANIFEST + + if [[ "${ES_SNAPSHOT_MANIFEST:-}" ]]; then + cat << EOF | buildkite-agent annotate --style "info" --context es-snapshot-manifest + This build is running using a custom Elasticsearch snapshot. + + ES Snapshot Manifest: $ES_SNAPSHOT_MANIFEST + + To use this locally, simply prefix your commands with: + + \`\`\` + ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" + \`\`\` + + e.g. + + \`\`\` + ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" node scripts/functional_tests_server.js + \`\`\` +EOF + fi +} + +# If a custom manifest isn't specified, then use the default one that we resolve earlier in the build +{ + if [[ ! "${ES_SNAPSHOT_MANIFEST:-}" ]]; then + ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST_DEFAULT --default '')} + export ES_SNAPSHOT_MANIFEST + echo "Using default ES Snapshot Manifest: $ES_SNAPSHOT_MANIFEST" + fi +} + +# Setup CI Stats +{ + CI_STATS_BUILD_ID="$(buildkite-agent meta-data get ci_stats_build_id --default '')" + export CI_STATS_BUILD_ID + + CI_STATS_TOKEN="$(vault_get kibana_ci_stats api_token)" + export CI_STATS_TOKEN + + CI_STATS_HOST="$(vault_get kibana_ci_stats api_host)" + export CI_STATS_HOST + + if [[ "$CI_STATS_BUILD_ID" ]]; then + echo "CI Stats Build ID: $CI_STATS_BUILD_ID" + + KIBANA_CI_STATS_CONFIG=$(jq -n \ + --arg buildId "$CI_STATS_BUILD_ID" \ + --arg apiUrl "https://$CI_STATS_HOST" \ + --arg apiToken "$CI_STATS_TOKEN" \ + '{buildId: $buildId, apiUrl: $apiUrl, apiToken: $apiToken}' \ + ) + export KIBANA_CI_STATS_CONFIG + fi +} + +# Set up misc keys +{ + KIBANA_CI_REPORTER_KEY=$(vault_get kibanamachine-reporter value) + export KIBANA_CI_REPORTER_KEY + + EC_API_KEY="$(vault_get kibana-ci-cloud-deploy pr_deploy_api_key)" + export EC_API_KEY + + PROJECT_API_KEY="$(vault_get kibana-ci-project-deploy pr_deploy_api_key)" + export PROJECT_API_KEY + + PROJECT_API_DOMAIN="$(vault_get kibana-ci-project-deploy pr_deploy_domain)" + export PROJECT_API_DOMAIN + + SYNTHETICS_SERVICE_USERNAME="$(vault_get kibana-ci-synthetics-credentials username)" + export SYNTHETICS_SERVICE_USERNAME + + SYNTHETICS_SERVICE_PASSWORD="$(vault_get kibana-ci-synthetics-credentials password)" + export SYNTHETICS_SERVICE_PASSWORD + + SYNTHETICS_SERVICE_MANIFEST="$(vault_get kibana-ci-synthetics-credentials manifest)" + export SYNTHETICS_SERVICE_MANIFEST + + SYNTHETICS_REMOTE_KIBANA_USERNAME="$(vault_get kibana-ci-synthetics-remote-credentials username)" + export SYNTHETICS_REMOTE_KIBANA_USERNAME + + SYNTHETICS_REMOTE_KIBANA_PASSWORD="$(vault_get kibana-ci-synthetics-remote-credentials password)" + export SYNTHETICS_REMOTE_KIBANA_PASSWORD + + SYNTHETICS_REMOTE_KIBANA_URL=${SYNTHETICS_REMOTE_KIBANA_URL-"$(vault_get kibana-ci-synthetics-remote-credentials url)"} + export SYNTHETICS_REMOTE_KIBANA_URL + + DEPLOY_TAGGER_SLACK_WEBHOOK_URL=${DEPLOY_TAGGER_SLACK_WEBHOOK_URL:-"$(vault_get kibana-serverless-release-tools DEPLOY_TAGGER_SLACK_WEBHOOK_URL)"} + export DEPLOY_TAGGER_SLACK_WEBHOOK_URL + + SONAR_LOGIN=$(vault_get sonarqube token) + export SONAR_LOGIN + + ELASTIC_APM_SERVER_URL=$(vault_get project-kibana-ci-apm apm_server_url) + export ELASTIC_APM_SERVER_URL + + ELASTIC_APM_API_KEY=$(vault_get project-kibana-ci-apm apm_server_api_key) + export ELASTIC_APM_API_KEY +} + +# Set up GCS Service Account for CDN +{ + GCS_SA_CDN_KEY="$(vault_get gcs-sa-cdn-prod key)" + export GCS_SA_CDN_KEY + + GCS_SA_CDN_EMAIL="$(vault_get gcs-sa-cdn-prod email)" + export GCS_SA_CDN_EMAIL + + GCS_SA_CDN_BUCKET="$(vault_get gcs-sa-cdn-prod bucket)" + export GCS_SA_CDN_BUCKET + + GCS_SA_CDN_URL="$(vault_get gcs-sa-cdn-prod cdn)" + export GCS_SA_CDN_URL +} + +# Setup Failed Test Reporter Elasticsearch credentials +{ + TEST_FAILURES_ES_CLOUD_ID=$(vault_get failed_tests_reporter_es cloud_id) + export TEST_FAILURES_ES_CLOUD_ID + + TEST_FAILURES_ES_USERNAME=$(vault_get failed_tests_reporter_es username) + export TEST_FAILURES_ES_USERNAME + + TEST_FAILURES_ES_PASSWORD=$(vault_get failed_tests_reporter_es password) + export TEST_FAILURES_ES_PASSWORD +} + +# Setup Bazel Remote/Local Cache Credentials +{ + BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE="$HOME/.kibana-ci-bazel-remote-cache-local-dev.json" + export BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE + vault_get kibana-ci-bazel-remote-cache-local-dev service_account_json > "$BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE" + + BAZEL_REMOTE_CACHE_CREDENTIALS_FILE="$HOME/.kibana-ci-bazel-remote-cache-gcs.json" + export BAZEL_REMOTE_CACHE_CREDENTIALS_FILE + vault_get kibana-ci-bazel-remote-cache-sa-key key | base64 -d > "$BAZEL_REMOTE_CACHE_CREDENTIALS_FILE" +} + +# Setup GCS Service Account Proxy for CI +{ + KIBANA_SERVICE_ACCOUNT_PROXY_KEY="$(mktemp -d)/kibana-gcloud-service-account.json" + export KIBANA_SERVICE_ACCOUNT_PROXY_KEY + vault_get kibana-ci-sa-proxy-key key | base64 -d > "$KIBANA_SERVICE_ACCOUNT_PROXY_KEY" +} + +PIPELINE_PRE_COMMAND=${PIPELINE_PRE_COMMAND:-".buildkite/scripts/lifecycle/pipelines/$BUILDKITE_PIPELINE_SLUG/pre_command.sh"} +if [[ -f "$PIPELINE_PRE_COMMAND" ]]; then + source "$PIPELINE_PRE_COMMAND" +fi diff --git a/.buildkite/scripts/lifecycle/post_build.sh b/.buildkite/scripts/lifecycle/post_build.sh index 446ca4b28c559..3ca36e9d04b78 100755 --- a/.buildkite/scripts/lifecycle/post_build.sh +++ b/.buildkite/scripts/lifecycle/post_build.sh @@ -9,7 +9,10 @@ if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then "$(dirname "${0}")/commit_status_complete.sh" fi -ts-node "$(dirname "${0}")/ci_stats_complete.ts" +# Skip indexing the same metrics twice +if [[ "${BUILDKITE_RETRY_COUNT:-0}" == "0" ]]; then + ts-node "$(dirname "${0}")/ci_stats_complete.ts" +fi if [[ "${GITHUB_PR_NUMBER:-}" ]]; then DOCS_CHANGES_URL="https://kibana_bk_$GITHUB_PR_NUMBER}.docs-preview.app.elstc.co/diff" diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh index 91854422855a4..218184d36f65a 100755 --- a/.buildkite/scripts/lifecycle/post_command.sh +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -6,8 +6,12 @@ echo '--- Log out of gcloud' ./.buildkite/scripts/common/activate_service_account.sh --unset-impersonation || echo "Failed to unset impersonation" ./.buildkite/scripts/common/activate_service_account.sh --logout-gcloud || echo "Failed to log out of gcloud" -echo '--- Agent Debug Info' -ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true +if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then + echo '--- Skipping Agent Debug Info' +else + echo '--- Agent Debug Info' + ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true +fi IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_test_execution_step" --default '')" diff --git a/.buildkite/scripts/lifecycle/pre_command.sh b/.buildkite/scripts/lifecycle/pre_command.sh index 1e77fa11303ce..0ac12e62a7b0d 100755 --- a/.buildkite/scripts/lifecycle/pre_command.sh +++ b/.buildkite/scripts/lifecycle/pre_command.sh @@ -3,191 +3,22 @@ set -euo pipefail source .buildkite/scripts/common/util.sh - -echo '--- Setup environment vars' source .buildkite/scripts/common/env.sh -source .buildkite/scripts/common/setup_node.sh - -BUILDKITE_TOKEN="$(vault_get buildkite-ci buildkite_token_all_jobs)" -export BUILDKITE_TOKEN +source .buildkite/scripts/common/setup_job_env.sh -echo '--- Install/build buildkite dependencies' +if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then + echo "Skipping node setup (SKIP_NODE_SETUP=$SKIP_NODE_SETUP)" +else + source .buildkite/scripts/common/setup_node.sh + source .buildkite/scripts/common/setup_buildkite_deps.sh -# `rm -rf ; npm install -g ts-node` will cause ts-node bin files to be messed up -# but literally just calling `npm install -g ts-node` a second time fixes it -# this is only on newer versions of npm -npm_install_global ts-node -if ! ts-node --version; then - npm_install_global ts-node - ts-node --version; + echo '--- Agent Debug/SSH Info' + ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true fi -cd '.buildkite' -retry 5 15 npm ci -cd .. - -echo '--- Agent Debug/SSH Info' -ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true - if [[ "$(curl -is metadata.google.internal || true)" ]]; then echo "" echo "To SSH into this agent, run:" echo "gcloud compute ssh --tunnel-through-iap --project elastic-kibana-ci --zone \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/zone)\" \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/name)\"" echo "" fi - -echo '--- Job Environment Setup' - -# Set up a custom ES Snapshot Manifest if one has been specified for this build -{ - ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST --default '')} - export ES_SNAPSHOT_MANIFEST - - if [[ "${ES_SNAPSHOT_MANIFEST:-}" ]]; then - cat << EOF | buildkite-agent annotate --style "info" --context es-snapshot-manifest - This build is running using a custom Elasticsearch snapshot. - - ES Snapshot Manifest: $ES_SNAPSHOT_MANIFEST - - To use this locally, simply prefix your commands with: - - \`\`\` - ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" - \`\`\` - - e.g. - - \`\`\` - ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" node scripts/functional_tests_server.js - \`\`\` -EOF - fi -} - -# If a custom manifest isn't specified, then use the default one that we resolve earlier in the build -{ - if [[ ! "${ES_SNAPSHOT_MANIFEST:-}" ]]; then - ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST_DEFAULT --default '')} - export ES_SNAPSHOT_MANIFEST - echo "Using default ES Snapshot Manifest: $ES_SNAPSHOT_MANIFEST" - fi -} - -# Setup CI Stats -{ - CI_STATS_BUILD_ID="$(buildkite-agent meta-data get ci_stats_build_id --default '')" - export CI_STATS_BUILD_ID - - CI_STATS_TOKEN="$(vault_get kibana_ci_stats api_token)" - export CI_STATS_TOKEN - - CI_STATS_HOST="$(vault_get kibana_ci_stats api_host)" - export CI_STATS_HOST - - if [[ "$CI_STATS_BUILD_ID" ]]; then - echo "CI Stats Build ID: $CI_STATS_BUILD_ID" - - KIBANA_CI_STATS_CONFIG=$(jq -n \ - --arg buildId "$CI_STATS_BUILD_ID" \ - --arg apiUrl "https://$CI_STATS_HOST" \ - --arg apiToken "$CI_STATS_TOKEN" \ - '{buildId: $buildId, apiUrl: $apiUrl, apiToken: $apiToken}' \ - ) - export KIBANA_CI_STATS_CONFIG - fi -} - -GITHUB_TOKEN=$(vault_get kibanamachine github_token) -export GITHUB_TOKEN - -KIBANA_CI_GITHUB_TOKEN=$(vault_get kibana-ci-github github_token) -export KIBANA_CI_GITHUB_TOKEN - -KIBANA_CI_REPORTER_KEY=$(vault_get kibanamachine-reporter value) -export KIBANA_CI_REPORTER_KEY - -KIBANA_DOCKER_USERNAME="$(vault_get container-registry username)" -export KIBANA_DOCKER_USERNAME - -KIBANA_DOCKER_PASSWORD="$(vault_get container-registry password)" -export KIBANA_DOCKER_PASSWORD - -EC_API_KEY="$(vault_get kibana-ci-cloud-deploy pr_deploy_api_key)" -export EC_API_KEY - -PROJECT_API_KEY="$(vault_get kibana-ci-project-deploy pr_deploy_api_key)" -export PROJECT_API_KEY - -PROJECT_API_DOMAIN="$(vault_get kibana-ci-project-deploy pr_deploy_domain)" -export PROJECT_API_DOMAIN - -SYNTHETICS_SERVICE_USERNAME="$(vault_get kibana-ci-synthetics-credentials username)" -export SYNTHETICS_SERVICE_USERNAME - -SYNTHETICS_SERVICE_PASSWORD="$(vault_get kibana-ci-synthetics-credentials password)" -export SYNTHETICS_SERVICE_PASSWORD - -SYNTHETICS_SERVICE_MANIFEST="$(vault_get kibana-ci-synthetics-credentials manifest)" -export SYNTHETICS_SERVICE_MANIFEST - -SYNTHETICS_REMOTE_KIBANA_USERNAME="$(vault_get kibana-ci-synthetics-remote-credentials username)" -export SYNTHETICS_REMOTE_KIBANA_USERNAME - -SYNTHETICS_REMOTE_KIBANA_PASSWORD="$(vault_get kibana-ci-synthetics-remote-credentials password)" -export SYNTHETICS_REMOTE_KIBANA_PASSWORD - -SYNTHETICS_REMOTE_KIBANA_URL=${SYNTHETICS_REMOTE_KIBANA_URL-"$(vault_get kibana-ci-synthetics-remote-credentials url)"} -export SYNTHETICS_REMOTE_KIBANA_URL - -DEPLOY_TAGGER_SLACK_WEBHOOK_URL=${DEPLOY_TAGGER_SLACK_WEBHOOK_URL:-"$(vault_get kibana-serverless-release-tools DEPLOY_TAGGER_SLACK_WEBHOOK_URL)"} -export DEPLOY_TAGGER_SLACK_WEBHOOK_URL - -GCS_SA_CDN_KEY="$(vault_get gcs-sa-cdn-prod key)" -export GCS_SA_CDN_KEY - -GCS_SA_CDN_EMAIL="$(vault_get gcs-sa-cdn-prod email)" -export GCS_SA_CDN_EMAIL - -GCS_SA_CDN_BUCKET="$(vault_get gcs-sa-cdn-prod bucket)" -export GCS_SA_CDN_BUCKET - -GCS_SA_CDN_URL="$(vault_get gcs-sa-cdn-prod cdn)" -export GCS_SA_CDN_URL - - -ELASTIC_APM_SERVER_URL=$(vault_get project-kibana-ci-apm apm_server_url) -export ELASTIC_APM_SERVER_URL - -ELASTIC_APM_API_KEY=$(vault_get project-kibana-ci-apm apm_server_api_key) -export ELASTIC_APM_API_KEY - -# Setup Failed Test Reporter Elasticsearch credentials -{ - TEST_FAILURES_ES_CLOUD_ID=$(vault_get failed_tests_reporter_es cloud_id) - export TEST_FAILURES_ES_CLOUD_ID - - TEST_FAILURES_ES_USERNAME=$(vault_get failed_tests_reporter_es username) - export TEST_FAILURES_ES_USERNAME - - TEST_FAILURES_ES_PASSWORD=$(vault_get failed_tests_reporter_es password) - export TEST_FAILURES_ES_PASSWORD -} - -BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE="$HOME/.kibana-ci-bazel-remote-cache-local-dev.json" -export BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE -vault_get kibana-ci-bazel-remote-cache-local-dev service_account_json > "$BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE" - -# Export key for accessing bazel remote cache's GCS bucket -BAZEL_REMOTE_CACHE_CREDENTIALS_FILE="$HOME/.kibana-ci-bazel-remote-cache-gcs.json" -export BAZEL_REMOTE_CACHE_CREDENTIALS_FILE -vault_get kibana-ci-bazel-remote-cache-sa-key key | base64 -d > "$BAZEL_REMOTE_CACHE_CREDENTIALS_FILE" - -# Setup GCS Service Account Proxy for CI -KIBANA_SERVICE_ACCOUNT_PROXY_KEY="$(mktemp -d)/kibana-gcloud-service-account.json" -export KIBANA_SERVICE_ACCOUNT_PROXY_KEY -vault_get kibana-ci-sa-proxy-key key | base64 -d > "$KIBANA_SERVICE_ACCOUNT_PROXY_KEY" - -PIPELINE_PRE_COMMAND=${PIPELINE_PRE_COMMAND:-".buildkite/scripts/lifecycle/pipelines/$BUILDKITE_PIPELINE_SLUG/pre_command.sh"} -if [[ -f "$PIPELINE_PRE_COMMAND" ]]; then - source "$PIPELINE_PRE_COMMAND" -fi diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 955409c971198..cd392b00be882 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -233,6 +233,7 @@ const uploadPipeline = (pipelineContent: string | object) => { /^x-pack\/packages\/security-solution/, /^x-pack\/packages\/kbn-elastic-assistant/, /^x-pack\/packages\/kbn-elastic-assistant-common/, + /^x-pack\/test\/functional\/es_archives\/security_solution/, /^x-pack\/test\/security_solution_cypress/, ])) || GITHUB_PR_LABELS.includes('ci:all-cypress-suites') @@ -271,6 +272,7 @@ const uploadPipeline = (pipelineContent: string | object) => { /^x-pack\/packages\/security-solution/, /^x-pack\/packages\/kbn-elastic-assistant/, /^x-pack\/packages\/kbn-elastic-assistant-common/, + /^x-pack\/test\/functional\/es_archives\/security_solution/, /^x-pack\/test\/security_solution_cypress/, ])) || GITHUB_PR_LABELS.includes('ci:all-cypress-suites') diff --git a/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts b/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts index 231977979c414..2dcfcbce7551d 100644 --- a/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts +++ b/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts @@ -28,15 +28,12 @@ function uploadTriggerStep(commitSha: string) { env: { SERVICE_COMMIT_HASH: commitSha.slice(0, 12), REMOTE_SERVICE_CONFIG, + ...(IS_DRY_RUN ? { DRY_RUN: 'true' } : {}), }, }, }; - if (IS_DRY_RUN) { - console.log('Dry run: skipping upload of GPCTL trigger step. Step definition:', triggerStep); - } else { - buildkite.uploadSteps([triggerStep]); - } + buildkite.uploadSteps([triggerStep]); } main() diff --git a/.buildkite/scripts/steps/artifacts/docker_image.sh b/.buildkite/scripts/steps/artifacts/docker_image.sh index 0706a21dd4274..1002c9f798c74 100755 --- a/.buildkite/scripts/steps/artifacts/docker_image.sh +++ b/.buildkite/scripts/steps/artifacts/docker_image.sh @@ -136,6 +136,7 @@ steps: SERVICE_COMMIT_HASH: "$GIT_ABBREV_COMMIT" SERVICE: kibana REMOTE_SERVICE_CONFIG: https://raw.githubusercontent.com/elastic/serverless-gitops/main/gen/gpctl/kibana/dev.yaml + DRY_RUN: "${DRY_RUN:-false}" EOF else diff --git a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh index ebf9e28d2c9ea..75896c687705d 100755 --- a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh +++ b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh @@ -15,7 +15,7 @@ OUTPUT_DIR="${KIBANA_DIR}/${OUTPUT_REL}" .buildkite/scripts/bootstrap.sh echo "--- Extract APM metrics" -for journey in x-pack/performance/journeys/*; do +for journey in x-pack/performance/journeys_e2e/*; do echo "Looking for journey=${journey} and BUILD_ID=${BUILD_ID} in APM traces" node scripts/extract_performance_testing_dataset \ diff --git a/.buildkite/scripts/steps/serverless/build_and_deploy.sh b/.buildkite/scripts/steps/serverless/build_and_deploy.sh index 8553cb57fb700..c346bf11a3ada 100644 --- a/.buildkite/scripts/steps/serverless/build_and_deploy.sh +++ b/.buildkite/scripts/steps/serverless/build_and_deploy.sh @@ -52,6 +52,20 @@ deploy() { -XGET &>> $DEPLOY_LOGS PROJECT_ID=$(jq -r --slurp '[.[0].items[] | select(.name == "'$PROJECT_NAME'")] | .[0].id' $DEPLOY_LOGS) + if is_pr_with_label "ci:project-redeploy"; then + if [ -z "${PROJECT_ID}" ]; then + echo "No project to remove" + else + echo "Shutting down previous project..." + curl -s \ + -H "Authorization: ApiKey $PROJECT_API_KEY" \ + -H "Content-Type: application/json" \ + "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}/${PROJECT_ID}" \ + -XDELETE > /dev/null + PROJECT_ID='null' + fi + fi + if [ -z "${PROJECT_ID}" ] || [ "$PROJECT_ID" = 'null' ]; then echo "Creating project..." curl -s \ diff --git a/.eslintrc.js b/.eslintrc.js index 2c58a2aebbea3..1ec3718ec74bc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -911,19 +911,7 @@ module.exports = { { files: [ 'x-pack/plugins/aiops/**/*.tsx', - 'x-pack/plugins/infra/**/*.tsx', - 'x-pack/plugins/observability_solution/apm/**/*.tsx', - 'x-pack/plugins/observability_solution/dataset_quality/**/*.tsx', - 'x-pack/plugins/observability_solution/exploratory_view/**/*.tsx', - 'x-pack/plugins/observability_solution/infra/**/*.tsx', - 'x-pack/plugins/observability_solution/observability/**/*.tsx', - 'x-pack/plugins/observability_solution/observability_ai_assistant/**/*.tsx', - 'x-pack/plugins/observability_solution/observability_onboarding/**/*.tsx', - 'x-pack/plugins/observability_solution/observability_shared/**/*.tsx', - 'x-pack/plugins/observability_solution/profiling/**/*.tsx', - 'x-pack/plugins/observability_solution/synthetics/**/*.tsx', - 'x-pack/plugins/observability_solution/uptime/**/*.tsx', - 'x-pack/plugins/observability_solution/ux/**/*.tsx', + 'x-pack/plugins/observability_solution/**/*.tsx', 'src/plugins/ai_assistant_management/**/*.tsx', ], rules: { @@ -932,16 +920,7 @@ module.exports = { }, { files: [ - 'x-pack/plugins/observability_solution/apm/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/exploratory_view/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/infra/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/observability/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/observability_ai_assistant/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/observability_onboarding/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/observability_shared/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/profiling/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/synthetics/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'x-pack/plugins/observability_solution/ux/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', + 'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', 'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', ], rules: { diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index aee28a182c004..38ce02595c282 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -277,6 +277,13 @@ packages/core/saved-objects/core-saved-objects-server @elastic/kibana-core packages/core/saved-objects/core-saved-objects-server-internal @elastic/kibana-core packages/core/saved-objects/core-saved-objects-server-mocks @elastic/kibana-core packages/core/saved-objects/core-saved-objects-utils-server @elastic/kibana-core +packages/core/security/core-security-browser @elastic/kibana-core +packages/core/security/core-security-browser-internal @elastic/kibana-core +packages/core/security/core-security-browser-mocks @elastic/kibana-core +packages/core/security/core-security-common @elastic/kibana-core @elastic/kibana-security +packages/core/security/core-security-server @elastic/kibana-core +packages/core/security/core-security-server-internal @elastic/kibana-core +packages/core/security/core-security-server-mocks @elastic/kibana-core packages/core/status/core-status-common @elastic/kibana-core packages/core/status/core-status-common-internal @elastic/kibana-core packages/core/status/core-status-server @elastic/kibana-core @@ -488,6 +495,7 @@ src/plugins/kibana_usage_collection @elastic/kibana-core src/plugins/kibana_utils @elastic/appex-sharedux x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture packages/kbn-language-documentation-popover @elastic/kibana-visualizations +x-pack/examples/lens_config_builder_example @elastic/kibana-visualizations packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team @elastic/kibana-visualizations packages/kbn-lens-formula-docs @elastic/kibana-visualizations x-pack/examples/lens_embeddable_inline_editing_example @elastic/kibana-visualizations @@ -776,6 +784,8 @@ packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/kbn-shared-ux-utility @elastic/appex-sharedux x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team x-pack/plugins/snapshot_restore @elastic/platform-deployment-management +packages/solution-nav/es @elastic/appex-sharedux +packages/solution-nav/oblt @elastic/appex-sharedux packages/kbn-some-dev-log @elastic/kibana-operations packages/kbn-sort-package-json @elastic/kibana-operations packages/kbn-sort-predicates @elastic/kibana-visualizations @@ -1056,7 +1066,6 @@ x-pack/plugins/observability_solution/infra/server/lib/alerting @elastic/obs-ux- /x-pack/test/functional/apps/monitoring @elastic/obs-ux-infra_services-team @elastic/stack-monitoring /x-pack/test/api_integration/apis/monitoring @elastic/obs-ux-infra_services-team @elastic/stack-monitoring /x-pack/test/api_integration/apis/monitoring_collection @elastic/obs-ux-infra_services-team @elastic/stack-monitoring -/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer @elastic/obs-ux-logs-team # Fleet /fleet_packages.json @elastic/fleet @@ -1087,7 +1096,11 @@ x-pack/plugins/observability_solution/infra/server/lib/alerting @elastic/obs-ux- # Logs /x-pack/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team +/x-pack/test/dataset_quality_api_integration @elastic/obs-ux-logs-team /x-pack/test/functional/apps/observability_logs_explorer @elastic/obs-ux-logs-team +/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer @elastic/obs-ux-logs-team +/x-pack/test/functional/apps/dataset_quality @elastic/obs-ux-logs-team +/x-pack/test_serverless/functional/test_suites/observability/dataset_quality @elastic/obs-ux-logs-team # Observability onboarding tour /x-pack/plugins/observability_solution/observability_shared/public/components/tour @elastic/platform-onboarding @@ -1539,8 +1552,6 @@ x-pack/plugins/security_solution/server/lib/security_integrations @elastic/secur **/*.scss @elastic/kibana-design # Observability design -/x-pack/plugins/observability_solution/apm/**/*.scss @elastic/observability-design -/x-pack/plugins/observability_solution/infra/**/*.scss @elastic/observability-design /x-pack/plugins/fleet/**/*.scss @elastic/observability-design /x-pack/plugins/monitoring/**/*.scss @elastic/observability-design @@ -1552,7 +1563,6 @@ x-pack/plugins/security_solution/server/lib/security_integrations @elastic/secur /x-pack/plugins/security_solution/**/*.scss @elastic/security-design /x-pack/plugins/security_solution_ess/**/*.scss @elastic/security-design /x-pack/plugins/security_solution_serverless/**/*.scss @elastic/security-design -/x-pack/plugins/observability_solution/logs_explorer/**/*.scss @elastic/observability-design # Logstash #CC# /x-pack/plugins/logstash/ @elastic/logstash diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index 49d89e52abb0c..79bc29dc29b13 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -22,3 +22,9 @@ - 'x-pack/test/fleet_api_integration/**/*.*' - 'Team:obs-ux-management': - 'x-pack/plugins/observability_solution/observability/**/*.*' +- 'Team:obs-knowledge': + - 'src/plugins/ai_assistant_management/observability/**/*.*' + - 'x-pack/plugins/observability_solution/observability_ai_assistant/**/*.*' + - 'x-pack/plugins/observability_solution/observability_ai_assistant_app/**/*.*' + - 'x-pack/test/observability_ai_assistant_api_integration/**/*.*' + - 'x-pack/test/observability_ai_assistant_functional/**/*.*' diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 50ab303a28480..c73b83ad93e39 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index d82a4a5358eec..5ea01f3da2ed1 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-12 +date: 2024-03-18 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 4a81bda1a8328..5747b266405ed 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-12 +date: 2024-03-18 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 df08b366096b1..32990ea9ddcc7 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-12 +date: 2024-03-18 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 80a171590d1a0..704ada4c01add 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index e6573ccf6ac59..332752c51fb2d 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-12 +date: 2024-03-18 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 bfdec5f3ee2ed..b7cac2784d108 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -418,7 +418,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_service_summary\" | \"POST /internal/apm/assistant/get_correlation_values\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/transactions/flamegraph\" | \"GET /internal/apm/services/{serviceName}/transactions/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_service_summary\" | \"POST /internal/apm/assistant/get_correlation_values\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" ], "path": "x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -523,7 +523,7 @@ "SavedApmCustomDashboard", ">; } & ", "APMRouteCreateOptions", - "; \"GET /internal/apm/services/{serviceName}/transactions/functions\": { endpoint: \"GET /internal/apm/services/{serviceName}/transactions/functions\"; params?: ", + "; \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\": { endpoint: \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -533,6 +533,12 @@ "IntersectionC", "<[", "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>, ", + "TypeC", "<{ environment: ", "UnionC", "<[", @@ -553,25 +559,51 @@ }, ">]>; }>, ", "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; startIndex: ", + "<{ documentType: ", + "UnionC", + "<[", + "LiteralC", + "<", + "ApmDocumentType", + ".ServiceTransactionMetric>, ", + "LiteralC", + "<", + "ApmDocumentType", + ".TransactionMetric>, ", + "LiteralC", + "<", + "ApmDocumentType", + ".TransactionEvent>]>; rollupInterval: ", + "UnionC", + "<[", + "LiteralC", + "<", + "RollupInterval", + ".OneMinute>, ", + "LiteralC", + "<", + "RollupInterval", + ".TenMinutes>, ", + "LiteralC", + "<", + "RollupInterval", + ".SixtyMinutes>, ", + "LiteralC", + "<", + "RollupInterval", + ".None>]>; }>, ", + "TypeC", + "<{ startIndex: ", "Type", "; endIndex: ", "Type", - "; transactionName: ", - "StringC", - "; transactionType: ", - "StringC", - "; }>, ", + "; }>, ", "TypeC", "<{ kuery: ", "StringC", "; }>]>; }> | undefined; handler: ({}: ", "APMRouteHandlerResources", - " & { params: { path: { serviceName: string; }; query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + " & { params: { path: { serviceName: string; }; query: { start: number; end: number; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "; } & { start: number; end: number; startIndex: number; endIndex: number; transactionName: string; transactionType: string; } & { kuery: string; }; }; }) => Promise<", + ">; } & { documentType: ", + "ApmDocumentType", + ".TransactionMetric | ", + "ApmDocumentType", + ".ServiceTransactionMetric | ", + "ApmDocumentType", + ".TransactionEvent; rollupInterval: ", + "RollupInterval", + "; } & { startIndex: number; endIndex: number; } & { kuery: string; }; }; }) => Promise<{ functions: ", { "pluginId": "@kbn/profiling-utils", "scope": "common", @@ -589,9 +629,9 @@ "section": "def-common.TopNFunctions", "text": "TopNFunctions" }, - " | undefined>; } & ", + "; hostNames: string[]; } | undefined>; } & ", "APMRouteCreateOptions", - "; \"GET /internal/apm/services/{serviceName}/transactions/flamegraph\": { endpoint: \"GET /internal/apm/services/{serviceName}/transactions/flamegraph\"; params?: ", + "; \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\": { endpoint: \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -601,9 +641,11 @@ "IntersectionC", "<[", "TypeC", - "<{ kuery: ", - "StringC", - "; }>, ", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>, ", "TypeC", "<{ environment: ", "UnionC", @@ -625,17 +667,45 @@ }, ">]>; }>, ", "TypeC", - "<{ transactionName: ", - "StringC", - "; start: ", - "Type", - "; end: ", - "Type", - "; transactionType: ", + "<{ documentType: ", + "UnionC", + "<[", + "LiteralC", + "<", + "ApmDocumentType", + ".ServiceTransactionMetric>, ", + "LiteralC", + "<", + "ApmDocumentType", + ".TransactionMetric>, ", + "LiteralC", + "<", + "ApmDocumentType", + ".TransactionEvent>]>; rollupInterval: ", + "UnionC", + "<[", + "LiteralC", + "<", + "RollupInterval", + ".OneMinute>, ", + "LiteralC", + "<", + "RollupInterval", + ".TenMinutes>, ", + "LiteralC", + "<", + "RollupInterval", + ".SixtyMinutes>, ", + "LiteralC", + "<", + "RollupInterval", + ".None>]>; }>, ", + "TypeC", + "<{ kuery: ", "StringC", "; }>]>; }> | undefined; handler: ({}: ", "APMRouteHandlerResources", - " & { params: { path: { serviceName: string; }; query: { kuery: string; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + " & { params: { path: { serviceName: string; }; query: { start: number; end: number; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "; } & { transactionName: string; start: number; end: number; transactionType: string; }; }; }) => Promise<", + ">; } & { documentType: ", + "ApmDocumentType", + ".TransactionMetric | ", + "ApmDocumentType", + ".ServiceTransactionMetric | ", + "ApmDocumentType", + ".TransactionEvent; rollupInterval: ", + "RollupInterval", + "; } & { kuery: string; }; }; }) => Promise<{ flamegraph: ", { "pluginId": "@kbn/profiling-utils", "scope": "common", @@ -653,7 +731,7 @@ "section": "def-common.BaseFlameGraph", "text": "BaseFlameGraph" }, - " | undefined>; } & ", + "; hostNames: string[]; } | undefined>; } & ", "APMRouteCreateOptions", "; \"GET /internal/apm/services/{serviceName}/profiling/functions\": { endpoint: \"GET /internal/apm/services/{serviceName}/profiling/functions\"; params?: ", "TypeC", @@ -665,12 +743,6 @@ "IntersectionC", "<[", "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; }>, ", - "TypeC", "<{ environment: ", "UnionC", "<[", @@ -690,52 +762,28 @@ "text": "NonEmptyStringBrand" }, ">]>; }>, ", + "PartialC", + "<{ transactionName: ", + "StringC", + "; }>, ", "TypeC", - "<{ documentType: ", - "UnionC", - "<[", - "LiteralC", - "<", - "ApmDocumentType", - ".ServiceTransactionMetric>, ", - "LiteralC", - "<", - "ApmDocumentType", - ".TransactionMetric>, ", - "LiteralC", - "<", - "ApmDocumentType", - ".TransactionEvent>]>; rollupInterval: ", - "UnionC", - "<[", - "LiteralC", - "<", - "RollupInterval", - ".OneMinute>, ", - "LiteralC", - "<", - "RollupInterval", - ".TenMinutes>, ", - "LiteralC", - "<", - "RollupInterval", - ".SixtyMinutes>, ", - "LiteralC", - "<", - "RollupInterval", - ".None>]>; }>, ", - "TypeC", - "<{ startIndex: ", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; startIndex: ", "Type", "; endIndex: ", "Type", - "; }>, ", + "; transactionType: ", + "StringC", + "; }>, ", "TypeC", "<{ kuery: ", "StringC", "; }>]>; }> | undefined; handler: ({}: ", "APMRouteHandlerResources", - " & { params: { path: { serviceName: string; }; query: { start: number; end: number; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + " & { params: { path: { serviceName: string; }; query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "; } & { documentType: ", - "ApmDocumentType", - ".TransactionMetric | ", - "ApmDocumentType", - ".ServiceTransactionMetric | ", - "ApmDocumentType", - ".TransactionEvent; rollupInterval: ", - "RollupInterval", - "; } & { startIndex: number; endIndex: number; } & { kuery: string; }; }; }) => Promise<{ functions: ", + ">; } & { transactionName?: string | undefined; } & { start: number; end: number; startIndex: number; endIndex: number; transactionType: string; } & { kuery: string; }; }; }) => Promise<", { "pluginId": "@kbn/profiling-utils", "scope": "common", @@ -761,7 +801,7 @@ "section": "def-common.TopNFunctions", "text": "TopNFunctions" }, - "; hostNames: string[]; } | undefined>; } & ", + " | undefined>; } & ", "APMRouteCreateOptions", "; \"GET /internal/apm/profiling/status\": { endpoint: \"GET /internal/apm/profiling/status\"; params?: undefined; handler: ({}: ", "APMRouteHandlerResources", @@ -777,11 +817,9 @@ "IntersectionC", "<[", "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; }>, ", + "<{ kuery: ", + "StringC", + "; }>, ", "TypeC", "<{ environment: ", "UnionC", @@ -802,46 +840,20 @@ "text": "NonEmptyStringBrand" }, ">]>; }>, ", + "PartialC", + "<{ transactionName: ", + "StringC", + "; }>, ", "TypeC", - "<{ documentType: ", - "UnionC", - "<[", - "LiteralC", - "<", - "ApmDocumentType", - ".ServiceTransactionMetric>, ", - "LiteralC", - "<", - "ApmDocumentType", - ".TransactionMetric>, ", - "LiteralC", - "<", - "ApmDocumentType", - ".TransactionEvent>]>; rollupInterval: ", - "UnionC", - "<[", - "LiteralC", - "<", - "RollupInterval", - ".OneMinute>, ", - "LiteralC", - "<", - "RollupInterval", - ".TenMinutes>, ", - "LiteralC", - "<", - "RollupInterval", - ".SixtyMinutes>, ", - "LiteralC", - "<", - "RollupInterval", - ".None>]>; }>, ", - "TypeC", - "<{ kuery: ", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; transactionType: ", "StringC", "; }>]>; }> | undefined; handler: ({}: ", "APMRouteHandlerResources", - " & { params: { path: { serviceName: string; }; query: { start: number; end: number; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + " & { params: { path: { serviceName: string; }; query: { kuery: string; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "; } & { documentType: ", - "ApmDocumentType", - ".TransactionMetric | ", - "ApmDocumentType", - ".ServiceTransactionMetric | ", - "ApmDocumentType", - ".TransactionEvent; rollupInterval: ", - "RollupInterval", - "; } & { kuery: string; }; }; }) => Promise<{ flamegraph: ", + ">; } & { transactionName?: string | undefined; } & { start: number; end: number; transactionType: string; }; }; }) => Promise<", { "pluginId": "@kbn/profiling-utils", "scope": "common", @@ -867,7 +871,7 @@ "section": "def-common.BaseFlameGraph", "text": "BaseFlameGraph" }, - "; hostNames: string[]; } | undefined>; } & ", + " | undefined>; } & ", "APMRouteCreateOptions", "; \"GET /internal/apm/assistant/get_downstream_dependencies\": { endpoint: \"GET /internal/apm/assistant/get_downstream_dependencies\"; params?: ", "TypeC", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 10ae0fb6b8486..88aace98c3724 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index c056627c2f801..15c880836ca5c 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index c9183f850cc88..b023c9eee05d2 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 01341f087ced8..02d7fdd998619 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 3916f2b8b1436..63637c2968ea9 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 24ebae8ee75a3..4b9df9e6783c4 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index a5131360840ac..b12771bc615bb 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 0735d4bcc5750..5486641e67a1d 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index f3de1bf566643..acf84d9087541 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 22ad39518d586..f4d4914e3bed6 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index bc0f3d041c72e..bcf0845f2a1e4 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 38f80c5ce3b78..cb63ebb9cd779 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index d4c18ac67d4bd..1511dc0781c96 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 122b40461bfc3..7d73066626e3c 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index e0487776b248b..20a34191f6e19 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-03-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json index e837613960147..38d1a78dcab84 100644 --- a/api_docs/controls.devdocs.json +++ b/api_docs/controls.devdocs.json @@ -181,7 +181,7 @@ "label": "dispatch", "description": [], "signature": [ - "{ setLastSavedInput: (payload: ", + "{ setControlWithInvalidSelectionsId: (payload: string | undefined) => void; setLastSavedInput: (payload: ", { "pluginId": "controls", "scope": "common", @@ -189,7 +189,11 @@ "section": "def-common.PersistableControlGroupInput", "text": "PersistableControlGroupInput" }, - ") => void; setControlWithInvalidSelectionsId: (payload: string | undefined) => void; setControlStyle: (payload: ", + " | undefined) => void; setLastSavedFilters: (payload: ", + "ControlGroupFilterOutput", + " | undefined) => void; setUnpublishedFilters: (payload: ", + "ControlGroupFilterOutput", + " | undefined) => void; setControlStyle: (payload: ", "ControlStyle", ") => void; setChainingSystem: (payload: ", "ControlGroupChainingSystem", @@ -540,6 +544,52 @@ ], "returnComment": [] }, + { + "parentPluginId": "controls", + "id": "def-public.ControlGroupContainer.setSavedState", + "type": "Function", + "tags": [], + "label": "setSavedState", + "description": [], + "signature": [ + "(lastSavedInput: ", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.PersistableControlGroupInput", + "text": "PersistableControlGroupInput" + }, + ") => void" + ], + "path": "src/plugins/controls/public/control_group/embeddable/control_group_container.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "controls", + "id": "def-public.ControlGroupContainer.setSavedState.$1", + "type": "Object", + "tags": [], + "label": "lastSavedInput", + "description": [], + "signature": [ + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.PersistableControlGroupInput", + "text": "PersistableControlGroupInput" + } + ], + "path": "src/plugins/controls/public/control_group/embeddable/control_group_container.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "controls", "id": "def-public.ControlGroupContainer.resetToLastSavedState", @@ -588,7 +638,7 @@ "section": "def-common.ControlGroupInput", "text": "ControlGroupInput" }, - ">, \"id\" | \"controlStyle\" | \"ignoreParentSettings\" | \"panels\" | \"chainingSystem\">" + ">, \"id\" | \"controlStyle\" | \"ignoreParentSettings\" | \"panels\" | \"chainingSystem\" | \"showApplySelections\">" ], "path": "src/plugins/controls/public/control_group/embeddable/control_group_container.tsx", "deprecated": false, @@ -1164,6 +1214,40 @@ ], "returnComment": [] }, + { + "parentPluginId": "controls", + "id": "def-public.ControlGroupContainer.publishFilters", + "type": "Function", + "tags": [], + "label": "publishFilters", + "description": [], + "signature": [ + "({ filters, timeslice }: ", + "ControlGroupFilterOutput", + ") => void" + ], + "path": "src/plugins/controls/public/control_group/embeddable/control_group_container.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "controls", + "id": "def-public.ControlGroupContainer.publishFilters.$1", + "type": "CompoundType", + "tags": [], + "label": "{ filters, timeslice }", + "description": [], + "signature": [ + "ControlGroupFilterOutput" + ], + "path": "src/plugins/controls/public/control_group/embeddable/control_group_container.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "controls", "id": "def-public.ControlGroupContainer.createNewPanelState", @@ -2026,7 +2110,10 @@ "text": "ControlOutput" }, ", any> implements ", - "IClearableControl" + "IClearableControl", + "<", + "ControlInput", + ">" ], "path": "src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx", "deprecated": false, @@ -2344,6 +2431,56 @@ ], "returnComment": [] }, + { + "parentPluginId": "controls", + "id": "def-public.OptionsListEmbeddable.selectionsToFilters", + "type": "Function", + "tags": [], + "label": "selectionsToFilters", + "description": [], + "signature": [ + "(input: Partial<", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.OptionsListEmbeddableInput", + "text": "OptionsListEmbeddableInput" + }, + ">) => Promise<", + "ControlFilterOutput", + ">" + ], + "path": "src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "controls", + "id": "def-public.OptionsListEmbeddable.selectionsToFilters.$1", + "type": "Object", + "tags": [], + "label": "input", + "description": [], + "signature": [ + "Partial<", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.OptionsListEmbeddableInput", + "text": "OptionsListEmbeddableInput" + }, + ">" + ], + "path": "src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "controls", "id": "def-public.OptionsListEmbeddable.clearSelections", @@ -3158,7 +3295,10 @@ "text": "ControlOutput" }, ", any> implements ", - "IClearableControl" + "IClearableControl", + "<", + "ControlInput", + ">" ], "path": "src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx", "deprecated": false, @@ -3474,6 +3614,56 @@ ], "returnComment": [] }, + { + "parentPluginId": "controls", + "id": "def-public.RangeSliderEmbeddable.selectionsToFilters", + "type": "Function", + "tags": [], + "label": "selectionsToFilters", + "description": [], + "signature": [ + "(input: Partial<", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.RangeSliderEmbeddableInput", + "text": "RangeSliderEmbeddableInput" + }, + ">) => Promise<", + "ControlFilterOutput", + ">" + ], + "path": "src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "controls", + "id": "def-public.RangeSliderEmbeddable.selectionsToFilters.$1", + "type": "Object", + "tags": [], + "label": "input", + "description": [], + "signature": [ + "Partial<", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.RangeSliderEmbeddableInput", + "text": "RangeSliderEmbeddableInput" + }, + ">" + ], + "path": "src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "controls", "id": "def-public.RangeSliderEmbeddable.clearSelections", @@ -4383,69 +4573,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "controls", - "id": "def-public.CommonControlOutput", - "type": "Interface", - "tags": [], - "label": "CommonControlOutput", - "description": [], - "path": "src/plugins/controls/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "controls", - "id": "def-public.CommonControlOutput.filters", - "type": "Array", - "tags": [], - "label": "filters", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined" - ], - "path": "src/plugins/controls/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "controls", - "id": "def-public.CommonControlOutput.dataViewId", - "type": "string", - "tags": [], - "label": "dataViewId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/controls/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "controls", - "id": "def-public.CommonControlOutput.timeslice", - "type": "Object", - "tags": [], - "label": "timeslice", - "description": [], - "signature": [ - "[number, number] | undefined" - ], - "path": "src/plugins/controls/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "controls", "id": "def-public.ControlEditorProps", @@ -4671,6 +4798,20 @@ "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "controls", + "id": "def-public.ControlGroupInput.showApplySelections", + "type": "CompoundType", + "tags": [], + "label": "showApplySelections", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/controls/common/control_group/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -5610,6 +5751,24 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "controls", + "id": "def-public.CommonControlOutput", + "type": "Type", + "tags": [], + "label": "CommonControlOutput", + "description": [], + "signature": [ + "ControlFilterOutput", + " & ", + "ControlTimesliceOutput", + " & { dataViewId?: string | undefined; }" + ], + "path": "src/plugins/controls/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "controls", "id": "def-public.CONTROL_GROUP_TYPE", @@ -5640,7 +5799,9 @@ "section": "def-public.IEmbeddable", "text": "IEmbeddable" }, - " & { isChained?: (() => boolean) | undefined; renderPrepend?: (() => React.ReactNode) | undefined; }" + " & { isChained?: (() => boolean) | undefined; renderPrepend?: (() => React.ReactNode) | undefined; selectionsToFilters?: ((input: Partial) => Promise<", + "ControlGroupFilterOutput", + ">) | undefined; }" ], "path": "src/plugins/controls/public/types.ts", "deprecated": false, @@ -5812,15 +5973,11 @@ "section": "def-public.ContainerOutput", "text": "ContainerOutput" }, - " & Omit<", - { - "pluginId": "controls", - "scope": "public", - "docId": "kibControlsPluginApi", - "section": "def-public.CommonControlOutput", - "text": "CommonControlOutput" - }, - ", \"dataViewId\"> & { dataViewIds: string[]; }" + " & ", + "ControlFilterOutput", + " & ", + "ControlTimesliceOutput", + " & { dataViewIds: string[]; }" ], "path": "src/plugins/controls/public/control_group/types.ts", "deprecated": false, @@ -5866,7 +6023,9 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; timeslice?: [number, number] | undefined; controlStyle?: ", + " | undefined; timeslice?: ", + "TimeSlice", + " | undefined; controlStyle?: ", "ControlStyle", " | undefined; ignoreParentSettings?: ", "ParentIgnoreSettings", @@ -5893,13 +6052,10 @@ "text": "EmbeddableOutput" }, " & ", - { - "pluginId": "controls", - "scope": "public", - "docId": "kibControlsPluginApi", - "section": "def-public.CommonControlOutput", - "text": "CommonControlOutput" - } + "ControlFilterOutput", + " & ", + "ControlTimesliceOutput", + " & { dataViewId?: string | undefined; }" ], "path": "src/plugins/controls/public/types.ts", "deprecated": false, @@ -5975,7 +6131,9 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; timeslice?: [number, number] | undefined; controlStyle?: ", + " | undefined; timeslice?: ", + "TimeSlice", + " | undefined; controlStyle?: ", "ControlStyle", " | undefined; ignoreParentSettings?: ", "ParentIgnoreSettings", @@ -6466,7 +6624,7 @@ "ParentIgnoreSettings", " | undefined; chainingSystem: ", "ControlGroupChainingSystem", - "; } | undefined" + "; showApplySelections?: boolean | undefined; } | undefined" ], "path": "src/plugins/controls/common/control_group/control_group_persistence.ts", "deprecated": false, @@ -6571,7 +6729,7 @@ "section": "def-common.PersistableControlGroupInput", "text": "PersistableControlGroupInput" }, - " | undefined) => boolean" + " | undefined, compareSelections?: boolean) => boolean" ], "path": "src/plugins/controls/common/control_group/control_group_persistence.ts", "deprecated": false, @@ -6620,6 +6778,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "controls", + "id": "def-common.persistableControlGroupInputIsEqual.$3", + "type": "boolean", + "tags": [], + "label": "compareSelections", + "description": [], + "signature": [ + "boolean" + ], + "path": "src/plugins/controls/common/control_group/control_group_persistence.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [], @@ -6905,6 +7078,20 @@ "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "controls", + "id": "def-common.ControlGroupInput.showApplySelections", + "type": "CompoundType", + "tags": [], + "label": "showApplySelections", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/controls/common/control_group/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -7438,7 +7625,9 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; timeslice?: [number, number] | undefined; controlStyle?: ", + " | undefined; timeslice?: ", + "TimeSlice", + " | undefined; controlStyle?: ", "ControlStyle", " | undefined; ignoreParentSettings?: ", "ParentIgnoreSettings", @@ -7544,7 +7733,7 @@ }, "; chainingSystem: ", "ControlGroupChainingSystem", - "; }" + "; showApplySelections?: boolean | undefined; }" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, @@ -7561,7 +7750,7 @@ "\nOnly parts of the Control Group Input should be persisted" ], "signature": [ - "(\"controlStyle\" | \"ignoreParentSettings\" | \"panels\" | \"chainingSystem\")[]" + "(\"controlStyle\" | \"ignoreParentSettings\" | \"panels\" | \"chainingSystem\" | \"showApplySelections\")[]" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 144462cace376..27ab9507b8e6c 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.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 | |-------------------|-----------|------------------------|-----------------| -| 332 | 0 | 324 | 16 | +| 340 | 0 | 332 | 20 | ## Client diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 6fe29708eaeab..92e0d915e35ba 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-12 +date: 2024-03-18 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 f82795fb1b29f..bb7b6e100c934 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -209,8 +209,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { @@ -225,8 +225,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">>>, options: ", { @@ -263,8 +263,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { @@ -279,8 +279,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">>>" ], @@ -689,8 +689,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { @@ -2012,25 +2012,17 @@ "label": "DashboardAttributes", "description": [], "signature": [ - "{ controlGroupInput?: ", + "Omit<", { - "pluginId": "controls", - "scope": "common", - "docId": "kibControlsPluginApi", - "section": "def-common.RawControlGroupAttributes", - "text": "RawControlGroupAttributes" - }, - " | undefined; refreshInterval?: ", - { - "pluginId": "data", + "pluginId": "dashboard", "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardAttributes", + "text": "DashboardAttributes" }, - " | undefined; timeRestore: boolean; optionsJSON?: string | undefined; useMargins?: boolean | undefined; description: string; panelsJSON: string; timeFrom?: string | undefined; version: number; timeTo?: string | undefined; title: string; kibanaSavedObjectMeta: { searchSourceJSON: string; }; }" + ", \"controlGroupInput\"> & { controlGroupInput?: ControlGroupAttributesV2 | undefined; }" ], - "path": "src/plugins/dashboard/common/content_management/v1/types.ts", + "path": "src/plugins/dashboard/common/content_management/v2/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index d50b1d2db6297..8be738002f70d 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-12 +date: 2024-03-18 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 603b61d3cf3b0..a63570fa67d9b 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 0fb5062382407..3a451e6ef5ea7 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-12 +date: 2024-03-18 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 978a61c477aa1..f9badb263963f 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-12 +date: 2024-03-18 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 4a605c11c427d..e1011773f1058 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -1518,9 +1518,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1578,9 +1578,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1644,9 +1644,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1696,9 +1696,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1739,9 +1739,9 @@ "SearchSessionStatusDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1791,9 +1791,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1842,9 +1842,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1902,9 +1902,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1968,9 +1968,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2020,9 +2020,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2078,9 +2078,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2130,9 +2130,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2173,9 +2173,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2209,9 +2209,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2252,9 +2252,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2288,9 +2288,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2331,9 +2331,9 @@ "SearchSessionStatusDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2375,9 +2375,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 5fa7cd0f30fd0..6c6f3aeca040f 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-12 +date: 2024-03-18 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 e450ba6a42342..43d3160639e0d 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-12 +date: 2024-03-18 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 f8fb6cf19844e..89a06512fc055 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-12 +date: 2024-03-18 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 f1f9a7494f5f8..55304199c058b 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index a20b06603967c..62867688d1e55 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-12 +date: 2024-03-18 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 820eb16563e46..35fc4e85d9fb3 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-12 +date: 2024-03-18 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 def2ca3b863c7..7ed04c2cfb3de 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-12 +date: 2024-03-18 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 8311a36e4ecc2..ff4f0c12e7231 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -204,6 +204,7 @@ Safe to remove. | | savedObjects | | | serverless | | | taskManager | +| | taskManager | | | @kbn/core-saved-objects-api-browser | | | @kbn/core-saved-objects-api-browser | | | @kbn/storybook | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 48d98dffeec11..f5481db40831b 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 1bfc5643f2247..1678d8f230df5 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 2bb5e121325bd..1cb2a8fd5a391 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-12 +date: 2024-03-18 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 24cc2d271232d..f69c8adf26d6d 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-12 +date: 2024-03-18 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 2aba0640673b5..527798d97384d 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-12 +date: 2024-03-18 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 7143b8465dcc7..a9d8bdc23e997 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-12 +date: 2024-03-18 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 c4d3736d79275..807dfdfa8fd50 100644 --- a/api_docs/elastic_assistant.devdocs.json +++ b/api_docs/elastic_assistant.devdocs.json @@ -1499,7 +1499,7 @@ "label": "onNewReplacements", "description": [], "signature": [ - "((newReplacements: Record) => void) | undefined" + "((newReplacements: { value: string; uuid: string; }[]) => void) | undefined" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, @@ -1508,12 +1508,12 @@ { "parentPluginId": "elasticAssistant", "id": "def-server.AssistantToolParams.onNewReplacements.$1", - "type": "Object", + "type": "Array", "tags": [], "label": "newReplacements", "description": [], "signature": [ - "Record" + "{ value: string; uuid: string; }[]" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, @@ -1526,12 +1526,12 @@ { "parentPluginId": "elasticAssistant", "id": "def-server.AssistantToolParams.replacements", - "type": "Object", + "type": "Array", "tags": [], "label": "replacements", "description": [], "signature": [ - "Record | undefined" + "{ value: string; uuid: string; }[] | undefined" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, @@ -1552,7 +1552,7 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - "" + "" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, @@ -1639,16 +1639,61 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - "): { preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string) => Promise<{ payload: ", + "): { preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string, state?: ", + "AnomalyDetectionRuleState", + " | undefined) => Promise<{ payload: ", "AnomalyDetectionAlertPayload", "; context: ", "AnomalyDetectionAlertContext", - "; name: string; isHealthy: boolean; } | undefined>; }; } & ", + "; name: string; isHealthy: boolean; stateUpdate: ", + "AnomalyDetectionRuleState", + "; } | undefined>; }; } & ", "TrainedModelsProvider" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginSetupDependencies.taskManager", + "type": "Object", + "tags": [], + "label": "taskManager", + "description": [], + "signature": [ + { + "pluginId": "taskManager", + "scope": "server", + "docId": "kibTaskManagerPluginApi", + "section": "def-server.TaskManagerSetupContract", + "text": "TaskManagerSetupContract" + } + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginSetupDependencies.spaces", + "type": "Object", + "tags": [], + "label": "spaces", + "description": [], + "signature": [ + { + "pluginId": "spaces", + "scope": "server", + "docId": "kibSpacesPluginApi", + "section": "def-server.SpacesPluginSetup", + "text": "SpacesPluginSetup" + }, + " | undefined" + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1683,6 +1728,47 @@ "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginStartDependencies.spaces", + "type": "Object", + "tags": [], + "label": "spaces", + "description": [], + "signature": [ + { + "pluginId": "spaces", + "scope": "server", + "docId": "kibSpacesPluginApi", + "section": "def-server.SpacesPluginStart", + "text": "SpacesPluginStart" + }, + " | undefined" + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginStartDependencies.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.SecurityPluginStart", + "text": "SecurityPluginStart" + } + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index c0985d47d52b8..130b88d0b97a9 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 41 | 0 | 27 | 0 | +| 45 | 0 | 31 | 0 | ## Server diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index e6fe7d3157f46..c400ec63a8b1c 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -3039,10 +3039,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localQuery", + "id": "def-public.Embeddable.query$", "type": "Object", "tags": [], - "label": "localQuery", + "label": "query$", "description": [], "signature": [ "{ readonly value: ", @@ -3931,10 +3931,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localFilters", + "id": "def-public.Embeddable.filters$", "type": "Object", "tags": [], - "label": "localFilters", + "label": "filters$", "description": [], "signature": [ "{ readonly value: ", @@ -4868,10 +4868,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localTimeRange", + "id": "def-public.Embeddable.timeRange$", "type": "Object", "tags": [], - "label": "localTimeRange", + "label": "timeRange$", "description": [], "signature": [ "{ readonly value: ", @@ -5768,10 +5768,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.setLocalTimeRange", + "id": "def-public.Embeddable.setTimeRange", "type": "Function", "tags": [], - "label": "setLocalTimeRange", + "label": "setTimeRange", "description": [], "signature": [ "(timeRange: ", @@ -5791,7 +5791,7 @@ "children": [ { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.setLocalTimeRange.$1", + "id": "def-public.Embeddable.setTimeRange.$1", "type": "Object", "tags": [], "label": "timeRange", @@ -5806,7 +5806,7 @@ }, " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false } @@ -5927,32 +5927,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.getFallbackTimeRange", + "id": "def-public.Embeddable.isCompatibleWithUnifiedSearch", "type": "Function", "tags": [], - "label": "getFallbackTimeRange", - "description": [], - "signature": [ - "(() => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) | undefined" - ], - "path": "src/plugins/embeddable/public/lib/embeddables/embeddable.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.Embeddable.isCompatibleWithLocalUnifiedSearch", - "type": "Function", - "tags": [], - "label": "isCompatibleWithLocalUnifiedSearch", + "label": "isCompatibleWithUnifiedSearch", "description": [], "signature": [ "(() => boolean) | undefined" @@ -7712,7 +7690,7 @@ "tags": [], "label": "EmbeddablePanel", "description": [ - "\nLoads and renders a legacy embeddable." + "\nLoads and renders a legacy embeddable.\n\nAncestry chain must use 'key' attribute to reset DOM and state when embeddable changes\nFor example " ], "signature": [ "(props: ", @@ -7988,39 +7966,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.initializeReactEmbeddableUuid", - "type": "Function", - "tags": [], - "label": "initializeReactEmbeddableUuid", - "description": [], - "signature": [ - "(maybeId?: string | undefined) => string" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.initializeReactEmbeddableUuid.$1", - "type": "string", - "tags": [], - "label": "maybeId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.isContextMenuTriggerContext", @@ -8842,7 +8787,23 @@ "\nRenders a component from the React Embeddable registry into a Presentation Panel.\n\nTODO: Rename this to simply `Embeddable` when the legacy Embeddable system is removed." ], "signature": [ - "({ uuid, type, state, }: { uuid?: string | undefined; type: string; state: ", + " = ", + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.DefaultEmbeddableApi", + "text": "DefaultEmbeddableApi" + }, + ">({ maybeId, type, state, parentApi, onApiAvailable, }: { maybeId?: string | undefined; type: string; state: ", { "pluginId": "@kbn/presentation-containers", "scope": "common", @@ -8850,7 +8811,15 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - "; }) => JSX.Element" + "; parentApi?: ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" + }, + " | undefined; onApiAvailable?: ((api: ApiType) => void) | undefined; }) => JSX.Element" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -8861,7 +8830,7 @@ "id": "def-public.ReactEmbeddableRenderer.$1", "type": "Object", "tags": [], - "label": "{\n uuid,\n type,\n state,\n}", + "label": "{\n maybeId,\n type,\n state,\n parentApi,\n onApiAvailable,\n}", "description": [], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, @@ -8869,10 +8838,10 @@ "children": [ { "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableRenderer.$1.uuid", + "id": "def-public.ReactEmbeddableRenderer.$1.maybeId", "type": "string", "tags": [], - "label": "uuid", + "label": "maybeId", "description": [], "signature": [ "string | undefined" @@ -8907,79 +8876,66 @@ "section": "def-common.SerializedPanelState", "text": "SerializedPanelState" }, - "" + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.RegisterReactEmbeddable", - "type": "Function", - "tags": [], - "label": "RegisterReactEmbeddable", - "description": [ - "\nA helper function which transforms a component into an Embeddable component by forwarding a ref which\nshould be used with `useEmbeddableApiHandle` to expose an API for your component." - ], - "signature": [ - "(component: ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableRegistration", - "text": "ReactEmbeddableRegistration" - }, - ") => React.ForwardRefExoticComponent, \"key\" | \"css\"> & React.RefAttributes>" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.RegisterReactEmbeddable.$1", - "type": "Function", - "tags": [], - "label": "component", - "description": [], - "signature": [ + }, { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableRegistration", - "text": "ReactEmbeddableRegistration" + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableRenderer.$1.parentApi", + "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/react_embeddable_renderer.tsx", + "deprecated": false, + "trackAdoption": false }, - "" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableRenderer.$1.onApiAvailable", + "type": "Function", + "tags": [], + "label": "onApiAvailable", + "description": [], + "signature": [ + "((api: ApiType) => void) | undefined" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableRenderer.$1.onApiAvailable.$1", + "type": "Uncategorized", + "tags": [], + "label": "api", + "description": [], + "signature": [ + "ApiType" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] } ], "returnComment": [], @@ -8993,7 +8949,7 @@ "label": "registerReactEmbeddableFactory", "description": [], "signature": [ - " = ", { "pluginId": "embeddable", "scope": "public", @@ -9009,7 +8965,7 @@ "section": "def-public.DefaultEmbeddableApi", "text": "DefaultEmbeddableApi" }, - ">(key: string, factory: ", + ">(factory: ", { "pluginId": "embeddable", "scope": "public", @@ -9026,21 +8982,6 @@ { "parentPluginId": "embeddable", "id": "def-public.registerReactEmbeddableFactory.$1", - "type": "string", - "tags": [], - "label": "key", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.registerReactEmbeddableFactory.$2", "type": "Object", "tags": [], "label": "factory", @@ -9348,134 +9289,112 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.useEmbeddableFactory", + "id": "def-public.startTrackingEmbeddableUnsavedChanges", "type": "Function", "tags": [], - "label": "useEmbeddableFactory", + "label": "startTrackingEmbeddableUnsavedChanges", "description": [], "signature": [ - "({\n input,\n factory,\n onInputUpdated,\n}: EmbeddableRendererWithFactory) => readonly [", + "(uuid: string, parentApi: ", { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ErrorEmbeddable", - "text": "ErrorEmbeddable" - }, - " | ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.IEmbeddable", - "text": "IEmbeddable" + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" }, - ", deserializeState: (state: ", { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.EmbeddableOutput", - "text": "EmbeddableOutput" + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.SerializedPanelState", + "text": "SerializedPanelState" }, - ", any> | undefined, boolean, string | undefined]" + ") => StateType) => { unsavedChanges: ", + "BehaviorSubject", + "; resetUnsavedChanges: () => void; cleanup: () => void; } | { unsavedChanges: ", + "BehaviorSubject", + " | undefined>; resetUnsavedChanges: () => void; cleanup: () => void; }" ], - "path": "src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.tsx", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "embeddable", - "id": "def-public.useEmbeddableFactory.$1", - "type": "Object", + "id": "def-public.startTrackingEmbeddableUnsavedChanges.$1", + "type": "string", "tags": [], - "label": "{\n input,\n factory,\n onInputUpdated,\n}", + "label": "uuid", "description": [], "signature": [ - "EmbeddableRendererWithFactory" + "string" ], - "path": "src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.tsx", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableApiHandle", - "type": "Function", - "tags": [], - "label": "useReactEmbeddableApiHandle", - "description": [ - "\nPushes any API to the passed in ref. Note that any API passed in will not be rebuilt on\nsubsequent renders, so it does not support reactive variables. Instead, pass in setter functions\nand publishing subjects to allow other components to listen to changes." - ], - "signature": [ - "(apiToRegister: Omit, ref: React.ForwardedRef, uuid: string) => ApiType" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableApiHandle.$1", - "type": "Object", + "id": "def-public.startTrackingEmbeddableUnsavedChanges.$2", + "type": "CompoundType", "tags": [], - "label": "apiToRegister", + "label": "parentApi", "description": [], "signature": [ - "Omit" + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" + }, + " | undefined" ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "isRequired": false }, { "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableApiHandle.$2", - "type": "CompoundType", + "id": "def-public.startTrackingEmbeddableUnsavedChanges.$3", + "type": "Object", "tags": [], - "label": "ref", + "label": "comparators", "description": [], "signature": [ - "React.ForwardedRef" + "EmbeddableStateComparators", + "" ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true }, { "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableApiHandle.$3", - "type": "string", + "id": "def-public.startTrackingEmbeddableUnsavedChanges.$4", + "type": "Function", "tags": [], - "label": "uuid", + "label": "deserializeState", "description": [], "signature": [ - "string" + "(state: ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.SerializedPanelState", + "text": "SerializedPanelState" + }, + ") => StateType" ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", + "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -9486,112 +9405,53 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableParentApi", - "type": "Function", - "tags": [], - "label": "useReactEmbeddableParentApi", - "description": [], - "signature": [ - "() => unknown" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableUnsavedChanges", + "id": "def-public.useEmbeddableFactory", "type": "Function", "tags": [], - "label": "useReactEmbeddableUnsavedChanges", + "label": "useEmbeddableFactory", "description": [], "signature": [ - "(uuid: string, factory: ", + "({\n input,\n factory,\n onInputUpdated,\n}: EmbeddableRendererWithFactory) => readonly [", { "pluginId": "embeddable", "scope": "public", "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableFactory", - "text": "ReactEmbeddableFactory" + "section": "def-public.ErrorEmbeddable", + "text": "ErrorEmbeddable" }, - ", comparators: ", - "EmbeddableStateComparators", - ") => { unsavedChanges: ", - "BehaviorSubject", - " | undefined>; resetUnsavedChanges: () => void; }" + " | undefined, boolean, string | undefined]" ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", + "path": "src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableUnsavedChanges.$1", - "type": "string", - "tags": [], - "label": "uuid", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableUnsavedChanges.$2", - "type": "Object", - "tags": [], - "label": "factory", - "description": [], - "signature": [ - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableFactory", - "text": "ReactEmbeddableFactory" - }, - "" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.useReactEmbeddableUnsavedChanges.$3", + "id": "def-public.useEmbeddableFactory.$1", "type": "Object", "tags": [], - "label": "comparators", + "label": "{\n input,\n factory,\n onInputUpdated,\n}", "description": [], "signature": [ - "EmbeddableStateComparators", - "" + "EmbeddableRendererWithFactory" ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", + "path": "src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -9808,34 +9668,85 @@ "section": "def-public.ContainerOutput", "text": "ContainerOutput" }, - " extends ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.EmbeddableOutput", - "text": "EmbeddableOutput" - } + " extends ", + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.EmbeddableOutput", + "text": "EmbeddableOutput" + } + ], + "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.ContainerOutput.embeddableLoaded", + "type": "Object", + "tags": [], + "label": "embeddableLoaded", + "description": [], + "signature": [ + "{ [key: string]: boolean; }" + ], + "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.DefaultEmbeddableApi", + "type": "Interface", + "tags": [], + "label": "DefaultEmbeddableApi", + "description": [ + "\nThe default embeddable API that all Embeddables must implement.\n\nBefore adding anything to this interface, please be certain that it belongs in *every* embeddable." + ], + "signature": [ + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.DefaultEmbeddableApi", + "text": "DefaultEmbeddableApi" + }, + " extends ", + "DefaultPresentationPanelApi", + ",", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.HasType", + "text": "HasType" + }, + ",", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesUnsavedChanges", + "text": "PublishesUnsavedChanges" + }, + ",", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSerializableState", + "text": "HasSerializableState" + }, + "" ], - "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.ContainerOutput.embeddableLoaded", - "type": "Object", - "tags": [], - "label": "embeddableLoaded", - "description": [], - "signature": [ - "{ [key: string]: boolean; }" - ], - "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", - "deprecated": false, - "trackAdoption": false - } - ], + "children": [], "initialIsOpen": false }, { @@ -12987,7 +12898,7 @@ "section": "def-public.ReactEmbeddableFactory", "text": "ReactEmbeddableFactory" }, - "" + "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -12995,58 +12906,28 @@ "children": [ { "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableFactory.getComponent", - "type": "Function", + "id": "def-public.ReactEmbeddableFactory.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableFactory.latestVersion", + "type": "string", "tags": [], - "label": "getComponent", + "label": "latestVersion", "description": [], "signature": [ - "(initialState: StateType, maybeId?: string | undefined) => Promise<", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddable", - "text": "ReactEmbeddable" - }, - ">" + "string | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableFactory.getComponent.$1", - "type": "Uncategorized", - "tags": [], - "label": "initialState", - "description": [], - "signature": [ - "StateType" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableFactory.getComponent.$2", - "type": "string", - "tags": [], - "label": "maybeId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "embeddable", @@ -13097,17 +12978,58 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableFactory.latestVersion", - "type": "string", + "id": "def-public.ReactEmbeddableFactory.buildEmbeddable", + "type": "Function", "tags": [], - "label": "latestVersion", + "label": "buildEmbeddable", "description": [], "signature": [ - "string | undefined" + "(initialState: StateType, buildApi: (apiRegistration: ", + "ReactEmbeddableApiRegistration", + ", comparators: ", + "EmbeddableStateComparators", + ") => ApiType) => Promise<{ Component: React.FC<{}>; api: ApiType; }>" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableFactory.buildEmbeddable.$1", + "type": "Uncategorized", + "tags": [], + "label": "initialState", + "description": [], + "signature": [ + "StateType" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableFactory.buildEmbeddable.$2", + "type": "Function", + "tags": [], + "label": "buildApi", + "description": [], + "signature": [ + "(apiRegistration: ", + "ReactEmbeddableApiRegistration", + ", comparators: ", + "EmbeddableStateComparators", + ") => ApiType" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -13480,143 +13402,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.DefaultEmbeddableApi", - "type": "Type", - "tags": [], - "label": "DefaultEmbeddableApi", - "description": [ - "\nThe default embeddable API that all Embeddables must implement.\n\nBefore adding anything to this interface, please be certain that it belongs in *every* embeddable." - ], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasUniqueId", - "text": "HasUniqueId" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDataLoading", - "text": "PublishesDataLoading" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesBlockingError", - "text": "PublishesBlockingError" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDisabledActionIds", - "text": "PublishesDisabledActionIds" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasParentApi", - "text": "HasParentApi" - }, - " & ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - }, - " & { addNewPanel: (panel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ", displaySuccessMessage?: boolean | undefined) => Promise; registerPanelApi: (panelId: string, panelApi: ApiType) => void; removePanel: (panelId: string) => void; canRemovePanels?: (() => boolean) | undefined; replacePanel: (idToRemove: string, newPanel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ") => Promise; getChildIds: () => string[]; getChild: (childId: string) => unknown; } & Partial & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesViewMode", - "text": "PublishesViewMode" - }, - ">>> & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnsavedChanges", - "text": "PublishesUnsavedChanges" - }, - " & { serializeState: () => Promise<", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.SerializedPanelState", - "text": "SerializedPanelState" - }, - ">; }" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.EmbeddableFactoryDefinition", @@ -13834,38 +13619,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddable", - "type": "Type", - "tags": [], - "label": "ReactEmbeddable", - "description": [], - "signature": [ - "React.ForwardRefExoticComponent>" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddable.$1", - "type": "Uncategorized", - "tags": [], - "label": "props", - "description": [], - "signature": [ - "P" - ], - "path": "node_modules/@types/react/index.d.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.ReactEmbeddableRegistration", @@ -14226,21 +13979,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.ReactEmbeddableParentContext", - "type": "Object", - "tags": [], - "label": "ReactEmbeddableParentContext", - "description": [], - "signature": [ - "React.Context" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.shouldRefreshFilterCompareOptions", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 121d2d01e64df..e7a333e0a8c09 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-12 +date: 2024-03-18 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 | 457 | 8 | +| 553 | 1 | 451 | 9 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index a14d26c8a6bc2..c785c958e2b5a 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 282503f4bac5d..c5726a99ebeea 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 129af3207db82..a8e43be24e7e1 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-12 +date: 2024-03-18 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 e3cba54f8da1e..77be7453f940b 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-12 +date: 2024-03-18 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 dabc10a02ce2d..52c5c8263365c 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-12 +date: 2024-03-18 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 380f2b088d834..de480e74643ed 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 778ce102b418f..4e948fa813dc8 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index c8ff57599fb76..56382e4fb8042 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-12 +date: 2024-03-18 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 49c98e88ea6fb..157098a4e63ed 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-12 +date: 2024-03-18 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 e3e27d0a98a0f..7c8b9774d8896 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-12 +date: 2024-03-18 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 6c757d5df9c42..6fb00fb38c03a 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-12 +date: 2024-03-18 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 be8fd8ca8b148..d5e51d3426cbc 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-12 +date: 2024-03-18 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 a43536282c0fe..0fdb152473077 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-12 +date: 2024-03-18 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 a3d499f51486b..36099650d355a 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-12 +date: 2024-03-18 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 26c6f6ac4fd8b..97f75ceb210ad 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-12 +date: 2024-03-18 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 0f538cfc4c224..d9de7ed39c8f5 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-12 +date: 2024-03-18 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 30f523c2a534c..190270baf1329 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-12 +date: 2024-03-18 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 b61c4bf7a1cac..1b52d518217ce 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-12 +date: 2024-03-18 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 1593c84dfe068..52a05007d8263 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-12 +date: 2024-03-18 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 8e738e4f254a3..2f348b49c7846 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-12 +date: 2024-03-18 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 b97e78bcca0c8..e0b6a1aed63bc 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 1e182c0f7c175..7814df4bfd20c 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index dcd179fe9cfe6..39e7167817cf2 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-12 +date: 2024-03-18 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 4444ebdd36855..d49d7f3794d69 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-12 +date: 2024-03-18 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 10459f9487c30..0466be5c3d895 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 470000133e400..791271d8a8b5f 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-12 +date: 2024-03-18 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 159c0692ee97c..606e60fef8cf6 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-12 +date: 2024-03-18 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 ac959cede4137..bc026343a8631 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -7414,9 +7414,9 @@ }, ", options?: { spaceId?: string | undefined; id?: string | undefined; user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7571,9 +7571,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7837,9 +7837,9 @@ "NewPackagePolicyWithId", "[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7953,9 +7953,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8047,9 +8047,9 @@ }, "[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8161,9 +8161,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8650,9 +8650,9 @@ }, ", options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8768,9 +8768,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8854,9 +8854,9 @@ }, ", ids: string[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8967,9 +8967,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -9082,9 +9082,9 @@ }, ", ids: string[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -9187,9 +9187,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -19152,7 +19152,7 @@ "label": "fleet", "description": [], "signature": [ - "{ all: boolean; setup: boolean; readEnrollmentTokens: boolean; readAgentPolicies: boolean; }" + "{ all: boolean; setup: boolean; readEnrollmentTokens: boolean; readAgentPolicies: boolean; allAgentPolicies: boolean; readAgents: boolean; allAgents: boolean; readSettings: boolean; allSettings: boolean; }" ], "path": "x-pack/plugins/fleet/common/authz.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index ff80f71dc183a..14b937b5f1988 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-12 +date: 2024-03-18 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 6eed143c1e43a..b70dcfe9f95e5 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-12 +date: 2024-03-18 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 34b7bce0c2311..fb3c787ebdb7c 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 43e6a66a89aaf..cce978f0b62e7 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-12 +date: 2024-03-18 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 8d83c575ec5a4..8f38fd3730642 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-12 +date: 2024-03-18 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 e5b3cc626d6e3..9a67fe7646581 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.devdocs.json b/api_docs/index_management.devdocs.json index 73442591dbed1..a1548fef1c1c5 100644 --- a/api_docs/index_management.devdocs.json +++ b/api_docs/index_management.devdocs.json @@ -2786,13 +2786,10 @@ { "parentPluginId": "indexManagement", "id": "def-common.TemplateDeserialized.allowAutoCreate", - "type": "CompoundType", + "type": "string", "tags": [], "label": "allowAutoCreate", "description": [], - "signature": [ - "boolean | undefined" - ], "path": "x-pack/plugins/index_management/common/types/templates.ts", "deprecated": false, "trackAdoption": false diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 01afb4bbdfa5f..e5d63873ff4f4 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-12 +date: 2024-03-18 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 0787da1761a9a..72c84abacfc36 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-12 +date: 2024-03-18 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 8065d065b5055..0e4c2a57bd2bd 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-12 +date: 2024-03-18 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 acc1057d55ad0..469e4cff6314d 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-12 +date: 2024-03-18 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 4122ecabbf887..57ab531e60ffe 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-12 +date: 2024-03-18 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 8aa4d1670d968..5d61dbe7b669a 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-12 +date: 2024-03-18 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 6a61d6d2a3ece..a14bdae472766 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-12 +date: 2024-03-18 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 39f7ba7cfe781..c5388c50182aa 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-12 +date: 2024-03-18 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 6af44dc29117f..c6bf87b953e8f 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-12 +date: 2024-03-18 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 1dcf15d4bad69..56c2363f7290e 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-12 +date: 2024-03-18 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 8294b47c43f79..8424ece182735 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-12 +date: 2024-03-18 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 fc736001325e4..011f2c35b1bfb 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_alerts_as_data_utils.devdocs.json index 869b2bf876ef2..b59b0fab3cdd9 100644 --- a/api_docs/kbn_alerts_as_data_utils.devdocs.json +++ b/api_docs/kbn_alerts_as_data_utils.devdocs.json @@ -196,7 +196,7 @@ "label": "AADAlert", "description": [], "signature": [ - "({ '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & {} & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'agent.name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; labels?: unknown; 'processor.event'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.name'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'slo.id'?: string | undefined; 'slo.instanceId'?: string | undefined; 'slo.revision'?: string | number | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'agent.name'?: string | undefined; 'anomaly.bucket_span.minutes'?: string | undefined; 'anomaly.start'?: string | number | undefined; 'error.message'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'monitor.id'?: string | undefined; 'monitor.name'?: string | undefined; 'monitor.type'?: string | undefined; 'observer.geo.name'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.x509.issuer.common_name'?: string | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.subject.common_name'?: string | undefined; 'url.full'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({ '@timestamp': string | number; 'kibana.alert.ancestors': { depth: string | number; id: string; index: string; type: string; }[]; 'kibana.alert.depth': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.original_event.action': string; 'kibana.alert.original_event.category': string[]; 'kibana.alert.original_event.created': string | number; 'kibana.alert.original_event.dataset': string; 'kibana.alert.original_event.id': string; 'kibana.alert.original_event.ingested': string | number; 'kibana.alert.original_event.kind': string; 'kibana.alert.original_event.module': string; 'kibana.alert.original_event.original': string; 'kibana.alert.original_event.outcome': string; 'kibana.alert.original_event.provider': string; 'kibana.alert.original_event.sequence': string | number; 'kibana.alert.original_event.type': string[]; 'kibana.alert.original_time': string | number; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.false_positives': string[]; 'kibana.alert.rule.max_signals': (string | number)[]; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.threat.framework': string; 'kibana.alert.rule.threat.tactic.id': string; 'kibana.alert.rule.threat.tactic.name': string; 'kibana.alert.rule.threat.tactic.reference': string; 'kibana.alert.rule.threat.technique.id': string; 'kibana.alert.rule.threat.technique.name': string; 'kibana.alert.rule.threat.technique.reference': string; 'kibana.alert.rule.threat.technique.subtechnique.id': string; 'kibana.alert.rule.threat.technique.subtechnique.name': string; 'kibana.alert.rule.threat.technique.subtechnique.reference': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'ecs.version'?: string | undefined; 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'host.asset.criticality'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.ancestors.rule'?: string | undefined; 'kibana.alert.building_block_type'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.group.id'?: string | undefined; 'kibana.alert.group.index'?: number | undefined; 'kibana.alert.host.criticality_level'?: string | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.new_terms'?: string[] | undefined; 'kibana.alert.original_event.agent_id_status'?: string | undefined; 'kibana.alert.original_event.code'?: string | undefined; 'kibana.alert.original_event.duration'?: string | undefined; 'kibana.alert.original_event.end'?: string | number | undefined; 'kibana.alert.original_event.hash'?: string | undefined; 'kibana.alert.original_event.reason'?: string | undefined; 'kibana.alert.original_event.reference'?: string | undefined; 'kibana.alert.original_event.risk_score'?: number | undefined; 'kibana.alert.original_event.risk_score_norm'?: number | undefined; 'kibana.alert.original_event.severity'?: string | number | undefined; 'kibana.alert.original_event.start'?: string | number | undefined; 'kibana.alert.original_event.timezone'?: string | undefined; 'kibana.alert.original_event.url'?: string | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.building_block_type'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.immutable'?: string[] | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.rule.timeline_id'?: string[] | undefined; 'kibana.alert.rule.timeline_title'?: string[] | undefined; 'kibana.alert.rule.timestamp_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.threshold_result.cardinality'?: unknown; 'kibana.alert.threshold_result.count'?: string | number | undefined; 'kibana.alert.threshold_result.from'?: string | number | undefined; 'kibana.alert.threshold_result.terms'?: { field?: string | undefined; value?: string | undefined; }[] | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.user.criticality_level'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.alert.workflow_user'?: string | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; 'user.asset.criticality'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({ 'kibana.alert.job_id': string; } & { 'kibana.alert.anomaly_score'?: number[] | undefined; 'kibana.alert.anomaly_timestamp'?: string | number | undefined; 'kibana.alert.is_interim'?: boolean | undefined; 'kibana.alert.top_influencers'?: { influencer_field_name?: string | undefined; influencer_field_value?: string | undefined; influencer_score?: number | undefined; initial_influencer_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; timestamp?: string | number | undefined; }[] | undefined; 'kibana.alert.top_records'?: { actual?: number | undefined; by_field_name?: string | undefined; by_field_value?: string | undefined; detector_index?: number | undefined; field_name?: string | undefined; function?: string | undefined; initial_record_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; over_field_name?: string | undefined; over_field_value?: string | undefined; partition_field_name?: string | undefined; partition_field_value?: string | undefined; record_score?: number | undefined; timestamp?: string | number | undefined; typical?: number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'kibana.alert.datafeed_results'?: { datafeed_id?: string | undefined; datafeed_state?: string | undefined; job_id?: string | undefined; job_state?: string | undefined; }[] | undefined; 'kibana.alert.delayed_data_results'?: { annotation?: string | undefined; end_timestamp?: string | number | undefined; job_id?: string | undefined; missed_docs_count?: string | number | undefined; }[] | undefined; 'kibana.alert.job_errors_results'?: { errors?: unknown; job_id?: string | undefined; }[] | undefined; 'kibana.alert.mml_results'?: { job_id?: string | undefined; log_time?: string | number | undefined; memory_status?: string | undefined; model_bytes?: string | number | undefined; model_bytes_exceeded?: string | number | undefined; model_bytes_memory_limit?: string | number | undefined; peak_model_bytes?: string | number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'kibana.alert.results'?: { description?: string | undefined; health_status?: string | undefined; issues?: unknown; node_name?: string | undefined; transform_id?: string | undefined; transform_state?: string | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; })" + "({ '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & {} & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'agent.name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; labels?: unknown; 'processor.event'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.name'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'slo.id'?: string | undefined; 'slo.instanceId'?: string | undefined; 'slo.revision'?: string | number | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({} & { 'agent.name'?: string | undefined; 'anomaly.bucket_span.minutes'?: string | undefined; 'anomaly.start'?: string | number | undefined; 'error.message'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'monitor.id'?: string | undefined; 'monitor.name'?: string | undefined; 'monitor.type'?: string | undefined; 'observer.geo.name'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.x509.issuer.common_name'?: string | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.subject.common_name'?: string | undefined; 'url.full'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({ '@timestamp': string | number; 'kibana.alert.ancestors': { depth: string | number; id: string; index: string; type: string; }[]; 'kibana.alert.depth': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.original_event.action': string; 'kibana.alert.original_event.category': string[]; 'kibana.alert.original_event.created': string | number; 'kibana.alert.original_event.dataset': string; 'kibana.alert.original_event.id': string; 'kibana.alert.original_event.ingested': string | number; 'kibana.alert.original_event.kind': string; 'kibana.alert.original_event.module': string; 'kibana.alert.original_event.original': string; 'kibana.alert.original_event.outcome': string; 'kibana.alert.original_event.provider': string; 'kibana.alert.original_event.sequence': string | number; 'kibana.alert.original_event.type': string[]; 'kibana.alert.original_time': string | number; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.false_positives': string[]; 'kibana.alert.rule.max_signals': (string | number)[]; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.threat.framework': string; 'kibana.alert.rule.threat.tactic.id': string; 'kibana.alert.rule.threat.tactic.name': string; 'kibana.alert.rule.threat.tactic.reference': string; 'kibana.alert.rule.threat.technique.id': string; 'kibana.alert.rule.threat.technique.name': string; 'kibana.alert.rule.threat.technique.reference': string; 'kibana.alert.rule.threat.technique.subtechnique.id': string; 'kibana.alert.rule.threat.technique.subtechnique.name': string; 'kibana.alert.rule.threat.technique.subtechnique.reference': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'ecs.version'?: string | undefined; 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'host.asset.criticality'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.ancestors.rule'?: string | undefined; 'kibana.alert.building_block_type'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.group.id'?: string | undefined; 'kibana.alert.group.index'?: number | undefined; 'kibana.alert.host.criticality_level'?: string | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.new_terms'?: string[] | undefined; 'kibana.alert.original_event.agent_id_status'?: string | undefined; 'kibana.alert.original_event.code'?: string | undefined; 'kibana.alert.original_event.duration'?: string | undefined; 'kibana.alert.original_event.end'?: string | number | undefined; 'kibana.alert.original_event.hash'?: string | undefined; 'kibana.alert.original_event.reason'?: string | undefined; 'kibana.alert.original_event.reference'?: string | undefined; 'kibana.alert.original_event.risk_score'?: number | undefined; 'kibana.alert.original_event.risk_score_norm'?: number | undefined; 'kibana.alert.original_event.severity'?: string | number | undefined; 'kibana.alert.original_event.start'?: string | number | undefined; 'kibana.alert.original_event.timezone'?: string | undefined; 'kibana.alert.original_event.url'?: string | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.building_block_type'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.immutable'?: string[] | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.rule.timeline_id'?: string[] | undefined; 'kibana.alert.rule.timeline_title'?: string[] | undefined; 'kibana.alert.rule.timestamp_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.threshold_result.cardinality'?: unknown; 'kibana.alert.threshold_result.count'?: string | number | undefined; 'kibana.alert.threshold_result.from'?: string | number | undefined; 'kibana.alert.threshold_result.terms'?: { field?: string | undefined; value?: string | undefined; }[] | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.user.criticality_level'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.alert.workflow_user'?: string | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; 'user.asset.criticality'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }) | ({ 'kibana.alert.job_id': string; } & { 'kibana.alert.anomaly_score'?: number[] | undefined; 'kibana.alert.anomaly_timestamp'?: string | number | undefined; 'kibana.alert.is_interim'?: boolean | undefined; 'kibana.alert.top_influencers'?: { influencer_field_name?: string | undefined; influencer_field_value?: string | undefined; influencer_score?: number | undefined; initial_influencer_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; timestamp?: string | number | undefined; }[] | undefined; 'kibana.alert.top_records'?: { actual?: number | undefined; by_field_name?: string | undefined; by_field_value?: string | undefined; detector_index?: number | undefined; field_name?: string | undefined; function?: string | undefined; initial_record_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; over_field_name?: string | undefined; over_field_value?: string | undefined; partition_field_name?: string | undefined; partition_field_value?: string | undefined; record_score?: number | undefined; timestamp?: string | number | undefined; typical?: number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'kibana.alert.datafeed_results'?: { datafeed_id?: string | undefined; datafeed_state?: string | undefined; job_id?: string | undefined; job_state?: string | undefined; }[] | undefined; 'kibana.alert.delayed_data_results'?: { annotation?: string | undefined; end_timestamp?: string | number | undefined; job_id?: string | undefined; missed_docs_count?: string | number | undefined; }[] | undefined; 'kibana.alert.job_errors_results'?: { errors?: unknown; job_id?: string | undefined; }[] | undefined; 'kibana.alert.mml_results'?: { job_id?: string | undefined; log_time?: string | number | undefined; memory_status?: string | undefined; model_bytes?: string | number | undefined; model_bytes_exceeded?: string | number | undefined; model_bytes_memory_limit?: string | number | undefined; peak_model_bytes?: string | number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }) | ({} & { 'kibana.alert.results'?: { description?: string | undefined; health_status?: string | undefined; issues?: unknown; node_name?: string | undefined; transform_id?: string | undefined; transform_state?: string | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; })" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/index.ts", "deprecated": false, @@ -211,7 +211,7 @@ "label": "Alert", "description": [], "signature": [ - "{ '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{ '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/alert_schema.ts", "deprecated": false, @@ -241,7 +241,7 @@ "label": "AlertFieldMap", "description": [], "signature": [ - "{ readonly \"kibana.alert.action_group\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.case_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.duration.us\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.end\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping\": { readonly type: \"boolean\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping_history\": { readonly type: \"boolean\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.maintenance_window_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.instance.id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.last_detected\": { readonly type: \"date\"; readonly required: false; readonly array: false; }; readonly \"kibana.alert.reason\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; readonly multi_fields: ", + "{ readonly \"kibana.alert.action_group\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.case_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.duration.us\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.end\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping\": { readonly type: \"boolean\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping_history\": { readonly type: \"boolean\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.maintenance_window_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.consecutive_matches\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.instance.id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.last_detected\": { readonly type: \"date\"; readonly required: false; readonly array: false; }; readonly \"kibana.alert.reason\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; readonly multi_fields: ", { "pluginId": "@kbn/alerts-as-data-utils", "scope": "common", @@ -264,7 +264,7 @@ "label": "DefaultAlert", "description": [], "signature": [ - "{} & {} & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{} & {} & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/default_schema.ts", "deprecated": false, @@ -330,7 +330,7 @@ "label": "MlAnomalyDetectionAlert", "description": [], "signature": [ - "{ 'kibana.alert.job_id': string; } & { 'kibana.alert.anomaly_score'?: number[] | undefined; 'kibana.alert.anomaly_timestamp'?: string | number | undefined; 'kibana.alert.is_interim'?: boolean | undefined; 'kibana.alert.top_influencers'?: { influencer_field_name?: string | undefined; influencer_field_value?: string | undefined; influencer_score?: number | undefined; initial_influencer_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; timestamp?: string | number | undefined; }[] | undefined; 'kibana.alert.top_records'?: { actual?: number | undefined; by_field_name?: string | undefined; by_field_value?: string | undefined; detector_index?: number | undefined; field_name?: string | undefined; function?: string | undefined; initial_record_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; over_field_name?: string | undefined; over_field_value?: string | undefined; partition_field_name?: string | undefined; partition_field_value?: string | undefined; record_score?: number | undefined; timestamp?: string | number | undefined; typical?: number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{ 'kibana.alert.job_id': string; } & { 'kibana.alert.anomaly_score'?: number[] | undefined; 'kibana.alert.anomaly_timestamp'?: string | number | undefined; 'kibana.alert.is_interim'?: boolean | undefined; 'kibana.alert.top_influencers'?: { influencer_field_name?: string | undefined; influencer_field_value?: string | undefined; influencer_score?: number | undefined; initial_influencer_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; timestamp?: string | number | undefined; }[] | undefined; 'kibana.alert.top_records'?: { actual?: number | undefined; by_field_name?: string | undefined; by_field_value?: string | undefined; detector_index?: number | undefined; field_name?: string | undefined; function?: string | undefined; initial_record_score?: number | undefined; is_interim?: boolean | undefined; job_id?: string | undefined; over_field_name?: string | undefined; over_field_value?: string | undefined; partition_field_name?: string | undefined; partition_field_value?: string | undefined; record_score?: number | undefined; timestamp?: string | number | undefined; typical?: number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/ml_anomaly_detection_schema.ts", "deprecated": false, @@ -345,7 +345,7 @@ "label": "MlAnomalyDetectionHealthAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.datafeed_results'?: { datafeed_id?: string | undefined; datafeed_state?: string | undefined; job_id?: string | undefined; job_state?: string | undefined; }[] | undefined; 'kibana.alert.delayed_data_results'?: { annotation?: string | undefined; end_timestamp?: string | number | undefined; job_id?: string | undefined; missed_docs_count?: string | number | undefined; }[] | undefined; 'kibana.alert.job_errors_results'?: { errors?: unknown; job_id?: string | undefined; }[] | undefined; 'kibana.alert.mml_results'?: { job_id?: string | undefined; log_time?: string | number | undefined; memory_status?: string | undefined; model_bytes?: string | number | undefined; model_bytes_exceeded?: string | number | undefined; model_bytes_memory_limit?: string | number | undefined; peak_model_bytes?: string | number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{} & { 'kibana.alert.datafeed_results'?: { datafeed_id?: string | undefined; datafeed_state?: string | undefined; job_id?: string | undefined; job_state?: string | undefined; }[] | undefined; 'kibana.alert.delayed_data_results'?: { annotation?: string | undefined; end_timestamp?: string | number | undefined; job_id?: string | undefined; missed_docs_count?: string | number | undefined; }[] | undefined; 'kibana.alert.job_errors_results'?: { errors?: unknown; job_id?: string | undefined; }[] | undefined; 'kibana.alert.mml_results'?: { job_id?: string | undefined; log_time?: string | number | undefined; memory_status?: string | undefined; model_bytes?: string | number | undefined; model_bytes_exceeded?: string | number | undefined; model_bytes_memory_limit?: string | number | undefined; peak_model_bytes?: string | number | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/ml_anomaly_detection_health_schema.ts", "deprecated": false, @@ -360,7 +360,7 @@ "label": "ObservabilityApmAlert", "description": [], "signature": [ - "{} & { 'agent.name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; labels?: unknown; 'processor.event'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.name'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{} & { 'agent.name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; labels?: unknown; 'processor.event'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.name'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_apm_schema.ts", "deprecated": false, @@ -375,7 +375,7 @@ "label": "ObservabilityLogsAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_logs_schema.ts", "deprecated": false, @@ -390,7 +390,7 @@ "label": "ObservabilityMetricsAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_metrics_schema.ts", "deprecated": false, @@ -405,7 +405,7 @@ "label": "ObservabilitySloAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'slo.id'?: string | undefined; 'slo.instanceId'?: string | undefined; 'slo.revision'?: string | number | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{} & { 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'slo.id'?: string | undefined; 'slo.instanceId'?: string | undefined; 'slo.revision'?: string | number | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_slo_schema.ts", "deprecated": false, @@ -420,7 +420,7 @@ "label": "ObservabilityUptimeAlert", "description": [], "signature": [ - "{} & { 'agent.name'?: string | undefined; 'anomaly.bucket_span.minutes'?: string | undefined; 'anomaly.start'?: string | number | undefined; 'error.message'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'monitor.id'?: string | undefined; 'monitor.name'?: string | undefined; 'monitor.type'?: string | undefined; 'observer.geo.name'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.x509.issuer.common_name'?: string | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.subject.common_name'?: string | undefined; 'url.full'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{} & { 'agent.name'?: string | undefined; 'anomaly.bucket_span.minutes'?: string | undefined; 'anomaly.start'?: string | number | undefined; 'error.message'?: string | undefined; 'kibana.alert.context'?: unknown; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | number | undefined; 'kibana.alert.evaluation.values'?: (string | number)[] | undefined; 'kibana.alert.group'?: { field?: string[] | undefined; value?: string[] | undefined; }[] | undefined; 'monitor.id'?: string | undefined; 'monitor.name'?: string | undefined; 'monitor.type'?: string | undefined; 'observer.geo.name'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.x509.issuer.common_name'?: string | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.subject.common_name'?: string | undefined; 'url.full'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_uptime_schema.ts", "deprecated": false, @@ -435,7 +435,7 @@ "label": "SecurityAlert", "description": [], "signature": [ - "{ '@timestamp': string | number; 'kibana.alert.ancestors': { depth: string | number; id: string; index: string; type: string; }[]; 'kibana.alert.depth': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.original_event.action': string; 'kibana.alert.original_event.category': string[]; 'kibana.alert.original_event.created': string | number; 'kibana.alert.original_event.dataset': string; 'kibana.alert.original_event.id': string; 'kibana.alert.original_event.ingested': string | number; 'kibana.alert.original_event.kind': string; 'kibana.alert.original_event.module': string; 'kibana.alert.original_event.original': string; 'kibana.alert.original_event.outcome': string; 'kibana.alert.original_event.provider': string; 'kibana.alert.original_event.sequence': string | number; 'kibana.alert.original_event.type': string[]; 'kibana.alert.original_time': string | number; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.false_positives': string[]; 'kibana.alert.rule.max_signals': (string | number)[]; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.threat.framework': string; 'kibana.alert.rule.threat.tactic.id': string; 'kibana.alert.rule.threat.tactic.name': string; 'kibana.alert.rule.threat.tactic.reference': string; 'kibana.alert.rule.threat.technique.id': string; 'kibana.alert.rule.threat.technique.name': string; 'kibana.alert.rule.threat.technique.reference': string; 'kibana.alert.rule.threat.technique.subtechnique.id': string; 'kibana.alert.rule.threat.technique.subtechnique.name': string; 'kibana.alert.rule.threat.technique.subtechnique.reference': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'ecs.version'?: string | undefined; 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'host.asset.criticality'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.ancestors.rule'?: string | undefined; 'kibana.alert.building_block_type'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.group.id'?: string | undefined; 'kibana.alert.group.index'?: number | undefined; 'kibana.alert.host.criticality_level'?: string | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.new_terms'?: string[] | undefined; 'kibana.alert.original_event.agent_id_status'?: string | undefined; 'kibana.alert.original_event.code'?: string | undefined; 'kibana.alert.original_event.duration'?: string | undefined; 'kibana.alert.original_event.end'?: string | number | undefined; 'kibana.alert.original_event.hash'?: string | undefined; 'kibana.alert.original_event.reason'?: string | undefined; 'kibana.alert.original_event.reference'?: string | undefined; 'kibana.alert.original_event.risk_score'?: number | undefined; 'kibana.alert.original_event.risk_score_norm'?: number | undefined; 'kibana.alert.original_event.severity'?: string | number | undefined; 'kibana.alert.original_event.start'?: string | number | undefined; 'kibana.alert.original_event.timezone'?: string | undefined; 'kibana.alert.original_event.url'?: string | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.building_block_type'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.immutable'?: string[] | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.rule.timeline_id'?: string[] | undefined; 'kibana.alert.rule.timeline_title'?: string[] | undefined; 'kibana.alert.rule.timestamp_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.threshold_result.cardinality'?: unknown; 'kibana.alert.threshold_result.count'?: string | number | undefined; 'kibana.alert.threshold_result.from'?: string | number | undefined; 'kibana.alert.threshold_result.terms'?: { field?: string | undefined; value?: string | undefined; }[] | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.user.criticality_level'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.alert.workflow_user'?: string | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; 'user.asset.criticality'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" + "{ '@timestamp': string | number; 'kibana.alert.ancestors': { depth: string | number; id: string; index: string; type: string; }[]; 'kibana.alert.depth': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.original_event.action': string; 'kibana.alert.original_event.category': string[]; 'kibana.alert.original_event.created': string | number; 'kibana.alert.original_event.dataset': string; 'kibana.alert.original_event.id': string; 'kibana.alert.original_event.ingested': string | number; 'kibana.alert.original_event.kind': string; 'kibana.alert.original_event.module': string; 'kibana.alert.original_event.original': string; 'kibana.alert.original_event.outcome': string; 'kibana.alert.original_event.provider': string; 'kibana.alert.original_event.sequence': string | number; 'kibana.alert.original_event.type': string[]; 'kibana.alert.original_time': string | number; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.false_positives': string[]; 'kibana.alert.rule.max_signals': (string | number)[]; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.threat.framework': string; 'kibana.alert.rule.threat.tactic.id': string; 'kibana.alert.rule.threat.tactic.name': string; 'kibana.alert.rule.threat.tactic.reference': string; 'kibana.alert.rule.threat.technique.id': string; 'kibana.alert.rule.threat.technique.name': string; 'kibana.alert.rule.threat.technique.reference': string; 'kibana.alert.rule.threat.technique.subtechnique.id': string; 'kibana.alert.rule.threat.technique.subtechnique.name': string; 'kibana.alert.rule.threat.technique.subtechnique.reference': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'ecs.version'?: string | undefined; 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'host.asset.criticality'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.ancestors.rule'?: string | undefined; 'kibana.alert.building_block_type'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.group.id'?: string | undefined; 'kibana.alert.group.index'?: number | undefined; 'kibana.alert.host.criticality_level'?: string | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.new_terms'?: string[] | undefined; 'kibana.alert.original_event.agent_id_status'?: string | undefined; 'kibana.alert.original_event.code'?: string | undefined; 'kibana.alert.original_event.duration'?: string | undefined; 'kibana.alert.original_event.end'?: string | number | undefined; 'kibana.alert.original_event.hash'?: string | undefined; 'kibana.alert.original_event.reason'?: string | undefined; 'kibana.alert.original_event.reference'?: string | undefined; 'kibana.alert.original_event.risk_score'?: number | undefined; 'kibana.alert.original_event.risk_score_norm'?: number | undefined; 'kibana.alert.original_event.severity'?: string | number | undefined; 'kibana.alert.original_event.start'?: string | number | undefined; 'kibana.alert.original_event.timezone'?: string | undefined; 'kibana.alert.original_event.url'?: string | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.building_block_type'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.immutable'?: string[] | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.rule.timeline_id'?: string[] | undefined; 'kibana.alert.rule.timeline_title'?: string[] | undefined; 'kibana.alert.rule.timestamp_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.threshold_result.cardinality'?: unknown; 'kibana.alert.threshold_result.count'?: string | number | undefined; 'kibana.alert.threshold_result.from'?: string | number | undefined; 'kibana.alert.threshold_result.terms'?: { field?: string | undefined; value?: string | undefined; }[] | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.user.criticality_level'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.alert.workflow_user'?: string | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; 'user.asset.criticality'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; } & { '@timestamp': string | number; 'ecs.version': string; } & { 'agent.build.original'?: string | undefined; 'agent.ephemeral_id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'agent.type'?: string | undefined; 'agent.version'?: string | undefined; 'client.address'?: string | undefined; 'client.as.number'?: string | number | undefined; 'client.as.organization.name'?: string | undefined; 'client.bytes'?: string | number | undefined; 'client.domain'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_code'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'client.geo.name'?: string | undefined; 'client.geo.postal_code'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.timezone'?: string | undefined; 'client.ip'?: string | undefined; 'client.mac'?: string | undefined; 'client.nat.ip'?: string | undefined; 'client.nat.port'?: string | number | undefined; 'client.packets'?: string | number | undefined; 'client.port'?: string | number | undefined; 'client.registered_domain'?: string | undefined; 'client.subdomain'?: string | undefined; 'client.top_level_domain'?: string | undefined; 'client.user.domain'?: string | undefined; 'client.user.email'?: string | undefined; 'client.user.full_name'?: string | undefined; 'client.user.group.domain'?: string | undefined; 'client.user.group.id'?: string | undefined; 'client.user.group.name'?: string | undefined; 'client.user.hash'?: string | undefined; 'client.user.id'?: string | undefined; 'client.user.name'?: string | undefined; 'client.user.roles'?: string[] | undefined; 'cloud.account.id'?: string | undefined; 'cloud.account.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'cloud.instance.name'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.origin.account.id'?: string | undefined; 'cloud.origin.account.name'?: string | undefined; 'cloud.origin.availability_zone'?: string | undefined; 'cloud.origin.instance.id'?: string | undefined; 'cloud.origin.instance.name'?: string | undefined; 'cloud.origin.machine.type'?: string | undefined; 'cloud.origin.project.id'?: string | undefined; 'cloud.origin.project.name'?: string | undefined; 'cloud.origin.provider'?: string | undefined; 'cloud.origin.region'?: string | undefined; 'cloud.origin.service.name'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.target.account.id'?: string | undefined; 'cloud.target.account.name'?: string | undefined; 'cloud.target.availability_zone'?: string | undefined; 'cloud.target.instance.id'?: string | undefined; 'cloud.target.instance.name'?: string | undefined; 'cloud.target.machine.type'?: string | undefined; 'cloud.target.project.id'?: string | undefined; 'cloud.target.project.name'?: string | undefined; 'cloud.target.provider'?: string | undefined; 'cloud.target.region'?: string | undefined; 'cloud.target.service.name'?: string | undefined; 'container.cpu.usage'?: string | number | undefined; 'container.disk.read.bytes'?: string | number | undefined; 'container.disk.write.bytes'?: string | number | undefined; 'container.id'?: string | undefined; 'container.image.hash.all'?: string[] | undefined; 'container.image.name'?: string | undefined; 'container.image.tag'?: string[] | undefined; 'container.labels'?: unknown; 'container.memory.usage'?: string | number | undefined; 'container.name'?: string | undefined; 'container.network.egress.bytes'?: string | number | undefined; 'container.network.ingress.bytes'?: string | number | undefined; 'container.runtime'?: string | undefined; 'container.security_context.privileged'?: boolean | undefined; 'destination.address'?: string | undefined; 'destination.as.number'?: string | number | undefined; 'destination.as.organization.name'?: string | undefined; 'destination.bytes'?: string | number | undefined; 'destination.domain'?: string | undefined; 'destination.geo.city_name'?: string | undefined; 'destination.geo.continent_code'?: string | undefined; 'destination.geo.continent_name'?: string | undefined; 'destination.geo.country_iso_code'?: string | undefined; 'destination.geo.country_name'?: string | undefined; 'destination.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'destination.geo.name'?: string | undefined; 'destination.geo.postal_code'?: string | undefined; 'destination.geo.region_iso_code'?: string | undefined; 'destination.geo.region_name'?: string | undefined; 'destination.geo.timezone'?: string | undefined; 'destination.ip'?: string | undefined; 'destination.mac'?: string | undefined; 'destination.nat.ip'?: string | undefined; 'destination.nat.port'?: string | number | undefined; 'destination.packets'?: string | number | undefined; 'destination.port'?: string | number | undefined; 'destination.registered_domain'?: string | undefined; 'destination.subdomain'?: string | undefined; 'destination.top_level_domain'?: string | undefined; 'destination.user.domain'?: string | undefined; 'destination.user.email'?: string | undefined; 'destination.user.full_name'?: string | undefined; 'destination.user.group.domain'?: string | undefined; 'destination.user.group.id'?: string | undefined; 'destination.user.group.name'?: string | undefined; 'destination.user.hash'?: string | undefined; 'destination.user.id'?: string | undefined; 'destination.user.name'?: string | undefined; 'destination.user.roles'?: string[] | undefined; 'device.id'?: string | undefined; 'device.manufacturer'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'dll.code_signature.digest_algorithm'?: string | undefined; 'dll.code_signature.exists'?: boolean | undefined; 'dll.code_signature.signing_id'?: string | undefined; 'dll.code_signature.status'?: string | undefined; 'dll.code_signature.subject_name'?: string | undefined; 'dll.code_signature.team_id'?: string | undefined; 'dll.code_signature.timestamp'?: string | number | undefined; 'dll.code_signature.trusted'?: boolean | undefined; 'dll.code_signature.valid'?: boolean | undefined; 'dll.hash.md5'?: string | undefined; 'dll.hash.sha1'?: string | undefined; 'dll.hash.sha256'?: string | undefined; 'dll.hash.sha384'?: string | undefined; 'dll.hash.sha512'?: string | undefined; 'dll.hash.ssdeep'?: string | undefined; 'dll.hash.tlsh'?: string | undefined; 'dll.name'?: string | undefined; 'dll.path'?: string | undefined; 'dll.pe.architecture'?: string | undefined; 'dll.pe.company'?: string | undefined; 'dll.pe.description'?: string | undefined; 'dll.pe.file_version'?: string | undefined; 'dll.pe.go_import_hash'?: string | undefined; 'dll.pe.go_imports'?: unknown; 'dll.pe.go_imports_names_entropy'?: string | number | undefined; 'dll.pe.go_imports_names_var_entropy'?: string | number | undefined; 'dll.pe.go_stripped'?: boolean | undefined; 'dll.pe.imphash'?: string | undefined; 'dll.pe.import_hash'?: string | undefined; 'dll.pe.imports'?: unknown[] | undefined; 'dll.pe.imports_names_entropy'?: string | number | undefined; 'dll.pe.imports_names_var_entropy'?: string | number | undefined; 'dll.pe.original_file_name'?: string | undefined; 'dll.pe.pehash'?: string | undefined; 'dll.pe.product'?: string | undefined; 'dll.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'dns.answers'?: { class?: string | undefined; data?: string | undefined; name?: string | undefined; ttl?: string | number | undefined; type?: string | undefined; }[] | undefined; 'dns.header_flags'?: string[] | undefined; 'dns.id'?: string | undefined; 'dns.op_code'?: string | undefined; 'dns.question.class'?: string | undefined; 'dns.question.name'?: string | undefined; 'dns.question.registered_domain'?: string | undefined; 'dns.question.subdomain'?: string | undefined; 'dns.question.top_level_domain'?: string | undefined; 'dns.question.type'?: string | undefined; 'dns.resolved_ip'?: string[] | undefined; 'dns.response_code'?: string | undefined; 'dns.type'?: string | undefined; 'email.attachments'?: { 'file.extension'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.name'?: string | undefined; 'file.size'?: string | number | undefined; }[] | undefined; 'email.bcc.address'?: string[] | undefined; 'email.cc.address'?: string[] | undefined; 'email.content_type'?: string | undefined; 'email.delivery_timestamp'?: string | number | undefined; 'email.direction'?: string | undefined; 'email.from.address'?: string[] | undefined; 'email.local_id'?: string | undefined; 'email.message_id'?: string | undefined; 'email.origination_timestamp'?: string | number | undefined; 'email.reply_to.address'?: string[] | undefined; 'email.sender.address'?: string | undefined; 'email.subject'?: string | undefined; 'email.to.address'?: string[] | undefined; 'email.x_mailer'?: string | undefined; 'error.code'?: string | undefined; 'error.id'?: string | undefined; 'error.message'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.type'?: string | undefined; 'event.action'?: string | undefined; 'event.agent_id_status'?: string | undefined; 'event.category'?: string[] | undefined; 'event.code'?: string | undefined; 'event.created'?: string | number | undefined; 'event.dataset'?: string | undefined; 'event.duration'?: string | number | undefined; 'event.end'?: string | number | undefined; 'event.hash'?: string | undefined; 'event.id'?: string | undefined; 'event.ingested'?: string | number | undefined; 'event.kind'?: string | undefined; 'event.module'?: string | undefined; 'event.original'?: string | undefined; 'event.outcome'?: string | undefined; 'event.provider'?: string | undefined; 'event.reason'?: string | undefined; 'event.reference'?: string | undefined; 'event.risk_score'?: number | undefined; 'event.risk_score_norm'?: number | undefined; 'event.sequence'?: string | number | undefined; 'event.severity'?: string | number | undefined; 'event.start'?: string | number | undefined; 'event.timezone'?: string | undefined; 'event.type'?: string[] | undefined; 'event.url'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.version'?: string | undefined; 'file.accessed'?: string | number | undefined; 'file.attributes'?: string[] | undefined; 'file.code_signature.digest_algorithm'?: string | undefined; 'file.code_signature.exists'?: boolean | undefined; 'file.code_signature.signing_id'?: string | undefined; 'file.code_signature.status'?: string | undefined; 'file.code_signature.subject_name'?: string | undefined; 'file.code_signature.team_id'?: string | undefined; 'file.code_signature.timestamp'?: string | number | undefined; 'file.code_signature.trusted'?: boolean | undefined; 'file.code_signature.valid'?: boolean | undefined; 'file.created'?: string | number | undefined; 'file.ctime'?: string | number | undefined; 'file.device'?: string | undefined; 'file.directory'?: string | undefined; 'file.drive_letter'?: string | undefined; 'file.elf.architecture'?: string | undefined; 'file.elf.byte_order'?: string | undefined; 'file.elf.cpu_type'?: string | undefined; 'file.elf.creation_date'?: string | number | undefined; 'file.elf.exports'?: unknown[] | undefined; 'file.elf.go_import_hash'?: string | undefined; 'file.elf.go_imports'?: unknown; 'file.elf.go_imports_names_entropy'?: string | number | undefined; 'file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'file.elf.go_stripped'?: boolean | undefined; 'file.elf.header.abi_version'?: string | undefined; 'file.elf.header.class'?: string | undefined; 'file.elf.header.data'?: string | undefined; 'file.elf.header.entrypoint'?: string | number | undefined; 'file.elf.header.object_version'?: string | undefined; 'file.elf.header.os_abi'?: string | undefined; 'file.elf.header.type'?: string | undefined; 'file.elf.header.version'?: string | undefined; 'file.elf.import_hash'?: string | undefined; 'file.elf.imports'?: unknown[] | undefined; 'file.elf.imports_names_entropy'?: string | number | undefined; 'file.elf.imports_names_var_entropy'?: string | number | undefined; 'file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'file.elf.shared_libraries'?: string[] | undefined; 'file.elf.telfhash'?: string | undefined; 'file.extension'?: string | undefined; 'file.fork_name'?: string | undefined; 'file.gid'?: string | undefined; 'file.group'?: string | undefined; 'file.hash.md5'?: string | undefined; 'file.hash.sha1'?: string | undefined; 'file.hash.sha256'?: string | undefined; 'file.hash.sha384'?: string | undefined; 'file.hash.sha512'?: string | undefined; 'file.hash.ssdeep'?: string | undefined; 'file.hash.tlsh'?: string | undefined; 'file.inode'?: string | undefined; 'file.macho.go_import_hash'?: string | undefined; 'file.macho.go_imports'?: unknown; 'file.macho.go_imports_names_entropy'?: string | number | undefined; 'file.macho.go_imports_names_var_entropy'?: string | number | undefined; 'file.macho.go_stripped'?: boolean | undefined; 'file.macho.import_hash'?: string | undefined; 'file.macho.imports'?: unknown[] | undefined; 'file.macho.imports_names_entropy'?: string | number | undefined; 'file.macho.imports_names_var_entropy'?: string | number | undefined; 'file.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.macho.symhash'?: string | undefined; 'file.mime_type'?: string | undefined; 'file.mode'?: string | undefined; 'file.mtime'?: string | number | undefined; 'file.name'?: string | undefined; 'file.owner'?: string | undefined; 'file.path'?: string | undefined; 'file.pe.architecture'?: string | undefined; 'file.pe.company'?: string | undefined; 'file.pe.description'?: string | undefined; 'file.pe.file_version'?: string | undefined; 'file.pe.go_import_hash'?: string | undefined; 'file.pe.go_imports'?: unknown; 'file.pe.go_imports_names_entropy'?: string | number | undefined; 'file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'file.pe.go_stripped'?: boolean | undefined; 'file.pe.imphash'?: string | undefined; 'file.pe.import_hash'?: string | undefined; 'file.pe.imports'?: unknown[] | undefined; 'file.pe.imports_names_entropy'?: string | number | undefined; 'file.pe.imports_names_var_entropy'?: string | number | undefined; 'file.pe.original_file_name'?: string | undefined; 'file.pe.pehash'?: string | undefined; 'file.pe.product'?: string | undefined; 'file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'file.size'?: string | number | undefined; 'file.target_path'?: string | undefined; 'file.type'?: string | undefined; 'file.uid'?: string | undefined; 'file.x509.alternative_names'?: string[] | undefined; 'file.x509.issuer.common_name'?: string[] | undefined; 'file.x509.issuer.country'?: string[] | undefined; 'file.x509.issuer.distinguished_name'?: string | undefined; 'file.x509.issuer.locality'?: string[] | undefined; 'file.x509.issuer.organization'?: string[] | undefined; 'file.x509.issuer.organizational_unit'?: string[] | undefined; 'file.x509.issuer.state_or_province'?: string[] | undefined; 'file.x509.not_after'?: string | number | undefined; 'file.x509.not_before'?: string | number | undefined; 'file.x509.public_key_algorithm'?: string | undefined; 'file.x509.public_key_curve'?: string | undefined; 'file.x509.public_key_exponent'?: string | number | undefined; 'file.x509.public_key_size'?: string | number | undefined; 'file.x509.serial_number'?: string | undefined; 'file.x509.signature_algorithm'?: string | undefined; 'file.x509.subject.common_name'?: string[] | undefined; 'file.x509.subject.country'?: string[] | undefined; 'file.x509.subject.distinguished_name'?: string | undefined; 'file.x509.subject.locality'?: string[] | undefined; 'file.x509.subject.organization'?: string[] | undefined; 'file.x509.subject.organizational_unit'?: string[] | undefined; 'file.x509.subject.state_or_province'?: string[] | undefined; 'file.x509.version_number'?: string | undefined; 'group.domain'?: string | undefined; 'group.id'?: string | undefined; 'group.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.boot.id'?: string | undefined; 'host.cpu.usage'?: string | number | undefined; 'host.disk.read.bytes'?: string | number | undefined; 'host.disk.write.bytes'?: string | number | undefined; 'host.domain'?: string | undefined; 'host.geo.city_name'?: string | undefined; 'host.geo.continent_code'?: string | undefined; 'host.geo.continent_name'?: string | undefined; 'host.geo.country_iso_code'?: string | undefined; 'host.geo.country_name'?: string | undefined; 'host.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'host.geo.name'?: string | undefined; 'host.geo.postal_code'?: string | undefined; 'host.geo.region_iso_code'?: string | undefined; 'host.geo.region_name'?: string | undefined; 'host.geo.timezone'?: string | undefined; 'host.hostname'?: string | undefined; 'host.id'?: string | undefined; 'host.ip'?: string[] | undefined; 'host.mac'?: string[] | undefined; 'host.name'?: string | undefined; 'host.network.egress.bytes'?: string | number | undefined; 'host.network.egress.packets'?: string | number | undefined; 'host.network.ingress.bytes'?: string | number | undefined; 'host.network.ingress.packets'?: string | number | undefined; 'host.os.family'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.kernel'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'host.pid_ns_ino'?: string | undefined; 'host.risk.calculated_level'?: string | undefined; 'host.risk.calculated_score'?: number | undefined; 'host.risk.calculated_score_norm'?: number | undefined; 'host.risk.static_level'?: string | undefined; 'host.risk.static_score'?: number | undefined; 'host.risk.static_score_norm'?: number | undefined; 'host.type'?: string | undefined; 'host.uptime'?: string | number | undefined; 'http.request.body.bytes'?: string | number | undefined; 'http.request.body.content'?: string | undefined; 'http.request.bytes'?: string | number | undefined; 'http.request.id'?: string | undefined; 'http.request.method'?: string | undefined; 'http.request.mime_type'?: string | undefined; 'http.request.referrer'?: string | undefined; 'http.response.body.bytes'?: string | number | undefined; 'http.response.body.content'?: string | undefined; 'http.response.bytes'?: string | number | undefined; 'http.response.mime_type'?: string | undefined; 'http.response.status_code'?: string | number | undefined; 'http.version'?: string | undefined; labels?: unknown; 'log.file.path'?: string | undefined; 'log.level'?: string | undefined; 'log.logger'?: string | undefined; 'log.origin.file.line'?: string | number | undefined; 'log.origin.file.name'?: string | undefined; 'log.origin.function'?: string | undefined; 'log.syslog'?: unknown; message?: string | undefined; 'network.application'?: string | undefined; 'network.bytes'?: string | number | undefined; 'network.community_id'?: string | undefined; 'network.direction'?: string | undefined; 'network.forwarded_ip'?: string | undefined; 'network.iana_number'?: string | undefined; 'network.inner'?: unknown; 'network.name'?: string | undefined; 'network.packets'?: string | number | undefined; 'network.protocol'?: string | undefined; 'network.transport'?: string | undefined; 'network.type'?: string | undefined; 'network.vlan.id'?: string | undefined; 'network.vlan.name'?: string | undefined; 'observer.egress'?: unknown; 'observer.geo.city_name'?: string | undefined; 'observer.geo.continent_code'?: string | undefined; 'observer.geo.continent_name'?: string | undefined; 'observer.geo.country_iso_code'?: string | undefined; 'observer.geo.country_name'?: string | undefined; 'observer.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'observer.geo.name'?: string | undefined; 'observer.geo.postal_code'?: string | undefined; 'observer.geo.region_iso_code'?: string | undefined; 'observer.geo.region_name'?: string | undefined; 'observer.geo.timezone'?: string | undefined; 'observer.hostname'?: string | undefined; 'observer.ingress'?: unknown; 'observer.ip'?: string[] | undefined; 'observer.mac'?: string[] | undefined; 'observer.name'?: string | undefined; 'observer.os.family'?: string | undefined; 'observer.os.full'?: string | undefined; 'observer.os.kernel'?: string | undefined; 'observer.os.name'?: string | undefined; 'observer.os.platform'?: string | undefined; 'observer.os.type'?: string | undefined; 'observer.os.version'?: string | undefined; 'observer.product'?: string | undefined; 'observer.serial_number'?: string | undefined; 'observer.type'?: string | undefined; 'observer.vendor'?: string | undefined; 'observer.version'?: string | undefined; 'orchestrator.api_version'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.url'?: string | undefined; 'orchestrator.cluster.version'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'orchestrator.organization'?: string | undefined; 'orchestrator.resource.annotation'?: string[] | undefined; 'orchestrator.resource.id'?: string | undefined; 'orchestrator.resource.ip'?: string[] | undefined; 'orchestrator.resource.label'?: string[] | undefined; 'orchestrator.resource.name'?: string | undefined; 'orchestrator.resource.parent.type'?: string | undefined; 'orchestrator.resource.type'?: string | undefined; 'orchestrator.type'?: string | undefined; 'organization.id'?: string | undefined; 'organization.name'?: string | undefined; 'package.architecture'?: string | undefined; 'package.build_version'?: string | undefined; 'package.checksum'?: string | undefined; 'package.description'?: string | undefined; 'package.install_scope'?: string | undefined; 'package.installed'?: string | number | undefined; 'package.license'?: string | undefined; 'package.name'?: string | undefined; 'package.path'?: string | undefined; 'package.reference'?: string | undefined; 'package.size'?: string | number | undefined; 'package.type'?: string | undefined; 'package.version'?: string | undefined; 'process.args'?: string[] | undefined; 'process.args_count'?: string | number | undefined; 'process.code_signature.digest_algorithm'?: string | undefined; 'process.code_signature.exists'?: boolean | undefined; 'process.code_signature.signing_id'?: string | undefined; 'process.code_signature.status'?: string | undefined; 'process.code_signature.subject_name'?: string | undefined; 'process.code_signature.team_id'?: string | undefined; 'process.code_signature.timestamp'?: string | number | undefined; 'process.code_signature.trusted'?: boolean | undefined; 'process.code_signature.valid'?: boolean | undefined; 'process.command_line'?: string | undefined; 'process.elf.architecture'?: string | undefined; 'process.elf.byte_order'?: string | undefined; 'process.elf.cpu_type'?: string | undefined; 'process.elf.creation_date'?: string | number | undefined; 'process.elf.exports'?: unknown[] | undefined; 'process.elf.go_import_hash'?: string | undefined; 'process.elf.go_imports'?: unknown; 'process.elf.go_imports_names_entropy'?: string | number | undefined; 'process.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.elf.go_stripped'?: boolean | undefined; 'process.elf.header.abi_version'?: string | undefined; 'process.elf.header.class'?: string | undefined; 'process.elf.header.data'?: string | undefined; 'process.elf.header.entrypoint'?: string | number | undefined; 'process.elf.header.object_version'?: string | undefined; 'process.elf.header.os_abi'?: string | undefined; 'process.elf.header.type'?: string | undefined; 'process.elf.header.version'?: string | undefined; 'process.elf.import_hash'?: string | undefined; 'process.elf.imports'?: unknown[] | undefined; 'process.elf.imports_names_entropy'?: string | number | undefined; 'process.elf.imports_names_var_entropy'?: string | number | undefined; 'process.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.elf.shared_libraries'?: string[] | undefined; 'process.elf.telfhash'?: string | undefined; 'process.end'?: string | number | undefined; 'process.entity_id'?: string | undefined; 'process.entry_leader.args'?: string[] | undefined; 'process.entry_leader.args_count'?: string | number | undefined; 'process.entry_leader.attested_groups.name'?: string | undefined; 'process.entry_leader.attested_user.id'?: string | undefined; 'process.entry_leader.attested_user.name'?: string | undefined; 'process.entry_leader.command_line'?: string | undefined; 'process.entry_leader.entity_id'?: string | undefined; 'process.entry_leader.entry_meta.source.ip'?: string | undefined; 'process.entry_leader.entry_meta.type'?: string | undefined; 'process.entry_leader.executable'?: string | undefined; 'process.entry_leader.group.id'?: string | undefined; 'process.entry_leader.group.name'?: string | undefined; 'process.entry_leader.interactive'?: boolean | undefined; 'process.entry_leader.name'?: string | undefined; 'process.entry_leader.parent.entity_id'?: string | undefined; 'process.entry_leader.parent.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.entity_id'?: string | undefined; 'process.entry_leader.parent.session_leader.pid'?: string | number | undefined; 'process.entry_leader.parent.session_leader.start'?: string | number | undefined; 'process.entry_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.entry_leader.parent.start'?: string | number | undefined; 'process.entry_leader.parent.vpid'?: string | number | undefined; 'process.entry_leader.pid'?: string | number | undefined; 'process.entry_leader.real_group.id'?: string | undefined; 'process.entry_leader.real_group.name'?: string | undefined; 'process.entry_leader.real_user.id'?: string | undefined; 'process.entry_leader.real_user.name'?: string | undefined; 'process.entry_leader.same_as_process'?: boolean | undefined; 'process.entry_leader.saved_group.id'?: string | undefined; 'process.entry_leader.saved_group.name'?: string | undefined; 'process.entry_leader.saved_user.id'?: string | undefined; 'process.entry_leader.saved_user.name'?: string | undefined; 'process.entry_leader.start'?: string | number | undefined; 'process.entry_leader.supplemental_groups.id'?: string | undefined; 'process.entry_leader.supplemental_groups.name'?: string | undefined; 'process.entry_leader.tty'?: unknown; 'process.entry_leader.user.id'?: string | undefined; 'process.entry_leader.user.name'?: string | undefined; 'process.entry_leader.vpid'?: string | number | undefined; 'process.entry_leader.working_directory'?: string | undefined; 'process.env_vars'?: string[] | undefined; 'process.executable'?: string | undefined; 'process.exit_code'?: string | number | undefined; 'process.group_leader.args'?: string[] | undefined; 'process.group_leader.args_count'?: string | number | undefined; 'process.group_leader.command_line'?: string | undefined; 'process.group_leader.entity_id'?: string | undefined; 'process.group_leader.executable'?: string | undefined; 'process.group_leader.group.id'?: string | undefined; 'process.group_leader.group.name'?: string | undefined; 'process.group_leader.interactive'?: boolean | undefined; 'process.group_leader.name'?: string | undefined; 'process.group_leader.pid'?: string | number | undefined; 'process.group_leader.real_group.id'?: string | undefined; 'process.group_leader.real_group.name'?: string | undefined; 'process.group_leader.real_user.id'?: string | undefined; 'process.group_leader.real_user.name'?: string | undefined; 'process.group_leader.same_as_process'?: boolean | undefined; 'process.group_leader.saved_group.id'?: string | undefined; 'process.group_leader.saved_group.name'?: string | undefined; 'process.group_leader.saved_user.id'?: string | undefined; 'process.group_leader.saved_user.name'?: string | undefined; 'process.group_leader.start'?: string | number | undefined; 'process.group_leader.supplemental_groups.id'?: string | undefined; 'process.group_leader.supplemental_groups.name'?: string | undefined; 'process.group_leader.tty'?: unknown; 'process.group_leader.user.id'?: string | undefined; 'process.group_leader.user.name'?: string | undefined; 'process.group_leader.vpid'?: string | number | undefined; 'process.group_leader.working_directory'?: string | undefined; 'process.hash.md5'?: string | undefined; 'process.hash.sha1'?: string | undefined; 'process.hash.sha256'?: string | undefined; 'process.hash.sha384'?: string | undefined; 'process.hash.sha512'?: string | undefined; 'process.hash.ssdeep'?: string | undefined; 'process.hash.tlsh'?: string | undefined; 'process.interactive'?: boolean | undefined; 'process.io'?: unknown; 'process.macho.go_import_hash'?: string | undefined; 'process.macho.go_imports'?: unknown; 'process.macho.go_imports_names_entropy'?: string | number | undefined; 'process.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.macho.go_stripped'?: boolean | undefined; 'process.macho.import_hash'?: string | undefined; 'process.macho.imports'?: unknown[] | undefined; 'process.macho.imports_names_entropy'?: string | number | undefined; 'process.macho.imports_names_var_entropy'?: string | number | undefined; 'process.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.macho.symhash'?: string | undefined; 'process.name'?: string | undefined; 'process.parent.args'?: string[] | undefined; 'process.parent.args_count'?: string | number | undefined; 'process.parent.code_signature.digest_algorithm'?: string | undefined; 'process.parent.code_signature.exists'?: boolean | undefined; 'process.parent.code_signature.signing_id'?: string | undefined; 'process.parent.code_signature.status'?: string | undefined; 'process.parent.code_signature.subject_name'?: string | undefined; 'process.parent.code_signature.team_id'?: string | undefined; 'process.parent.code_signature.timestamp'?: string | number | undefined; 'process.parent.code_signature.trusted'?: boolean | undefined; 'process.parent.code_signature.valid'?: boolean | undefined; 'process.parent.command_line'?: string | undefined; 'process.parent.elf.architecture'?: string | undefined; 'process.parent.elf.byte_order'?: string | undefined; 'process.parent.elf.cpu_type'?: string | undefined; 'process.parent.elf.creation_date'?: string | number | undefined; 'process.parent.elf.exports'?: unknown[] | undefined; 'process.parent.elf.go_import_hash'?: string | undefined; 'process.parent.elf.go_imports'?: unknown; 'process.parent.elf.go_imports_names_entropy'?: string | number | undefined; 'process.parent.elf.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.go_stripped'?: boolean | undefined; 'process.parent.elf.header.abi_version'?: string | undefined; 'process.parent.elf.header.class'?: string | undefined; 'process.parent.elf.header.data'?: string | undefined; 'process.parent.elf.header.entrypoint'?: string | number | undefined; 'process.parent.elf.header.object_version'?: string | undefined; 'process.parent.elf.header.os_abi'?: string | undefined; 'process.parent.elf.header.type'?: string | undefined; 'process.parent.elf.header.version'?: string | undefined; 'process.parent.elf.import_hash'?: string | undefined; 'process.parent.elf.imports'?: unknown[] | undefined; 'process.parent.elf.imports_names_entropy'?: string | number | undefined; 'process.parent.elf.imports_names_var_entropy'?: string | number | undefined; 'process.parent.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'process.parent.elf.shared_libraries'?: string[] | undefined; 'process.parent.elf.telfhash'?: string | undefined; 'process.parent.end'?: string | number | undefined; 'process.parent.entity_id'?: string | undefined; 'process.parent.executable'?: string | undefined; 'process.parent.exit_code'?: string | number | undefined; 'process.parent.group.id'?: string | undefined; 'process.parent.group.name'?: string | undefined; 'process.parent.group_leader.entity_id'?: string | undefined; 'process.parent.group_leader.pid'?: string | number | undefined; 'process.parent.group_leader.start'?: string | number | undefined; 'process.parent.group_leader.vpid'?: string | number | undefined; 'process.parent.hash.md5'?: string | undefined; 'process.parent.hash.sha1'?: string | undefined; 'process.parent.hash.sha256'?: string | undefined; 'process.parent.hash.sha384'?: string | undefined; 'process.parent.hash.sha512'?: string | undefined; 'process.parent.hash.ssdeep'?: string | undefined; 'process.parent.hash.tlsh'?: string | undefined; 'process.parent.interactive'?: boolean | undefined; 'process.parent.macho.go_import_hash'?: string | undefined; 'process.parent.macho.go_imports'?: unknown; 'process.parent.macho.go_imports_names_entropy'?: string | number | undefined; 'process.parent.macho.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.go_stripped'?: boolean | undefined; 'process.parent.macho.import_hash'?: string | undefined; 'process.parent.macho.imports'?: unknown[] | undefined; 'process.parent.macho.imports_names_entropy'?: string | number | undefined; 'process.parent.macho.imports_names_var_entropy'?: string | number | undefined; 'process.parent.macho.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.macho.symhash'?: string | undefined; 'process.parent.name'?: string | undefined; 'process.parent.pe.architecture'?: string | undefined; 'process.parent.pe.company'?: string | undefined; 'process.parent.pe.description'?: string | undefined; 'process.parent.pe.file_version'?: string | undefined; 'process.parent.pe.go_import_hash'?: string | undefined; 'process.parent.pe.go_imports'?: unknown; 'process.parent.pe.go_imports_names_entropy'?: string | number | undefined; 'process.parent.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.go_stripped'?: boolean | undefined; 'process.parent.pe.imphash'?: string | undefined; 'process.parent.pe.import_hash'?: string | undefined; 'process.parent.pe.imports'?: unknown[] | undefined; 'process.parent.pe.imports_names_entropy'?: string | number | undefined; 'process.parent.pe.imports_names_var_entropy'?: string | number | undefined; 'process.parent.pe.original_file_name'?: string | undefined; 'process.parent.pe.pehash'?: string | undefined; 'process.parent.pe.product'?: string | undefined; 'process.parent.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.parent.pgid'?: string | number | undefined; 'process.parent.pid'?: string | number | undefined; 'process.parent.real_group.id'?: string | undefined; 'process.parent.real_group.name'?: string | undefined; 'process.parent.real_user.id'?: string | undefined; 'process.parent.real_user.name'?: string | undefined; 'process.parent.saved_group.id'?: string | undefined; 'process.parent.saved_group.name'?: string | undefined; 'process.parent.saved_user.id'?: string | undefined; 'process.parent.saved_user.name'?: string | undefined; 'process.parent.start'?: string | number | undefined; 'process.parent.supplemental_groups.id'?: string | undefined; 'process.parent.supplemental_groups.name'?: string | undefined; 'process.parent.thread.capabilities.effective'?: string[] | undefined; 'process.parent.thread.capabilities.permitted'?: string[] | undefined; 'process.parent.thread.id'?: string | number | undefined; 'process.parent.thread.name'?: string | undefined; 'process.parent.title'?: string | undefined; 'process.parent.tty'?: unknown; 'process.parent.uptime'?: string | number | undefined; 'process.parent.user.id'?: string | undefined; 'process.parent.user.name'?: string | undefined; 'process.parent.vpid'?: string | number | undefined; 'process.parent.working_directory'?: string | undefined; 'process.pe.architecture'?: string | undefined; 'process.pe.company'?: string | undefined; 'process.pe.description'?: string | undefined; 'process.pe.file_version'?: string | undefined; 'process.pe.go_import_hash'?: string | undefined; 'process.pe.go_imports'?: unknown; 'process.pe.go_imports_names_entropy'?: string | number | undefined; 'process.pe.go_imports_names_var_entropy'?: string | number | undefined; 'process.pe.go_stripped'?: boolean | undefined; 'process.pe.imphash'?: string | undefined; 'process.pe.import_hash'?: string | undefined; 'process.pe.imports'?: unknown[] | undefined; 'process.pe.imports_names_entropy'?: string | number | undefined; 'process.pe.imports_names_var_entropy'?: string | number | undefined; 'process.pe.original_file_name'?: string | undefined; 'process.pe.pehash'?: string | undefined; 'process.pe.product'?: string | undefined; 'process.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'process.pgid'?: string | number | undefined; 'process.pid'?: string | number | undefined; 'process.previous.args'?: string[] | undefined; 'process.previous.args_count'?: string | number | undefined; 'process.previous.executable'?: string | undefined; 'process.real_group.id'?: string | undefined; 'process.real_group.name'?: string | undefined; 'process.real_user.id'?: string | undefined; 'process.real_user.name'?: string | undefined; 'process.saved_group.id'?: string | undefined; 'process.saved_group.name'?: string | undefined; 'process.saved_user.id'?: string | undefined; 'process.saved_user.name'?: string | undefined; 'process.session_leader.args'?: string[] | undefined; 'process.session_leader.args_count'?: string | number | undefined; 'process.session_leader.command_line'?: string | undefined; 'process.session_leader.entity_id'?: string | undefined; 'process.session_leader.executable'?: string | undefined; 'process.session_leader.group.id'?: string | undefined; 'process.session_leader.group.name'?: string | undefined; 'process.session_leader.interactive'?: boolean | undefined; 'process.session_leader.name'?: string | undefined; 'process.session_leader.parent.entity_id'?: string | undefined; 'process.session_leader.parent.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.entity_id'?: string | undefined; 'process.session_leader.parent.session_leader.pid'?: string | number | undefined; 'process.session_leader.parent.session_leader.start'?: string | number | undefined; 'process.session_leader.parent.session_leader.vpid'?: string | number | undefined; 'process.session_leader.parent.start'?: string | number | undefined; 'process.session_leader.parent.vpid'?: string | number | undefined; 'process.session_leader.pid'?: string | number | undefined; 'process.session_leader.real_group.id'?: string | undefined; 'process.session_leader.real_group.name'?: string | undefined; 'process.session_leader.real_user.id'?: string | undefined; 'process.session_leader.real_user.name'?: string | undefined; 'process.session_leader.same_as_process'?: boolean | undefined; 'process.session_leader.saved_group.id'?: string | undefined; 'process.session_leader.saved_group.name'?: string | undefined; 'process.session_leader.saved_user.id'?: string | undefined; 'process.session_leader.saved_user.name'?: string | undefined; 'process.session_leader.start'?: string | number | undefined; 'process.session_leader.supplemental_groups.id'?: string | undefined; 'process.session_leader.supplemental_groups.name'?: string | undefined; 'process.session_leader.tty'?: unknown; 'process.session_leader.user.id'?: string | undefined; 'process.session_leader.user.name'?: string | undefined; 'process.session_leader.vpid'?: string | number | undefined; 'process.session_leader.working_directory'?: string | undefined; 'process.start'?: string | number | undefined; 'process.supplemental_groups.id'?: string | undefined; 'process.supplemental_groups.name'?: string | undefined; 'process.thread.capabilities.effective'?: string[] | undefined; 'process.thread.capabilities.permitted'?: string[] | undefined; 'process.thread.id'?: string | number | undefined; 'process.thread.name'?: string | undefined; 'process.title'?: string | undefined; 'process.tty'?: unknown; 'process.uptime'?: string | number | undefined; 'process.user.id'?: string | undefined; 'process.user.name'?: string | undefined; 'process.vpid'?: string | number | undefined; 'process.working_directory'?: string | undefined; 'registry.data.bytes'?: string | undefined; 'registry.data.strings'?: string[] | undefined; 'registry.data.type'?: string | undefined; 'registry.hive'?: string | undefined; 'registry.key'?: string | undefined; 'registry.path'?: string | undefined; 'registry.value'?: string | undefined; 'related.hash'?: string[] | undefined; 'related.hosts'?: string[] | undefined; 'related.ip'?: string[] | undefined; 'related.user'?: string[] | undefined; 'rule.author'?: string[] | undefined; 'rule.category'?: string | undefined; 'rule.description'?: string | undefined; 'rule.id'?: string | undefined; 'rule.license'?: string | undefined; 'rule.name'?: string | undefined; 'rule.reference'?: string | undefined; 'rule.ruleset'?: string | undefined; 'rule.uuid'?: string | undefined; 'rule.version'?: string | undefined; 'server.address'?: string | undefined; 'server.as.number'?: string | number | undefined; 'server.as.organization.name'?: string | undefined; 'server.bytes'?: string | number | undefined; 'server.domain'?: string | undefined; 'server.geo.city_name'?: string | undefined; 'server.geo.continent_code'?: string | undefined; 'server.geo.continent_name'?: string | undefined; 'server.geo.country_iso_code'?: string | undefined; 'server.geo.country_name'?: string | undefined; 'server.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'server.geo.name'?: string | undefined; 'server.geo.postal_code'?: string | undefined; 'server.geo.region_iso_code'?: string | undefined; 'server.geo.region_name'?: string | undefined; 'server.geo.timezone'?: string | undefined; 'server.ip'?: string | undefined; 'server.mac'?: string | undefined; 'server.nat.ip'?: string | undefined; 'server.nat.port'?: string | number | undefined; 'server.packets'?: string | number | undefined; 'server.port'?: string | number | undefined; 'server.registered_domain'?: string | undefined; 'server.subdomain'?: string | undefined; 'server.top_level_domain'?: string | undefined; 'server.user.domain'?: string | undefined; 'server.user.email'?: string | undefined; 'server.user.full_name'?: string | undefined; 'server.user.group.domain'?: string | undefined; 'server.user.group.id'?: string | undefined; 'server.user.group.name'?: string | undefined; 'server.user.hash'?: string | undefined; 'server.user.id'?: string | undefined; 'server.user.name'?: string | undefined; 'server.user.roles'?: string[] | undefined; 'service.address'?: string | undefined; 'service.environment'?: string | undefined; 'service.ephemeral_id'?: string | undefined; 'service.id'?: string | undefined; 'service.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.node.role'?: string | undefined; 'service.node.roles'?: string[] | undefined; 'service.origin.address'?: string | undefined; 'service.origin.environment'?: string | undefined; 'service.origin.ephemeral_id'?: string | undefined; 'service.origin.id'?: string | undefined; 'service.origin.name'?: string | undefined; 'service.origin.node.name'?: string | undefined; 'service.origin.node.role'?: string | undefined; 'service.origin.node.roles'?: string[] | undefined; 'service.origin.state'?: string | undefined; 'service.origin.type'?: string | undefined; 'service.origin.version'?: string | undefined; 'service.state'?: string | undefined; 'service.target.address'?: string | undefined; 'service.target.environment'?: string | undefined; 'service.target.ephemeral_id'?: string | undefined; 'service.target.id'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.node.name'?: string | undefined; 'service.target.node.role'?: string | undefined; 'service.target.node.roles'?: string[] | undefined; 'service.target.state'?: string | undefined; 'service.target.type'?: string | undefined; 'service.target.version'?: string | undefined; 'service.type'?: string | undefined; 'service.version'?: string | undefined; 'source.address'?: string | undefined; 'source.as.number'?: string | number | undefined; 'source.as.organization.name'?: string | undefined; 'source.bytes'?: string | number | undefined; 'source.domain'?: string | undefined; 'source.geo.city_name'?: string | undefined; 'source.geo.continent_code'?: string | undefined; 'source.geo.continent_name'?: string | undefined; 'source.geo.country_iso_code'?: string | undefined; 'source.geo.country_name'?: string | undefined; 'source.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'source.geo.name'?: string | undefined; 'source.geo.postal_code'?: string | undefined; 'source.geo.region_iso_code'?: string | undefined; 'source.geo.region_name'?: string | undefined; 'source.geo.timezone'?: string | undefined; 'source.ip'?: string | undefined; 'source.mac'?: string | undefined; 'source.nat.ip'?: string | undefined; 'source.nat.port'?: string | number | undefined; 'source.packets'?: string | number | undefined; 'source.port'?: string | number | undefined; 'source.registered_domain'?: string | undefined; 'source.subdomain'?: string | undefined; 'source.top_level_domain'?: string | undefined; 'source.user.domain'?: string | undefined; 'source.user.email'?: string | undefined; 'source.user.full_name'?: string | undefined; 'source.user.group.domain'?: string | undefined; 'source.user.group.id'?: string | undefined; 'source.user.group.name'?: string | undefined; 'source.user.hash'?: string | undefined; 'source.user.id'?: string | undefined; 'source.user.name'?: string | undefined; 'source.user.roles'?: string[] | undefined; 'span.id'?: string | undefined; tags?: string[] | undefined; 'threat.enrichments'?: { indicator?: unknown; 'matched.atomic'?: string | undefined; 'matched.field'?: string | undefined; 'matched.id'?: string | undefined; 'matched.index'?: string | undefined; 'matched.occurred'?: string | number | undefined; 'matched.type'?: string | undefined; }[] | undefined; 'threat.feed.dashboard_id'?: string | undefined; 'threat.feed.description'?: string | undefined; 'threat.feed.name'?: string | undefined; 'threat.feed.reference'?: string | undefined; 'threat.framework'?: string | undefined; 'threat.group.alias'?: string[] | undefined; 'threat.group.id'?: string | undefined; 'threat.group.name'?: string | undefined; 'threat.group.reference'?: string | undefined; 'threat.indicator.as.number'?: string | number | undefined; 'threat.indicator.as.organization.name'?: string | undefined; 'threat.indicator.confidence'?: string | undefined; 'threat.indicator.description'?: string | undefined; 'threat.indicator.email.address'?: string | undefined; 'threat.indicator.file.accessed'?: string | number | undefined; 'threat.indicator.file.attributes'?: string[] | undefined; 'threat.indicator.file.code_signature.digest_algorithm'?: string | undefined; 'threat.indicator.file.code_signature.exists'?: boolean | undefined; 'threat.indicator.file.code_signature.signing_id'?: string | undefined; 'threat.indicator.file.code_signature.status'?: string | undefined; 'threat.indicator.file.code_signature.subject_name'?: string | undefined; 'threat.indicator.file.code_signature.team_id'?: string | undefined; 'threat.indicator.file.code_signature.timestamp'?: string | number | undefined; 'threat.indicator.file.code_signature.trusted'?: boolean | undefined; 'threat.indicator.file.code_signature.valid'?: boolean | undefined; 'threat.indicator.file.created'?: string | number | undefined; 'threat.indicator.file.ctime'?: string | number | undefined; 'threat.indicator.file.device'?: string | undefined; 'threat.indicator.file.directory'?: string | undefined; 'threat.indicator.file.drive_letter'?: string | undefined; 'threat.indicator.file.elf.architecture'?: string | undefined; 'threat.indicator.file.elf.byte_order'?: string | undefined; 'threat.indicator.file.elf.cpu_type'?: string | undefined; 'threat.indicator.file.elf.creation_date'?: string | number | undefined; 'threat.indicator.file.elf.exports'?: unknown[] | undefined; 'threat.indicator.file.elf.go_import_hash'?: string | undefined; 'threat.indicator.file.elf.go_imports'?: unknown; 'threat.indicator.file.elf.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.go_stripped'?: boolean | undefined; 'threat.indicator.file.elf.header.abi_version'?: string | undefined; 'threat.indicator.file.elf.header.class'?: string | undefined; 'threat.indicator.file.elf.header.data'?: string | undefined; 'threat.indicator.file.elf.header.entrypoint'?: string | number | undefined; 'threat.indicator.file.elf.header.object_version'?: string | undefined; 'threat.indicator.file.elf.header.os_abi'?: string | undefined; 'threat.indicator.file.elf.header.type'?: string | undefined; 'threat.indicator.file.elf.header.version'?: string | undefined; 'threat.indicator.file.elf.import_hash'?: string | undefined; 'threat.indicator.file.elf.imports'?: unknown[] | undefined; 'threat.indicator.file.elf.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.elf.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.elf.sections'?: { chi2?: string | number | undefined; entropy?: string | number | undefined; flags?: string | undefined; name?: string | undefined; physical_offset?: string | undefined; physical_size?: string | number | undefined; type?: string | undefined; var_entropy?: string | number | undefined; virtual_address?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.elf.segments'?: { sections?: string | undefined; type?: string | undefined; }[] | undefined; 'threat.indicator.file.elf.shared_libraries'?: string[] | undefined; 'threat.indicator.file.elf.telfhash'?: string | undefined; 'threat.indicator.file.extension'?: string | undefined; 'threat.indicator.file.fork_name'?: string | undefined; 'threat.indicator.file.gid'?: string | undefined; 'threat.indicator.file.group'?: string | undefined; 'threat.indicator.file.hash.md5'?: string | undefined; 'threat.indicator.file.hash.sha1'?: string | undefined; 'threat.indicator.file.hash.sha256'?: string | undefined; 'threat.indicator.file.hash.sha384'?: string | undefined; 'threat.indicator.file.hash.sha512'?: string | undefined; 'threat.indicator.file.hash.ssdeep'?: string | undefined; 'threat.indicator.file.hash.tlsh'?: string | undefined; 'threat.indicator.file.inode'?: string | undefined; 'threat.indicator.file.mime_type'?: string | undefined; 'threat.indicator.file.mode'?: string | undefined; 'threat.indicator.file.mtime'?: string | number | undefined; 'threat.indicator.file.name'?: string | undefined; 'threat.indicator.file.owner'?: string | undefined; 'threat.indicator.file.path'?: string | undefined; 'threat.indicator.file.pe.architecture'?: string | undefined; 'threat.indicator.file.pe.company'?: string | undefined; 'threat.indicator.file.pe.description'?: string | undefined; 'threat.indicator.file.pe.file_version'?: string | undefined; 'threat.indicator.file.pe.go_import_hash'?: string | undefined; 'threat.indicator.file.pe.go_imports'?: unknown; 'threat.indicator.file.pe.go_imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.go_stripped'?: boolean | undefined; 'threat.indicator.file.pe.imphash'?: string | undefined; 'threat.indicator.file.pe.import_hash'?: string | undefined; 'threat.indicator.file.pe.imports'?: unknown[] | undefined; 'threat.indicator.file.pe.imports_names_entropy'?: string | number | undefined; 'threat.indicator.file.pe.imports_names_var_entropy'?: string | number | undefined; 'threat.indicator.file.pe.original_file_name'?: string | undefined; 'threat.indicator.file.pe.pehash'?: string | undefined; 'threat.indicator.file.pe.product'?: string | undefined; 'threat.indicator.file.pe.sections'?: { entropy?: string | number | undefined; name?: string | undefined; physical_size?: string | number | undefined; var_entropy?: string | number | undefined; virtual_size?: string | number | undefined; }[] | undefined; 'threat.indicator.file.size'?: string | number | undefined; 'threat.indicator.file.target_path'?: string | undefined; 'threat.indicator.file.type'?: string | undefined; 'threat.indicator.file.uid'?: string | undefined; 'threat.indicator.file.x509.alternative_names'?: string[] | undefined; 'threat.indicator.file.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.file.x509.issuer.country'?: string[] | undefined; 'threat.indicator.file.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.file.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.not_after'?: string | number | undefined; 'threat.indicator.file.x509.not_before'?: string | number | undefined; 'threat.indicator.file.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.file.x509.public_key_curve'?: string | undefined; 'threat.indicator.file.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.file.x509.public_key_size'?: string | number | undefined; 'threat.indicator.file.x509.serial_number'?: string | undefined; 'threat.indicator.file.x509.signature_algorithm'?: string | undefined; 'threat.indicator.file.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.file.x509.subject.country'?: string[] | undefined; 'threat.indicator.file.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.file.x509.subject.locality'?: string[] | undefined; 'threat.indicator.file.x509.subject.organization'?: string[] | undefined; 'threat.indicator.file.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.file.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.file.x509.version_number'?: string | undefined; 'threat.indicator.first_seen'?: string | number | undefined; 'threat.indicator.geo.city_name'?: string | undefined; 'threat.indicator.geo.continent_code'?: string | undefined; 'threat.indicator.geo.continent_name'?: string | undefined; 'threat.indicator.geo.country_iso_code'?: string | undefined; 'threat.indicator.geo.country_name'?: string | undefined; 'threat.indicator.geo.location'?: string | { type: string; coordinates: number[]; } | { lat: number; lon: number; } | { location: number[]; } | { location: string; } | undefined; 'threat.indicator.geo.name'?: string | undefined; 'threat.indicator.geo.postal_code'?: string | undefined; 'threat.indicator.geo.region_iso_code'?: string | undefined; 'threat.indicator.geo.region_name'?: string | undefined; 'threat.indicator.geo.timezone'?: string | undefined; 'threat.indicator.ip'?: string | undefined; 'threat.indicator.last_seen'?: string | number | undefined; 'threat.indicator.marking.tlp'?: string | undefined; 'threat.indicator.marking.tlp_version'?: string | undefined; 'threat.indicator.modified_at'?: string | number | undefined; 'threat.indicator.name'?: string | undefined; 'threat.indicator.port'?: string | number | undefined; 'threat.indicator.provider'?: string | undefined; 'threat.indicator.reference'?: string | undefined; 'threat.indicator.registry.data.bytes'?: string | undefined; 'threat.indicator.registry.data.strings'?: string[] | undefined; 'threat.indicator.registry.data.type'?: string | undefined; 'threat.indicator.registry.hive'?: string | undefined; 'threat.indicator.registry.key'?: string | undefined; 'threat.indicator.registry.path'?: string | undefined; 'threat.indicator.registry.value'?: string | undefined; 'threat.indicator.scanner_stats'?: string | number | undefined; 'threat.indicator.sightings'?: string | number | undefined; 'threat.indicator.type'?: string | undefined; 'threat.indicator.url.domain'?: string | undefined; 'threat.indicator.url.extension'?: string | undefined; 'threat.indicator.url.fragment'?: string | undefined; 'threat.indicator.url.full'?: string | undefined; 'threat.indicator.url.original'?: string | undefined; 'threat.indicator.url.password'?: string | undefined; 'threat.indicator.url.path'?: string | undefined; 'threat.indicator.url.port'?: string | number | undefined; 'threat.indicator.url.query'?: string | undefined; 'threat.indicator.url.registered_domain'?: string | undefined; 'threat.indicator.url.scheme'?: string | undefined; 'threat.indicator.url.subdomain'?: string | undefined; 'threat.indicator.url.top_level_domain'?: string | undefined; 'threat.indicator.url.username'?: string | undefined; 'threat.indicator.x509.alternative_names'?: string[] | undefined; 'threat.indicator.x509.issuer.common_name'?: string[] | undefined; 'threat.indicator.x509.issuer.country'?: string[] | undefined; 'threat.indicator.x509.issuer.distinguished_name'?: string | undefined; 'threat.indicator.x509.issuer.locality'?: string[] | undefined; 'threat.indicator.x509.issuer.organization'?: string[] | undefined; 'threat.indicator.x509.issuer.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.issuer.state_or_province'?: string[] | undefined; 'threat.indicator.x509.not_after'?: string | number | undefined; 'threat.indicator.x509.not_before'?: string | number | undefined; 'threat.indicator.x509.public_key_algorithm'?: string | undefined; 'threat.indicator.x509.public_key_curve'?: string | undefined; 'threat.indicator.x509.public_key_exponent'?: string | number | undefined; 'threat.indicator.x509.public_key_size'?: string | number | undefined; 'threat.indicator.x509.serial_number'?: string | undefined; 'threat.indicator.x509.signature_algorithm'?: string | undefined; 'threat.indicator.x509.subject.common_name'?: string[] | undefined; 'threat.indicator.x509.subject.country'?: string[] | undefined; 'threat.indicator.x509.subject.distinguished_name'?: string | undefined; 'threat.indicator.x509.subject.locality'?: string[] | undefined; 'threat.indicator.x509.subject.organization'?: string[] | undefined; 'threat.indicator.x509.subject.organizational_unit'?: string[] | undefined; 'threat.indicator.x509.subject.state_or_province'?: string[] | undefined; 'threat.indicator.x509.version_number'?: string | undefined; 'threat.software.alias'?: string[] | undefined; 'threat.software.id'?: string | undefined; 'threat.software.name'?: string | undefined; 'threat.software.platforms'?: string[] | undefined; 'threat.software.reference'?: string | undefined; 'threat.software.type'?: string | undefined; 'threat.tactic.id'?: string[] | undefined; 'threat.tactic.name'?: string[] | undefined; 'threat.tactic.reference'?: string[] | undefined; 'threat.technique.id'?: string[] | undefined; 'threat.technique.name'?: string[] | undefined; 'threat.technique.reference'?: string[] | undefined; 'threat.technique.subtechnique.id'?: string[] | undefined; 'threat.technique.subtechnique.name'?: string[] | undefined; 'threat.technique.subtechnique.reference'?: string[] | undefined; 'tls.cipher'?: string | undefined; 'tls.client.certificate'?: string | undefined; 'tls.client.certificate_chain'?: string[] | undefined; 'tls.client.hash.md5'?: string | undefined; 'tls.client.hash.sha1'?: string | undefined; 'tls.client.hash.sha256'?: string | undefined; 'tls.client.issuer'?: string | undefined; 'tls.client.ja3'?: string | undefined; 'tls.client.not_after'?: string | number | undefined; 'tls.client.not_before'?: string | number | undefined; 'tls.client.server_name'?: string | undefined; 'tls.client.subject'?: string | undefined; 'tls.client.supported_ciphers'?: string[] | undefined; 'tls.client.x509.alternative_names'?: string[] | undefined; 'tls.client.x509.issuer.common_name'?: string[] | undefined; 'tls.client.x509.issuer.country'?: string[] | undefined; 'tls.client.x509.issuer.distinguished_name'?: string | undefined; 'tls.client.x509.issuer.locality'?: string[] | undefined; 'tls.client.x509.issuer.organization'?: string[] | undefined; 'tls.client.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.client.x509.issuer.state_or_province'?: string[] | undefined; 'tls.client.x509.not_after'?: string | number | undefined; 'tls.client.x509.not_before'?: string | number | undefined; 'tls.client.x509.public_key_algorithm'?: string | undefined; 'tls.client.x509.public_key_curve'?: string | undefined; 'tls.client.x509.public_key_exponent'?: string | number | undefined; 'tls.client.x509.public_key_size'?: string | number | undefined; 'tls.client.x509.serial_number'?: string | undefined; 'tls.client.x509.signature_algorithm'?: string | undefined; 'tls.client.x509.subject.common_name'?: string[] | undefined; 'tls.client.x509.subject.country'?: string[] | undefined; 'tls.client.x509.subject.distinguished_name'?: string | undefined; 'tls.client.x509.subject.locality'?: string[] | undefined; 'tls.client.x509.subject.organization'?: string[] | undefined; 'tls.client.x509.subject.organizational_unit'?: string[] | undefined; 'tls.client.x509.subject.state_or_province'?: string[] | undefined; 'tls.client.x509.version_number'?: string | undefined; 'tls.curve'?: string | undefined; 'tls.established'?: boolean | undefined; 'tls.next_protocol'?: string | undefined; 'tls.resumed'?: boolean | undefined; 'tls.server.certificate'?: string | undefined; 'tls.server.certificate_chain'?: string[] | undefined; 'tls.server.hash.md5'?: string | undefined; 'tls.server.hash.sha1'?: string | undefined; 'tls.server.hash.sha256'?: string | undefined; 'tls.server.issuer'?: string | undefined; 'tls.server.ja3s'?: string | undefined; 'tls.server.not_after'?: string | number | undefined; 'tls.server.not_before'?: string | number | undefined; 'tls.server.subject'?: string | undefined; 'tls.server.x509.alternative_names'?: string[] | undefined; 'tls.server.x509.issuer.common_name'?: string[] | undefined; 'tls.server.x509.issuer.country'?: string[] | undefined; 'tls.server.x509.issuer.distinguished_name'?: string | undefined; 'tls.server.x509.issuer.locality'?: string[] | undefined; 'tls.server.x509.issuer.organization'?: string[] | undefined; 'tls.server.x509.issuer.organizational_unit'?: string[] | undefined; 'tls.server.x509.issuer.state_or_province'?: string[] | undefined; 'tls.server.x509.not_after'?: string | number | undefined; 'tls.server.x509.not_before'?: string | number | undefined; 'tls.server.x509.public_key_algorithm'?: string | undefined; 'tls.server.x509.public_key_curve'?: string | undefined; 'tls.server.x509.public_key_exponent'?: string | number | undefined; 'tls.server.x509.public_key_size'?: string | number | undefined; 'tls.server.x509.serial_number'?: string | undefined; 'tls.server.x509.signature_algorithm'?: string | undefined; 'tls.server.x509.subject.common_name'?: string[] | undefined; 'tls.server.x509.subject.country'?: string[] | undefined; 'tls.server.x509.subject.distinguished_name'?: string | undefined; 'tls.server.x509.subject.locality'?: string[] | undefined; 'tls.server.x509.subject.organization'?: string[] | undefined; 'tls.server.x509.subject.organizational_unit'?: string[] | undefined; 'tls.server.x509.subject.state_or_province'?: string[] | undefined; 'tls.server.x509.version_number'?: string | undefined; 'tls.version'?: string | undefined; 'tls.version_protocol'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'url.domain'?: string | undefined; 'url.extension'?: string | undefined; 'url.fragment'?: string | undefined; 'url.full'?: string | undefined; 'url.original'?: string | undefined; 'url.password'?: string | undefined; 'url.path'?: string | undefined; 'url.port'?: string | number | undefined; 'url.query'?: string | undefined; 'url.registered_domain'?: string | undefined; 'url.scheme'?: string | undefined; 'url.subdomain'?: string | undefined; 'url.top_level_domain'?: string | undefined; 'url.username'?: string | undefined; 'user.changes.domain'?: string | undefined; 'user.changes.email'?: string | undefined; 'user.changes.full_name'?: string | undefined; 'user.changes.group.domain'?: string | undefined; 'user.changes.group.id'?: string | undefined; 'user.changes.group.name'?: string | undefined; 'user.changes.hash'?: string | undefined; 'user.changes.id'?: string | undefined; 'user.changes.name'?: string | undefined; 'user.changes.roles'?: string[] | undefined; 'user.domain'?: string | undefined; 'user.effective.domain'?: string | undefined; 'user.effective.email'?: string | undefined; 'user.effective.full_name'?: string | undefined; 'user.effective.group.domain'?: string | undefined; 'user.effective.group.id'?: string | undefined; 'user.effective.group.name'?: string | undefined; 'user.effective.hash'?: string | undefined; 'user.effective.id'?: string | undefined; 'user.effective.name'?: string | undefined; 'user.effective.roles'?: string[] | undefined; 'user.email'?: string | undefined; 'user.full_name'?: string | undefined; 'user.group.domain'?: string | undefined; 'user.group.id'?: string | undefined; 'user.group.name'?: string | undefined; 'user.hash'?: string | undefined; 'user.id'?: string | undefined; 'user.name'?: string | undefined; 'user.risk.calculated_level'?: string | undefined; 'user.risk.calculated_score'?: number | undefined; 'user.risk.calculated_score_norm'?: number | undefined; 'user.risk.static_level'?: string | undefined; 'user.risk.static_score'?: number | undefined; 'user.risk.static_score_norm'?: number | undefined; 'user.roles'?: string[] | undefined; 'user.target.domain'?: string | undefined; 'user.target.email'?: string | undefined; 'user.target.full_name'?: string | undefined; 'user.target.group.domain'?: string | undefined; 'user.target.group.id'?: string | undefined; 'user.target.group.name'?: string | undefined; 'user.target.hash'?: string | undefined; 'user.target.id'?: string | undefined; 'user.target.name'?: string | undefined; 'user.target.roles'?: string[] | undefined; 'user_agent.device.name'?: string | undefined; 'user_agent.name'?: string | undefined; 'user_agent.original'?: string | undefined; 'user_agent.os.family'?: string | undefined; 'user_agent.os.full'?: string | undefined; 'user_agent.os.kernel'?: string | undefined; 'user_agent.os.name'?: string | undefined; 'user_agent.os.platform'?: string | undefined; 'user_agent.os.type'?: string | undefined; 'user_agent.os.version'?: string | undefined; 'user_agent.version'?: string | undefined; 'vulnerability.category'?: string[] | undefined; 'vulnerability.classification'?: string | undefined; 'vulnerability.description'?: string | undefined; 'vulnerability.enumeration'?: string | undefined; 'vulnerability.id'?: string | undefined; 'vulnerability.reference'?: string | undefined; 'vulnerability.report_id'?: string | undefined; 'vulnerability.scanner.vendor'?: string | undefined; 'vulnerability.score.base'?: number | undefined; 'vulnerability.score.environmental'?: number | undefined; 'vulnerability.score.temporal'?: number | undefined; 'vulnerability.score.version'?: string | undefined; 'vulnerability.severity'?: string | undefined; } & {} & { 'ecs.version'?: string | undefined; 'kibana.alert.risk_score'?: number | undefined; 'kibana.alert.rule.author'?: string | undefined; 'kibana.alert.rule.created_at'?: string | number | undefined; 'kibana.alert.rule.created_by'?: string | undefined; 'kibana.alert.rule.description'?: string | undefined; 'kibana.alert.rule.enabled'?: string | undefined; 'kibana.alert.rule.from'?: string | undefined; 'kibana.alert.rule.interval'?: string | undefined; 'kibana.alert.rule.license'?: string | undefined; 'kibana.alert.rule.note'?: string | undefined; 'kibana.alert.rule.references'?: string[] | undefined; 'kibana.alert.rule.rule_id'?: string | undefined; 'kibana.alert.rule.rule_name_override'?: string | undefined; 'kibana.alert.rule.to'?: string | undefined; 'kibana.alert.rule.type'?: string | undefined; 'kibana.alert.rule.updated_at'?: string | number | undefined; 'kibana.alert.rule.updated_by'?: string | undefined; 'kibana.alert.rule.version'?: string | undefined; 'kibana.alert.severity'?: string | undefined; 'kibana.alert.suppression.docs_count'?: string | number | undefined; 'kibana.alert.suppression.end'?: string | number | undefined; 'kibana.alert.suppression.start'?: string | number | undefined; 'kibana.alert.suppression.terms.field'?: string[] | undefined; 'kibana.alert.suppression.terms.value'?: string[] | undefined; 'kibana.alert.system_status'?: string | undefined; 'kibana.alert.workflow_reason'?: string | undefined; 'kibana.alert.workflow_status_updated_at'?: string | number | undefined; 'kibana.alert.workflow_user'?: string | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/security_schema.ts", "deprecated": false, @@ -450,7 +450,7 @@ "label": "StackAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.evaluation.conditions'?: string | undefined; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | undefined; 'kibana.alert.title'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{} & { 'kibana.alert.evaluation.conditions'?: string | undefined; 'kibana.alert.evaluation.threshold'?: string | number | undefined; 'kibana.alert.evaluation.value'?: string | undefined; 'kibana.alert.title'?: string | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/stack_schema.ts", "deprecated": false, @@ -465,7 +465,7 @@ "label": "TransformHealthAlert", "description": [], "signature": [ - "{} & { 'kibana.alert.results'?: { description?: string | undefined; health_status?: string | undefined; issues?: unknown; node_name?: string | undefined; transform_id?: string | undefined; transform_state?: string | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" + "{} & { 'kibana.alert.results'?: { description?: string | undefined; health_status?: string | undefined; issues?: unknown; node_name?: string | undefined; transform_id?: string | undefined; transform_state?: string | undefined; }[] | undefined; } & { '@timestamp': string | number; 'kibana.alert.instance.id': string; 'kibana.alert.rule.category': string; 'kibana.alert.rule.consumer': string; 'kibana.alert.rule.name': string; 'kibana.alert.rule.producer': string; 'kibana.alert.rule.revision': string | number; 'kibana.alert.rule.rule_type_id': string; 'kibana.alert.rule.uuid': string; 'kibana.alert.status': string; 'kibana.alert.uuid': string; 'kibana.space_ids': string[]; } & { 'event.action'?: string | undefined; 'event.kind'?: string | undefined; 'kibana.alert.action_group'?: string | undefined; 'kibana.alert.case_ids'?: string[] | undefined; 'kibana.alert.consecutive_matches'?: string | number | undefined; 'kibana.alert.duration.us'?: string | number | undefined; 'kibana.alert.end'?: string | number | undefined; 'kibana.alert.flapping'?: boolean | undefined; 'kibana.alert.flapping_history'?: boolean[] | undefined; 'kibana.alert.last_detected'?: string | number | undefined; 'kibana.alert.maintenance_window_ids'?: string[] | undefined; 'kibana.alert.reason'?: string | undefined; 'kibana.alert.rule.execution.uuid'?: string | undefined; 'kibana.alert.rule.parameters'?: unknown; 'kibana.alert.rule.tags'?: string[] | undefined; 'kibana.alert.start'?: string | number | undefined; 'kibana.alert.time_range'?: { gte?: string | number | undefined; lte?: string | number | undefined; } | undefined; 'kibana.alert.url'?: string | undefined; 'kibana.alert.workflow_assignee_ids'?: string[] | undefined; 'kibana.alert.workflow_status'?: string | undefined; 'kibana.alert.workflow_tags'?: string[] | undefined; 'kibana.version'?: string | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-alerts-as-data-utils/src/schemas/generated/transform_health_schema.ts", "deprecated": false, @@ -482,7 +482,7 @@ "label": "alertFieldMap", "description": [], "signature": [ - "{ readonly \"kibana.alert.action_group\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.case_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.duration.us\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.end\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping\": { readonly type: \"boolean\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping_history\": { readonly type: \"boolean\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.maintenance_window_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.instance.id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.last_detected\": { readonly type: \"date\"; readonly required: false; readonly array: false; }; readonly \"kibana.alert.reason\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; readonly multi_fields: ", + "{ readonly \"kibana.alert.action_group\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.case_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.duration.us\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.end\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping\": { readonly type: \"boolean\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.flapping_history\": { readonly type: \"boolean\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.maintenance_window_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.consecutive_matches\": { readonly type: \"long\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.instance.id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.last_detected\": { readonly type: \"date\"; readonly required: false; readonly array: false; }; readonly \"kibana.alert.reason\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; readonly multi_fields: ", { "pluginId": "@kbn/alerts-as-data-utils", "scope": "common", diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 29d2789659ca6..f698476a4bf91 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-12 +date: 2024-03-18 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 ad32ce4bc575d..4bf23901fdeeb 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-12 +date: 2024-03-18 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 5ec6e2db6bb74..b555f177348cf 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-12 +date: 2024-03-18 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 a14493e345487..3aada91936bef 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-12 +date: 2024-03-18 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 039e1bd9bdc99..a5067ed8a97a3 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-12 +date: 2024-03-18 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 a2c1e78921ef5..ba23d3f6bbae3 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-12 +date: 2024-03-18 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 61378d9836aa1..9ae7da46f5f1a 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-12 +date: 2024-03-18 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 243de8b578f05..7c9a0c90bde4c 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-12 +date: 2024-03-18 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 9c4486255ed37..9199912956ea8 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-12 +date: 2024-03-18 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 85f41c7307a72..68b2f8983ee58 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-12 +date: 2024-03-18 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 95924e806f3a0..d6571b679cb14 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-12 +date: 2024-03-18 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 5dfcf3b44a542..013ff7dbca87f 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-12 +date: 2024-03-18 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 4bbe204f85ef0..0e4a387e62fb1 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-12 +date: 2024-03-18 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 2cb880aef3b0a..50d275384a13d 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-12 +date: 2024-03-18 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 f777eee680fd0..1347ff41f1c70 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-12 +date: 2024-03-18 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 a152b6b8bc17b..a785c770da065 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-12 +date: 2024-03-18 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 a93484e2c118b..4b0d9388c002a 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-12 +date: 2024-03-18 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 97a2b5dd72820..1cd6bc3124185 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-12 +date: 2024-03-18 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 b7fd850f803ac..063c74818cb80 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-12 +date: 2024-03-18 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 7efddef3245e8..f005a5c3aa701 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-12 +date: 2024-03-18 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 3522bde5a61dd..8df9b8ff7b76d 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-12 +date: 2024-03-18 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 a43c7bdc21597..6f710b5f64be2 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-12 +date: 2024-03-18 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 63918cc1cc7e6..e7119051361d6 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-12 +date: 2024-03-18 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 e3fa4d02cee61..e6b44c60e8d3b 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-12 +date: 2024-03-18 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 2edd5f638c6f1..1e93ee39ad7aa 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_code_editor.mdx index b78979a48eab3..6c0e30617c7d5 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index b533ffb42406d..81902bcbf936a 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-12 +date: 2024-03-18 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 7e177e12251f2..f5cb0f956555c 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-12 +date: 2024-03-18 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 94215ae6a0a88..8c36e00751a20 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-12 +date: 2024-03-18 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 6d4d43072ec57..5ef00910df4ef 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-12 +date: 2024-03-18 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 770818546f445..178cbda72b09a 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-12 +date: 2024-03-18 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 a903b8d175110..d2334aa97d35d 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-12 +date: 2024-03-18 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 b04396137ac59..e77c0da8afb18 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-12 +date: 2024-03-18 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 39d0a3d98d318..0643f11e6974c 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-12 +date: 2024-03-18 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 0c5c47f49059a..3c042d3d9cc2b 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-12 +date: 2024-03-18 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 a7700c5e06401..28d093c6e10f8 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-12 +date: 2024-03-18 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 3b96a2abad5fe..ee383f2628c56 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_content_management_utils.mdx index 634a6fc5934d1..0c295b4ea274e 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-12 +date: 2024-03-18 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 fb6030ab29cfb..70168a946ffdb 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-12 +date: 2024-03-18 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 2d06becb8a787..ae876603dbe36 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-12 +date: 2024-03-18 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 e5b1261e64526..70261b7f92c3a 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-12 +date: 2024-03-18 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 b4319bd965b81..5b32fa5586ff0 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-12 +date: 2024-03-18 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 9d2ff2808cef9..6a6ad78c609ac 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-12 +date: 2024-03-18 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 106cd67c51a2f..d8808633ad93f 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_application_browser.mdx index 697d3d32a73c2..4db6904fd3b9b 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-12 +date: 2024-03-18 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 7388be9858764..ab0d58396012f 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-12 +date: 2024-03-18 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 838b67b579f91..835fbca35c21e 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-12 +date: 2024-03-18 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 ab02a2596e587..e52167b9fb67a 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-12 +date: 2024-03-18 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 98ccab824aaa8..8f9ae26d0246d 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-12 +date: 2024-03-18 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 0e7359f7e738e..ad45462510836 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-12 +date: 2024-03-18 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 14130e723f14d..c57399f41e3c1 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_base_browser_mocks.devdocs.json index 26da0985adf56..f11f066ebf54e 100644 --- a/api_docs/kbn_core_base_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_base_browser_mocks.devdocs.json @@ -43,7 +43,16 @@ "description": [], "signature": [ "({ production }?: { production?: boolean | undefined; }) => ", - "CoreContext" + "CoreContext", + " & { logger: ", + { + "pluginId": "@kbn/logging-mocks", + "scope": "common", + "docId": "kibKbnLoggingMocksPluginApi", + "section": "def-common.MockedLogger", + "text": "MockedLogger" + }, + "; }" ], "path": "packages/core/base/core-base-browser-mocks/src/core_context.mock.ts", "deprecated": false, diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 92ca4dcbd32e6..d7c7c5729fba2 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-12 +date: 2024-03-18 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 0774b66a9d38e..a4bf205aadc50 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-12 +date: 2024-03-18 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 7f60837c2ca09..9ac41bbf830bb 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-12 +date: 2024-03-18 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 90a4d5fdf4301..4b2456080f01b 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-12 +date: 2024-03-18 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 d7790e98aa1e2..6cb42a82c2725 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-12 +date: 2024-03-18 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 00b964f2f1820..33e984181177d 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-12 +date: 2024-03-18 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 53ca787cc8cc2..f96e1cd9b7b0f 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-12 +date: 2024-03-18 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 c4b971280b7cd..72b4356b074c3 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_chrome_browser.mdx index 8cf6c203ecbfe..e8a40fc6632c6 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-12 +date: 2024-03-18 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 b78117e985742..2ddf219aba353 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-12 +date: 2024-03-18 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 07e643c2db2b1..8853633b18805 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-12 +date: 2024-03-18 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 9df71ae50f857..39ded77e93532 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-12 +date: 2024-03-18 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 e7bd0c338ee58..9726dfd32afaf 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-12 +date: 2024-03-18 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 40f44c691b7c1..2d21d4296fcd0 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-12 +date: 2024-03-18 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 5d131a079a017..9064cf60b30af 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-12 +date: 2024-03-18 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 4adbd2c483e89..c8e9606f40e22 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-12 +date: 2024-03-18 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 ec390bc46205e..671264c2fb2e9 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-12 +date: 2024-03-18 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 fbcc1baf5e1e9..5b8fa3f654f9e 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-12 +date: 2024-03-18 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 716d0dbbf7728..f029fefc89f7e 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-12 +date: 2024-03-18 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 084c38412f964..0617a12670ac9 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-12 +date: 2024-03-18 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 eb3f4ff467e89..cc64cfdfc2a15 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-12 +date: 2024-03-18 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 2851408a64b2d..458e818e6cbc1 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-12 +date: 2024-03-18 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 9e3b302dc5ade..1b702acf45211 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-12 +date: 2024-03-18 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 0e444669b0284..5ec2eb496148d 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-12 +date: 2024-03-18 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 40426138586d9..58b67ae3a373f 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-12 +date: 2024-03-18 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 6813c21e97f2b..123da36dfee80 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-12 +date: 2024-03-18 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 a8a376b5e2f15..ced832ca4a0d0 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-12 +date: 2024-03-18 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 5ca19b76b724b..1b85ad7a9eac0 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-12 +date: 2024-03-18 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 e5c77c7961f98..fb0f21a697b5e 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-12 +date: 2024-03-18 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 b4b1d655cd5f0..26a09eb79eed4 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index a0c933d446a1b..8f89739770de5 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index c1d8a1e8e3bea..61d70fbb0d772 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index bf1ed82aba789..c3dce644ced27 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index fb0780fd6cb11..92ae2a1b0bb29 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-12 +date: 2024-03-18 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 135106c4a05e7..ed7affa837c88 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-12 +date: 2024-03-18 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 f9cef70a0753b..682f0d56eeef3 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-12 +date: 2024-03-18 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 1cca6a169d28a..61d4684622101 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-12 +date: 2024-03-18 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 724f2e169d2d5..3c7ede0000f91 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-12 +date: 2024-03-18 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 445019456c80c..3034b52f3715d 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-12 +date: 2024-03-18 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 77474599a634c..62d7994ed3cae 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-12 +date: 2024-03-18 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 3fdb7bbcaf625..e535b4ebfacd2 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-12 +date: 2024-03-18 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 6ca053f3d6d4d..3f5d5ca756b32 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-12 +date: 2024-03-18 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 736b1b2f30568..44bb9efd4c526 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-12 +date: 2024-03-18 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 8aa6dc537847c..961510fcede31 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-12 +date: 2024-03-18 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 031bdae299a75..a5068a91f6fe9 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-12 +date: 2024-03-18 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 4ddfbc6d41d22..e69b5849949a0 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-12 +date: 2024-03-18 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 9f129610419d9..6d0e319807b91 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-12 +date: 2024-03-18 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 c135b83c67ee2..42bc09ec5f93c 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-12 +date: 2024-03-18 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 cf7f23828810e..83f9475e526b7 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-12 +date: 2024-03-18 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 77e0cf36d5e1b..8f4dadc5cc477 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json index f65d2dcfff8d7..674a7dcbe6794 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.devdocs.json +++ b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json @@ -112,6 +112,26 @@ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-request-handler-context-server", + "id": "def-common.CoreRequestHandlerContext.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + } + ], + "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false 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 046090a3cecf2..20bb6a0bb0e99 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_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 | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 11 | 0 | +| 15 | 0 | 12 | 0 | ## Common diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 24007e6172ff3..8cacb01b87d38 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-12 +date: 2024-03-18 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 8c49ff601d66d..4e0a3c9de83a9 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-12 +date: 2024-03-18 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 a6e249fd30ed5..fbdd03fb35ed4 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-12 +date: 2024-03-18 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 a45d852ad9914..18c44e64cf322 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-12 +date: 2024-03-18 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 2a680f2d87926..b5b48b70c7f53 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-12 +date: 2024-03-18 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 c0e574bab89ef..e1f09959a9ece 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -3844,10 +3844,6 @@ "plugin": "crossClusterReplication", "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_stats_route.ts" }, - { - "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts" - }, { "plugin": "globalSearch", "path": "x-pack/plugins/global_search/server/routes/get_searchable_types.ts" @@ -4084,6 +4080,10 @@ "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts" }, + { + "plugin": "enterpriseSearch", + "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts" + }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/crawler/crawler_multiple_schedules.ts" @@ -6374,14 +6374,6 @@ "plugin": "crossClusterReplication", "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_create_route.ts" }, - { - "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts" - }, - { - "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts" - }, { "plugin": "globalSearch", "path": "x-pack/plugins/global_search/server/routes/find.ts" @@ -9096,10 +9088,6 @@ "plugin": "crossClusterReplication", "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_delete_route.ts" }, - { - "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts" - }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/crawler/crawler_extraction_rules.ts" @@ -13568,12 +13556,32 @@ }, { "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts" + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts" }, { "plugin": "elasticAssistant", "path": "x-pack/plugins/elastic_assistant/server/routes/evaluate/get_evaluate.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts" + }, { "plugin": "logsShared", "path": "x-pack/plugins/observability_solution/logs_shared/server/lib/adapters/framework/kibana_framework_adapter.ts" @@ -13744,43 +13752,43 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.ts" }, { "plugin": "securitySolution", @@ -14285,6 +14293,10 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/server/services/security/fleet_router.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts" + }, { "plugin": "logsShared", "path": "x-pack/plugins/observability_solution/logs_shared/server/lib/adapters/framework/kibana_framework_adapter.ts" @@ -14904,10 +14916,38 @@ "plugin": "ecsDataQualityDashboard", "path": "x-pack/plugins/ecs_data_quality_dashboard/server/routes/results/post_results.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts" + }, { "plugin": "elasticAssistant", "path": "x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts" + }, { "plugin": "logsShared", "path": "x-pack/plugins/observability_solution/logs_shared/server/lib/adapters/framework/kibana_framework_adapter.ts" @@ -15030,67 +15070,67 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_rule_health/get_rule_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/import_rules/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/setup/setup_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_rule_health/get_rule_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/import_rules/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/setup/setup_health_route.ts" }, { "plugin": "securitySolution", @@ -15614,6 +15654,14 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/server/services/security/fleet_router.ts" }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts" + }, + { + "plugin": "elasticAssistant", + "path": "x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts" + }, { "plugin": "logsShared", "path": "x-pack/plugins/observability_solution/logs_shared/server/lib/adapters/framework/kibana_framework_adapter.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 46fde779de48d..610b7e752a012 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-12 +date: 2024-03-18 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 6427afaa88699..23f5e57d6fa78 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-12 +date: 2024-03-18 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 bad8ec754e6dd..6233785fbb98e 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-12 +date: 2024-03-18 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 c145e062b3d94..a2f314e689624 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-12 +date: 2024-03-18 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 c7349b4b70c7b..b18e8bf5f11a9 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-12 +date: 2024-03-18 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 c2fe772b96d8f..1c2f265170dbf 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-12 +date: 2024-03-18 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 ef8022a6e0e22..01c0d6137a849 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-12 +date: 2024-03-18 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 8ce6c42723d69..c5360be2f0f1e 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-12 +date: 2024-03-18 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 5c26dbbb65f9a..13f37188545e6 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-12 +date: 2024-03-18 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 ac2507dce32a7..dfdd78f12624e 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-12 +date: 2024-03-18 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 346606612b82f..ca74c48d2a2ec 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index 13a073fb2437c..9a08f80a601b1 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -339,6 +339,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreSetup.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceSetup}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreSetup.getStartServices", @@ -844,6 +866,28 @@ "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreStart.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 72e4019767ca7..2665a614b3897 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.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 | |-------------------|-----------|------------------------|-----------------| -| 32 | 0 | 0 | 0 | +| 34 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json index 9c0e60e2cd942..547c6390aa72a 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json @@ -244,6 +244,14 @@ "section": "def-common.FatalErrorsSetup", "text": "FatalErrorsSetup" }, + ">; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, ">; plugins: { onStart: jest.Mock; }; }, any, any]>, [], any>; http: ", { "pluginId": "@kbn/core-http-browser-mocks", @@ -300,6 +308,14 @@ "section": "def-common.ThemeServiceSetup", "text": "ThemeServiceSetup" }, + ">; security: jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, ">; plugins: { onSetup: jest.Mock; onStart: jest.Mock; }; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser-mocks/src/index.ts", @@ -489,6 +505,14 @@ "section": "def-common.FatalErrorsSetup", "text": "FatalErrorsSetup" }, + ">; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, ">; plugins: { onStart: jest.Mock; }; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser-mocks/src/index.ts", diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 215a22e947759..10b9da41381e0 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_lifecycle_server.devdocs.json index 330fbe8c4e162..a514499ccd655 100644 --- a/api_docs/kbn_core_lifecycle_server.devdocs.json +++ b/api_docs/kbn_core_lifecycle_server.devdocs.json @@ -654,6 +654,28 @@ "path": "packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-server", + "id": "def-common.CoreSetup.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceSetup}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -924,6 +946,28 @@ "path": "packages/core/lifecycle/core-lifecycle-server/src/core_start.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-server", + "id": "def-common.CoreStart.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-server/src/core_start.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 33dd8e01d03d4..e2dd3269cf8f7 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_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 | |-------------------|-----------|------------------------|-----------------| -| 36 | 0 | 0 | 0 | +| 38 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json index 3eb3da50099db..dd259b586305c 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json @@ -184,7 +184,15 @@ "IExecutionContext", ">; coreUsageData: jest.Mocked<", "InternalCoreUsageDataSetup", - ">; customBranding: { register: jest.Mock; getBrandingFor: jest.Mock; }; userSettings: { setUserProfileSettings: jest.Mock; getUserSettingDarkMode: jest.Mock; }; }" + ">; customBranding: { register: jest.Mock; getBrandingFor: jest.Mock; }; userSettings: { setUserProfileSettings: jest.Mock; getUserSettingDarkMode: jest.Mock; }; security: jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-server-mocks/src/index.ts", "deprecated": false, @@ -282,7 +290,15 @@ "section": "def-common.InternalDeprecationsServiceStart", "text": "InternalDeprecationsServiceStart" }, - ">; customBranding: {}; }" + ">; customBranding: {}; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-server-mocks/src/index.ts", "deprecated": false, diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 4dc8c48a42dcf..7bf6db5758fee 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-12 +date: 2024-03-18 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 b9e45acfc1ce6..d40a2c817ec22 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-12 +date: 2024-03-18 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 98b5afb781fd7..c287e73107736 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-12 +date: 2024-03-18 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 b3e10411d6827..b3e612b53a1d4 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-12 +date: 2024-03-18 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 f8ac471b15b2b..258c2a93c2229 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-12 +date: 2024-03-18 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 5fe5ecc520756..0236f0e195ede 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-12 +date: 2024-03-18 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 9f7463ad04d38..4a3bed7b9ca05 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-12 +date: 2024-03-18 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 aa35a4224ca16..20916777fd88e 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-12 +date: 2024-03-18 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 c581ea31df1b7..a0f93c405613e 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-12 +date: 2024-03-18 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 9f9935ad0b243..ecafb95cf149e 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-12 +date: 2024-03-18 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 3be3530a73d15..c434a1202fa66 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-12 +date: 2024-03-18 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 494253547522c..11dd6338b12f5 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-12 +date: 2024-03-18 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 544fba7f7b6b1..10ad6ddcf5311 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-12 +date: 2024-03-18 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 6eea4b4be9b71..09e8f5ca437d8 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-12 +date: 2024-03-18 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 bd96bcde4229f..b6e592226db83 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-12 +date: 2024-03-18 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 fc73c820bf764..d8af55e584a53 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-12 +date: 2024-03-18 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 eb9e6930ee6eb..4bb21a8ef18f3 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-12 +date: 2024-03-18 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 682d40f17f844..80a74b1d57c3e 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-12 +date: 2024-03-18 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 4ef27122205a2..8b157b05ba5d8 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-12 +date: 2024-03-18 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 b95fab994dc2b..be2c776e742b8 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-12 +date: 2024-03-18 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 fb19e264a1a95..1980197e4ee29 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-12 +date: 2024-03-18 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 7c3b8f5fe7ab5..e5874eecf44a7 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-12 +date: 2024-03-18 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 8b939fe68989b..1c74a35eac436 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-12 +date: 2024-03-18 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 2a0557a70e679..86f120180765d 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-12 +date: 2024-03-18 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 2d26d75a051ba..f459d6c005a6f 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-12 +date: 2024-03-18 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 ccdabd805e205..063f8e0842b05 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-12 +date: 2024-03-18 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 9ef238e1cb2d3..d5d0a8a03ce9e 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-12 +date: 2024-03-18 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 6b85f0754ffe8..6f4260b302477 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-12 +date: 2024-03-18 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 32ba623caf339..b29b92188dd5e 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-12 +date: 2024-03-18 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 be1387b3b2a47..8532bb5c399b1 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-12 +date: 2024-03-18 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 afe07bab74b01..2104527d18328 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-12 +date: 2024-03-18 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 41c543e668559..3e38a3d3848ea 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_root_server_internal.mdx index 4ca8ac26734c5..0e2f22cd85cee 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-12 +date: 2024-03-18 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 f5c2c90f4529a..61e9d1a07bac1 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-12 +date: 2024-03-18 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 7d00fe71e3bfa..c4cd66ecdaae7 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-12 +date: 2024-03-18 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 09d9bf2162b68..8e8ddf7b94828 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-12 +date: 2024-03-18 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 23a3cf7ab7822..7b44ce471e21f 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-12 +date: 2024-03-18 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 1a6096e003ef8..c30de0d1f59b4 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-12 +date: 2024-03-18 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 a66134d833d70..a85be502764a2 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-12 +date: 2024-03-18 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 4c6efa985c42b..167d7de53448f 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-12 +date: 2024-03-18 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 d0b80c8a31001..e640d2946f8b9 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-12 +date: 2024-03-18 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 5b3818d73ca97..97f72c5f82edb 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-12 +date: 2024-03-18 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 dfadaf9046d4c..4b5b39ea56f33 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-12 +date: 2024-03-18 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 5195ce952e219..b4dcc4f8648d3 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 5aed78b6d8516..0356bd9b0ea3c 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-12 +date: 2024-03-18 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 0b3cb5ecd1a82..ca16bf2d0a3e2 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-12 +date: 2024-03-18 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 63735026e811c..293722b7ecc91 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-12 +date: 2024-03-18 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 2da0180ca7ee1..9d511a9316e91 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-12 +date: 2024-03-18 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 b85acbb063729..6b5288f449a34 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-12 +date: 2024-03-18 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 6716b1825f9f1..1d2c9a8465c43 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_security_browser.devdocs.json new file mode 100644 index 0000000000000..868b3b9c39522 --- /dev/null +++ b/api_docs/kbn_core_security_browser.devdocs.json @@ -0,0 +1,230 @@ +{ + "id": "@kbn/core-security-browser", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreAuthenticationService", + "type": "Interface", + "tags": [], + "label": "CoreAuthenticationService", + "description": [ + "\nCore's authentication service\n" + ], + "path": "packages/core/security/core-security-browser/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreAuthenticationService.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nReturns currently authenticated user\nand throws if current user isn't authenticated." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + ">" + ], + "path": "packages/core/security/core-security-browser/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreSecurityContract", + "type": "Interface", + "tags": [], + "label": "CoreSecurityContract", + "description": [ + "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreSecurityContract.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup", + "type": "Interface", + "tags": [], + "label": "SecurityServiceSetup", + "description": [ + "\nSetup contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup.registerSecurityApi", + "type": "Function", + "tags": [], + "label": "registerSecurityApi", + "description": [ + "\nRegister the security implementation that then will be used and re-exposed by Core.\n" + ], + "signature": [ + "(api: ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + }, + ") => void" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup.registerSecurityApi.$1", + "type": "Object", + "tags": [], + "label": "api", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + } + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityServiceStart", + "description": [ + "\nStart contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nThe {@link CoreAuthenticationService | authentication service}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.AuthenticationServiceContract", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceContract", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx new file mode 100644 index 0000000000000..3e75d35b75c88 --- /dev/null +++ b/api_docs/kbn_core_security_browser.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: kibKbnCoreSecurityBrowserPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] +--- +import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 3 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_browser_internal.devdocs.json b/api_docs/kbn_core_security_browser_internal.devdocs.json new file mode 100644 index 0000000000000..a813bdc65d11c --- /dev/null +++ b/api_docs/kbn_core_security_browser_internal.devdocs.json @@ -0,0 +1,207 @@ +{ + "id": "@kbn/core-security-browser-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService", + "type": "Class", + "tags": [], + "label": "SecurityService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserInternalPluginApi", + "section": "def-common.SecurityService", + "text": "SecurityService" + }, + " implements ", + "CoreService", + "<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ", ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "coreContext", + "description": [], + "signature": [ + "CoreContext" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.InternalSecurityServiceSetup", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceSetup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.InternalSecurityServiceStart", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx new file mode 100644 index 0000000000000..9b1b53051bfb3 --- /dev/null +++ b/api_docs/kbn_core_security_browser_internal.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: kibKbnCoreSecurityBrowserInternalPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] +--- +import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 8 | 0 | 8 | 0 | + +## Common + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_browser_mocks.devdocs.json b/api_docs/kbn_core_security_browser_mocks.devdocs.json new file mode 100644 index 0000000000000..9d1edf7048bca --- /dev/null +++ b/api_docs/kbn_core_security_browser_mocks.devdocs.json @@ -0,0 +1,154 @@ +{ + "id": "@kbn/core-security-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock", + "type": "Object", + "tags": [], + "label": "securityServiceMock", + "description": [], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => { setup: jest.Mock; start: jest.Mock; stop: jest.Mock; }" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createSetup", + "type": "Function", + "tags": [], + "label": "createSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createStart", + "type": "Function", + "tags": [], + "label": "createStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createInternalSetup", + "type": "Function", + "tags": [], + "label": "createInternalSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createInternalStart", + "type": "Function", + "tags": [], + "label": "createInternalStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx new file mode 100644 index 0000000000000..cd94773a0530e --- /dev/null +++ b/api_docs/kbn_core_security_browser_mocks.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: kibKbnCoreSecurityBrowserMocksPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] +--- +import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_security_common.devdocs.json b/api_docs/kbn_core_security_common.devdocs.json new file mode 100644 index 0000000000000..af196d5e34931 --- /dev/null +++ b/api_docs/kbn_core_security_common.devdocs.json @@ -0,0 +1,347 @@ +{ + "id": "@kbn/core-security-common", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser", + "type": "Interface", + "tags": [], + "label": "AuthenticatedUser", + "description": [ + "\nRepresents the currently authenticated user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " extends ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.User", + "text": "User" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_realm", + "type": "Object", + "tags": [], + "label": "authentication_realm", + "description": [ + "\nThe name and type of the Realm that has authenticated the user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.UserRealm", + "text": "UserRealm" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.lookup_realm", + "type": "Object", + "tags": [], + "label": "lookup_realm", + "description": [ + "\nThe name and type of the Realm where the user information were retrieved from." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.UserRealm", + "text": "UserRealm" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_provider", + "type": "Object", + "tags": [], + "label": "authentication_provider", + "description": [ + "\nThe authentication provider that used to authenticate user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticationProvider", + "text": "AuthenticationProvider" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_type", + "type": "string", + "tags": [], + "label": "authentication_type", + "description": [ + "\nThe AuthenticationType used by ES to authenticate the user.\n" + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.elastic_cloud_user", + "type": "boolean", + "tags": [], + "label": "elastic_cloud_user", + "description": [ + "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.profile_uid", + "type": "string", + "tags": [], + "label": "profile_uid", + "description": [ + "\nUser profile ID of this user." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider", + "type": "Interface", + "tags": [], + "label": "AuthenticationProvider", + "description": [ + "\nType and name tuple to identify provider used to authenticate user." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\nType of the Kibana authentication provider." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nName of the Kibana authentication provider (arbitrary string)." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User", + "type": "Interface", + "tags": [], + "label": "User", + "description": [ + "\nA set of fields describing Kibana user." + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.username", + "type": "string", + "tags": [], + "label": "username", + "description": [], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.email", + "type": "string", + "tags": [], + "label": "email", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.full_name", + "type": "string", + "tags": [], + "label": "full_name", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.roles", + "type": "Object", + "tags": [], + "label": "roles", + "description": [], + "signature": [ + "readonly string[]" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm", + "type": "Interface", + "tags": [], + "label": "UserRealm", + "description": [ + "\nAn Elasticsearch realm that was used to resolve and authenticate the user." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nArbitrary name of the security realm." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\nType of the security realm (file, native, saml etc.)." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx new file mode 100644 index 0000000000000..7d0cbbefa39cb --- /dev/null +++ b/api_docs/kbn_core_security_common.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: kibKbnCoreSecurityCommonPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] +--- +import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 20 | 0 | 6 | 0 | + +## Common + +### Interfaces + + diff --git a/api_docs/kbn_core_security_server.devdocs.json b/api_docs/kbn_core_security_server.devdocs.json new file mode 100644 index 0000000000000..6e06a416514b6 --- /dev/null +++ b/api_docs/kbn_core_security_server.devdocs.json @@ -0,0 +1,335 @@ +{ + "id": "@kbn/core-security-server", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "AuthcRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService", + "type": "Interface", + "tags": [], + "label": "CoreAuthenticationService", + "description": [ + "\nCore's authentication service\n" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nRetrieve the user bound to the provided request, or null if\nno user is authenticated.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "The request to retrieve the authenticated user for." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityContract", + "type": "Interface", + "tags": [], + "label": "CoreSecurityContract", + "description": [ + "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityContract.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "SecurityRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityRequestHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup", + "type": "Interface", + "tags": [], + "label": "SecurityServiceSetup", + "description": [ + "\nSetup contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup.registerSecurityApi", + "type": "Function", + "tags": [], + "label": "registerSecurityApi", + "description": [ + "\nRegister the security implementation that then will be used and re-exposed by Core.\n" + ], + "signature": [ + "(api: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + }, + ") => void" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup.registerSecurityApi.$1", + "type": "Object", + "tags": [], + "label": "api", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + } + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityServiceStart", + "description": [ + "\nStart contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nThe {@link CoreAuthenticationService | authentication service}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthenticationServiceContract", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceContract", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx new file mode 100644 index 0000000000000..227dc11d4441d --- /dev/null +++ b/api_docs/kbn_core_security_server.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: kibKbnCoreSecurityServerPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] +--- +import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 15 | 0 | 7 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_server_internal.devdocs.json b/api_docs/kbn_core_security_server_internal.devdocs.json new file mode 100644 index 0000000000000..ad646e17ccfa2 --- /dev/null +++ b/api_docs/kbn_core_security_server_internal.devdocs.json @@ -0,0 +1,339 @@ +{ + "id": "@kbn/core-security-server-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext", + "type": "Class", + "tags": [], + "label": "CoreSecurityRouteHandlerContext", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityServerInternalPluginApi", + "section": "def-common.CoreSecurityRouteHandlerContext", + "text": "CoreSecurityRouteHandlerContext" + }, + " implements ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "#authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "securityStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService", + "type": "Class", + "tags": [], + "label": "SecurityService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityServerInternalPluginApi", + "section": "def-common.SecurityService", + "text": "SecurityService" + }, + " implements ", + "CoreService", + "<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ", ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "coreContext", + "description": [], + "signature": [ + "CoreContext" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.InternalSecurityServiceSetup", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceSetup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-server-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.InternalSecurityServiceStart", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx new file mode 100644 index 0000000000000..7afc2aa8b2756 --- /dev/null +++ b/api_docs/kbn_core_security_server_internal.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: kibKbnCoreSecurityServerInternalPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] +--- +import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 14 | 0 | + +## Common + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_server_mocks.devdocs.json b/api_docs/kbn_core_security_server_mocks.devdocs.json new file mode 100644 index 0000000000000..8f3b32bc57004 --- /dev/null +++ b/api_docs/kbn_core_security_server_mocks.devdocs.json @@ -0,0 +1,178 @@ +{ + "id": "@kbn/core-security-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock", + "type": "Object", + "tags": [], + "label": "securityServiceMock", + "description": [], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => { setup: jest.Mock; start: jest.Mock; stop: jest.Mock; }" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createSetup", + "type": "Function", + "tags": [], + "label": "createSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createStart", + "type": "Function", + "tags": [], + "label": "createStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createInternalSetup", + "type": "Function", + "tags": [], + "label": "createInternalSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createInternalStart", + "type": "Function", + "tags": [], + "label": "createInternalStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createRequestHandlerContext", + "type": "Function", + "tags": [], + "label": "createRequestHandlerContext", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx new file mode 100644 index 0000000000000..a6fd91e5b4071 --- /dev/null +++ b/api_docs/kbn_core_security_server_mocks.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: kibKbnCoreSecurityServerMocksPluginApi +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-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] +--- +import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 0 | 7 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index d34bb9a6c7513..163ce07c83564 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-12 +date: 2024-03-18 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 641251da53a5b..9ab8257ec203e 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-12 +date: 2024-03-18 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 ee72a7062d187..878a02d158647 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-12 +date: 2024-03-18 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 0ac76c7179799..0e7e98f9d3bfa 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-12 +date: 2024-03-18 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 c98adbba18c0e..29f802f97d7d1 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-12 +date: 2024-03-18 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 fc2af17bfe7e1..d92c3bef05f62 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-12 +date: 2024-03-18 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 0cabe0c4ba0a9..25a079c747099 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-12 +date: 2024-03-18 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 511860d4a36d5..5be3a2431b414 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_core_test_helpers_model_versions.devdocs.json index 7e2f256a95f89..f77cfd048a4d8 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.devdocs.json +++ b/api_docs/kbn_core_test_helpers_model_versions.devdocs.json @@ -302,10 +302,10 @@ }, { "parentPluginId": "@kbn/core-test-helpers-model-versions", - "id": "def-common.ModelVersionTestKit.tearsDown", + "id": "def-common.ModelVersionTestKit.tearDown", "type": "Function", "tags": [], - "label": "tearsDown", + "label": "tearDown", "description": [ "\nCleanup function that will delete the test index.\nShould be called before calling `testbed.prepareTestKit` again." ], diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 82d92b23eb9a3..e50364d61aa5d 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-12 +date: 2024-03-18 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 ee3d049b0ac5a..8455c7b4146d8 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-12 +date: 2024-03-18 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 0efaa0419e3dc..f5681b243d36d 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-12 +date: 2024-03-18 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 e809681084d8b..9bbd738a794f6 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-12 +date: 2024-03-18 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 3974b299cb4bf..787ad6445acb4 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 93be19728835c..5c0c043ad0eab 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-12 +date: 2024-03-18 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 72921fcf3ee7e..259e105f66dfd 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-12 +date: 2024-03-18 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 38793dd77aa15..23bccc5ddb3ef 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_core_ui_settings_common.mdx index f5bc6714877e5..abd80ed56b643 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-12 +date: 2024-03-18 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 87a7bbac6df92..8c4e254e69568 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-12 +date: 2024-03-18 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 9fabd1fce3c03..ffac51c3da739 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-12 +date: 2024-03-18 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 ceb8064dbf740..2151f810d65f6 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-12 +date: 2024-03-18 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 e16fd165fc59f..326f8a25e3c2a 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-12 +date: 2024-03-18 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 876bb8b8ff408..1673cfa30f338 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-12 +date: 2024-03-18 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 7312feb7aba59..f73327fe76d96 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-12 +date: 2024-03-18 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 e2ac9ac4294c2..45fdc2b66617e 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-12 +date: 2024-03-18 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 9ebd126bd1047..02058712bf5ba 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-12 +date: 2024-03-18 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 0c860e0ef7cf0..ce060b4d83605 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-12 +date: 2024-03-18 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 7a9b560c0a3d0..343bbe0e13311 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-12 +date: 2024-03-18 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 9f691908667c2..a9375982c9f8b 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-12 +date: 2024-03-18 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 366a61da70c28..15fdf9a2a4767 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-12 +date: 2024-03-18 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 7f617efac18a8..380f125a316e8 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-12 +date: 2024-03-18 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 59e0e1023620d..0178f5a63371a 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-12 +date: 2024-03-18 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 f3927a4a4e4db..31c5c55707d85 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-12 +date: 2024-03-18 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 25a617c21ba21..9c73c1b5af84b 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-12 +date: 2024-03-18 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 5fd91692650d2..87a03164bb527 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-12 +date: 2024-03-18 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 d2029d367426d..f05d3c9cee1f9 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-12 +date: 2024-03-18 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 29cf8cf5ae6e7..602ca1abf255b 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-12 +date: 2024-03-18 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 4b6fc1df89538..b1555674e05a6 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-12 +date: 2024-03-18 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 a57f1565950aa..e66d7c7dab189 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 8d7a8cfe5d994..0e4cbc5db0ebc 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 857e199e8692b..ab9fa7c3732e8 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-12 +date: 2024-03-18 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 e3b6677fa3224..0a3b4bd069cf6 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-12 +date: 2024-03-18 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 d49aae4d366a9..7a781a9197594 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 0eaac977d7ba3..71dd25f57af50 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-12 +date: 2024-03-18 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 10bfe0145db5f..4ef51005b5f72 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-12 +date: 2024-03-18 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 2e87a77a64cb3..3517f54b9ccf1 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-12 +date: 2024-03-18 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 66db3b2bbd5a6..785d0825d7212 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-12 +date: 2024-03-18 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 230508632f027..f498b1777ff3b 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-12 +date: 2024-03-18 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 a1804277f1669..bb46e5ab9906f 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-12 +date: 2024-03-18 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 6a53ec5d3d7ef..1031ba686a336 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-12 +date: 2024-03-18 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 5852c5805422d..495325415aca5 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-12 +date: 2024-03-18 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 3f30bac9992f1..cc865cfdb4030 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index bfd0c508ee8f0..03a1f398ebb68 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-12 +date: 2024-03-18 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 d4045b5ff04ad..5406b8c855ba5 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_dom_drag_drop.mdx index f7c51ac652604..237fd627c8022 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 527ab5660d9f9..98937c750387c 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-12 +date: 2024-03-18 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 3beccb738af61..e2637b2f51de9 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-12 +date: 2024-03-18 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 d19112c40bcba..8a8b14a177212 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-12 +date: 2024-03-18 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 96907c9c54f07..1a08ccdbd8e0a 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -159,7 +159,7 @@ "label": "AssistantProvider", "description": [], "signature": [ - "({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, assistantTelemetry, augmentMessageCodeBlocks, baseAllow, baseAllowReplacement, defaultAllow, defaultAllowReplacement, docLinks, basePath, basePromptContexts, baseQuickPrompts, baseSystemPrompts, children, getComments, http, getInitialConversations, nameSpace, setConversations, setDefaultAllow, setDefaultAllowReplacement, title, toasts, }: React.PropsWithChildren<", + "({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, assistantTelemetry, augmentMessageCodeBlocks, baseAllow, baseAllowReplacement, defaultAllow, defaultAllowReplacement, docLinks, basePath, basePromptContexts, baseQuickPrompts, baseSystemPrompts, children, getComments, http, baseConversations, nameSpace, setDefaultAllow, setDefaultAllowReplacement, title, toasts, }: React.PropsWithChildren<", "AssistantProviderProps", ">) => JSX.Element" ], @@ -172,7 +172,7 @@ "id": "def-public.AssistantProvider.$1", "type": "CompoundType", "tags": [], - "label": "{\n actionTypeRegistry,\n alertsIndexPattern,\n assistantAvailability,\n assistantTelemetry,\n augmentMessageCodeBlocks,\n baseAllow,\n baseAllowReplacement,\n defaultAllow,\n defaultAllowReplacement,\n docLinks,\n basePath,\n basePromptContexts = [],\n baseQuickPrompts = [],\n baseSystemPrompts = BASE_SYSTEM_PROMPTS,\n children,\n getComments,\n http,\n getInitialConversations,\n nameSpace = DEFAULT_ASSISTANT_NAMESPACE,\n setConversations,\n setDefaultAllow,\n setDefaultAllowReplacement,\n title = DEFAULT_ASSISTANT_TITLE,\n toasts,\n}", + "label": "{\n actionTypeRegistry,\n alertsIndexPattern,\n assistantAvailability,\n assistantTelemetry,\n augmentMessageCodeBlocks,\n baseAllow,\n baseAllowReplacement,\n defaultAllow,\n defaultAllowReplacement,\n docLinks,\n basePath,\n basePromptContexts = [],\n baseQuickPrompts = [],\n baseSystemPrompts = BASE_SYSTEM_PROMPTS,\n children,\n getComments,\n http,\n baseConversations,\n nameSpace = DEFAULT_ASSISTANT_NAMESPACE,\n setDefaultAllow,\n setDefaultAllowReplacement,\n title = DEFAULT_ASSISTANT_TITLE,\n toasts,\n}", "description": [], "signature": [ "React.PropsWithChildren<", @@ -188,6 +188,239 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkChangeConversations", + "type": "Function", + "tags": [], + "label": "bulkChangeConversations", + "description": [], + "signature": [ + "(http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + }, + ", conversationsActions: ", + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.ConversationsBulkActions", + "text": "ConversationsBulkActions" + }, + ", toasts?: ", + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + }, + " | undefined) => Promise<", + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.BulkActionResponse", + "text": "BulkActionResponse" + }, + " | undefined>" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkChangeConversations.$1", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkChangeConversations.$2", + "type": "Object", + "tags": [], + "label": "conversationsActions", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.ConversationsBulkActions", + "text": "ConversationsBulkActions" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkChangeConversations.$3", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + }, + " | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getConversationById", + "type": "Function", + "tags": [], + "label": "getConversationById", + "description": [ + "\nAPI call for getting conversation by id.\n" + ], + "signature": [ + "({ http, id, signal, toasts, }: ", + "GetConversationByIdParams", + ") => Promise<", + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Conversation", + "text": "Conversation" + }, + " | undefined>" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getConversationById.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n id,\n signal,\n toasts,\n}", + "description": [], + "signature": [ + "GetConversationByIdParams" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.mergeBaseWithPersistedConversations", + "type": "Function", + "tags": [], + "label": "mergeBaseWithPersistedConversations", + "description": [], + "signature": [ + "(baseConversations: Record, conversationsData: ", + "FetchConversationsResponse", + ") => Record" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.mergeBaseWithPersistedConversations.$1", + "type": "Object", + "tags": [], + "label": "baseConversations", + "description": [], + "signature": [ + "Record" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.mergeBaseWithPersistedConversations.$2", + "type": "Object", + "tags": [], + "label": "conversationsData", + "description": [], + "signature": [ + "FetchConversationsResponse" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.NewChat", @@ -226,26 +459,26 @@ }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.NewChatById", + "id": "def-public.NewChatByTitle", "type": "Function", "tags": [], - "label": "NewChatById", + "label": "NewChatByTitle", "description": [ - "\n`NewChatByID` displays a _New chat_ icon button by providing only the `promptContextId`\nof a context that was (already) registered by the `useAssistantOverlay` hook. You may\noptionally style the button icon, or override the default _New chat_ text with custom\ncontent, like {'🪄✨'}\n\nUSE THIS WHEN: all the data necessary to start a new chat is NOT available\nin the same part of the React tree as the _New chat_ button. When paired\nwith the `useAssistantOverlay` hook, this option enables context to be be\nregistered where the data is available, and then the _New chat_ button can be displayed\nin another part of the tree." + "\n`NewChatByTitle` displays a _New chat_ icon button by providing only the `promptContextId`\nof a context that was (already) registered by the `useAssistantOverlay` hook. You may\noptionally style the button icon, or override the default _New chat_ text with custom\ncontent, like {'🪄✨'}\n\nUSE THIS WHEN: all the data necessary to start a new chat is NOT available\nin the same part of the React tree as the _New chat_ button. When paired\nwith the `useAssistantOverlay` hook, this option enables context to be be\nregistered where the data is available, and then the _New chat_ button can be displayed\nin another part of the tree." ], "signature": [ "React.NamedExoticComponent<", "Props", ">" ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/new_chat_by_id/index.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/new_chat_by_title/index.tsx", "deprecated": false, "trackAdoption": false, "returnComment": [], "children": [ { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.NewChatById.$1", + "id": "def-public.NewChatByTitle.$1", "type": "Uncategorized", "tags": [], "label": "props", @@ -285,10 +518,10 @@ "tags": [], "label": "useAssistantOverlay", "description": [ - "\n`useAssistantOverlay` is a hook that registers context with the assistant overlay, and\nreturns an optional `showAssistantOverlay` function to display the assistant overlay.\nAs an alterative to using the `showAssistantOverlay` returned from this hook, you may\nuse the `NewChatById` component and pass it the `promptContextId` returned by this hook.\n\nUSE THIS WHEN: You want to register context in one part of the tree, and then show\na _New chat_ button in another part of the tree without passing around the data, or when\nyou want to build a custom `New chat` button with features not not provided by the\n`NewChat` component." + "\n`useAssistantOverlay` is a hook that registers context with the assistant overlay, and\nreturns an optional `showAssistantOverlay` function to display the assistant overlay.\nAs an alterative to using the `showAssistantOverlay` returned from this hook, you may\nuse the `NewChatByTitle` component and pass it the `promptContextId` returned by this hook.\n\nUSE THIS WHEN: You want to register context in one part of the tree, and then show\na _New chat_ button in another part of the tree without passing around the data, or when\nyou want to build a custom `New chat` button with features not not provided by the\n`NewChat` component." ], "signature": [ - "(category: string, conversationId: string | null, description: string, getPromptContext: () => Promise | Promise>, id: string | null, suggestedUserPrompt: string | null | undefined, tooltip: React.ReactNode) => UseAssistantOverlay" + "(category: string, conversationTitle: string | null, description: string, getPromptContext: () => Promise | Promise>, id: string | null, suggestedUserPrompt: string | null | undefined, tooltip: React.ReactNode) => UseAssistantOverlay" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx", "deprecated": false, @@ -314,7 +547,7 @@ "id": "def-public.useAssistantOverlay.$2", "type": "CompoundType", "tags": [], - "label": "conversationId", + "label": "conversationTitle", "description": [], "signature": [ "string | null" @@ -402,6 +635,55 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.useFetchCurrentUserConversations", + "type": "Function", + "tags": [], + "label": "useFetchCurrentUserConversations", + "description": [ + "\nAPI call for fetching assistant conversations for the current user\n" + ], + "signature": [ + "({ http, onFetch, signal, }: ", + "UseFetchCurrentUserConversationsParams", + ") => ", + "UseQueryResult", + ", unknown>" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.useFetchCurrentUserConversations.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n onFetch,\n signal,\n}", + "description": [], + "signature": [ + "UseFetchCurrentUserConversationsParams" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "hook for getting the status of the conversations" + ], + "initialIsOpen": false } ], "interfaces": [ @@ -715,89 +997,62 @@ }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails", + "id": "def-public.BulkActionAggregatedError", "type": "Interface", "tags": [], - "label": "CodeBlockDetails", + "label": "BulkActionAggregatedError", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.type", - "type": "CompoundType", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "\"eql\" | \"esql\" | \"sql\" | \"kql\" | \"dsl\" | \"json\" | \"no-type\"" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.content", + "id": "def-public.BulkActionAggregatedError.message", "type": "string", "tags": [], - "label": "content", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.start", - "type": "number", - "tags": [], - "label": "start", + "label": "message", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.end", + "id": "def-public.BulkActionAggregatedError.status_code", "type": "number", "tags": [], - "label": "end", + "label": "status_code", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.getControlContainer", - "type": "Function", + "id": "def-public.BulkActionAggregatedError.err_code", + "type": "string", "tags": [], - "label": "getControlContainer", + "label": "err_code", "description": [], "signature": [ - "(() => Element | undefined) | undefined" + "string | undefined" ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.CodeBlockDetails.button", - "type": "CompoundType", + "id": "def-public.BulkActionAggregatedError.conversations", + "type": "Array", "tags": [], - "label": "button", + "label": "conversations", "description": [], "signature": [ - "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + "{ id: string; name?: string | undefined; }[]" ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false } @@ -806,39 +1061,499 @@ }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Conversation", + "id": "def-public.BulkActionAttributes", "type": "Interface", "tags": [], - "label": "Conversation", - "description": [ - "\nComplete state to reconstruct a conversation instance.\nIncludes all messages, connector configured, and relevant UI state.\n" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "label": "BulkActionAttributes", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Conversation.apiConfig", + "id": "def-public.BulkActionAttributes.summary", "type": "Object", "tags": [], - "label": "apiConfig", + "label": "summary", "description": [], "signature": [ - "{ connectorId?: string | undefined; connectorTypeTitle?: string | undefined; defaultSystemPromptId?: string | undefined; provider?: ", - "OpenAiProviderType", - " | undefined; model?: string | undefined; }" + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.BulkActionSummary", + "text": "BulkActionSummary" + } ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Conversation.id", - "type": "string", + "id": "def-public.BulkActionAttributes.results", + "type": "Object", "tags": [], - "label": "id", + "label": "results", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.BulkActionResult", + "text": "BulkActionResult" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionAttributes.errors", + "type": "Array", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.BulkActionAggregatedError", + "text": "BulkActionAggregatedError" + }, + "[] | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse", + "type": "Interface", + "tags": [], + "label": "BulkActionResponse", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse.success", + "type": "CompoundType", + "tags": [], + "label": "success", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse.conversations_count", + "type": "number", + "tags": [], + "label": "conversations_count", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse.message", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse.statusCode", + "type": "number", + "tags": [], + "label": "statusCode", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResponse.attributes", + "type": "Object", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.BulkActionAttributes", + "text": "BulkActionAttributes" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResult", + "type": "Interface", + "tags": [], + "label": "BulkActionResult", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResult.updated", + "type": "Array", + "tags": [], + "label": "updated", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Conversation", + "text": "Conversation" + }, + "[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResult.created", + "type": "Array", + "tags": [], + "label": "created", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Conversation", + "text": "Conversation" + }, + "[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResult.deleted", + "type": "Array", + "tags": [], + "label": "deleted", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Conversation", + "text": "Conversation" + }, + "[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionResult.skipped", + "type": "Array", + "tags": [], + "label": "skipped", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Conversation", + "text": "Conversation" + }, + "[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionSummary", + "type": "Interface", + "tags": [], + "label": "BulkActionSummary", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionSummary.failed", + "type": "number", + "tags": [], + "label": "failed", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionSummary.skipped", + "type": "number", + "tags": [], + "label": "skipped", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionSummary.succeeded", + "type": "number", + "tags": [], + "label": "succeeded", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.BulkActionSummary.total", + "type": "number", + "tags": [], + "label": "total", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails", + "type": "Interface", + "tags": [], + "label": "CodeBlockDetails", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"eql\" | \"esql\" | \"sql\" | \"kql\" | \"dsl\" | \"json\" | \"no-type\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.content", + "type": "string", + "tags": [], + "label": "content", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.start", + "type": "number", + "tags": [], + "label": "start", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.end", + "type": "number", + "tags": [], + "label": "end", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.getControlContainer", + "type": "Function", + "tags": [], + "label": "getControlContainer", + "description": [], + "signature": [ + "(() => Element | undefined) | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.CodeBlockDetails.button", + "type": "CompoundType", + "tags": [], + "label": "button", + "description": [], + "signature": [ + "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation", + "type": "Interface", + "tags": [], + "label": "Conversation", + "description": [ + "\nComplete state to reconstruct a conversation instance.\nIncludes all messages, connector configured, and relevant UI state.\n" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.timestamp", + "type": "string", + "tags": [], + "label": "'@timestamp'", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.apiConfig", + "type": "Object", + "tags": [], + "label": "apiConfig", + "description": [], + "signature": [ + "{ connectorId: string; connectorTypeTitle: 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, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.user", + "type": "Object", + "tags": [], + "label": "user", + "description": [], + "signature": [ + "{ id?: string | undefined; name?: string | undefined; } | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.category", + "type": "string", + "tags": [], + "label": "category", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.title", + "type": "string", + "tags": [], + "label": "title", "description": [], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, @@ -867,13 +1582,13 @@ }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Conversation.replacements", + "id": "def-public.Conversation.updatedAt", "type": "Object", "tags": [], - "label": "replacements", + "label": "updatedAt", "description": [], "signature": [ - "Record | undefined" + "Date | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, @@ -881,14 +1596,27 @@ }, { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Conversation.theme", + "id": "def-public.Conversation.createdAt", "type": "Object", "tags": [], - "label": "theme", + "label": "createdAt", "description": [], "signature": [ - "ConversationTheme", - " | undefined" + "Date | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Conversation.replacements", + "type": "Array", + "tags": [], + "label": "replacements", + "description": [], + "signature": [ + "{ value: string; uuid: string; }[]" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, @@ -925,6 +1653,155 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationsBulkActions", + "type": "Interface", + "tags": [], + "label": "ConversationsBulkActions", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationsBulkActions.update", + "type": "Object", + "tags": [], + "label": "update", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationsBulkActions.create", + "type": "Object", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationsBulkActions.delete", + "type": "Object", + "tags": [], + "label": "delete", + "description": [], + "signature": [ + "{ ids: string[]; } | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationUpdateParams", + "type": "Interface", + "tags": [], + "label": "ConversationUpdateParams", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationUpdateParams.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationUpdateParams.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationUpdateParams.messages", + "type": "Array", + "tags": [], + "label": "messages", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.Message", + "text": "Message" + }, + "[] | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ConversationUpdateParams.apiConfig", + "type": "Object", + "tags": [], + "label": "apiConfig", + "description": [], + "signature": [ + "{ connectorId: string; connectorTypeTitle: 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, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.DeleteKnowledgeBaseResponse", @@ -932,7 +1809,7 @@ "tags": [], "label": "DeleteKnowledgeBaseResponse", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -943,7 +1820,7 @@ "tags": [], "label": "success", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false } @@ -957,7 +1834,7 @@ "tags": [], "label": "GetKnowledgeBaseStatusResponse", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -968,7 +1845,7 @@ "tags": [], "label": "elser_exists", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false }, @@ -982,7 +1859,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false }, @@ -993,7 +1870,7 @@ "tags": [], "label": "index_exists", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false }, @@ -1004,7 +1881,7 @@ "tags": [], "label": "pipeline_exists", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false } @@ -1053,12 +1930,12 @@ { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.Message.replacements", - "type": "Object", + "type": "Array", "tags": [], "label": "replacements", "description": [], "signature": [ - "Record | undefined" + "{ value: string; uuid: string; }[] | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, @@ -1142,7 +2019,7 @@ "tags": [], "label": "PostKnowledgeBaseResponse", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -1153,7 +2030,7 @@ "tags": [], "label": "success", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx", + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 14dc4836941d5..4eb8ede5b58e2 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 104 | 0 | 84 | 6 | +| 154 | 0 | 132 | 8 | ## Client diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index 20d99ef3d3124..b4dee48863e55 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -276,6 +276,118 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceAnonymizedValuesWithOriginalValues", + "type": "Function", + "tags": [], + "label": "replaceAnonymizedValuesWithOriginalValues", + "description": [], + "signature": [ + "({ messageContent, replacements, }: { messageContent: string; replacements: { value: string; uuid: string; }[]; }) => string" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceAnonymizedValuesWithOriginalValues.$1", + "type": "Object", + "tags": [], + "label": "{\n messageContent,\n replacements,\n}", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceAnonymizedValuesWithOriginalValues.$1.messageContent", + "type": "string", + "tags": [], + "label": "messageContent", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceAnonymizedValuesWithOriginalValues.$1.replacements", + "type": "Array", + "tags": [], + "label": "replacements", + "description": [], + "signature": [ + "{ value: string; uuid: string; }[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceOriginalValuesWithUuidValues", + "type": "Function", + "tags": [], + "label": "replaceOriginalValuesWithUuidValues", + "description": [], + "signature": [ + "({ messageContent, replacements, }: { messageContent: string; replacements: { value: string; uuid: string; }[]; }) => string" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceOriginalValuesWithUuidValues.$1", + "type": "Object", + "tags": [], + "label": "{\n messageContent,\n replacements,\n}", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceOriginalValuesWithUuidValues.$1.messageContent", + "type": "string", + "tags": [], + "label": "messageContent", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.replaceOriginalValuesWithUuidValues.$1.replacements", + "type": "Array", + "tags": [], + "label": "replacements", + "description": [], + "signature": [ + "{ value: string; uuid: string; }[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.transformRawData", @@ -284,7 +396,7 @@ "label": "transformRawData", "description": [], "signature": [ - "({ allow, allowReplacement, currentReplacements, getAnonymizedValue, onNewReplacements, rawData, }: { allow: string[]; allowReplacement: string[]; currentReplacements: Record | undefined; getAnonymizedValue: ({ currentReplacements, rawValue, }: { currentReplacements: Record | undefined; rawValue: string; }) => string; onNewReplacements?: ((replacements: Record) => void) | undefined; rawData: string | Record; }) => string" + "({ allow, allowReplacement, currentReplacements, getAnonymizedValue, onNewReplacements, rawData, }: { allow: string[]; allowReplacement: string[]; currentReplacements: { value: string; uuid: string; }[] | undefined; getAnonymizedValue: ({ currentReplacements, rawValue, }: { currentReplacements: Record | undefined; rawValue: string; }) => string; onNewReplacements?: ((replacements: { value: string; uuid: string; }[]) => void) | undefined; rawData: string | Record; }) => string" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx", "deprecated": false, @@ -332,12 +444,12 @@ { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.transformRawData.$1.currentReplacements", - "type": "Object", + "type": "Array", "tags": [], "label": "currentReplacements", "description": [], "signature": [ - "Record | undefined" + "{ value: string; uuid: string; }[] | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx", "deprecated": false, @@ -406,7 +518,7 @@ "label": "onNewReplacements", "description": [], "signature": [ - "((replacements: Record) => void) | undefined" + "((replacements: { value: string; uuid: string; }[]) => void) | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx", "deprecated": false, @@ -415,12 +527,12 @@ { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.transformRawData.$1.onNewReplacements.$1", - "type": "Object", + "type": "Array", "tags": [], "label": "replacements", "description": [], "signature": [ - "Record" + "{ value: string; uuid: string; }[]" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx", "deprecated": false, @@ -456,321 +568,2035 @@ "misc": [ { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AssistantFeatures", + "id": "def-common.ApiConfig", "type": "Type", "tags": [], - "label": "AssistantFeatures", - "description": [ - "\nInterface for features available to the elastic assistant" - ], + "label": "ApiConfig", + "description": [], "signature": [ - "{ readonly assistantModelEvaluation: boolean; readonly assistantStreamingEnabled: boolean; }" + "{ connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.Dataset", + "id": "def-common.AppendConversationMessageRequestBody", "type": "Type", "tags": [], - "label": "Dataset", + "label": "AppendConversationMessageRequestBody", "description": [], "signature": [ - "{ input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: 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; }[]; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DatasetItem", + "id": "def-common.AppendConversationMessageRequestBodyInput", "type": "Type", "tags": [], - "label": "DatasetItem", + "label": "AppendConversationMessageRequestBodyInput", "description": [], "signature": [ - "{ input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: 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; }[]; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetCapabilitiesResponse", + "id": "def-common.AppendConversationMessageRequestParams", "type": "Type", "tags": [], - "label": "GetCapabilitiesResponse", + "label": "AppendConversationMessageRequestParams", "description": [], "signature": [ - "{ assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }" + "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetEvaluateResponse", + "id": "def-common.AppendConversationMessageRequestParamsInput", "type": "Type", "tags": [], - "label": "GetEvaluateResponse", + "label": "AppendConversationMessageRequestParamsInput", "description": [], "signature": [ - "{ agentExecutors: string[]; }" + "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.INTERNAL_API_ACCESS", - "type": "string", + "id": "def-common.AppendConversationMessageResponse", + "type": "Type", "tags": [], - "label": "INTERNAL_API_ACCESS", + "label": "AppendConversationMessageResponse", "description": [], "signature": [ - "\"internal\"" + "{ 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; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.OutputIndex", + "id": "def-common.AssistantFeatures", "type": "Type", "tags": [], - "label": "OutputIndex", - "description": [], + "label": "AssistantFeatures", + "description": [ + "\nInterface for features available to the elastic assistant" + ], "signature": [ - "string" + "{ readonly assistantModelEvaluation: boolean; readonly assistantStreamingEnabled: boolean; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateBody", + "id": "def-common.BulkActionBase", "type": "Type", "tags": [], - "label": "PostEvaluateBody", + "label": "BulkActionBase", "description": [], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "{ query?: string | undefined; ids?: string[] | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestBody", + "id": "def-common.BulkActionSkipReason", "type": "Type", "tags": [], - "label": "PostEvaluateRequestBody", + "label": "BulkActionSkipReason", "description": [], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "\"CONVERSATION_NOT_MODIFIED\"" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestBodyInput", + "id": "def-common.BulkActionSkipResult", "type": "Type", "tags": [], - "label": "PostEvaluateRequestBodyInput", + "label": "BulkActionSkipResult", "description": [], "signature": [ - "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + "{ id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestQuery", + "id": "def-common.BulkCrudActionResponse", "type": "Type", "tags": [], - "label": "PostEvaluateRequestQuery", + "label": "BulkCrudActionResponse", "description": [], "signature": [ - "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | 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.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; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateRequestQueryInput", + "id": "def-common.BulkCrudActionResults", "type": "Type", "tags": [], - "label": "PostEvaluateRequestQueryInput", + "label": "BulkCrudActionResults", "description": [], "signature": [ - "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + "{ 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[]; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PostEvaluateResponse", + "id": "def-common.BulkCrudActionSummary", "type": "Type", "tags": [], - "label": "PostEvaluateResponse", + "label": "BulkCrudActionSummary", "description": [], "signature": [ - "{ success: boolean; evaluationId: string; }" + "{ total: number; succeeded: number; failed: number; skipped: number; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.PUBLIC_API_ACCESS", - "type": "string", + "id": "def-common.ConversationCategory", + "type": "Type", "tags": [], - "label": "PUBLIC_API_ACCESS", - "description": [], + "label": "ConversationCategory", + "description": [ + "\nThe conversation category." + ], "signature": [ - "\"public\"" + "\"assistant\" | \"insights\"" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false - } - ], - "objects": [ + }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.API_VERSIONS", - "type": "Object", + "id": "def-common.ConversationCategoryEnum", + "type": "Type", "tags": [], - "label": "API_VERSIONS", + "label": "ConversationCategoryEnum", "description": [], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "signature": [ + "{ assistant: \"assistant\"; insights: \"insights\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.API_VERSIONS.public", - "type": "Object", - "tags": [], - "label": "public", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.API_VERSIONS.public.v1", - "type": "string", - "tags": [], - "label": "v1", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.API_VERSIONS.internal", - "type": "Object", - "tags": [], - "label": "internal", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.API_VERSIONS.internal.v1", - "type": "string", - "tags": [], - "label": "v1", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.Dataset", - "type": "Object", + "id": "def-common.ConversationConfidence", + "type": "Type", "tags": [], - "label": "Dataset", - "description": [], + "label": "ConversationConfidence", + "description": [ + "\nThe conversation confidence." + ], "signature": [ - "Zod.ZodDefault; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>, \"many\">>" + "\"medium\" | \"low\" | \"high\"" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.DatasetItem", - "type": "Object", + "id": "def-common.ConversationConfidenceEnum", + "type": "Type", "tags": [], - "label": "DatasetItem", + "label": "ConversationConfidenceEnum", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodOptional; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>" + "{ medium: \"medium\"; low: \"low\"; high: \"high\"; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.defaultAssistantFeatures", - "type": "Object", + "id": "def-common.ConversationCreateProps", + "type": "Type", "tags": [], - "label": "defaultAssistantFeatures", - "description": [ - "\nDefault features available to the elastic assistant" - ], + "label": "ConversationCreateProps", + "description": [], "signature": [ - "{ readonly assistantModelEvaluation: false; readonly assistantStreamingEnabled: false; }" + "{ 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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationDetailsInError", + "type": "Type", + "tags": [], + "label": "ConversationDetailsInError", + "description": [], + "signature": [ + "{ id: string; name?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationMessageCreateProps", + "type": "Type", + "tags": [], + "label": "ConversationMessageCreateProps", + "description": [], + "signature": [ + "{ 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; }[]; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationSummary", + "type": "Type", + "tags": [], + "label": "ConversationSummary", + "description": [], + "signature": [ + "{ content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationUpdateProps", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationRequestBody", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationRequestBodyInput", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseRequestParams", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseRequestParamsInput", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseRequestParamsInput", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseResponse", + "type": "Type", + "tags": [], + "label": "CreateKnowledgeBaseResponse", + "description": [], + "signature": [ + "{ success?: boolean | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Dataset", + "type": "Type", + "tags": [], + "label": "Dataset", + "description": [], + "signature": [ + "{ input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[]" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DatasetItem", + "type": "Type", + "tags": [], + "label": "DatasetItem", + "description": [], + "signature": [ + "{ input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationRequestParams", + "type": "Type", + "tags": [], + "label": "DeleteConversationRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationRequestParamsInput", + "type": "Type", + "tags": [], + "label": "DeleteConversationRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseRequestParams", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseRequestParamsInput", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseRequestParamsInput", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseResponse", + "type": "Type", + "tags": [], + "label": "DeleteKnowledgeBaseResponse", + "description": [], + "signature": [ + "{ success?: boolean | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION", + "description": [], + "signature": [ + "\"2023-10-31\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION", + "description": [], + "signature": [ + "\"1\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_PROMPTS_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_PROMPTS_URL", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ELASTIC_AI_ASSISTANT_URL", + "type": "string", + "tags": [], + "label": "ELASTIC_AI_ASSISTANT_URL", + "description": [], + "signature": [ + "\"/api/elastic_assistant\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ErrorSchema", + "type": "Type", + "tags": [], + "label": "ErrorSchema", + "description": [], + "signature": [ + "{ error: { message: string; status_code: number; }; id?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestBody", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestBodyInput", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestParams", + "type": "Type", + "tags": [], + "label": "ExecuteConnectorRequestParams", + "description": [], + "signature": [ + "{ connectorId: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestParamsInput", + "type": "Type", + "tags": [], + "label": "ExecuteConnectorRequestParamsInput", + "description": [], + "signature": [ + "{ connectorId: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorResponse", + "type": "Type", + "tags": [], + "label": "ExecuteConnectorResponse", + "description": [], + "signature": [ + "{ data?: string | undefined; connector_id?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsRequestQuery", + "type": "Type", + "tags": [], + "label": "FindConversationsRequestQuery", + "description": [], + "signature": [ + "{ per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsRequestQueryInput", + "type": "Type", + "tags": [], + "label": "FindConversationsRequestQueryInput", + "description": [], + "signature": [ + "{ fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsResponse", + "type": "Type", + "tags": [], + "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; }[]; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsSortField", + "type": "Type", + "tags": [], + "label": "FindConversationsSortField", + "description": [], + "signature": [ + "\"title\" | \"updated_at\" | \"created_at\" | \"is_default\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsSortFieldEnum", + "type": "Type", + "tags": [], + "label": "FindConversationsSortFieldEnum", + "description": [], + "signature": [ + "{ title: \"title\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindCurrentUserConversationsRequestQuery", + "type": "Type", + "tags": [], + "label": "FindCurrentUserConversationsRequestQuery", + "description": [], + "signature": [ + "{ per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindCurrentUserConversationsRequestQueryInput", + "type": "Type", + "tags": [], + "label": "FindCurrentUserConversationsRequestQueryInput", + "description": [], + "signature": [ + "{ fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindCurrentUserConversationsResponse", + "type": "Type", + "tags": [], + "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; }[]; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.GetCapabilitiesResponse", + "type": "Type", + "tags": [], + "label": "GetCapabilitiesResponse", + "description": [], + "signature": [ + "{ assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.GetEvaluateResponse", + "type": "Type", + "tags": [], + "label": "GetEvaluateResponse", + "description": [], + "signature": [ + "{ agentExecutors: string[]; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.INTERNAL_API_ACCESS", + "type": "string", + "tags": [], + "label": "INTERNAL_API_ACCESS", + "description": [], + "signature": [ + "\"internal\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.KnowledgeBaseResponse", + "type": "Type", + "tags": [], + "label": "KnowledgeBaseResponse", + "description": [ + "\nAI assistant KnowledgeBase." + ], + "signature": [ + "{ success?: boolean | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Message", + "type": "Type", + "tags": [], + "label": "Message", + "description": [ + "\nAI assistant conversation message." + ], + "signature": [ + "{ 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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.MessageRole", + "type": "Type", + "tags": [], + "label": "MessageRole", + "description": [ + "\nMessage role." + ], + "signature": [ + "\"user\" | \"system\" | \"assistant\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.MessageRoleEnum", + "type": "Type", + "tags": [], + "label": "MessageRoleEnum", + "description": [], + "signature": [ + "{ user: \"user\"; system: \"system\"; assistant: \"assistant\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.NonEmptyString", + "type": "Type", + "tags": [], + "label": "NonEmptyString", + "description": [ + "\nA string that is not empty and does not contain only whitespace" + ], + "signature": [ + "string" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.NormalizedConversationError", + "type": "Type", + "tags": [], + "label": "NormalizedConversationError", + "description": [], + "signature": [ + "{ message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.OutputIndex", + "type": "Type", + "tags": [], + "label": "OutputIndex", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionRequestBody", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionRequestBodyInput", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateBody", + "type": "Type", + "tags": [], + "label": "PostEvaluateBody", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestBody", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestBody", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestBodyInput", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestBodyInput", + "description": [], + "signature": [ + "{ dataset?: { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }[] | undefined; evalPrompt?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestQuery", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestQuery", + "description": [], + "signature": [ + "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateRequestQueryInput", + "type": "Type", + "tags": [], + "label": "PostEvaluateRequestQueryInput", + "description": [], + "signature": [ + "{ agents: string; models: string; outputIndex: string; datasetName?: string | undefined; evaluationType?: string | undefined; evalModel?: string | undefined; projectName?: string | undefined; runName?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PostEvaluateResponse", + "type": "Type", + "tags": [], + "label": "PostEvaluateResponse", + "description": [], + "signature": [ + "{ success: boolean; evaluationId: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Provider", + "type": "Type", + "tags": [], + "label": "Provider", + "description": [ + "\nProvider" + ], + "signature": [ + "\"OpenAI\" | \"Azure OpenAI\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ProviderEnum", + "type": "Type", + "tags": [], + "label": "ProviderEnum", + "description": [], + "signature": [ + "{ OpenAI: \"OpenAI\"; \"Azure OpenAI\": \"Azure OpenAI\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PUBLIC_API_ACCESS", + "type": "string", + "tags": [], + "label": "PUBLIC_API_ACCESS", + "description": [], + "signature": [ + "\"public\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationRequestParams", + "type": "Type", + "tags": [], + "label": "ReadConversationRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationRequestParamsInput", + "type": "Type", + "tags": [], + "label": "ReadConversationRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Reader", + "type": "Type", + "tags": [], + "label": "Reader", + "description": [], + "signature": [ + "{} & { [k: string]: unknown; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseRequestParams", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseRequestParamsInput", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseRequestParamsInput", + "description": [], + "signature": [ + "{ resource?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseResponse", + "type": "Type", + "tags": [], + "label": "ReadKnowledgeBaseResponse", + "description": [], + "signature": [ + "{ elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Replacement", + "type": "Type", + "tags": [], + "label": "Replacement", + "description": [ + "\nReplacements object used to anonymize/deanomymize messsages" + ], + "signature": [ + "{ value: string; uuid: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.SortOrder", + "type": "Type", + "tags": [], + "label": "SortOrder", + "description": [], + "signature": [ + "\"asc\" | \"desc\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.SortOrderEnum", + "type": "Type", + "tags": [], + "label": "SortOrderEnum", + "description": [], + "signature": [ + "{ asc: \"asc\"; desc: \"desc\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.TraceData", + "type": "Type", + "tags": [], + "label": "TraceData", + "description": [ + "\ntrace Data" + ], + "signature": [ + "{ transactionId?: string | undefined; traceId?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestBody", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestBodyInput", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestParams", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestParamsInput", + "type": "Type", + "tags": [], + "label": "UpdateConversationRequestParamsInput", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationResponse", + "type": "Type", + "tags": [], + "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; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.User", + "type": "Type", + "tags": [], + "label": "User", + "description": [ + "\nCould be any string, not necessarily a UUID" + ], + "signature": [ + "{ id?: string | undefined; name?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UUID", + "type": "Type", + "tags": [], + "label": "UUID", + "description": [ + "\nA universally unique identifier" + ], + "signature": [ + "string" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.API_VERSIONS", + "type": "Object", + "tags": [], + "label": "API_VERSIONS", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.API_VERSIONS.public", + "type": "Object", + "tags": [], + "label": "public", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.API_VERSIONS.public.v1", + "type": "string", + "tags": [], + "label": "v1", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.API_VERSIONS.internal", + "type": "Object", + "tags": [], + "label": "internal", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.API_VERSIONS.internal.v1", + "type": "string", + "tags": [], + "label": "v1", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ApiConfig", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AppendConversationMessageRequestBody", + "type": "Object", + "tags": [], + "label": "AppendConversationMessageRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ messages: Zod.ZodArray, 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\">; }, \"strip\", Zod.ZodTypeAny, { 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; }[]; }, { 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; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AppendConversationMessageRequestParams", + "type": "Object", + "tags": [], + "label": "AppendConversationMessageRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AppendConversationMessageResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkActionBase", + "type": "Object", + "tags": [], + "label": "BulkActionBase", + "description": [], + "signature": [ + "Zod.ZodObject<{ query: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkActionSkipReason", + "type": "Object", + "tags": [], + "label": "BulkActionSkipReason", + "description": [], + "signature": [ + "Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkActionSkipResult", + "type": "Object", + "tags": [], + "label": "BulkActionSkipResult", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodOptional; 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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkCrudActionResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkCrudActionResults", + "type": "Object", + "tags": [], + "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[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.BulkCrudActionSummary", + "type": "Object", + "tags": [], + "label": "BulkCrudActionSummary", + "description": [], + "signature": [ + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationCategory", + "type": "Object", + "tags": [], + "label": "ConversationCategory", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"assistant\", \"insights\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationCategoryEnum", + "type": "Object", + "tags": [], + "label": "ConversationCategoryEnum", + "description": [], + "signature": [ + "{ assistant: \"assistant\"; insights: \"insights\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationConfidence", + "type": "Object", + "tags": [], + "label": "ConversationConfidence", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"low\", \"medium\", \"high\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationConfidenceEnum", + "type": "Object", + "tags": [], + "label": "ConversationConfidenceEnum", + "description": [], + "signature": [ + "{ medium: \"medium\"; low: \"low\"; high: \"high\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationCreateProps", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationDetailsInError", + "type": "Object", + "tags": [], + "label": "ConversationDetailsInError", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationMessageCreateProps", + "type": "Object", + "tags": [], + "label": "ConversationMessageCreateProps", + "description": [], + "signature": [ + "Zod.ZodObject<{ messages: Zod.ZodArray, 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\">; }, \"strip\", Zod.ZodTypeAny, { 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; }[]; }, { 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; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationSummary", + "type": "Object", + "tags": [], + "label": "ConversationSummary", + "description": [], + "signature": [ + "Zod.ZodObject<{ content: 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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ConversationUpdateProps", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationRequestBody", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateConversationResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseRequestParams", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.CreateKnowledgeBaseResponse", + "type": "Object", + "tags": [], + "label": "CreateKnowledgeBaseResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Dataset", + "type": "Object", + "tags": [], + "label": "Dataset", + "description": [], + "signature": [ + "Zod.ZodDefault; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>, \"many\">>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DatasetItem", + "type": "Object", + "tags": [], + "label": "DatasetItem", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodOptional; input: Zod.ZodString; prediction: Zod.ZodOptional; reference: Zod.ZodString; tags: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }, { input: string; reference: string; id?: string | undefined; prediction?: string | undefined; tags?: string[] | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/post_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.defaultAssistantFeatures", + "type": "Object", + "tags": [], + "label": "defaultAssistantFeatures", + "description": [ + "\nDefault features available to the elastic assistant" + ], + "signature": [ + "{ readonly assistantModelEvaluation: false; readonly assistantStreamingEnabled: false; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", "deprecated": false, @@ -779,30 +2605,330 @@ }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetCapabilitiesResponse", + "id": "def-common.DeleteConversationRequestParams", + "type": "Object", + "tags": [], + "label": "DeleteConversationRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteConversationResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseRequestParams", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.DeleteKnowledgeBaseResponse", + "type": "Object", + "tags": [], + "label": "DeleteKnowledgeBaseResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ErrorSchema", + "type": "Object", + "tags": [], + "label": "ErrorSchema", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodOptional; error: Zod.ZodObject<{ status_code: Zod.ZodNumber; message: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; }, { message: string; status_code: number; }>; }, \"strict\", Zod.ZodTypeAny, { error: { message: string; status_code: number; }; id?: string | undefined; }, { error: { message: string; status_code: number; }; id?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestBody", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorRequestParams", + "type": "Object", + "tags": [], + "label": "ExecuteConnectorRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; }, { connectorId: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ExecuteConnectorResponse", + "type": "Object", + "tags": [], + "label": "ExecuteConnectorResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ data: Zod.ZodOptional; connector_id: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; status: Zod.ZodOptional; trace_data: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { data?: string | undefined; connector_id?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { data?: string | undefined; connector_id?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsRequestQuery", + "type": "Object", + "tags": [], + "label": "FindConversationsRequestQuery", + "description": [], + "signature": [ + "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsResponse", + "type": "Object", + "tags": [], + "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; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsSortField", + "type": "Object", + "tags": [], + "label": "FindConversationsSortField", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"created_at\", \"is_default\", \"title\", \"updated_at\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindConversationsSortFieldEnum", + "type": "Object", + "tags": [], + "label": "FindConversationsSortFieldEnum", + "description": [], + "signature": [ + "{ title: \"title\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindCurrentUserConversationsRequestQuery", + "type": "Object", + "tags": [], + "label": "FindCurrentUserConversationsRequestQuery", + "description": [], + "signature": [ + "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"title\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindCurrentUserConversationsResponse", + "type": "Object", + "tags": [], + "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; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.GetCapabilitiesResponse", + "type": "Object", + "tags": [], + "label": "GetCapabilitiesResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ assistantModelEvaluation: Zod.ZodBoolean; assistantStreamingEnabled: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }, { assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.GetEvaluateResponse", + "type": "Object", + "tags": [], + "label": "GetEvaluateResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ agentExecutors: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { agentExecutors: string[]; }, { agentExecutors: string[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.KnowledgeBaseResponse", "type": "Object", "tags": [], - "label": "GetCapabilitiesResponse", + "label": "KnowledgeBaseResponse", "description": [], "signature": [ - "Zod.ZodObject<{ assistantModelEvaluation: Zod.ZodBoolean; assistantStreamingEnabled: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }, { assistantModelEvaluation: boolean; assistantStreamingEnabled: boolean; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { success?: boolean | undefined; }, { success?: boolean | undefined; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.GetEvaluateResponse", + "id": "def-common.Message", "type": "Object", "tags": [], - "label": "GetEvaluateResponse", + "label": "Message", "description": [], "signature": [ - "Zod.ZodObject<{ agentExecutors: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { agentExecutors: string[]; }, { agentExecutors: string[]; }>" + "Zod.ZodObject<{ content: Zod.ZodString; reader: 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; }>" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/evaluation/get_evaluate_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.MessageRole", + "type": "Object", + "tags": [], + "label": "MessageRole", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.MessageRoleEnum", + "type": "Object", + "tags": [], + "label": "MessageRoleEnum", + "description": [], + "signature": [ + "{ user: \"user\"; system: \"system\"; assistant: \"assistant\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.NonEmptyString", + "type": "Object", + "tags": [], + "label": "NonEmptyString", + "description": [], + "signature": [ + "Zod.ZodString" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.NormalizedConversationError", + "type": "Object", + "tags": [], + "label": "NormalizedConversationError", + "description": [], + "signature": [ + "Zod.ZodObject<{ message: Zod.ZodString; status_code: Zod.ZodNumber; err_code: 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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -822,6 +2948,36 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionRequestBody", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PerformBulkActionResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.PostEvaluateBody", @@ -881,6 +3037,246 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Provider", + "type": "Object", + "tags": [], + "label": "Provider", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"OpenAI\", \"Azure OpenAI\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ProviderEnum", + "type": "Object", + "tags": [], + "label": "ProviderEnum", + "description": [], + "signature": [ + "{ OpenAI: \"OpenAI\"; \"Azure OpenAI\": \"Azure OpenAI\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationRequestParams", + "type": "Object", + "tags": [], + "label": "ReadConversationRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadConversationResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Reader", + "type": "Object", + "tags": [], + "label": "Reader", + "description": [], + "signature": [ + "Zod.ZodObject<{}, \"strip\", Zod.ZodUnknown, Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseRequestParams", + "type": "Object", + "tags": [], + "label": "ReadKnowledgeBaseRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ resource: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { resource?: string | undefined; }, { resource?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.ReadKnowledgeBaseResponse", + "type": "Object", + "tags": [], + "label": "ReadKnowledgeBaseResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ elser_exists: Zod.ZodOptional; index_exists: Zod.ZodOptional; pipeline_exists: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }, { elser_exists?: boolean | undefined; index_exists?: boolean | undefined; pipeline_exists?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.Replacement", + "type": "Object", + "tags": [], + "label": "Replacement", + "description": [], + "signature": [ + "Zod.ZodObject<{ value: Zod.ZodString; uuid: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { value: string; uuid: string; }, { value: string; uuid: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.SortOrder", + "type": "Object", + "tags": [], + "label": "SortOrder", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"asc\", \"desc\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.SortOrderEnum", + "type": "Object", + "tags": [], + "label": "SortOrderEnum", + "description": [], + "signature": [ + "{ asc: \"asc\"; desc: \"desc\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.TraceData", + "type": "Object", + "tags": [], + "label": "TraceData", + "description": [], + "signature": [ + "Zod.ZodObject<{ transactionId: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestBody", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationRequestParams", + "type": "Object", + "tags": [], + "label": "UpdateConversationRequestParams", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UpdateConversationResponse", + "type": "Object", + "tags": [], + "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; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.User", + "type": "Object", + "tags": [], + "label": "User", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodOptional; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.UUID", + "type": "Object", + "tags": [], + "label": "UUID", + "description": [], + "signature": [ + "Zod.ZodString" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ] } diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 6ba519c086cae..bafb5aac4db7a 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 59 | 0 | 57 | 0 | +| 220 | 0 | 207 | 0 | ## Common diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index d6574cfb7d883..ef81873fd0942 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-12 +date: 2024-03-18 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 b3d6a99db525c..fc63c0bd02944 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-12 +date: 2024-03-18 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 14aef84bf2dbb..a04b0e3349f63 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-12 +date: 2024-03-18 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 80ee8609055ed..89c3585c2eab6 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.devdocs.json b/api_docs/kbn_es_types.devdocs.json index 5ace284b455cf..3d53027e6d33c 100644 --- a/api_docs/kbn_es_types.devdocs.json +++ b/api_docs/kbn_es_types.devdocs.json @@ -20,100 +20,6 @@ "classes": [], "functions": [], "interfaces": [ - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails", - "type": "Interface", - "tags": [], - "label": "ClusterDetails", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.status", - "type": "CompoundType", - "tags": [], - "label": "status", - "description": [], - "signature": [ - "\"running\" | \"failed\" | \"partial\" | \"skipped\" | \"successful\"" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.indices", - "type": "string", - "tags": [], - "label": "indices", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.took", - "type": "number", - "tags": [], - "label": "took", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.timed_out", - "type": "boolean", - "tags": [], - "label": "timed_out", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails._shards", - "type": "Object", - "tags": [], - "label": "_shards", - "description": [], - "signature": [ - "ShardStatistics", - " | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.failures", - "type": "Array", - "tags": [], - "label": "failures", - "description": [], - "signature": [ - "ShardFailure", - "[] | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-types", "id": "def-common.ESQLColumn", diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 3c165b72aa09b..5f72cfa185aba 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.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 | |-------------------|-----------|------------------------|-----------------| -| 32 | 0 | 32 | 0 | +| 25 | 0 | 25 | 0 | ## Common diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 2a7d3808c96b1..061e02ee9f97d 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_esql_utils.mdx index 5543ecbff4960..6f8d8cabc11be 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index f98fae084e446..2cedfa30b43b1 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-12 +date: 2024-03-18 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 651ede0348080..ac8956c4fec11 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-12 +date: 2024-03-18 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 06ee543ac6b9d..ce2283a17ea7e 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-12 +date: 2024-03-18 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 e966a867b62f2..cba9e69585066 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 1b7795cae30d7..e3b38f3e78bb6 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 23ea20f4a8a8b..74d314cf2aaa2 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-12 +date: 2024-03-18 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 9e2d385195511..8dcb4dbd39d2d 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-12 +date: 2024-03-18 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 42faca62928f0..2a8fd0f35fe90 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-12 +date: 2024-03-18 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 99c951ac2db73..663d6d7da7757 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-12 +date: 2024-03-18 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 20bd0efb70405..35938a759f87a 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-12 +date: 2024-03-18 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 c2e605ef0db4d..ab75deabac8b4 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-12 +date: 2024-03-18 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 c0d02da0530ff..3e3d9b717a12c 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-12 +date: 2024-03-18 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 7911f3ac227a2..27f23277183c1 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-12 +date: 2024-03-18 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 85eea8fa1c6eb..ce4421fcae38c 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-12 +date: 2024-03-18 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 8803f22a5c9f0..f46d10c7009a8 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-12 +date: 2024-03-18 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 b1f3cdf7bdb25..a388cb52f69e4 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-12 +date: 2024-03-18 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 fd7ac15b34faf..212ee340d0c47 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-12 +date: 2024-03-18 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 145d177d6454e..15dc8c0788d19 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-12 +date: 2024-03-18 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 5d1be6e12304d..63b63830410e4 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-12 +date: 2024-03-18 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 fddbfff936405..aa488be05dc4f 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-12 +date: 2024-03-18 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 3a2ae53f0fee5..05e82181cd062 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-12 +date: 2024-03-18 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 24846104e1a9f..edcaeaee495b2 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-12 +date: 2024-03-18 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 5bc9cd6921536..1858cf8bcb50a 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-12 +date: 2024-03-18 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 906f8a7afd2d5..92fb9774235d6 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-12 +date: 2024-03-18 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 095a3d6134ab1..cd35af52be01d 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.devdocs.json b/api_docs/kbn_journeys.devdocs.json index fe8ff4a3f4d5e..50aa2845204ce 100644 --- a/api_docs/kbn_journeys.devdocs.json +++ b/api_docs/kbn_journeys.devdocs.json @@ -184,7 +184,7 @@ "tags": [], "label": "Constructor", "description": [ - "\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys directory." + "\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys_e2e directory." ], "signature": [ "any" diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 27bb69e9e9ac9..18cae0c5d5c6f 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-12 +date: 2024-03-18 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 02a613bef9340..0f007b5cb4c82 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-12 +date: 2024-03-18 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 4d61043d16e4f..9eadc8fb8e3ee 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-12 +date: 2024-03-18 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 16a77b04e337e..48ee91ee2f065 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-12 +date: 2024-03-18 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 a6f399d3f89c8..ba4f1b591d40c 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-12 +date: 2024-03-18 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 948385e9c797b..73353b66eccc7 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-12 +date: 2024-03-18 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 a9d456b12aadf..ad61c4a8609a6 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-12 +date: 2024-03-18 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 d998e0058e646..fd1d3f4ab9fd7 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-12 +date: 2024-03-18 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 01549a2df1d28..47fff4947e6ef 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-12 +date: 2024-03-18 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 95b8a6d038dd0..a103ea68e6610 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_management_cards_navigation.mdx index f2893fe3e3413..c625c1bb87639 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 975f4e9d51e56..a326065c66a34 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-12 +date: 2024-03-18 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 bd528e4fe9603..22f464b7c25ad 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index 0a0a7b21dac62..8076fe0f0feda 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index a3832d56be254..bf15536786f04 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-12 +date: 2024-03-18 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 115ff18aa3472..6cc516d77cc29 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-12 +date: 2024-03-18 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 635d84c86cc1c..749336ae66f2f 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_management_settings_ids.mdx index 0a7b7af951a40..7b9fc1de83684 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index c229663e3b5c7..13e7b9fc9e594 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-12 +date: 2024-03-18 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 6bea20894118d..ca089ebd374fc 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-12 +date: 2024-03-18 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 8959e8b1271c7..0cf0c99e3a255 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-12 +date: 2024-03-18 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 eb0f092a7fc2a..3a1cc4774c1b7 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-12 +date: 2024-03-18 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 3d785a62b3961..b7cbe4cc5fe24 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-12 +date: 2024-03-18 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 2c2801363cefd..ee899cf0b44ae 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-12 +date: 2024-03-18 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 78f14b28ba72f..9bf0f12f7ced0 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 348b2c8a0e9e0..7d97447627aa2 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-12 +date: 2024-03-18 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 10f3a43479f65..1d72f0654ca06 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-12 +date: 2024-03-18 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 da9308773fa94..1e0a5b7f8670b 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-12 +date: 2024-03-18 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 7111fda0f7e19..c8ee7fd3df3a9 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-12 +date: 2024-03-18 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 400d8c68bd6cc..78150bb9e7c46 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-12 +date: 2024-03-18 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 8ec1f6100c260..fff5dca4ab28a 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-12 +date: 2024-03-18 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 ccbb614d0f501..b90f67f06e608 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-12 +date: 2024-03-18 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 c87657990d504..2440d88525a60 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-12 +date: 2024-03-18 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 800d7ffad7402..317781383a83e 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-12 +date: 2024-03-18 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 75b4c9aba752c..307deb5744387 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-12 +date: 2024-03-18 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 2e762554a958e..b7931080b336e 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-12 +date: 2024-03-18 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 1ce61cfea8f3b..d3bf01bcfb0ff 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-12 +date: 2024-03-18 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 9aebed24cbace..651b61fd508d4 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-12 +date: 2024-03-18 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 43ab49129b43b..4de4aba1401e1 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-12 +date: 2024-03-18 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 e3ba0b9808262..e8840950b857f 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-12 +date: 2024-03-18 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 8551a30d8c36c..ac8218957ec89 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-12 +date: 2024-03-18 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 bd2c9e4639242..eab92c12cb95e 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-12 +date: 2024-03-18 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 7180774bc9535..4d8634f199396 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-12 +date: 2024-03-18 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 3b7afaa01d35f..f1b4ec8432724 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-12 +date: 2024-03-18 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 1c0723a762804..dbd1758cd9f66 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-12 +date: 2024-03-18 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 4b1b951a1a9c9..fd9efc156278a 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-12 +date: 2024-03-18 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_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index bb0af2087a79d..dbe7ae0371087 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-12 +date: 2024-03-18 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 9955cf5f4ec41..b131136b04a78 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-12 +date: 2024-03-18 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 cf2e2c1f8788e..c0ab6444c56f4 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-12 +date: 2024-03-18 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 21c167e1167af..188ca5cf2aefc 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-12 +date: 2024-03-18 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 caa25430f591f..7eeba34ee9592 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-12 +date: 2024-03-18 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 37af52f693a6f..6cc4288afeba5 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-12 +date: 2024-03-18 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 a24c6729dc711..76fdadb6b388f 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-12 +date: 2024-03-18 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 b6754fd2a1b5c..6c3b9d6bb5094 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-12 +date: 2024-03-18 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 752b373e035a2..1ce3a92a80389 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-12 +date: 2024-03-18 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 26f55f46a503d..468fa0ad2ec3e 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-12 +date: 2024-03-18 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 f6fcab56a5d53..2847ce67f4ded 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-12 +date: 2024-03-18 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 8bcc05c2b9e91..29f8dab4c5843 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-12 +date: 2024-03-18 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 be6c2875bdf21..1cead5ed4cfe3 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-12 +date: 2024-03-18 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 4f74defe24880..546ba57067473 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-12 +date: 2024-03-18 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 b1852b1b2febb..4a1dd06be29f6 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-12 +date: 2024-03-18 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 79a5ea7b1aea5..58ed51addc42e 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-12 +date: 2024-03-18 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 4168452055071..962a2a328ce0c 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-12 +date: 2024-03-18 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 63821f70df214..64baf4e37b700 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-12 +date: 2024-03-18 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 be56ee1636ede..3d0f92745ceeb 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-12 +date: 2024-03-18 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 aaa60fb53da1e..a50dd1aa1a58d 100644 --- a/api_docs/kbn_presentation_containers.devdocs.json +++ b/api_docs/kbn_presentation_containers.devdocs.json @@ -99,6 +99,47 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.apiHasSerializableState", + "type": "Function", + "tags": [], + "label": "apiHasSerializableState", + "description": [], + "signature": [ + "(api: unknown) => api is ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSerializableState", + "text": "HasSerializableState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.apiHasSerializableState.$1", + "type": "Unknown", + "tags": [], + "label": "api", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.apiIsPresentationContainer", @@ -656,6 +697,54 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSerializableState", + "type": "Interface", + "tags": [], + "label": "HasSerializableState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.HasSerializableState", + "text": "HasSerializableState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.HasSerializableState.serializeState", + "type": "Function", + "tags": [], + "label": "serializeState", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.SerializedPanelState", + "text": "SerializedPanelState" + }, + "" + ], + "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.PanelPackage", diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index ca9dd9cec09ec..d492583d80df2 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.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 | |-------------------|-----------|------------------------|-----------------| -| 42 | 0 | 40 | 0 | +| 46 | 0 | 44 | 0 | ## Common diff --git a/api_docs/kbn_presentation_library.mdx b/api_docs/kbn_presentation_library.mdx index 2096f3335fe7d..7796ae26a760f 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-12 +date: 2024-03-18 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 a76ada0e36efb..2269fdb93fdbe 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -483,46 +483,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesLocalUnifiedSearch", - "type": "Function", - "tags": [], - "label": "apiPublishesLocalUnifiedSearch", - "description": [], - "signature": [ - "(unknownApi: unknown) => unknownApi is ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - } - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesLocalUnifiedSearch.$1", - "type": "Unknown", - "tags": [], - "label": "unknownApi", - "description": [], - "signature": [ - "unknown" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.apiPublishesPanelDescription", @@ -605,10 +565,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesPartialLocalUnifiedSearch", + "id": "def-common.apiPublishesPartialUnifiedSearch", "type": "Function", "tags": [], - "label": "apiPublishesPartialLocalUnifiedSearch", + "label": "apiPublishesPartialUnifiedSearch", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is Partial<", @@ -616,18 +576,18 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesPartialLocalUnifiedSearch.$1", + "id": "def-common.apiPublishesPartialUnifiedSearch.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -635,7 +595,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -726,6 +686,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesUnifiedSearch", + "type": "Function", + "tags": [], + "label": "apiPublishesUnifiedSearch", + "description": [], + "signature": [ + "(unknownApi: unknown) => unknownApi is ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" + } + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesUnifiedSearch.$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.apiPublishesUnsavedChanges", @@ -810,10 +810,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritableLocalUnifiedSearch", + "id": "def-common.apiPublishesWritablePanelDescription", "type": "Function", "tags": [], - "label": "apiPublishesWritableLocalUnifiedSearch", + "label": "apiPublishesWritablePanelDescription", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -821,17 +821,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritableLocalUnifiedSearch", - "text": "PublishesWritableLocalUnifiedSearch" + "section": "def-common.PublishesWritablePanelDescription", + "text": "PublishesWritablePanelDescription" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritableLocalUnifiedSearch.$1", + "id": "def-common.apiPublishesWritablePanelDescription.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -839,7 +839,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -850,10 +850,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelDescription", + "id": "def-common.apiPublishesWritablePanelTitle", "type": "Function", "tags": [], - "label": "apiPublishesWritablePanelDescription", + "label": "apiPublishesWritablePanelTitle", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -861,17 +861,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritablePanelDescription", - "text": "PublishesWritablePanelDescription" + "section": "def-common.PublishesWritablePanelTitle", + "text": "PublishesWritablePanelTitle" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelDescription.$1", + "id": "def-common.apiPublishesWritablePanelTitle.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -879,7 +879,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -890,10 +890,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelTitle", + "id": "def-common.apiPublishesWritableUnifiedSearch", "type": "Function", "tags": [], - "label": "apiPublishesWritablePanelTitle", + "label": "apiPublishesWritableUnifiedSearch", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -901,17 +901,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritablePanelTitle", - "text": "PublishesWritablePanelTitle" + "section": "def-common.PublishesWritableUnifiedSearch", + "text": "PublishesWritableUnifiedSearch" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelTitle.$1", + "id": "def-common.apiPublishesWritableUnifiedSearch.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -919,7 +919,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1644,191 +1644,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalFilters", - "type": "Function", - "tags": [], - "label": "useLocalFilters", - "description": [ - "\nA hook that gets this API's local filters 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.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalFilters.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalQuery", - "type": "Function", - "tags": [], - "label": "useLocalQuery", - "description": [ - "\nA hook that gets this API's local query 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.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "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_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalQuery.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalTimeRange", - "type": "Function", - "tags": [], - "label": "useLocalTimeRange", - "description": [ - "\nA hook that gets this API's local time range 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.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalTimeRange.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.usePanelDescription", @@ -3506,120 +3321,40 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch", + "id": "def-common.PublishesPanelDescription", "type": "Interface", "tags": [], - "label": "PublishesLocalUnifiedSearch", + "label": "PublishesPanelDescription", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.isCompatibleWithLocalUnifiedSearch", - "type": "Function", + "id": "def-common.PublishesPanelDescription.panelDescription", + "type": "Object", "tags": [], - "label": "isCompatibleWithLocalUnifiedSearch", + "label": "panelDescription", "description": [], "signature": [ - "(() => boolean) | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localTimeRange", - "type": "Object", - "tags": [], - "label": "localTimeRange", - "description": [], - "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; source: ", + "{ readonly value: string | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; pipe: { (): ", + " | 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", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (op1: ", + "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>): ", + "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3627,15 +3362,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3645,15 +3372,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3665,15 +3384,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3687,15 +3398,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3711,15 +3414,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3737,15 +3432,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3765,15 +3452,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3795,219 +3474,86 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, R>) => ", + ") => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; operator: ", + "; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | 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): ", + "> | ((value: string | 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): ", + "; (next?: ((value: string | 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>; }; }" + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.getFallbackTimeRange", - "type": "Function", + "id": "def-common.PublishesPanelDescription.defaultPanelDescription", + "type": "Object", "tags": [], - "label": "getFallbackTimeRange", + "label": "defaultPanelDescription", "description": [], "signature": [ - "(() => ", { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/presentation-publishing", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" }, - " | undefined) | undefined" + " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesPanelTitle", + "type": "Interface", + "tags": [], + "label": "PublishesPanelTitle", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localFilters", + "id": "def-common.PublishesPanelTitle.panelTitle", "type": "Object", "tags": [], - "label": "localFilters", + "label": "panelTitle", "description": [], "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; source: ", + "{ readonly value: string | 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: { (): ", + " | 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", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (op1: ", + "; (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: ", + ", op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4015,15 +3561,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4033,15 +3571,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4053,15 +3583,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4075,15 +3597,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4099,15 +3613,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4125,15 +3631,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4153,15 +3651,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4183,259 +3673,51 @@ "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: ", + "[]; 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: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | 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): ", + "> | ((value: string | 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): ", + "; (next?: ((value: string | 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>; }; }" + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localQuery", + "id": "def-common.PublishesPanelTitle.hidePanelTitle", "type": "Object", "tags": [], - "label": "localQuery", + "label": "hidePanelTitle", "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: ", + "{ readonly value: boolean | 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: { (): ", + " | 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", - "<", - { - "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: ", + "; (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: ", + ", 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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4443,23 +3725,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4469,23 +3735,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4497,23 +3747,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4527,23 +3761,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4559,23 +3777,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4593,23 +3795,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4629,23 +3815,7 @@ "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: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4667,183 +3837,44 @@ "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: ", + "[]; 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: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | 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): ", + "> | ((value: boolean | 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): ", + "; (next?: ((value: boolean | 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.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "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>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesPanelTitle.defaultPanelTitle", + "type": "Object", + "tags": [], + "label": "defaultPanelTitle", + "description": [], + "signature": [ { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/presentation-publishing", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" }, - " | undefined>; }; }" + " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false } @@ -4852,40 +3883,104 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription", + "id": "def-common.PublishesPhaseEvents", "type": "Interface", "tags": [], - "label": "PublishesPanelDescription", + "label": "PublishesPhaseEvents", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription.panelDescription", + "id": "def-common.PublishesPhaseEvents.onPhaseChange", "type": "Object", "tags": [], - "label": "panelDescription", + "label": "onPhaseChange", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ readonly value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined; 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; error: (err: any) => void; forEach: { (next: (value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void): Promise; (next: (value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined; pipe: { (): ", "Observable", - "; (op1: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; (op1: ", "OperatorFunction", - "): ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4893,7 +3988,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4903,7 +4006,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4915,7 +4026,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4929,7 +4048,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4945,7 +4072,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4963,7 +4098,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4983,7 +4126,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5005,44 +4156,103 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - ") => ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "; operator: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: string | undefined) => void) | undefined): ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>> | ((value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription.defaultPanelDescription", - "type": "Object", - "tags": [], - "label": "defaultPanelDescription", - "description": [], - "signature": [ + "; }; toPromise: { (): Promise<", { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" }, - " | undefined" + " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", "deprecated": false, "trackAdoption": false } @@ -5051,21 +4261,23 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle", + "id": "def-common.PublishesSavedObjectId", "type": "Interface", "tags": [], - "label": "PublishesPanelTitle", - "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "label": "PublishesSavedObjectId", + "description": [ + "\nThis API publishes a saved object id which can be used to determine which saved object this API is linked to." + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle.panelTitle", + "id": "def-common.PublishesSavedObjectId.savedObjectId", "type": "Object", "tags": [], - "label": "panelTitle", + "label": "savedObjectId", "description": [], "signature": [ "{ readonly value: string | undefined; source: ", @@ -5220,35 +4432,129 @@ "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/publishes_saved_object_id.ts", "deprecated": false, "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesUnifiedSearch", + "type": "Interface", + "tags": [], + "label": "PublishesUnifiedSearch", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "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.PublishesPanelTitle.hidePanelTitle", + "id": "def-common.PublishesUnifiedSearch.timeRange$", "type": "Object", "tags": [], - "label": "hidePanelTitle", + "label": "timeRange$", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ readonly value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined; 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; error: (err: any) => void; forEach: { (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void): Promise; (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined; pipe: { (): ", "Observable", - "; (op1: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; (op1: ", "OperatorFunction", - "): ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5256,7 +4562,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5266,7 +4580,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5278,7 +4600,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5292,7 +4622,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5308,7 +4646,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5326,7 +4672,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5346,7 +4700,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5368,136 +4730,181 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - ") => ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "; operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: boolean | undefined) => void) | undefined): ", + "<", + { + "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: boolean | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (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; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle.defaultPanelTitle", - "type": "Object", - "tags": [], - "label": "defaultPanelTitle", - "description": [], - "signature": [ + "; }; toPromise: { (): Promise<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | undefined" + " | 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_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPhaseEvents", - "type": "Interface", - "tags": [], - "label": "PublishesPhaseEvents", - "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPhaseEvents.onPhaseChange", + "id": "def-common.PublishesUnifiedSearch.filters$", "type": "Object", "tags": [], - "label": "onPhaseChange", + "label": "filters$", "description": [], "signature": [ "{ readonly value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined; source: ", + "[] | undefined; source: ", "Observable", " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined) => void): Promise; (next: (value: ", + "[] | undefined) => void): Promise; (next: (value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined; pipe: { (): ", + "[] | undefined; pipe: { (): ", "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>; (op1: ", + "[] | undefined>; (op1: ", "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>): ", + "[] | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", @@ -5505,13 +4912,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5521,13 +4928,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5539,13 +4946,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5559,13 +4966,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5581,13 +4988,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5605,13 +5012,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5631,13 +5038,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5659,13 +5066,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5689,145 +5096,257 @@ "Observer", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[] | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, R>) => ", + "[] | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>; operator: ", + "[] | 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": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined> | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", + " | undefined; pipe: { (): ", + "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined>> | ((value: ", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: ", + " | undefined>; (op1: ", + "OperatorFunction", + "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + " | undefined, A>): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined>; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesSavedObjectId", - "type": "Interface", - "tags": [], - "label": "PublishesSavedObjectId", - "description": [ - "\nThis API publishes a saved object id which can be used to determine which saved object this API is linked to." - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesSavedObjectId.savedObjectId", - "type": "Object", - "tags": [], - "label": "savedObjectId", - "description": [], - "signature": [ - "{ readonly value: string | undefined; 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: { (): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - ", op2: ", + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5835,7 +5354,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5845,7 +5380,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5857,7 +5408,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5871,7 +5438,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5887,7 +5470,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5905,7 +5504,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5925,7 +5540,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "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", @@ -5947,23 +5578,183 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (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>[]; 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", - "; 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>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: string | undefined) => void) | undefined): ", + "<", + { + "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: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (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; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" + "; }; toPromise: { (): Promise<", + { + "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>; (PromiseCtor: PromiseConstructor): Promise<", + { + "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>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "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_saved_object_id.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false } @@ -6607,90 +6398,90 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritableLocalUnifiedSearch", + "id": "def-common.PublishesWritablePanelDescription", "type": "Type", "tags": [], - "label": "PublishesWritableLocalUnifiedSearch", + "label": "PublishesWritablePanelDescription", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - " & { setLocalTimeRange: (timeRange: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void; setLocalFilters: (filters: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void; setLocalQuery: (query: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "section": "def-common.PublishesPanelDescription", + "text": "PublishesPanelDescription" }, - " | undefined) => void; }" + " & { setPanelDescription: (newTitle: string | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritablePanelDescription", + "id": "def-common.PublishesWritablePanelTitle", "type": "Type", "tags": [], - "label": "PublishesWritablePanelDescription", + "label": "PublishesWritablePanelTitle", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" + "section": "def-common.PublishesPanelTitle", + "text": "PublishesPanelTitle" }, - " & { setPanelDescription: (newTitle: string | undefined) => void; }" + " & { setPanelTitle: (newTitle: string | undefined) => void; setHidePanelTitle: (hide: boolean | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritablePanelTitle", + "id": "def-common.PublishesWritableUnifiedSearch", "type": "Type", "tags": [], - "label": "PublishesWritablePanelTitle", + "label": "PublishesWritableUnifiedSearch", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, - " & { setPanelTitle: (newTitle: string | undefined) => void; setHidePanelTitle: (hide: boolean | undefined) => void; }" + " & { setTimeRange: (timeRange: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void; setFilters: (filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined) => void; setQuery: (query: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 7aa024dc18b84..8be589f4b181e 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-12 +date: 2024-03-18 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 | |-------------------|-----------|------------------------|-----------------| -| 156 | 0 | 120 | 3 | +| 149 | 0 | 116 | 3 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 82b04ed073a37..f6780ded83d98 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-12 +date: 2024-03-18 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 2919f2adafd1c..cbea33a042220 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-12 +date: 2024-03-18 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 b55d4a33d6997..adf68d453b768 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-12 +date: 2024-03-18 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 c0b37dd712a7d..413e94a41566f 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-12 +date: 2024-03-18 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 375f27bb9a8b2..7ee841621fbf3 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-12 +date: 2024-03-18 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 4dfa72b2654dc..8fb27f25399e3 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-12 +date: 2024-03-18 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 56ce19a9b42ea..fab2551fbab2c 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-12 +date: 2024-03-18 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 8a814aefd96be..c04633bf32f41 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-12 +date: 2024-03-18 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 7604f09f08761..514ba226e184a 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-12 +date: 2024-03-18 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 ebb4879313774..583235ad8c667 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-12 +date: 2024-03-18 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 3bb81eaa4e2e5..3865965897799 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-12 +date: 2024-03-18 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 7ff6cb803ce7f..d1f574d8c3e0d 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-12 +date: 2024-03-18 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 7a39b74b1246b..623f514f5fead 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-12 +date: 2024-03-18 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 e8081ddf4e97c..92e6d6c4d4143 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 9d7c8bb0c8248..074d3368d980b 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 25a189d112514..9b2027ca53f21 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index e590c9a45a4dd..9fdcd649d7f2e 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-12 +date: 2024-03-18 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 c4d7c3738fe3c..7f1c1cb93f9bb 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-12 +date: 2024-03-18 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 ce89c16838a53..dd222d379e04b 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-12 +date: 2024-03-18 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 765f586395e1b..b3b69c6294446 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-12 +date: 2024-03-18 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 35db85b5f6d74..02e9b55b25afa 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_reporting_public.mdx index fc6e92bf8a2c8..4d782e39ae373 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-12 +date: 2024-03-18 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 12c81757459e0..8001ab7303287 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-12 +date: 2024-03-18 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 f9e2311006105..a1e793573dde5 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-12 +date: 2024-03-18 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 0eedd3892589d..59b1fa27ff1e1 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-12 +date: 2024-03-18 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 d690c7b4f33b6..44c7c207135c6 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-12 +date: 2024-03-18 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 446450251dd0a..01c8122636870 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index ca4462ca88b05..80797716b4af1 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -236,6 +236,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.ALERT_CONSECUTIVE_MATCHES", + "type": "string", + "tags": [], + "label": "ALERT_CONSECUTIVE_MATCHES", + "description": [], + "signature": [ + "\"kibana.alert.consecutive_matches\"" + ], + "path": "packages/kbn-rule-data-utils/src/default_alerts_as_data.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.ALERT_CONTEXT", @@ -1504,7 +1519,7 @@ "label": "DefaultAlertFieldName", "description": [], "signature": [ - "\"@timestamp\" | \"kibana\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.producer\" | \"kibana.alert.rule.revision\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.status\" | \"kibana.alert.uuid\" | \"kibana.space_ids\" | \"kibana.alert.action_group\" | \"kibana.alert.case_ids\" | \"kibana.alert.duration.us\" | \"kibana.alert.end\" | \"kibana.alert.flapping\" | \"kibana.alert.flapping_history\" | \"kibana.alert.last_detected\" | \"kibana.alert.maintenance_window_ids\" | \"kibana.alert.reason\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.tags\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.url\" | \"kibana.alert.workflow_assignee_ids\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_tags\" | \"kibana.version\" | \"kibana.alert\" | \"kibana.alert.rule\"" + "\"@timestamp\" | \"kibana\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.producer\" | \"kibana.alert.rule.revision\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.status\" | \"kibana.alert.uuid\" | \"kibana.space_ids\" | \"kibana.alert.action_group\" | \"kibana.alert.case_ids\" | \"kibana.alert.consecutive_matches\" | \"kibana.alert.duration.us\" | \"kibana.alert.end\" | \"kibana.alert.flapping\" | \"kibana.alert.flapping_history\" | \"kibana.alert.last_detected\" | \"kibana.alert.maintenance_window_ids\" | \"kibana.alert.reason\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.tags\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.url\" | \"kibana.alert.workflow_assignee_ids\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_tags\" | \"kibana.version\" | \"kibana.alert\" | \"kibana.alert.rule\"" ], "path": "packages/kbn-rule-data-utils/src/default_alerts_as_data.ts", "deprecated": false, diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index d7876514717c7..5d546d41ff202 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-detections-response](https://github.com/orgs/elastic/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 122 | 0 | 119 | 0 | +| 123 | 0 | 120 | 0 | ## Common diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index f284ad1686e2a..b46fec83fd60f 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_search_api_panels.devdocs.json index c6fd706ade36f..4d5e1eab34c0e 100644 --- a/api_docs/kbn_search_api_panels.devdocs.json +++ b/api_docs/kbn_search_api_panels.devdocs.json @@ -1298,9 +1298,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 8b821052a9698..7b44ab174b57c 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_search_connectors.devdocs.json index 9130b6dc657eb..7c536b5d181b5 100644 --- a/api_docs/kbn_search_connectors.devdocs.json +++ b/api_docs/kbn_search_connectors.devdocs.json @@ -8472,6 +8472,33 @@ ] } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.azure_blob_storage.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.azure_blob_storage.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -11643,6 +11670,33 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.confluence.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.confluence.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -13173,6 +13227,33 @@ ] } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.dropbox.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.dropbox.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -15442,7 +15523,35 @@ "path": "packages/kbn-search-connectors/types/native_connectors.ts", "deprecated": false, "trackAdoption": false, - "children": [] + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.github.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.github.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] }, { "parentPluginId": "@kbn/search-connectors", @@ -16512,6 +16621,33 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.gmail.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.gmail.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -16560,7 +16696,35 @@ "path": "packages/kbn-search-connectors/types/native_connectors.ts", "deprecated": false, "trackAdoption": false, - "children": [] + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.google_cloud_storage.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.google_cloud_storage.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] }, { "parentPluginId": "@kbn/search-connectors", @@ -19039,6 +19203,33 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.google_drive.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.google_drive.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -22210,6 +22401,33 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.jira.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.jira.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -30013,6 +30231,33 @@ ] } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.network_drive.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.network_drive.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -31506,6 +31751,33 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.onedrive.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.onedrive.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -36282,6 +36554,33 @@ ] } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.outlook.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.outlook.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -40246,7 +40545,35 @@ "path": "packages/kbn-search-connectors/types/native_connectors.ts", "deprecated": false, "trackAdoption": false, - "children": [] + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.salesforce.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.salesforce.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] }, { "parentPluginId": "@kbn/search-connectors", @@ -42768,6 +43095,33 @@ ] } ] + }, + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.servicenow.features.FeatureName.INCREMENTAL_SYNC", + "type": "Object", + "tags": [], + "label": "[FeatureName.INCREMENTAL_SYNC]", + "description": [], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-connectors", + "id": "def-common.NATIVE_CONNECTOR_DEFINITIONS.servicenow.features.FeatureName.INCREMENTAL_SYNC.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-search-connectors/types/native_connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 35ca05cdaf3f5..08c7a6d538917 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3151 | 0 | 3151 | 0 | +| 3177 | 0 | 3177 | 0 | ## Common diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 99570ba8495c2..192ba467340c6 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-12 +date: 2024-03-18 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 3db4f22abca22..ce2bf22d70f57 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-12 +date: 2024-03-18 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 33730bcf2e1d2..b2f1a0a797722 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-12 +date: 2024-03-18 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 24f9c0e7bede2..2fa74c60a03e2 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-12 +date: 2024-03-18 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.devdocs.json b/api_docs/kbn_security_plugin_types_common.devdocs.json index 5aa76efd27dd6..ccad352a0b18e 100644 --- a/api_docs/kbn_security_plugin_types_common.devdocs.json +++ b/api_docs/kbn_security_plugin_types_common.devdocs.json @@ -31,22 +31,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -61,14 +61,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -83,14 +83,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -105,14 +105,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -125,7 +125,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -138,7 +138,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -154,7 +154,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -170,7 +170,7 @@ "description": [ "\nType and name tuple to identify provider used to authenticate user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -183,7 +183,7 @@ "description": [ "\nType of the Kibana authentication provider." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false }, @@ -196,7 +196,7 @@ "description": [ "\nName of the Kibana authentication provider (arbitrary string)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false } @@ -898,7 +898,7 @@ "description": [ "\nA set of fields describing Kibana user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -909,7 +909,7 @@ "tags": [], "label": "username", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -923,7 +923,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -937,7 +937,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -951,7 +951,7 @@ "signature": [ "readonly string[]" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -962,7 +962,7 @@ "tags": [], "label": "enabled", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -976,7 +976,7 @@ "signature": [ "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false } @@ -1293,7 +1293,7 @@ "description": [ "\nAn Elasticsearch realm that was used to resolve and authenticate the user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1306,7 +1306,7 @@ "description": [ "\nArbitrary name of the security realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -1319,7 +1319,7 @@ "description": [ "\nType of the security realm (file, native, saml etc.)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 9c11e8b5de8a6..82c84429de20a 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-12 +date: 2024-03-18 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 e37a5f5d84829..53b647c267b51 100644 --- a/api_docs/kbn_security_plugin_types_public.devdocs.json +++ b/api_docs/kbn_security_plugin_types_public.devdocs.json @@ -27,9 +27,9 @@ "signature": [ "() => Promise<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -118,9 +118,9 @@ }, " & Pick<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 506049b320bf9..16ff5f33d70c3 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.devdocs.json b/api_docs/kbn_security_plugin_types_server.devdocs.json index 13541b8552790..ddb99a73cc172 100644 --- a/api_docs/kbn_security_plugin_types_server.devdocs.json +++ b/api_docs/kbn_security_plugin_types_server.devdocs.json @@ -1490,9 +1490,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index be30c0bd2865b..cfeb2321ec791 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-12 +date: 2024-03-18 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 8d76a00d65dee..1ee10af5794b7 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_security_solution_navigation.mdx index e132278619633..ad2c27be67c8e 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-12 +date: 2024-03-18 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 70c73c7316776..4021466688efe 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-12 +date: 2024-03-18 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 cd40d8f44aedd..3041e0812fbd9 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-12 +date: 2024-03-18 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 89a6002a2d469..91aa33d13c298 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-12 +date: 2024-03-18 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 0ac2dfa6d6485..ce55bd6cb1ef4 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-12 +date: 2024-03-18 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 f9d96e43626b4..a5ec0cf738122 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index c60227949fdf9..ce9ce00416a87 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 3704b59ee39ed..0ffe3ad24053f 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-12 +date: 2024-03-18 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 7f6959d2b1870..26add784aedcf 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-12 +date: 2024-03-18 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 9c00bfeb13ca0..f64768cd13a57 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 0a7563fecf8b1..dba4155453d06 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 058c3d1b2aad9..d23092172d981 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-12 +date: 2024-03-18 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 a464c6d957728..2c2ba654b1118 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-12 +date: 2024-03-18 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 c744ed51eb586..909b3f6a1ff2d 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-12 +date: 2024-03-18 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 24418607d25a2..3af5c997eeb54 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-12 +date: 2024-03-18 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 ce3f0ece24eff..82bb2eecc9c50 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-12 +date: 2024-03-18 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 d221b8aee4e67..1bd0d1969c222 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-12 +date: 2024-03-18 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 1515f9bb87286..063fd3a1f6aea 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-12 +date: 2024-03-18 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 4deb25ff0ae30..827bd93a1c869 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-12 +date: 2024-03-18 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 2435fe0a87fb3..3f638e42de59e 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-12 +date: 2024-03-18 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 d9ba11842799c..38f507b45c830 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-12 +date: 2024-03-18 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 4ba3cccd7bcc7..f946dc625eced 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-12 +date: 2024-03-18 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 e6a3784501328..f74bcfc2f9914 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-12 +date: 2024-03-18 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 031c13079f0f3..97838c80b3f39 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-12 +date: 2024-03-18 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 26e925e9c1c74..d6e5c46f564ad 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-12 +date: 2024-03-18 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 7d2c9d49fac20..9f33a840deba5 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-12 +date: 2024-03-18 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 c55ab98528069..b733617485242 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-12 +date: 2024-03-18 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 7c504370c16ab..7b54841bba0c5 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-12 +date: 2024-03-18 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 34010b042978b..5709ae425408f 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-12 +date: 2024-03-18 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 755c7ab343bea..c3c28da03c51c 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-12 +date: 2024-03-18 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 1663345d73f19..4e49a19f349e2 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-12 +date: 2024-03-18 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 2fb6bb08ce270..37962a2755ad7 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-12 +date: 2024-03-18 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 86cfe958d8e2b..f2b9b70d3216b 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-12 +date: 2024-03-18 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 c11119370758b..a452f31d3deec 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-12 +date: 2024-03-18 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 bf24d8522fbcf..d0d40fa6cce27 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-12 +date: 2024-03-18 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 38ca3f0e83238..881f1887f8c5e 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-12 +date: 2024-03-18 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 815c9080d43ac..0dca2d2e4495d 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-12 +date: 2024-03-18 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 757a3614c0a26..000d4649af722 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-12 +date: 2024-03-18 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 84bec1f0fd0ad..413ea8677a3da 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-12 +date: 2024-03-18 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 d4eb568f208a6..e5002692fde02 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-12 +date: 2024-03-18 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 5a0adb8915b87..2e5d02e41dde7 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-12 +date: 2024-03-18 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 ceeb701c7d0b0..074acb5ce4e17 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-12 +date: 2024-03-18 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 51ceebafb9c15..89517ed554657 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-12 +date: 2024-03-18 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 8bc4444ea0ba8..64b53e378094b 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-12 +date: 2024-03-18 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 b4021d83c8e27..7630a2c2c5fe2 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-12 +date: 2024-03-18 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 332f4f915caf6..ae3a5cb14b10b 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-12 +date: 2024-03-18 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 463162a98ac70..f7d6f0b65a843 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-12 +date: 2024-03-18 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 f39cd3c227d35..6f50e91653ae5 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-12 +date: 2024-03-18 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 74ab8e0287bb8..0e2ce551a12e2 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-12 +date: 2024-03-18 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 7272692629948..11715da0cea1c 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-12 +date: 2024-03-18 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 ca0a22760e463..9e18cfd56f7b8 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-12 +date: 2024-03-18 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 4dbf0dbfb7bdb..afad301db44e0 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-12 +date: 2024-03-18 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 e2dc34689a1fc..558d8e5a711ea 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-12 +date: 2024-03-18 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 e550760f4b5e2..aa32e740682e9 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-12 +date: 2024-03-18 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 9d77435a61f33..3f6bb9ebbf176 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-12 +date: 2024-03-18 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 ee35ea2aa616d..35e450d4ed8f8 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-12 +date: 2024-03-18 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 11812e1678930..37752b0b67e77 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-12 +date: 2024-03-18 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 f15b2d76ecf84..69e9f74ccd87e 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-12 +date: 2024-03-18 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 f90e2c95696ab..c0055cc94f27c 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-12 +date: 2024-03-18 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 23297496fc029..1a8e5237466ff 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-12 +date: 2024-03-18 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 9b501e870ca8c..cdbb1892f3abf 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-12 +date: 2024-03-18 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 758a554fa29a9..3e78b6673eead 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-12 +date: 2024-03-18 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 7ed6aa8e1fac8..37e3e85fe564f 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-12 +date: 2024-03-18 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 0b1fc0b7c7e37..85b833f0e4c99 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-12 +date: 2024-03-18 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 7054c61e9efdf..cacd636899feb 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-12 +date: 2024-03-18 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 c5937b30caf5b..2505860bd284c 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-12 +date: 2024-03-18 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 46c6fe63287f7..b40671340b93a 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-12 +date: 2024-03-18 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 389b5140c4212..5926cf587a5c9 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-12 +date: 2024-03-18 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 3bed4155ecbe0..327d926f23cdc 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index d14239670dddc..2f82b7c89964d 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-12 +date: 2024-03-18 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 f2ff1666386ea..8e030f0ada374 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-12 +date: 2024-03-18 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 51d3abf9869f9..ea49824b8c7c9 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-12 +date: 2024-03-18 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 0232c2ae12fc2..43ab935f1f068 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-12 +date: 2024-03-18 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 3787c8b0b9038..6288cda0fb234 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-12 +date: 2024-03-18 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 c2d1ffc76d9ae..a1dbc4806d308 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-12 +date: 2024-03-18 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 f8b885631f085..55f2b3f659cd4 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-12 +date: 2024-03-18 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 49b1b9a9afbbe..b8c1902c408bf 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-12 +date: 2024-03-18 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 5a28ce3bae54c..7956d818a6a3a 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-12 +date: 2024-03-18 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 8154d883a5140..d9071675ad5e3 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-12 +date: 2024-03-18 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 a53b458603fc7..ec2c2a48b514f 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-12 +date: 2024-03-18 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 a9096f1eea394..df4f360e36111 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-12 +date: 2024-03-18 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 40f66b87d49b6..46e8db859668d 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-12 +date: 2024-03-18 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 bccc2f2ef64a2..06bb4aa47238c 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-12 +date: 2024-03-18 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 1611ca8cacda4..c8fa8de34a463 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-12 +date: 2024-03-18 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 917241554994d..50261ee9abebe 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-12 +date: 2024-03-18 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 576a085231736..fd9263b2cf403 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-12 +date: 2024-03-18 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 84cec5752f741..5aef79cbbd401 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-12 +date: 2024-03-18 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 0502dc33eed32..18d3f54ebef11 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_unified_data_table.mdx index 7625871318a79..89eba2b0b615d 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-12 +date: 2024-03-18 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 17e231b2ca2d8..40bbc13982ada 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-12 +date: 2024-03-18 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.mdx b/api_docs/kbn_unified_field_list.mdx index fc5456a11276f..24944ef6c3f53 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index 21eca5dfb2512..3ea5f9d42dcba 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-12 +date: 2024-03-18 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 c27f92ee9f285..09af9ec8a72c4 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-12 +date: 2024-03-18 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 8e2bf81461860..ae96aeeea75ba 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-12 +date: 2024-03-18 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 e56eafa3be1fc..2a1627a3e2ad6 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-12 +date: 2024-03-18 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 e5d25eb0ddea9..34be4894c03b4 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-12 +date: 2024-03-18 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 506ead098d53f..626c758e8bc9f 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 7a120970345a7..486da19d18e7d 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index 1aa5ba3e7b419..352fd45c2b536 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-12 +date: 2024-03-18 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 98846801bdd07..fd6a27166be48 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-12 +date: 2024-03-18 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 3b7bc413da65d..451c15839ab56 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-12 +date: 2024-03-18 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 231c327379743..8756e42002d7b 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-12 +date: 2024-03-18 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 28c3883a31c93..4c2f920528436 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index b7aff2e5df3b7..81a8e8e470626 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -4932,6 +4932,14 @@ "section": "def-common.PluginsServiceStart", "text": "PluginsServiceStart" }, + " | undefined; security?: ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, " | undefined; }" ], "path": "src/plugins/kibana_react/public/context/types.ts", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 90085ee549081..f90bf9930c4e0 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-12 +date: 2024-03-18 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 b22a4f399fc3b..3c2d98527f57a 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-12 +date: 2024-03-18 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 6a89d56577b0d..73b4cf50cbcc7 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-12 +date: 2024-03-18 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 0249b720ea6aa..2b0a7a454e993 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -10952,8 +10952,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & Partial<", { diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 5e94c767b7aa2..81810f1b24c25 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 25d8e3934dc63..1e0a963a94646 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-12 +date: 2024-03-18 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 1cba67df668fe..bf27be187d3f0 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-12 +date: 2024-03-18 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 26d6f687d6059..dbdc13b3e5be7 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-12 +date: 2024-03-18 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 539a171270d24..8584d58951f74 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 8ea6cbe2d336a..67a3577e0e1a8 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-12 +date: 2024-03-18 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 df19a9ce84e70..818e6c9545813 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 5cb488dcbacc3..a1eb71baae7bb 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index bbf454af57871..b5e1b4f98ea47 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index 832647b97e456..46fa7bfaaab12 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -4006,8 +4006,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & Partial<", { diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 7d02bd9db0974..2aad3d5c764db 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-12 +date: 2024-03-18 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 1bc3e9942f318..cae631c1e098d 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-12 +date: 2024-03-18 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 90f8c345bde55..e7e71c8c5b21f 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.devdocs.json b/api_docs/ml.devdocs.json index c3033b6f1cdf5..f2b2a33589b9d 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -2165,11 +2165,15 @@ "label": "AlertingService", "description": [], "signature": [ - "{ preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string) => Promise<{ payload: ", + "{ preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string, state?: ", + "AnomalyDetectionRuleState", + " | undefined) => Promise<{ payload: ", "AnomalyDetectionAlertPayload", "; context: ", "AnomalyDetectionAlertContext", - "; name: string; isHealthy: boolean; } | undefined>; }" + "; name: string; isHealthy: boolean; stateUpdate: ", + "AnomalyDetectionRuleState", + "; } | undefined>; }" ], "path": "x-pack/plugins/ml/server/shared.ts", "deprecated": false, @@ -2470,11 +2474,15 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - "): { preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string) => Promise<{ payload: ", + "): { preview: (args_0: Readonly<{} & { timeRange: string; alertParams: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>; sampleSize: number; }>) => Promise; execute: (params: Readonly<{} & { severity: number; jobSelection: Readonly<{} & { groupIds: string[]; jobIds: string[]; }>; resultType: \"bucket\" | \"record\" | \"influencer\"; includeInterim: boolean; lookbackInterval: string | null; topNBuckets: number | null; }>, spaceId: string, state?: ", + "AnomalyDetectionRuleState", + " | undefined) => Promise<{ payload: ", "AnomalyDetectionAlertPayload", "; context: ", "AnomalyDetectionAlertContext", - "; name: string; isHealthy: boolean; } | undefined>; }; } & ", + "; name: string; isHealthy: boolean; stateUpdate: ", + "AnomalyDetectionRuleState", + "; } | undefined>; }; } & ", "TrainedModelsProvider" ], "path": "x-pack/plugins/ml/server/plugin.ts", diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 62f1df9b3cac0..8fb3dd3cebf46 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 151 | 3 | 65 | 96 | +| 151 | 3 | 65 | 97 | ## Client diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 9d0ebee44ac0f..c11a0804002dd 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-12 +date: 2024-03-18 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 66d0c6d84aa28..ed6cf772196b4 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-12 +date: 2024-03-18 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 5d1a253fd411b..0fa7996f550b6 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-12 +date: 2024-03-18 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 2a4b38b5f0425..82a8760d4a389 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-12 +date: 2024-03-18 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 03d4532680122..37c7a1d6ef66f 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-12 +date: 2024-03-18 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 6862485fcb682..828472f01fc3c 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-12 +date: 2024-03-18 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 b3fbd0448720b..e5cde8a29fefa 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-12 +date: 2024-03-18 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 efe71a879f881..91bee1c20261c 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -3660,7 +3660,7 @@ "label": "format", "description": [], "signature": [ - "(options: { fields: OutputOf) => ", + "ScreenContextActionDefinition", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.createScreenContextAction.$1", + "type": "Uncategorized", + "tags": [], + "label": "definition", + "description": [], + "signature": [ + "TActionDefinition" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.createScreenContextAction.$2", + "type": "Function", + "tags": [], + "label": "respond", + "description": [], + "signature": [ + "ScreenContextActionRespondFunction", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observabilityAIAssistant", "id": "def-public.createStorybookChatService", @@ -1068,7 +1121,7 @@ "label": "complete", "description": [], "signature": [ - "(options: { screenContexts: ", + "(options: { getScreenContexts: () => ", "ObservabilityAIAssistantScreenContext", "[]; conversationId?: string | undefined; connectorId: string; messages: ", { @@ -1107,18 +1160,21 @@ "children": [ { "parentPluginId": "observabilityAIAssistant", - "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.screenContexts", - "type": "Array", + "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.getScreenContexts", + "type": "Function", "tags": [], - "label": "screenContexts", + "label": "getScreenContexts", "description": [], "signature": [ + "() => ", "ObservabilityAIAssistantScreenContext", "[]" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "observabilityAIAssistant", @@ -1241,9 +1297,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]" + "[]" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, @@ -1752,9 +1806,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -1921,9 +1973,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -1947,7 +1999,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -1985,14 +2037,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -2006,7 +2062,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2266,9 +2322,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2435,9 +2489,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -2461,7 +2515,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -2499,14 +2553,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -2520,7 +2578,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2753,6 +2811,48 @@ "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantService.navigate", + "type": "Function", + "tags": [], + "label": "navigate", + "description": [], + "signature": [ + "(callback: () => void) => Promise<", + "Observable", + "<", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" + }, + ">>" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantService.navigate.$1", + "type": "Function", + "tags": [], + "label": "callback", + "description": [], + "signature": [ + "() => void" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -3281,9 +3381,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -3450,9 +3548,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -3476,7 +3574,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -3514,14 +3612,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -3535,7 +3637,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -3898,9 +4000,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4067,9 +4167,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -4093,7 +4193,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -4131,14 +4231,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -4152,7 +4256,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4705,6 +4809,108 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction", + "type": "Function", + "tags": [], + "label": "createScreenContextAction", + "description": [], + "signature": [ + ", \"respond\">, TResponse = ReturnOf>(definition: TActionDefinition, respond: ", + "ScreenContextActionRespondFunction", + ") => ", + "ScreenContextActionDefinition", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$1", + "type": "Uncategorized", + "tags": [], + "label": "definition", + "description": [], + "signature": [ + "TActionDefinition" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$2", + "type": "Function", + "tags": [], + "label": "respond", + "description": [], + "signature": [ + "({}: { args: TResponse; signal: AbortSignal; connectorId: string; client: Pick<", + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantChatService", + "text": "ObservabilityAIAssistantChatService" + }, + ", \"complete\" | \"chat\">; messages: ", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.Message", + "text": "Message" + }, + "[]; }) => Promise<", + "FunctionResponse", + ">" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$2.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ args: TArguments; signal: AbortSignal; connectorId: string; client: Pick<", + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantChatService", + "text": "ObservabilityAIAssistantChatService" + }, + ", \"complete\" | \"chat\">; messages: ", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.Message", + "text": "Message" + }, + "[]; }" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] } ], "lifecycle": "start", @@ -4973,9 +5179,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -5142,9 +5346,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -5168,7 +5372,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -5206,14 +5410,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -5227,7 +5435,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -5894,7 +6102,7 @@ "label": "parameters", "description": [], "signature": [ - "TParameters" + "TParameters | undefined" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts", "deprecated": false, @@ -6397,16 +6605,16 @@ "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.ChatCompletionChunkEvent", - "text": "ChatCompletionChunkEvent" + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" }, " | ", { "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.MessageAddEvent", - "text": "MessageAddEvent" + "section": "def-common.ChatCompletionChunkEvent", + "text": "ChatCompletionChunkEvent" }, " | ", { @@ -6450,16 +6658,16 @@ "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.ChatCompletionChunkEvent", - "text": "ChatCompletionChunkEvent" + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" }, " | ", { "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.MessageAddEvent", - "text": "MessageAddEvent" + "section": "def-common.ChatCompletionChunkEvent", + "text": "ChatCompletionChunkEvent" } ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts", diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 741bef04efeee..89ae731a76647 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 218 | 1 | 216 | 21 | +| 227 | 1 | 225 | 24 | ## Client diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index f8f0d7c926bac..1e807d433e72e 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-12 +date: 2024-03-18 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 824916fce199b..9c13a548dc03d 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-12 +date: 2024-03-18 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 3d694bcd12b08..6fe31ba32191a 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 08ce1f91bb373..26b35924a9a8e 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.devdocs.json b/api_docs/osquery.devdocs.json index 02d9f62e0978a..e3de3dbf5b36b 100644 --- a/api_docs/osquery.devdocs.json +++ b/api_docs/osquery.devdocs.json @@ -301,7 +301,7 @@ "label": "createActionService", "description": [], "signature": [ - "{ create: (params: { agent_ids?: string[] | undefined; agent_all?: boolean | undefined; agent_platforms?: string[] | undefined; agent_policy_ids?: string[] | undefined; query?: string | undefined; queries?: { id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }[] | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; ecs_mapping?: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; pack_id?: string | undefined; alert_ids?: string[] | undefined; case_ids?: string[] | undefined; event_ids?: string[] | undefined; metadata?: object | undefined; }, alertData?: OutputOf public API | Number of teams | |--------------|----------|------------------------| -| 754 | 646 | 40 | +| 761 | 653 | 40 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 45552 | 233 | 34475 | 1767 | +| 45873 | 233 | 34757 | 1778 | ## Plugin Directory @@ -51,7 +51,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | The cloud security posture plugin | 14 | 0 | 2 | 2 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 32 | 0 | 24 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 149 | 0 | 125 | 6 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 332 | 0 | 324 | 16 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 340 | 0 | 332 | 20 | | crossClusterReplication | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | | customBranding | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 271 | 0 | 252 | 1 | @@ -68,8 +68,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 156 | 0 | 108 | 27 | | | [@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 | 41 | 0 | 27 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 562 | 1 | 457 | 8 | +| | [@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 | 553 | 1 | 451 | 9 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 18 | 0 | 18 | 0 | | | [@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 | @@ -132,7 +132,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 151 | 3 | 65 | 96 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 151 | 3 | 65 | 97 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 15 | 3 | 13 | 1 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 9 | 0 | 9 | 0 | @@ -141,14 +141,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 651 | 2 | 642 | 17 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 218 | 1 | 216 | 21 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 227 | 1 | 225 | 24 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 21 | 0 | 21 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 14 | 0 | 14 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 330 | 1 | 325 | 20 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 23 | 0 | 23 | 7 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 2 | 0 | 2 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds a standardized Presentation panel which allows any forward ref component to interface with various Kibana systems. | 11 | 0 | 11 | 3 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds a standardized Presentation panel which allows any forward ref component to interface with various Kibana systems. | 11 | 0 | 11 | 4 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 220 | 2 | 165 | 11 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 16 | 1 | 16 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 22 | 0 | 22 | 7 | @@ -178,9 +178,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 22 | 1 | 22 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 256 | 0 | 65 | 0 | | | [@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 | 1 | +| | [@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) | - | 108 | 0 | 64 | 5 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 104 | 0 | 61 | 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 | @@ -330,7 +330,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 16 | 0 | 16 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 1 | 10 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 11 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 12 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 3 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | @@ -347,9 +347,9 @@ 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) | - | 2 | 0 | 2 | 0 | | | [@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) | - | 32 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 34 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 5 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 38 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [@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) | - | 38 | 0 | 31 | 0 | @@ -400,6 +400,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 69 | 0 | 69 | 4 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 14 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 3 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 7 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 14 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 12 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 21 | 0 | 20 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 3 | 0 | @@ -457,13 +464,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 104 | 0 | 84 | 6 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 59 | 0 | 57 | 0 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 154 | 0 | 132 | 8 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 220 | 0 | 207 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 52 | 0 | 37 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | | | [@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) | - | 32 | 0 | 32 | 0 | +| | [@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) | - | 39 | 0 | 39 | 0 | @@ -556,9 +563,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@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) | - | 42 | 0 | 40 | 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) | - | 156 | 0 | 120 | 3 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 149 | 0 | 116 | 3 | | | [@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 | @@ -586,10 +593,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 2 | 8 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 2 | 0 | 1 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 16 | 0 | 16 | 1 | -| | [@elastic/security-detections-response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 122 | 0 | 119 | 0 | +| | [@elastic/security-detections-response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 123 | 0 | 120 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 76 | 0 | 76 | 0 | -| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 3151 | 0 | 3151 | 0 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 3177 | 0 | 3177 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 1 | 17 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 20 | 0 | 18 | 1 | diff --git a/api_docs/presentation_panel.devdocs.json b/api_docs/presentation_panel.devdocs.json index c876b5f958af5..d06b28a79955e 100644 --- a/api_docs/presentation_panel.devdocs.json +++ b/api_docs/presentation_panel.devdocs.json @@ -29,215 +29,11 @@ "label": "PresentationPanel", "description": [], "signature": [ - " & ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - }, - " & { addNewPanel: (panel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ", displaySuccessMessage?: boolean | undefined) => Promise; registerPanelApi: (panelId: string, panelApi: ApiType) => void; removePanel: (panelId: string) => void; canRemovePanels?: (() => boolean) | undefined; replacePanel: (idToRemove: string, newPanel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ") => Promise; getChildIds: () => string[]; getChild: (childId: string) => unknown; } & Partial & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesViewMode", - "text": "PublishesViewMode" - }, - ">>> = Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasUniqueId", - "text": "HasUniqueId" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDataLoading", - "text": "PublishesDataLoading" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesBlockingError", - "text": "PublishesBlockingError" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDisabledActionIds", - "text": "PublishesDisabledActionIds" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasParentApi", - "text": "HasParentApi" - }, - " & ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - }, - " & { addNewPanel: (panel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ", displaySuccessMessage?: boolean | undefined) => Promise; registerPanelApi: (panelId: string, panelApi: ApiType) => void; removePanel: (panelId: string) => void; canRemovePanels?: (() => boolean) | undefined; replacePanel: (idToRemove: string, newPanel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ") => Promise; getChildIds: () => string[]; getChild: (childId: string) => unknown; } & Partial & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesViewMode", - "text": "PublishesViewMode" - }, - ">>>, PropsType extends {} = {}>(props: ", + "(props: ", { "pluginId": "presentationPanel", "scope": "public", @@ -293,111 +89,9 @@ "section": "def-common.ErrorLike", "text": "ErrorLike" }, - "; api?: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasUniqueId", - "text": "HasUniqueId" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDataLoading", - "text": "PublishesDataLoading" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesBlockingError", - "text": "PublishesBlockingError" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDisabledActionIds", - "text": "PublishesDisabledActionIds" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasParentApi", - "text": "HasParentApi" - }, - " & ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - }, - " & { addNewPanel: (panel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ", displaySuccessMessage?: boolean | undefined) => Promise; registerPanelApi: (panelId: string, panelApi: ApiType) => void; removePanel: (panelId: string) => void; canRemovePanels?: (() => boolean) | undefined; replacePanel: (idToRemove: string, newPanel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ") => Promise; getChildIds: () => string[]; getChild: (childId: string) => unknown; } & Partial & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesViewMode", - "text": "PublishesViewMode" - }, - ">>> | undefined; }) => JSX.Element" + "; api?: ", + "DefaultPresentationPanelApi", + " | undefined; }) => JSX.Element" ], "path": "src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx", "deprecated": false, @@ -451,111 +145,8 @@ "label": "api", "description": [], "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasUniqueId", - "text": "HasUniqueId" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDataLoading", - "text": "PublishesDataLoading" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesBlockingError", - "text": "PublishesBlockingError" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesDisabledActionIds", - "text": "PublishesDisabledActionIds" - }, - " & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.HasParentApi", - "text": "HasParentApi" - }, - " & ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PublishesLastSavedState", - "text": "PublishesLastSavedState" - }, - " & { addNewPanel: (panel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ", displaySuccessMessage?: boolean | undefined) => Promise; registerPanelApi: (panelId: string, panelApi: ApiType) => void; removePanel: (panelId: string) => void; canRemovePanels?: (() => boolean) | undefined; replacePanel: (idToRemove: string, newPanel: ", - { - "pluginId": "@kbn/presentation-containers", - "scope": "common", - "docId": "kibKbnPresentationContainersPluginApi", - "section": "def-common.PanelPackage", - "text": "PanelPackage" - }, - ") => Promise; getChildIds: () => string[]; getChild: (childId: string) => unknown; } & Partial & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesViewMode", - "text": "PublishesViewMode" - }, - ">>> | undefined" + "DefaultPresentationPanelApi", + " | undefined" ], "path": "src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx", "deprecated": false, @@ -606,7 +197,7 @@ }, "<", "PanelCompatibleComponent", - ">; }" + " | null>; }" ], "path": "src/plugins/presentation_panel/public/panel_component/types.ts", "deprecated": false, diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index e4304448d0329..f0b81eb7f73c2 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.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 | |-------------------|-----------|------------------------|-----------------| -| 11 | 0 | 11 | 3 | +| 11 | 0 | 11 | 4 | ## Client diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 0ce45dc9a3d1e..e842b2abeb2d8 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-12 +date: 2024-03-18 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 0b3109442ae9e..2d24854ee2085 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.devdocs.json b/api_docs/profiling_data_access.devdocs.json index 23726acc30813..e674938901dd2 100644 --- a/api_docs/profiling_data_access.devdocs.json +++ b/api_docs/profiling_data_access.devdocs.json @@ -55,7 +55,7 @@ "CloudSetupStateType", " | ", "SetupStateType", - ">; fetchFunction: ({ core, esClient, startIndex, endIndex, indices, stacktraceIdsField, query, totalSeconds, }: ", + ">; fetchFunctions: ({ core, esClient, startIndex, endIndex, indices, stacktraceIdsField, query, totalSeconds, }: ", "FetchFunctionsParams", ") => Promise<", { diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index a9a17c4770b3b..a5289a502c95c 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-12 +date: 2024-03-18 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 d3fb67d9f2417..ddcac467e2f3a 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-12 +date: 2024-03-18 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 c2d11f5ad6750..91d2ed0a2d8f7 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-12 +date: 2024-03-18 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 bf2a223b13f79..206d51689917c 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-12 +date: 2024-03-18 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 6af7f820a5542..d8581b4e2ec54 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -107,7 +107,7 @@ "label": "get", "description": [], "signature": [ - "({ id, index }: GetAlertParams) => Promise Promise Promise<", "SearchResponse", - " Promise Promise OutputOf OutputOf Promise<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -223,9 +223,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" } @@ -257,9 +257,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" } @@ -2649,22 +2649,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2679,14 +2679,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2701,14 +2701,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2723,14 +2723,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2743,7 +2743,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2756,7 +2756,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2772,7 +2772,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -2830,9 +2830,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -5299,9 +5299,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -5633,22 +5633,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -5663,14 +5663,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5685,14 +5685,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5707,14 +5707,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5727,7 +5727,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5740,7 +5740,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5756,7 +5756,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -5772,7 +5772,7 @@ "description": [ "\nType and name tuple to identify provider used to authenticate user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -5785,7 +5785,7 @@ "description": [ "\nType of the Kibana authentication provider." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false }, @@ -5798,7 +5798,7 @@ "description": [ "\nName of the Kibana authentication provider (arbitrary string)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false } @@ -5864,9 +5864,9 @@ }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } @@ -6053,9 +6053,9 @@ }, " & Pick<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7067,7 +7067,7 @@ "description": [ "\nA set of fields describing Kibana user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -7078,7 +7078,7 @@ "tags": [], "label": "username", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7092,7 +7092,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7106,7 +7106,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7120,7 +7120,7 @@ "signature": [ "readonly string[]" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7131,7 +7131,7 @@ "tags": [], "label": "enabled", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7145,7 +7145,7 @@ "signature": [ "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false } @@ -7462,7 +7462,7 @@ "description": [ "\nAn Elasticsearch realm that was used to resolve and authenticate the user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -7475,7 +7475,7 @@ "description": [ "\nArbitrary name of the security realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -7488,7 +7488,7 @@ "description": [ "\nType of the security realm (file, native, saml etc.)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/security.mdx b/api_docs/security.mdx index d05ddca864438..da29c400ce8e5 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 71bb78f20ee8a..ba701e08c3cd1 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -114,7 +114,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/plugin.tsx", "deprecated": false, @@ -568,7 +568,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantModelEvaluation\" | \"assistantStreamingEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForIndicatorMatchRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | undefined" + "\"assistantModelEvaluation\" | \"assistantStreamingEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForIndicatorMatchRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -648,7 +648,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantModelEvaluation\" | \"assistantStreamingEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForIndicatorMatchRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | undefined" + "\"assistantModelEvaluation\" | \"assistantStreamingEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForIndicatorMatchRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1988,7 +1988,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3032,7 +3032,7 @@ "label": "ConfigType", "description": [], "signature": [ - "Omit; }>, \"offeringSettings\"> & { experimentalFeatures: ", + "Omit; }>, \"offeringSettings\"> & { experimentalFeatures: ", { "pluginId": "securitySolution", "scope": "common", @@ -3107,7 +3107,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3283,7 +3283,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly assistantStreamingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForIndicatorMatchRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3332,7 +3332,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly chartEmbeddablesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly assistantStreamingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: false; readonly responseActionsSentinelOneV1Enabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly alertSuppressionForIndicatorMatchRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: false; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; }" + "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly chartEmbeddablesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly assistantStreamingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: false; readonly responseActionsSentinelOneV1Enabled: false; readonly responseActionsSentinelOneV2Enabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly alertSuppressionForIndicatorMatchRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: false; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index aac1b0869d43c..2c0cbb45e3031 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-12 +date: 2024-03-18 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 2737c9df767e8..791f13a1c6de5 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-12 +date: 2024-03-18 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 5fb3cc552eeb4..8444d5bef0be7 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 7fad6fc6a9bda..d780f3357b81d 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index b2006cd7c804e..4c9ec05a31f39 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 40b57ed0dd0e8..81ae9740c00fc 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-12 +date: 2024-03-18 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 659fa602d1ece..17d28e36dbebb 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-12 +date: 2024-03-18 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 57fa9fdbfe99d..bb00ec9569bf5 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 02f6dba71e37b..0616d6f28ffe3 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-12 +date: 2024-03-18 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 7f353f339c658..ea621ae46b392 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-12 +date: 2024-03-18 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 f29199e5e7c59..fdfe4c2b32c08 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-12 +date: 2024-03-18 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 769ac262d0f25..f34f94aa350d3 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.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 | |-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 4 | 1 | +| 4 | 0 | 4 | 0 | ## Common diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index fd3ad76b48311..ae929b293a877 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -336,46 +336,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.createSkipError", - "type": "Function", - "tags": [], - "label": "createSkipError", - "description": [], - "signature": [ - "(error: Error) => ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - } - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "taskManager", - "id": "def-server.createSkipError.$1", - "type": "Object", - "tags": [], - "label": "error", - "description": [], - "signature": [ - "Error" - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "taskManager", "id": "def-server.createTaskRunError", @@ -481,54 +441,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.isSkipError", - "type": "Function", - "tags": [], - "label": "isSkipError", - "description": [], - "signature": [ - "(error: Error | ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - }, - ") => boolean" - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "taskManager", - "id": "def-server.isSkipError.$1", - "type": "CompoundType", - "tags": [], - "label": "error", - "description": [], - "signature": [ - "Error | ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - } - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "taskManager", "id": "def-server.isUnrecoverableError", @@ -783,6 +695,23 @@ "trackAdoption": false, "references": [] }, + { + "parentPluginId": "taskManager", + "id": "def-server.ConcreteTaskInstance.numSkippedRuns", + "type": "number", + "tags": [ + "deprecated" + ], + "label": "numSkippedRuns", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/task_manager/server/task.ts", + "deprecated": true, + "trackAdoption": false, + "references": [] + }, { "parentPluginId": "taskManager", "id": "def-server.ConcreteTaskInstance.version", @@ -1363,22 +1292,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.TaskInstance.numSkippedRuns", - "type": "number", - "tags": [], - "label": "numSkippedRuns", - "description": [ - "\nIndicates the number of skipped executions." - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/plugins/task_manager/server/task.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "taskManager", "id": "def-server.TaskInstance.timeoutOverride", diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 8bf8ea87a7c06..43d491933120b 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-12 +date: 2024-03-18 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 | |-------------------|-----------|------------------------|-----------------| -| 108 | 0 | 64 | 5 | +| 104 | 0 | 61 | 5 | ## Server diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 3be6aa5decfab..3215139fb898b 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index d50b3c484bb63..ed6179f0111e6 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-12 +date: 2024-03-18 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 2ed7b842fbac8..55b33b8277a0f 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-12 +date: 2024-03-18 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 5a15ede9e38b4..c0dc39a2d5f16 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-12 +date: 2024-03-18 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 cdc2f8cee7c25..b4aec1b23ba4e 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-12 +date: 2024-03-18 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 44f68231a56d1..9813a131deda1 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index afa0ec344b981..db1551eb0e7bc 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-12 +date: 2024-03-18 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 5c6dedfc77339..80bb6bae0b624 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 68e82a70d8437..fbedf779dfc94 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-12 +date: 2024-03-18 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 219848617d286..6c1cfaebd0eda 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-12 +date: 2024-03-18 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 5d825355d6849..416d9a3ca71c4 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-12 +date: 2024-03-18 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 94102db03dc37..39810e4cd60a4 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-12 +date: 2024-03-18 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 305b3307fbb30..3f18bcd5dd3ff 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-12 +date: 2024-03-18 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 200320cb88edc..8b41a66109b4a 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-12 +date: 2024-03-18 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 8e0d147bc77cd..c4d801c50e0b7 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-12 +date: 2024-03-18 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 da5e8dcdca3ef..0c52105a542b0 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-12 +date: 2024-03-18 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 534dce4fc1225..97b8e39258602 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 7c3afd604e787..0004e5c26f04e 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-12 +date: 2024-03-18 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 e376b7ec0fe80..11eec607e97cd 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-12 +date: 2024-03-18 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 39df91bdcfb3f..3732a3177a38d 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-12 +date: 2024-03-18 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 8aaa96c4c5672..1abd822681ac4 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-12 +date: 2024-03-18 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 472643cb5d590..4357c27e5e2eb 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-12 +date: 2024-03-18 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 a2920d5a21314..7558e572043d8 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-12 +date: 2024-03-18 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 3af7c335388fa..aabf96279d80e 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-12 +date: 2024-03-18 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 a58e835a5b02d..fcc7bdf04a131 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-12 +date: 2024-03-18 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 9dca8ab8067a4..e5b89d5972db2 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-12 +date: 2024-03-18 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 abef621e97873..bb76586957c3f 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-12 +date: 2024-03-18 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 5295a06295e64..b228bb90c050a 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-12 +date: 2024-03-18 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 3e719e839f127..73ce0ed21e408 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-12 +date: 2024-03-18 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 0e3de25ad2fb3..f4bc522911136 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -6800,47 +6800,7 @@ "section": "def-public.ContainerOutput", "text": "ContainerOutput" }, - "> | undefined; localTimeRange: ", - { - "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.TimeRange", - "text": "TimeRange" - }, - " | undefined>; setLocalTimeRange: (timeRange: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void; getFallbackTimeRange: (() => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) | undefined; isCompatibleWithLocalUnifiedSearch: (() => boolean) | undefined; canLinkToLibrary: (() => Promise) | undefined; linkToLibrary: (() => Promise) | undefined; canUnlinkFromLibrary: (() => Promise) | undefined; unlinkFromLibrary: (() => Promise) | undefined; hidePanelTitle: ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" - }, - "; parentApi: (Partial<", + "> | undefined; parentApi: (Partial<", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6888,7 +6848,15 @@ "section": "def-common.PublishesViewMode", "text": "PublishesViewMode" }, - ">) | undefined; panelTitle: ", + ">) | undefined; hidePanelTitle: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "; panelTitle: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6936,7 +6904,31 @@ "section": "def-common.PublishingSubject", "text": "PublishingSubject" }, - "; viewMode: ", + "; timeRange$: ", + { + "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.TimeRange", + "text": "TimeRange" + }, + " | undefined>; setTimeRange: (timeRange: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void; isCompatibleWithUnifiedSearch: (() => boolean) | undefined; canLinkToLibrary: (() => Promise) | undefined; linkToLibrary: (() => Promise) | undefined; canUnlinkFromLibrary: (() => Promise) | undefined; unlinkFromLibrary: (() => Promise) | undefined; viewMode: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6968,7 +6960,7 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - "; getDescription: () => string; localFilters: ", + "; getDescription: () => string; filters$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6984,7 +6976,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined>; localQuery: ", + "[] | undefined>; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 26a7caf9c2cc8..9c419e5aa0c06 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-12 +date: 2024-03-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/config/serverless.yml b/config/serverless.yml index ff518b8e72bf7..52ba1bbef1071 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -137,9 +137,6 @@ uiSettings: xpack.task_manager.allow_reading_invalid_state: false xpack.task_manager.request_timeouts.update_by_query: 60000 -## TaskManager requeue invalid tasks, supports ZDT -xpack.task_manager.requeue_invalid_tasks.enabled: true - # Reporting feature xpack.screenshotting.enabled: false xpack.reporting.queue.pollInterval: 3m diff --git a/dev_docs/tutorials/performance/adding_performance_journey.mdx b/dev_docs/tutorials/performance/adding_performance_journey.mdx index 77bb7d6f39e53..88b188f555028 100644 --- a/dev_docs/tutorials/performance/adding_performance_journey.mdx +++ b/dev_docs/tutorials/performance/adding_performance_journey.mdx @@ -23,7 +23,7 @@ Let's assume we instrumented dashboard with load time metrics and want to track Journey supports loading test data with esArchiver or kbnArchiver. Similar to functional tests, it might require to implement custom wait for UI rendering to be completed. -Simply create a new file in `x-pack/performance/journeys` with the following code: +Simply create a new file in `x-pack/performance/journeys_e2e` with the following code: ``` export const journey = new Journey({ @@ -51,7 +51,7 @@ In oder to get correct and consistent metrics, it is important to design journey ### Running performance journey locally for troubleshooting purposes Use the Node script: - `node scripts/run_performance.js --journey-path x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts` + `node scripts/run_performance.js --journey-path x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts` Scripts steps include: - start Elasticsearch diff --git a/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx b/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx index 6ab160ac93328..4711984dd247a 100644 --- a/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx +++ b/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx @@ -108,7 +108,7 @@ export TEST_CLOUD=1 Run your journey with the command: ``` -node scripts/functional_test_runner.js --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts` +node scripts/functional_test_runner.js --config x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts` ``` APM & Telemetry labels will be updated on the fly and metrics/traces should be available in Telemetry Staging and kibana-ops-e2e-perf cluster. diff --git a/docs/index.asciidoc b/docs/index.asciidoc index ac9f1f6a28e5d..786266cc894e4 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -1,8 +1,6 @@ [[kibana-guide]] = Kibana Guide -:kib-repo-dir: {kibana-root}/docs - include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] include::{docs-root}/shared/attributes.asciidoc[] diff --git a/docs/management/cases/images/cases-custom-fields-add.png b/docs/management/cases/images/cases-custom-fields-add.png index 1938ab2950053..6f4d452a9429c 100644 Binary files a/docs/management/cases/images/cases-custom-fields-add.png and b/docs/management/cases/images/cases-custom-fields-add.png differ diff --git a/docs/management/cases/manage-cases.asciidoc b/docs/management/cases/manage-cases.asciidoc index 50c2bc0ff5ff5..79b0f09642cc7 100644 --- a/docs/management/cases/manage-cases.asciidoc +++ b/docs/management/cases/manage-cases.asciidoc @@ -67,6 +67,8 @@ image::images/cases-custom-fields-add.png[Add a custom field in case settings] . If you want the text field to be mandatory in all cases, select *Make this field required*. +. Optionally add a default value. + . Click *Save field*. You can subsequently remove or edit custom fields on the *Settings* page. diff --git a/docs/management/maintenance-windows/maintenance-windows.asciidoc b/docs/management/maintenance-windows/maintenance-windows.asciidoc index a2ea825d5e4c1..559151c060ed2 100644 --- a/docs/management/maintenance-windows/maintenance-windows.asciidoc +++ b/docs/management/maintenance-windows/maintenance-windows.asciidoc @@ -54,11 +54,7 @@ If you turn on *Filter alerts*, you can use KQL to filter the alerts affected by image::images/create-maintenance-window-filter.png[The Create Maintenance Window user interface in {kib} with alert filters turned on] // NOTE: This is an autogenerated screenshot. Do not edit it directly. -[NOTE] -==== -* You can select only a single category when you turn on filters. -* Some rules are not affected by maintenance window filters because their alerts do not contain requisite data. In particular, <>, <>, {ml-docs}/ml-configuring-alerts.html[{anomaly-jobs} health], and {ref}/transform-alerts.html[transform health] rules are not affected by the filters. -==== +NOTE: You can select only a single category when you turn on filters. A maintenance window can have any one of the following statuses: diff --git a/docs/setup/install.asciidoc b/docs/setup/install.asciidoc index 1851d94473f4b..83e6b6f26b335 100644 --- a/docs/setup/install.asciidoc +++ b/docs/setup/install.asciidoc @@ -61,4 +61,4 @@ include::install/deb.asciidoc[] include::install/rpm.asciidoc[] -include::{kib-repo-dir}/setup/docker.asciidoc[] +include::{kibana-root}/docs/setup/docker.asciidoc[] diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 9703559649840..1bc5bb4c14dc2 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -623,22 +623,22 @@ Set this value to false to disable the Upgrade Assistant UI. *Default: true* Set this value to change the {kib} interface language. Valid locales are: `en`, `zh-CN`, `ja-JP`, `fr-FR`. *Default: `en`* -include::{kib-repo-dir}/settings/alert-action-settings.asciidoc[leveloffset=+1] -include::{kib-repo-dir}/settings/apm-settings.asciidoc[] -include::{kib-repo-dir}/settings/banners-settings.asciidoc[] -include::{kib-repo-dir}/settings/cases-settings.asciidoc[leveloffset=+1] -include::{kib-repo-dir}/settings/enterprise-search-settings.asciidoc[] -include::{kib-repo-dir}/settings/fleet-settings.asciidoc[] -include::{kib-repo-dir}/settings/i18n-settings.asciidoc[] -include::{kib-repo-dir}/settings/logging-settings.asciidoc[] -include::{kib-repo-dir}/settings/logs-ui-settings.asciidoc[] -include::{kib-repo-dir}/settings/infrastructure-ui-settings.asciidoc[] -include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[] -include::{kib-repo-dir}/settings/reporting-settings.asciidoc[] -include::{kib-repo-dir}/settings/search-sessions-settings.asciidoc[] +include::{kibana-root}/docs/settings/alert-action-settings.asciidoc[leveloffset=+1] +include::{kibana-root}/docs/settings/apm-settings.asciidoc[] +include::{kibana-root}/docs/settings/banners-settings.asciidoc[] +include::{kibana-root}/docs/settings/cases-settings.asciidoc[leveloffset=+1] +include::{kibana-root}/docs/settings/enterprise-search-settings.asciidoc[] +include::{kibana-root}/docs/settings/fleet-settings.asciidoc[] +include::{kibana-root}/docs/settings/i18n-settings.asciidoc[] +include::{kibana-root}/docs/settings/logging-settings.asciidoc[] +include::{kibana-root}/docs/settings/logs-ui-settings.asciidoc[] +include::{kibana-root}/docs/settings/infrastructure-ui-settings.asciidoc[] +include::{kibana-root}/docs/settings/monitoring-settings.asciidoc[] +include::{kibana-root}/docs/settings/reporting-settings.asciidoc[] +include::{kibana-root}/docs/settings/search-sessions-settings.asciidoc[] include::secure-settings.asciidoc[] -include::{kib-repo-dir}/settings/security-settings.asciidoc[] -include::{kib-repo-dir}/settings/spaces-settings.asciidoc[] -include::{kib-repo-dir}/settings/task-manager-settings.asciidoc[] -include::{kib-repo-dir}/settings/telemetry-settings.asciidoc[] -include::{kib-repo-dir}/settings/url-drilldown-settings.asciidoc[] +include::{kibana-root}/docs/settings/security-settings.asciidoc[] +include::{kibana-root}/docs/settings/spaces-settings.asciidoc[] +include::{kibana-root}/docs/settings/task-manager-settings.asciidoc[] +include::{kibana-root}/docs/settings/telemetry-settings.asciidoc[] +include::{kibana-root}/docs/settings/url-drilldown-settings.asciidoc[] diff --git a/docs/user/alerting/alerting-getting-started.asciidoc b/docs/user/alerting/alerting-getting-started.asciidoc index 3e6787370ff2f..545155e656893 100644 --- a/docs/user/alerting/alerting-getting-started.asciidoc +++ b/docs/user/alerting/alerting-getting-started.asciidoc @@ -75,7 +75,7 @@ When defining actions in a rule, you specify: Rather than repeatedly entering connection information and credentials for each action, {kib} simplifies action setup using <>. For example if four rules send email notifications via the same SMTP service, they can all reference the same SMTP connector. -The _action frequency_ defines when the action runs (for example, only when the alert status changes or at specific time intervals). Each rule type also has a set of the _action groups_ that affects when the action runs (for example, when the threshold is met or when the alert is recovered). If you want to reduce the number of notifications you receive without affecting their timeliness, some rule types support alert summaries. You can set the action frequency such that you receive notifications that summarize the new, ongoing, and recovered alerts at your preferred time intervals. +The _action frequency_ defines when the action runs (for example, only when the alert status changes or at specific time intervals). Each rule type also has a set of the _action groups_ that affects when the action runs (for example, when the threshold is met or when the alert is recovered). If you want to reduce the number of notifications you receive without affecting their timeliness, set the action frequency to a summary of alerts. You will receive notifications that summarize the new, ongoing, and recovered alerts at your preferred time intervals. Some types of rules enable you to further refine the conditions under which actions run. For example, you can specify that actions run only when an alert occurs within a specific time frame or when it matches a KQL query. diff --git a/docs/user/alerting/create-and-manage-rules.asciidoc b/docs/user/alerting/create-and-manage-rules.asciidoc index 670e531350d5b..b1a99f856546b 100644 --- a/docs/user/alerting/create-and-manage-rules.asciidoc +++ b/docs/user/alerting/create-and-manage-rules.asciidoc @@ -55,7 +55,7 @@ Each rule type provides its own way of defining the conditions to detect, but an For example, in an {es} query rule, you specify an index, a query, and a threshold, which uses a metric aggregation operation (`count`, `average`, `max`, `min`, or `sum`): [role="screenshot"] -image::images/es-query-rule-conditions.png[UI for defining rule conditions in an {es} query rule,500] +image::images/rule-types-es-query-conditions.png[UI for defining rule conditions in an {es} query rule,500] // NOTE: This is an autogenerated screenshot. Do not edit it directly. All rules must have a check interval, which defines how often to evaluate the rule conditions. Checks are queued; they run as close to the defined value as capacity allows. @@ -66,35 +66,32 @@ For details on what types of rules are available and how to configure them, refe [[defining-rules-actions-details]] ==== Actions -You can add one or more actions to your rule to generate notifications when its -conditions are met and when they are no longer met. +You can add one or more actions to your rule to generate notifications when its conditions are met and when they are no longer met. -Each action uses a connector, which provides connection information for a {kib} service or third party integration, depending on where you want to send the notifications. If no connectors exist, click **Add connector** to create one. +Each action uses a connector, which provides connection information for a {kib} service or third party integration, depending on where you want to send the notifications. +If no connectors exist, click **Add connector** to create one. + +After you select a connector, set the action frequency. +You can choose to create a summary of alerts on each check interval or on a custom interval. +Alternatively, you an choose to run actions for each alert (at each check interval, only when the alert status changes, or at a custom interval). + +NOTE: If you choose a custom action interval, it cannot be shorter than the rule's check interval. -After you select a connector, set the action frequency. If the rule type supports alert summaries, you can choose to create a summary of alerts on each check interval or on a custom interval. For example, if you create an {es} query rule, you can send notifications that summarize the new, ongoing, and recovered alerts on a custom interval: [role="screenshot"] image::images/es-query-rule-action-summary.png[UI for defining alert summary action in an {es} query rule,500] // NOTE: This is an autogenerated screenshot. Do not edit it directly. -[NOTE] -==== -* Some rules that support alert summaries, such as metric threshold rules, enable you to further refine when actions run by adding time frame and query filters. -* If you choose a custom action interval, it cannot be shorter than the rule's check interval. -==== - -Alternatively, you can set the action frequency such that the action runs for each alert. -If the rule type does not support alert summaries, this is your only available option. -You must choose when the action runs (for example, at each check interval, only when the alert status changes, or at a custom action interval). -You must also choose an action group, which affects whether the action runs. Each rule type has a specific set of valid action groups. +When you choose to run actions for each alert, you must specify an action group. +Each rule type has a set of valid action groups, which affect when an action runs. For example, you can set *Run when* to `Query matched` or `Recovered` for the {es} query rule: [role="screenshot"] image::images/es-query-rule-recovery-action.png[UI for defining a recovery action,500] // NOTE: This is an autogenerated screenshot. Do not edit it directly. -Each connector supports a specific set of actions for each action group and enables different action properties. +Connectors have unique behavior for each action group. For example, you can have actions that create an {opsgenie} alert when rule conditions are met and recovery actions that close the {opsgenie} alert. For more information about connectors, refer to <>. [[alerting-concepts-suppressing-duplicate-notifications]] @@ -114,7 +111,7 @@ servers that continue to exceed the threshold: * Minute 2: X123 and Y456 > 0.9. _One email_ will be sent for Y456. * Minute 3: X123, Y456, Z789 > 0.9. _One email_ will be sent for Z789. -To get notified only once when a server exceeds the threshold, you can set the action frequency to `On status changes`. Alternatively, if the rule type supports alert summaries, consider using them to reduce the volume of notifications. +To get notified only once when a server exceeds the threshold, you can set the action frequency to `On status changes`. Alternatively, consider using alert summaries to reduce the volume of notifications. ============================================== [float] diff --git a/docs/user/alerting/images/alert-types-tracking-containment-conditions.png b/docs/user/alerting/images/alert-types-tracking-containment-conditions.png index b328bb05dd0d6..1ff0a03b85512 100644 Binary files a/docs/user/alerting/images/alert-types-tracking-containment-conditions.png and b/docs/user/alerting/images/alert-types-tracking-containment-conditions.png differ diff --git a/docs/user/alerting/images/es-query-rule-conditions.png b/docs/user/alerting/images/es-query-rule-conditions.png deleted file mode 100644 index b2a4aeba332d3..0000000000000 Binary files a/docs/user/alerting/images/es-query-rule-conditions.png and /dev/null differ diff --git a/docs/user/alerting/images/rule-types-es-query-conditions.png b/docs/user/alerting/images/rule-types-es-query-conditions.png index 786d172368868..e1bbccc1b83d1 100644 Binary files a/docs/user/alerting/images/rule-types-es-query-conditions.png and b/docs/user/alerting/images/rule-types-es-query-conditions.png differ diff --git a/docs/user/alerting/rule-types/es-query.asciidoc b/docs/user/alerting/rule-types/es-query.asciidoc index 9f17768d1d66d..99c0e6f965306 100644 --- a/docs/user/alerting/rule-types/es-query.asciidoc +++ b/docs/user/alerting/rule-types/es-query.asciidoc @@ -81,7 +81,10 @@ This option is not available when you use a grouping field. Generally this value should be set to a value that is smaller than the time window, to avoid gaps in detection. -7. Select a scope value, which affects the <> that are required to access the rule. +7. In the advanced options, you can change the number of consecutive runs that must meet the rule conditions before an alert occurs. + The default value is `1`. + +8. Select a scope value, which affects the <> that are required to access the rule. For example when it's set to `Stack Rules`, you must have the appropriate *Management > {stack-rules-feature}* feature privileges to view or edit the rule. [float] diff --git a/docs/user/alerting/rule-types/geo-rule-types.asciidoc b/docs/user/alerting/rule-types/geo-rule-types.asciidoc index 22c0029601359..af26780a3a6aa 100644 --- a/docs/user/alerting/rule-types/geo-rule-types.asciidoc +++ b/docs/user/alerting/rule-types/geo-rule-types.asciidoc @@ -29,7 +29,10 @@ image::user/alerting/images/alert-types-tracking-containment-conditions.png[Crea Boundaries data is expected to be static (not updating). Boundaries are collected once when the rule is created and anytime after when boundary configuration is modified. -. Set the check interval, which defines how often to evaluate the rule conditions. +. Set the check interval, which defines how often to evaluate the rule conditions. + +. In the advanced options, you can change the number of consecutive runs that must meet the rule conditions before an alert occurs. + The default value is `1`. Entity locations are queried to determine whether they are contained within any monitored boundaries. Entity data should be somewhat "real time", meaning the dates of new documents aren't older than the current time minus the amount of the interval. diff --git a/docs/user/alerting/rule-types/index-threshold.asciidoc b/docs/user/alerting/rule-types/index-threshold.asciidoc index a91607c71600e..a5f7c79e1be74 100644 --- a/docs/user/alerting/rule-types/index-threshold.asciidoc +++ b/docs/user/alerting/rule-types/index-threshold.asciidoc @@ -44,6 +44,9 @@ It determines how far back to search for documents and uses the time field set i 7. Set the check interval, which defines how often to evaluate the rule conditions. Generally this value should be set to a value that is smaller than the time window, to avoid gaps in detection. +8. In the advanced options, you can change the number of consecutive runs that must meet the rule conditions before an alert occurs. +The default value is `1`. + If data is available and all clauses have been defined, a preview chart will render the threshold value and display a line chart showing the value for the last 30 intervals. This can provide an indication of recent values and their proximity to the threshold, and help you tune the clauses. diff --git a/docs/user/api.asciidoc b/docs/user/api.asciidoc index 7731a65baaac7..0309fe720c333 100644 --- a/docs/user/api.asciidoc +++ b/docs/user/api.asciidoc @@ -92,22 +92,22 @@ curl -X POST \ -------------------------------------------- -include::{kib-repo-dir}/api/features.asciidoc[] -include::{kib-repo-dir}/api/spaces-management.asciidoc[] -include::{kib-repo-dir}/api/role-management.asciidoc[] -include::{kib-repo-dir}/api/session-management.asciidoc[] -include::{kib-repo-dir}/api/saved-objects.asciidoc[] -include::{kib-repo-dir}/api/data-views.asciidoc[] -include::{kib-repo-dir}/api/index-patterns.asciidoc[] -include::{kib-repo-dir}/api/alerting.asciidoc[] -include::{kib-repo-dir}/api/actions-and-connectors.asciidoc[] -include::{kib-repo-dir}/api/cases.asciidoc[] -include::{kib-repo-dir}/api/dashboard-api.asciidoc[] -include::{kib-repo-dir}/api/logstash-configuration-management.asciidoc[] -include::{kib-repo-dir}/api/machine-learning.asciidoc[] -include::{kib-repo-dir}/api/osquery-manager.asciidoc[] -include::{kib-repo-dir}/api/short-urls.asciidoc[] -include::{kib-repo-dir}/api/task-manager/health.asciidoc[] -include::{kib-repo-dir}/api/upgrade-assistant.asciidoc[] -include::{kib-repo-dir}/api/synthetics/synthetics-api.asciidoc[] -include::{kib-repo-dir}/api/uptime-api.asciidoc[] +include::{kibana-root}/docs/api/features.asciidoc[] +include::{kibana-root}/docs/api/spaces-management.asciidoc[] +include::{kibana-root}/docs/api/role-management.asciidoc[] +include::{kibana-root}/docs/api/session-management.asciidoc[] +include::{kibana-root}/docs/api/saved-objects.asciidoc[] +include::{kibana-root}/docs/api/data-views.asciidoc[] +include::{kibana-root}/docs/api/index-patterns.asciidoc[] +include::{kibana-root}/docs/api/alerting.asciidoc[] +include::{kibana-root}/docs/api/actions-and-connectors.asciidoc[] +include::{kibana-root}/docs/api/cases.asciidoc[] +include::{kibana-root}/docs/api/dashboard-api.asciidoc[] +include::{kibana-root}/docs/api/logstash-configuration-management.asciidoc[] +include::{kibana-root}/docs/api/machine-learning.asciidoc[] +include::{kibana-root}/docs/api/osquery-manager.asciidoc[] +include::{kibana-root}/docs/api/short-urls.asciidoc[] +include::{kibana-root}/docs/api/task-manager/health.asciidoc[] +include::{kibana-root}/docs/api/upgrade-assistant.asciidoc[] +include::{kibana-root}/docs/api/synthetics/synthetics-api.asciidoc[] +include::{kibana-root}/docs/api/uptime-api.asciidoc[] diff --git a/docs/user/canvas.asciidoc b/docs/user/canvas.asciidoc index fd11a1162176f..e7b4fdaf20921 100644 --- a/docs/user/canvas.asciidoc +++ b/docs/user/canvas.asciidoc @@ -179,14 +179,14 @@ Want to export multiple workpads? Go to the *Canvas* home page, select the workp -- -include::{kib-repo-dir}/canvas/canvas-edit-workpads.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-edit-workpads.asciidoc[] -include::{kib-repo-dir}/canvas/canvas-present-workpad.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-present-workpad.asciidoc[] -include::{kib-repo-dir}/canvas/canvas-tutorial.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-tutorial.asciidoc[] -include::{kib-repo-dir}/canvas/canvas-expression-lifecycle.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-expression-lifecycle.asciidoc[] -include::{kib-repo-dir}/canvas/canvas-function-reference.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-function-reference.asciidoc[] -include::{kib-repo-dir}/canvas/canvas-tinymath-functions.asciidoc[] +include::{kibana-root}/docs/canvas/canvas-tinymath-functions.asciidoc[] diff --git a/docs/user/dev-tools.asciidoc b/docs/user/dev-tools.asciidoc index 48c41ed8886db..c3610d348e0c0 100644 --- a/docs/user/dev-tools.asciidoc +++ b/docs/user/dev-tools.asciidoc @@ -30,10 +30,10 @@ a| <> -- -include::{kib-repo-dir}/dev-tools/console/console.asciidoc[] +include::{kibana-root}/docs/dev-tools/console/console.asciidoc[] -include::{kib-repo-dir}/dev-tools/searchprofiler/index.asciidoc[] +include::{kibana-root}/docs/dev-tools/searchprofiler/index.asciidoc[] -include::{kib-repo-dir}/dev-tools/grokdebugger/index.asciidoc[] +include::{kibana-root}/docs/dev-tools/grokdebugger/index.asciidoc[] -include::{kib-repo-dir}/dev-tools/painlesslab/index.asciidoc[] +include::{kibana-root}/docs/dev-tools/painlesslab/index.asciidoc[] diff --git a/docs/user/discover.asciidoc b/docs/user/discover.asciidoc index e2b3fc2e0916e..d60ccb2ccd0de 100644 --- a/docs/user/discover.asciidoc +++ b/docs/user/discover.asciidoc @@ -336,17 +336,17 @@ For more about this and other rules provided in {alert-features}, go to < { - const markdownEmbeddableFactory: ReactEmbeddableFactory< - MarkdownEditorSerializedState, - MarkdownEditorApi - > = { - deserializeState: (state) => { - /** - * Here we can run migrations and inject references. - */ - return state.rawState as MarkdownEditorSerializedState; - }, - getComponent: async (state, maybeId) => { - /** - * initialize state (source of truth) - */ - const uuid = initializeReactEmbeddableUuid(maybeId); - const { titlesApi, titleComparators, serializeTitles } = - initializeReactEmbeddableTitles(state); - const contentSubject = new BehaviorSubject(state.content); +const markdownEmbeddableFactory: ReactEmbeddableFactory< + MarkdownEditorSerializedState, + MarkdownEditorApi +> = { + type: EUI_MARKDOWN_ID, + deserializeState: (state) => { + /** + * Here we can run clientside migrations and inject references. + */ + return state.rawState as MarkdownEditorSerializedState; + }, + /** + * The buildEmbeddable function is async so you can async import the component or load a saved + * object here. The loading will be handed gracefully by the Presentation Container. + */ + buildEmbeddable: async (state, buildApi) => { + /** + * initialize state (source of truth) + */ + const { titlesApi, titleComparators, serializeTitles } = initializeReactEmbeddableTitles(state); + const content$ = new BehaviorSubject(state.content); + + /** + * Register the API for this embeddable. This API will be published into the imperative handle + * of the React component. Methods on this API will be exposed to siblings, to registered actions + * and to the parent api. + */ + const api = buildApi( + { + ...titlesApi, + serializeState: () => { + return { + rawState: { + ...serializeTitles(), + content: content$.getValue(), + }, + }; + }, + }, /** - * getComponent is async so you can async import the component or load a saved object here. - * the loading will be handed gracefully by the Presentation Container. + * Provide state comparators. Each comparator is 3 element tuple: + * 1) current value (publishing subject) + * 2) setter, allowing parent to reset value + * 3) optional comparator which provides logic to diff lasted stored value and current value */ + { + content: [content$, (value) => content$.next(value)], + ...titleComparators, + } + ); - return RegisterReactEmbeddable((apiRef) => { - /** - * Unsaved changes logic is handled automatically by this hook. You only need to provide - * a subject, setter, and optional state comparator for each key in your state type. - */ - const { unsavedChanges, resetUnsavedChanges } = useReactEmbeddableUnsavedChanges( - uuid, - markdownEmbeddableFactory, - { - content: [contentSubject, (value) => contentSubject.next(value)], - ...titleComparators, - } - ); - - /** - * Publish the API. This is what gets forwarded to the Actions framework, and to whatever the - * parent of this embeddable is. - */ - const thisApi = useReactEmbeddableApiHandle( - { - ...titlesApi, - unsavedChanges, - resetUnsavedChanges, - serializeState: async () => { - return { - rawState: { - ...serializeTitles(), - content: contentSubject.getValue(), - }, - }; - }, - }, - apiRef, - uuid - ); - + return { + api, + Component: () => { // get state for rendering - const content = useStateFromPublishingSubject(contentSubject); - const viewMode = useInheritedViewMode(thisApi) ?? 'view'; + const content = useStateFromPublishingSubject(content$); + const viewMode = useInheritedViewMode(api) ?? 'view'; return viewMode === 'edit' ? ( { width: 100%; `} value={content ?? ''} - onChange={(value) => contentSubject.next(value)} + onChange={(value) => content$.next(value)} aria-label={i18n.translate('embeddableExamples.euiMarkdownEditor.ariaLabel', { defaultMessage: 'Dashboard markdown editor', })} @@ -105,20 +95,21 @@ export const registerMarkdownEditorEmbeddable = () => { ) : ( {content ?? ''} ); - }); - }, - }; - - /** - * Register the defined Embeddable Factory - notice that this isn't defined - * on the plugin. Instead, it's a simple imported function. I.E to register an - * embeddable, you only need the embeddable plugin in your requiredBundles - */ - registerReactEmbeddableFactory(EUI_MARKDOWN_ID, markdownEmbeddableFactory); + }, + }; + }, }; + +/** + * Register the defined Embeddable Factory - notice that this isn't defined + * on the plugin. Instead, it's a simple imported function. I.E to register an + * embeddable, you only need the embeddable plugin in your requiredBundles + */ +export const registerMarkdownEditorEmbeddable = () => + registerReactEmbeddableFactory(markdownEmbeddableFactory); 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 1e594ff61ba68..c8fd99d842333 100644 --- a/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts +++ b/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts @@ -15,4 +15,4 @@ export type MarkdownEditorSerializedState = SerializedReactEmbeddableTitles & { content: string; }; -export type MarkdownEditorApi = DefaultEmbeddableApi; +export type MarkdownEditorApi = DefaultEmbeddableApi; 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 38122c7393c84..ccc40ad7067a7 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 @@ -12,19 +12,15 @@ import { ChartsPluginStart } from '@kbn/charts-plugin/public'; import { Reference } from '@kbn/content-management-utils'; import { CoreStart } from '@kbn/core-lifecycle-browser'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DataView } from '@kbn/data-views-plugin/common'; import { DataViewsPublicPluginStart, DATA_VIEW_SAVED_OBJECT_TYPE, - type DataView, } from '@kbn/data-views-plugin/public'; import { initializeReactEmbeddableTitles, - initializeReactEmbeddableUuid, ReactEmbeddableFactory, - RegisterReactEmbeddable, registerReactEmbeddableFactory, - useReactEmbeddableApiHandle, - useReactEmbeddableUnsavedChanges, } from '@kbn/embeddable-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { i18n } from '@kbn/i18n'; @@ -37,7 +33,7 @@ import { } from '@kbn/unified-field-list'; import { cloneDeep } from 'lodash'; import React, { useEffect, useState } from 'react'; -import { BehaviorSubject } from 'rxjs'; +import { BehaviorSubject, Subscription } from 'rxjs'; import { FIELD_LIST_DATA_VIEW_REF_NAME, FIELD_LIST_ID } from './constants'; import { FieldListApi, FieldListSerializedStateState } from './types'; @@ -72,150 +68,164 @@ export const registerFieldListFactory = ( FieldListSerializedStateState, FieldListApi > = { + type: FIELD_LIST_ID, deserializeState: (state) => { const serializedState = cloneDeep(state.rawState) as FieldListSerializedStateState; // inject the reference const dataViewIdRef = state.references?.find( (ref) => ref.name === FIELD_LIST_DATA_VIEW_REF_NAME ); - if (dataViewIdRef && serializedState) { + // if the serializedState already contains a dataViewId, we don't want to overwrite it. (Unsaved state can cause this) + if (dataViewIdRef && serializedState && !serializedState.dataViewId) { serializedState.dataViewId = dataViewIdRef?.id; } return serializedState; }, - getComponent: async (initialState, maybeId) => { - const uuid = initializeReactEmbeddableUuid(maybeId); + buildEmbeddable: async (initialState, buildApi) => { + const subscriptions = new Subscription(); const { titlesApi, titleComparators, serializeTitles } = initializeReactEmbeddableTitles(initialState); const allDataViews = await dataViews.getIdsWithTitle(); - const selectedDataViewId$ = new BehaviorSubject( initialState.dataViewId ?? (await dataViews.getDefaultDataView())?.id ); + + // transform data view ID into data views array. + const getDataViews = async (id?: string) => { + return id ? [await dataViews.get(id)] : undefined; + }; + const dataViews$ = new BehaviorSubject( + await getDataViews(initialState.dataViewId) + ); + subscriptions.add( + selectedDataViewId$.subscribe(async (id) => dataViews$.next(await getDataViews(id))) + ); + const selectedFieldNames$ = new BehaviorSubject( initialState.selectedFieldNames ); - return RegisterReactEmbeddable((apiRef) => { - const { unsavedChanges, resetUnsavedChanges } = useReactEmbeddableUnsavedChanges( - uuid, - fieldListEmbeddableFactory, - { - dataViewId: [selectedDataViewId$, (value) => selectedDataViewId$.next(value)], - selectedFieldNames: [ - selectedFieldNames$, - (value) => selectedFieldNames$.next(value), - (a, b) => { - return (a?.slice().sort().join(',') ?? '') === (b?.slice().sort().join(',') ?? ''); + const api = buildApi( + { + ...titlesApi, + serializeState: () => { + const dataViewId = selectedDataViewId$.getValue(); + const references: Reference[] = dataViewId + ? [ + { + type: DATA_VIEW_SAVED_OBJECT_TYPE, + name: FIELD_LIST_DATA_VIEW_REF_NAME, + id: dataViewId, + }, + ] + : []; + return { + rawState: { + ...serializeTitles(), + // here we skip serializing the dataViewId, because the reference contains that information. + selectedFieldNames: selectedFieldNames$.getValue(), }, - ], - ...titleComparators, - } - ); - - useReactEmbeddableApiHandle( - { - ...titlesApi, - unsavedChanges, - resetUnsavedChanges, - serializeState: async () => { - const dataViewId = selectedDataViewId$.getValue(); - const references: Reference[] = dataViewId - ? [ - { - type: DATA_VIEW_SAVED_OBJECT_TYPE, - name: FIELD_LIST_DATA_VIEW_REF_NAME, - id: dataViewId, - }, - ] - : []; - return { - rawState: { - ...serializeTitles(), - // here we skip serializing the dataViewId, because the reference contains that information. - selectedFieldNames: selectedFieldNames$.getValue(), - }, - references, - }; - }, + references, + }; }, - apiRef, - uuid - ); + }, + { + ...titleComparators, + dataViewId: [selectedDataViewId$, (value) => selectedDataViewId$.next(value)], + selectedFieldNames: [ + selectedFieldNames$, + (value) => selectedFieldNames$.next(value), + (a, b) => { + return (a?.slice().sort().join(',') ?? '') === (b?.slice().sort().join(',') ?? ''); + }, + ], + } + ); - const [selectedDataViewId, selectedFieldNames] = useBatchedPublishingSubjects( - selectedDataViewId$, - selectedFieldNames$ - ); + return { + api, + Component: () => { + const [selectedDataViewId, selectedFieldNames] = useBatchedPublishingSubjects( + selectedDataViewId$, + selectedFieldNames$ + ); - const [selectedDataView, setSelectedDataView] = useState(undefined); + const [selectedDataView, setSelectedDataView] = useState(undefined); - useEffect(() => { - if (!selectedDataViewId) return; - let mounted = true; - (async () => { - const dataView = await dataViews.get(selectedDataViewId); - if (!mounted) return; - setSelectedDataView(dataView); - })(); - return () => { - mounted = false; - }; - }, [selectedDataViewId]); + useEffect(() => { + if (!selectedDataViewId) return; + let mounted = true; + (async () => { + const dataView = await dataViews.get(selectedDataViewId); + if (!mounted) return; + setSelectedDataView(dataView); + })(); + return () => { + mounted = false; + }; + }, [selectedDataViewId]); - return ( - - - { - selectedDataViewId$.next(nextSelection); - }} - trigger={{ - label: - selectedDataView?.getName() ?? - i18n.translate('embeddableExamples.unifiedFieldList.selectDataViewMessage', { - defaultMessage: 'Please select a data view', - }), - }} - /> - - - {selectedDataView ? ( - - selectedFieldNames$.next([ - ...(selectedFieldNames$.getValue() ?? []), - field.name, - ]) - } - onRemoveFieldFromWorkspace={(field) => { - selectedFieldNames$.next( - (selectedFieldNames$.getValue() ?? []).filter((name) => name !== field.name) - ); + // On destroy + useEffect(() => { + return () => { + subscriptions.unsubscribe(); + }; + }, []); + + return ( + + + { + selectedDataViewId$.next(nextSelection); + }} + trigger={{ + label: + selectedDataView?.getName() ?? + i18n.translate('embeddableExamples.unifiedFieldList.selectDataViewMessage', { + defaultMessage: 'Please select a data view', + }), }} /> - ) : null} - - - ); - }); + + + {selectedDataView ? ( + + selectedFieldNames$.next([ + ...(selectedFieldNames$.getValue() ?? []), + field.name, + ]) + } + onRemoveFieldFromWorkspace={(field) => { + selectedFieldNames$.next( + (selectedFieldNames$.getValue() ?? []).filter((name) => name !== field.name) + ); + }} + /> + ) : null} + + + ); + }, + }; }, }; - registerReactEmbeddableFactory(FIELD_LIST_ID, fieldListEmbeddableFactory); + registerReactEmbeddableFactory(fieldListEmbeddableFactory); }; diff --git a/package.json b/package.json index d791b770ce55c..92a2cd4186597 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ }, "dependencies": { "@appland/sql-parser": "^1.5.1", - "@babel/runtime": "^7.23.6", + "@babel/runtime": "^7.24.0", "@cfworker/json-schema": "^1.12.7", "@dnd-kit/core": "^3.1.1", "@dnd-kit/sortable": "^4.0.0", @@ -106,7 +106,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.12.2", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "93.2.0", + "@elastic/eui": "93.3.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -338,6 +338,13 @@ "@kbn/core-saved-objects-server": "link:packages/core/saved-objects/core-saved-objects-server", "@kbn/core-saved-objects-server-internal": "link:packages/core/saved-objects/core-saved-objects-server-internal", "@kbn/core-saved-objects-utils-server": "link:packages/core/saved-objects/core-saved-objects-utils-server", + "@kbn/core-security-browser": "link:packages/core/security/core-security-browser", + "@kbn/core-security-browser-internal": "link:packages/core/security/core-security-browser-internal", + "@kbn/core-security-browser-mocks": "link:packages/core/security/core-security-browser-mocks", + "@kbn/core-security-common": "link:packages/core/security/core-security-common", + "@kbn/core-security-server": "link:packages/core/security/core-security-server", + "@kbn/core-security-server-internal": "link:packages/core/security/core-security-server-internal", + "@kbn/core-security-server-mocks": "link:packages/core/security/core-security-server-mocks", "@kbn/core-status-common": "link:packages/core/status/core-status-common", "@kbn/core-status-common-internal": "link:packages/core/status/core-status-common-internal", "@kbn/core-status-server": "link:packages/core/status/core-status-server", @@ -514,6 +521,7 @@ "@kbn/kibana-utils-plugin": "link:src/plugins/kibana_utils", "@kbn/kubernetes-security-plugin": "link:x-pack/plugins/kubernetes_security", "@kbn/language-documentation-popover": "link:packages/kbn-language-documentation-popover", + "@kbn/lens-config-builder-example-plugin": "link:x-pack/examples/lens_config_builder_example", "@kbn/lens-embeddable-utils": "link:packages/kbn-lens-embeddable-utils", "@kbn/lens-formula-docs": "link:packages/kbn-lens-formula-docs", "@kbn/lens-inline-editing-example-plugin": "link:x-pack/examples/lens_embeddable_inline_editing_example", @@ -778,6 +786,8 @@ "@kbn/shared-ux-utility": "link:packages/kbn-shared-ux-utility", "@kbn/slo-schema": "link:x-pack/packages/kbn-slo-schema", "@kbn/snapshot-restore-plugin": "link:x-pack/plugins/snapshot_restore", + "@kbn/solution-nav-es": "link:packages/solution-nav/es", + "@kbn/solution-nav-oblt": "link:packages/solution-nav/oblt", "@kbn/sort-predicates": "link:packages/kbn-sort-predicates", "@kbn/spaces-plugin": "link:x-pack/plugins/spaces", "@kbn/spaces-test-plugin": "link:x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin", @@ -902,7 +912,6 @@ "@turf/helpers": "6.0.1", "@turf/length": "^6.0.2", "@xstate/react": "^3.2.2", - "JSONStream": "1.3.5", "adm-zip": "^0.5.9", "ajv": "^8.12.0", "ansi-regex": "^6.0.1", @@ -929,7 +938,7 @@ "compare-versions": "3.5.1", "constate": "^3.3.2", "copy-to-clipboard": "^3.0.8", - "core-js": "^3.34.0", + "core-js": "^3.36.0", "cronstrue": "^1.51.0", "css-box-model": "^1.2.1", "css.escape": "^1.5.1", @@ -966,7 +975,6 @@ "font-awesome": "4.7.0", "formik": "^2.4.5", "fp-ts": "^2.3.1", - "geojson-vt": "^3.2.1", "get-port": "^5.0.0", "getopts": "^2.2.5", "getos": "^3.1.0", @@ -1010,7 +1018,6 @@ "load-json-file": "^6.2.0", "lodash": "^4.17.21", "lru-cache": "^4.1.5", - "luxon": "^2.5.2", "lz-string": "^1.4.4", "mapbox-gl-draw-rectangle-mode": "1.0.4", "maplibre-gl": "3.1.0", @@ -1020,7 +1027,6 @@ "mime": "^2.4.4", "mime-types": "^2.1.27", "minimatch": "^3.1.2", - "mocha-multi-reporters": "^1.5.1", "moment": "^2.29.4", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.43", @@ -1046,7 +1052,6 @@ "pdfjs-dist": "^2.13.216", "pdfmake": "^0.2.7", "peggy": "^1.2.0", - "pluralize": "3.1.0", "polished": "^3.7.2", "pretty-ms": "6.0.0", "prop-types": "^15.8.1", @@ -1058,7 +1063,6 @@ "re2": "1.20.9", "react": "^17.0.2", "react-ace": "^7.0.5", - "react-color": "^2.13.8", "react-diff-view": "^3.2.0", "react-dom": "^17.0.2", "react-dropzone": "^4.2.9", @@ -1068,9 +1072,9 @@ "react-intl": "^2.8.0", "react-is": "^17.0.2", "react-markdown": "^6.0.3", - "react-moment-proptypes": "^1.7.0", "react-monaco-editor": "^0.54.0", "react-popper-tooltip": "^3.1.1", + "react-recompose": "^0.33.0", "react-redux": "^7.2.8", "react-resizable": "^3.0.4", "react-reverse-portal": "^2.1.0", @@ -1083,7 +1087,6 @@ "react-use": "^15.3.8", "react-virtualized": "^9.22.5", "react-window": "^1.8.9", - "recompose": "^0.30.0", "reduce-reducers": "^1.0.4", "redux": "^4.2.1", "redux-actions": "^2.6.5", @@ -1095,7 +1098,7 @@ "remark-gfm": "1.0.0", "remark-parse-no-trim": "^8.0.4", "remark-stringify": "^8.0.3", - "require-in-the-middle": "^7.2.0", + "require-in-the-middle": "^7.2.1", "reselect": "^4.1.8", "resize-observer-polyfill": "1.5.1", "rison-node": "1.0.2", @@ -1143,13 +1146,13 @@ }, "devDependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@babel/cli": "^7.23.4", - "@babel/core": "^7.23.6", - "@babel/eslint-parser": "^7.23.3", + "@babel/cli": "^7.23.9", + "@babel/core": "^7.24.0", + "@babel/eslint-parser": "^7.23.10", "@babel/eslint-plugin": "^7.23.5", "@babel/generator": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/parser": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/parser": "^7.24.0", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", @@ -1157,18 +1160,17 @@ "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-transform-class-properties": "^7.23.3", "@babel/plugin-transform-numeric-separator": "^7.23.4", - "@babel/plugin-transform-runtime": "^7.23.6", - "@babel/preset-env": "^7.23.6", + "@babel/plugin-transform-runtime": "^7.24.0", + "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", - "@babel/register": "^7.22.15", - "@babel/traverse": "^7.23.6", - "@babel/types": "^7.21.2", + "@babel/register": "^7.23.7", + "@babel/traverse": "^7.24.0", + "@babel/types": "7.21.2", "@bazel/ibazel": "^0.16.2", "@bazel/typescript": "4.6.2", "@cypress/code-coverage": "^3.12.18", "@cypress/grep": "^4.0.1", - "@cypress/snapshot": "^2.1.7", "@cypress/webpack-preprocessor": "^6.0.1", "@elastic/eslint-plugin-eui": "0.0.2", "@elastic/makelogs": "^6.1.1", @@ -1328,12 +1330,10 @@ "@kbn/yarn-lock-validator": "link:packages/kbn-yarn-lock-validator", "@mapbox/vector-tile": "1.3.1", "@octokit/rest": "^16.35.0", - "@openpgp/web-stream-tools": "^0.0.10", "@parcel/watcher": "^2.1.0", "@redocly/cli": "^1.6.0", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", - "@storybook/addon-controls": "^6.5.16", "@storybook/addon-docs": "^6.5.16", "@storybook/addon-essentials": "^6.5.16", "@storybook/addon-knobs": "^6.4.0", @@ -1383,7 +1383,6 @@ "@types/dagre": "^0.7.47", "@types/dedent": "^0.7.0", "@types/deep-freeze-strict": "^1.1.0", - "@types/delete-empty": "^2.0.0", "@types/diff": "^5.0.8", "@types/ejs": "^3.0.6", "@types/enzyme": "^3.10.12", @@ -1465,6 +1464,7 @@ "@types/react-grid-layout": "^1.3.2", "@types/react-intl": "^2.3.15", "@types/react-is": "^17.0.3", + "@types/react-recompose": "^0.33.4", "@types/react-router": "^5.1.20", "@types/react-router-config": "^5.0.7", "@types/react-router-dom": "^5.3.3", @@ -1472,7 +1472,6 @@ "@types/react-test-renderer": "^17.0.2", "@types/react-virtualized": "^9.21.22", "@types/react-window": "^1.8.5", - "@types/recompose": "^0.30.10", "@types/redux-actions": "^2.6.1", "@types/redux-logger": "^3.0.8", "@types/resolve": "^1.20.1", @@ -1487,7 +1486,6 @@ "@types/supertest": "^2.0.12", "@types/tapable": "^1.0.6", "@types/tar": "^6.1.5", - "@types/tempy": "^0.2.0", "@types/testing-library__jest-dom": "^5.14.7", "@types/textarea-caret": "^3.0.1", "@types/tinycolor2": "^1.4.1", @@ -1528,11 +1526,11 @@ "blob-polyfill": "^7.0.20220408", "callsites": "^3.1.0", "chance": "1.0.18", - "chromedriver": "^121.0.0", + "chromedriver": "^122.0.5", "clean-webpack-plugin": "^3.0.0", "cli-progress": "^3.12.0", "cli-table3": "^0.6.1", - "copy-webpack-plugin": "^6.0.2", + "content-security-policy-parser": "^0.6.0", "cpy": "^8.1.1", "css-loader": "^3.4.2", "cssnano": "^5.1.12", @@ -1546,15 +1544,12 @@ "cypress-recurse": "^1.35.2", "date-fns": "^2.29.3", "debug": "^2.6.9", - "delete-empty": "^2.0.0", "dependency-check": "^4.1.0", - "dpdm": "3.9.0", "ejs": "^3.1.8", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", "eslint": "^8.46.0", "eslint-config-prettier": "^9.0.0", - "eslint-module-utils": "^2.8.0", "eslint-plugin-ban": "^1.6.0", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-eslint-comments": "^3.2.0", @@ -1577,18 +1572,15 @@ "file-loader": "^4.2.0", "find-cypress-specs": "^1.41.4", "form-data": "^4.0.0", - "geckodriver": "^4.3.0", + "geckodriver": "^4.3.3", "gulp-brotli": "^3.0.0", "gulp-postcss": "^9.0.1", - "gulp-sourcemaps": "2.6.5", "gulp-terser": "^2.1.0", "has-ansi": "^3.0.0", - "hdr-histogram-js": "^1.2.0", "html": "1.0.0", "html-loader": "^1.3.2", "http-proxy": "^1.18.1", "ignore": "^5.3.0", - "is-path-inside": "^3.0.2", "jest": "^29.6.1", "jest-axe": "^5.0.0", "jest-canvas-mock": "^2.5.2", @@ -1647,11 +1639,10 @@ "q": "^1.5.1", "raw-loader": "^3.1.0", "react-test-renderer": "^17.0.2", - "react-textarea-autosize": "^8.3.4", "regenerate": "^1.4.0", "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", - "sass-embedded": "^1.70.0", + "sass-embedded": "^1.71.1", "sass-loader": "^10.5.1", "selenium-webdriver": "^4.18.1", "sharp": "0.32.6", @@ -1659,19 +1650,16 @@ "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", - "spec-change": "^1.7.1", "string-replace-loader": "^2.2.0", "style-loader": "^1.1.3", "stylelint": "^14.9.1", "stylelint-scss": "^4.3.0", "superagent": "^8.1.2", "supertest": "^6.3.3", - "supports-color": "^7.0.0", "svgo": "^2.8.0", "table": "^6.8.1", "tape": "^5.0.1", - "tempy": "^0.3.0", - "terser": "^5.26.0", + "terser": "^5.29.1", "terser-webpack-plugin": "^4.2.3", "tough-cookie": "^4.1.3", "tree-kill": "^1.2.2", @@ -1682,7 +1670,7 @@ "val-loader": "^1.1.1", "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", - "web-streams-polyfill": "^3.2.1", + "web-streams-polyfill": "^4.0.0", "webpack": "^4.41.5", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^4.10.0", diff --git a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx index eef7c839a0359..762c6eaf68b21 100644 --- a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx +++ b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx @@ -446,14 +446,14 @@ function TableListViewTableComp({ edit: { enabled: false, reason: i18n.translate('contentManagement.tableList.managedItemNoEdit', { - defaultMessage: 'This item is managed by Elastic. Clone it before making changes.', + defaultMessage: 'Elastic manages this item. Clone it to make changes.', }), }, ...ret[item.id], delete: { enabled: false, reason: i18n.translate('contentManagement.tableList.managedItemNoDelete', { - defaultMessage: 'This item is managed by Elastic. It cannot be deleted.', + defaultMessage: 'Elastic manages this item. Deleting it is not possible.', }), }, }; diff --git a/packages/core/base/core-base-browser-mocks/src/core_context.mock.ts b/packages/core/base/core-base-browser-mocks/src/core_context.mock.ts index cdbafc09c5c03..0c08184e368de 100644 --- a/packages/core/base/core-base-browser-mocks/src/core_context.mock.ts +++ b/packages/core/base/core-base-browser-mocks/src/core_context.mock.ts @@ -6,10 +6,12 @@ * Side Public License, v 1. */ -import { loggerMock } from '@kbn/logging-mocks'; +import { loggerMock, MockedLogger } from '@kbn/logging-mocks'; import type { CoreContext } from '@kbn/core-base-browser-internal'; -function createCoreContext({ production = false }: { production?: boolean } = {}): CoreContext { +function createCoreContext({ production = false }: { production?: boolean } = {}): CoreContext & { + logger: MockedLogger; +} { return { coreId: Symbol('core context mock'), logger: loggerMock.create(), diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index e00afdf7ee833..0e248a069e326 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -34,7 +34,6 @@ import type { ChromeSetProjectBreadcrumbsParams, NavigationTreeDefinition, AppDeepLinkId, - CloudURLs, } from '@kbn/core-chrome-browser'; import type { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; import type { @@ -213,6 +212,7 @@ export class ChromeService { }; const setChromeStyle = (style: ChromeStyle) => { + if (style === chromeStyle$.getValue()) return; chromeStyle$.next(style); }; @@ -283,12 +283,9 @@ export class ChromeService { LinkId extends AppDeepLinkId = AppDeepLinkId, Id extends string = string, ChildrenId extends string = Id - >( - navigationTree$: Observable>, - deps: { cloudUrls: CloudURLs } - ) { + >(navigationTree$: Observable>) { validateChromeStyle(); - projectNavigation.initNavigation(navigationTree$, deps); + projectNavigation.initNavigation(navigationTree$); } const setProjectBreadcrumbs = ( @@ -303,21 +300,11 @@ export class ChromeService { projectNavigation.setProjectHome(homeHref); }; - const setProjectsUrl = (projectsUrl: string) => { - validateChromeStyle(); - projectNavigation.setProjectsUrl(projectsUrl); - }; - const setProjectName = (projectName: string) => { validateChromeStyle(); projectNavigation.setProjectName(projectName); }; - const setProjectUrl = (projectUrl: string) => { - validateChromeStyle(); - projectNavigation.setProjectUrl(projectUrl); - }; - const isIE = () => { const ua = window.navigator.userAgent; const msie = ua.indexOf('MSIE '); // IE 10 or older @@ -543,8 +530,7 @@ export class ChromeService { getIsSideNavCollapsed$: () => this.isSideNavCollapsed$.asObservable(), project: { setHome: setProjectHome, - setProjectsUrl, - setProjectUrl, + setCloudUrls: projectNavigation.setCloudUrls.bind(projectNavigation), setProjectName, initNavigation: initProjectNavigation, getNavigationTreeUi$: () => projectNavigation.getNavigationTreeUi$(), diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx index 089613939c833..39a7a25424d6f 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx @@ -6,37 +6,49 @@ * Side Public License, v 1. */ +import React from 'react'; import { EuiContextMenuPanel, EuiContextMenuItem } from '@elastic/eui'; -import { +import type { AppDeepLinkId, ChromeProjectBreadcrumb, ChromeProjectNavigationNode, ChromeSetProjectBreadcrumbsParams, ChromeBreadcrumb, + SolutionNavigationDefinitions, + CloudLinks, } from '@kbn/core-chrome-browser'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import React from 'react'; + +import { getSolutionNavSwitcherBreadCrumb } from '../ui/solution_nav_switcher_breadcrumbs'; export function buildBreadcrumbs({ - projectsUrl, projectName, - projectUrl, + cloudLinks, projectBreadcrumbs, activeNodes, chromeBreadcrumbs, + solutionNavigations, }: { - projectsUrl?: string; projectName?: string; - projectUrl?: string; projectBreadcrumbs: { breadcrumbs: ChromeProjectBreadcrumb[]; params: ChromeSetProjectBreadcrumbsParams; }; chromeBreadcrumbs: ChromeBreadcrumb[]; + cloudLinks: CloudLinks; activeNodes: ChromeProjectNavigationNode[][]; + solutionNavigations?: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + }; }): ChromeProjectBreadcrumb[] { - const rootCrumb = buildRootCrumb({ projectsUrl, projectName, projectUrl }); + const rootCrumb = buildRootCrumb({ + projectName, + solutionNavigations, + cloudLinks, + }); if (projectBreadcrumbs.params.absolute) { return [rootCrumb, ...projectBreadcrumbs.breadcrumbs]; @@ -86,14 +98,30 @@ export function buildBreadcrumbs({ } function buildRootCrumb({ - projectsUrl, projectName, - projectUrl, + solutionNavigations, + cloudLinks, }: { - projectsUrl?: string; projectName?: string; - projectUrl?: string; + cloudLinks: CloudLinks; + solutionNavigations?: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + }; }): ChromeProjectBreadcrumb { + if (solutionNavigations) { + // if there are solution navigations, it means that we are in Kibana stateful and not + // in serverless with projects. + const { definitions, activeId, onChange } = solutionNavigations; + return getSolutionNavSwitcherBreadCrumb({ + definitions, + onChange, + activeId, + cloudLinks, + }); + } + return { text: projectName ?? @@ -106,13 +134,13 @@ function buildRootCrumb({ + , - + { }; const parseCloudURLs = (cloudLinks: CloudLinks): CloudLinks => { - const { userAndRoles, billingAndSub, deployment, performance } = cloudLinks; + const { userAndRoles, billingAndSub, deployment, deployments, performance } = cloudLinks; // We remove potential trailing forward slash ("/") at the end of the URL // because it breaks future navigation in Cloud console once we navigate there. @@ -27,12 +27,20 @@ const parseCloudURLs = (cloudLinks: CloudLinks): CloudLinks => { userAndRoles: parseLink(userAndRoles), billingAndSub: parseLink(billingAndSub), deployment: parseLink(deployment), + deployments: parseLink(deployments), performance: parseLink(performance), }; }; export const getCloudLinks = (cloud: CloudURLs): CloudLinks => { - const { billingUrl, deploymentUrl, performanceUrl, usersAndRolesUrl } = cloud; + const { + billingUrl, + deploymentsUrl, + deploymentUrl, + projectsUrl, + performanceUrl, + usersAndRolesUrl, + } = cloud; const links: CloudLinks = {}; @@ -72,5 +80,23 @@ export const getCloudLinks = (cloud: CloudURLs): CloudLinks => { }; } + if (deploymentsUrl) { + links.deployments = { + title: i18n.translate('core.ui.chrome.sideNavigation.cloudLinks.allDeploymentsLinkText', { + defaultMessage: 'View all deployments', + }), + href: deploymentsUrl, + }; + } + + if (projectsUrl) { + links.projects = { + title: i18n.translate('core.ui.chrome.sideNavigation.cloudLinks.allProjectsLinkText', { + defaultMessage: 'View all projects', + }), + href: projectsUrl, + }; + } + return parseCloudURLs(links); }; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts index ffb8a87b06c5f..1089d1ba46209 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts @@ -7,7 +7,7 @@ */ import { createMemoryHistory } from 'history'; -import { firstValueFrom, lastValueFrom, take, BehaviorSubject, of } from 'rxjs'; +import { firstValueFrom, lastValueFrom, take, BehaviorSubject, of, type Observable } from 'rxjs'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { loggerMock } from '@kbn/logging-mocks'; @@ -23,6 +23,14 @@ import type { } from '@kbn/core-chrome-browser'; import { ProjectNavigationService } from './project_navigation_service'; +jest.mock('rxjs', () => { + const original = jest.requireActual('rxjs'); + return { + ...original, + debounceTime: () => (source: Observable) => source, + }; +}); + const getNavLink = (partial: Partial = {}): ChromeNavLink => ({ id: 'kibana', title: 'Kibana', @@ -36,7 +44,7 @@ const getNavLink = (partial: Partial = {}): ChromeNavLink => ({ const getNavLinksService = (ids: Readonly = []) => { const navLinks = ids.map((id) => getNavLink({ id, title: id.toUpperCase() })); - const navLinksMock: ChromeNavLinks = { + const navLinksMock: jest.Mocked = { getNavLinks$: jest.fn().mockReturnValue(of(navLinks)), has: jest.fn(), get: jest.fn(), @@ -58,18 +66,23 @@ const setup = ({ navLinkIds?: Readonly; setChromeStyle?: () => void; } = {}) => { - const history = createMemoryHistory(); + const history = createMemoryHistory({ + initialEntries: [locationPathName], + }); history.replace(locationPathName); const projectNavigationService = new ProjectNavigationService(); const chromeBreadcrumbs$ = new BehaviorSubject([]); const navLinksService = getNavLinksService(navLinkIds); - + const application = { + ...applicationServiceMock.createInternalStartContract(), + history, + }; + application.navigateToUrl.mockImplementation(async (url) => { + history.push(url); + }); const projectNavigation = projectNavigationService.start({ - application: { - ...applicationServiceMock.createInternalStartContract(), - history, - }, + application, navLinksService, http: httpServiceMock.createStartContract(), chromeBreadcrumbs$, @@ -77,7 +90,7 @@ const setup = ({ setChromeStyle, }); - return { projectNavigation, history, chromeBreadcrumbs$ }; + return { projectNavigation, history, chromeBreadcrumbs$, navLinksService, application }; }; describe('initNavigation()', () => { @@ -135,8 +148,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); }); @@ -185,8 +197,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); const treeDefinition = await getNavTree(); const [node] = treeDefinition.body as [ChromeProjectNavigationNode]; @@ -210,8 +221,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); expect(logger.error).toHaveBeenCalledWith( @@ -390,8 +400,7 @@ describe('initNavigation()', () => { children: [{ link: 'foo' }], }, ], - }), - { cloudUrls: {} } + }) ); // 3. getNavigationTreeUi$() is resolved @@ -402,6 +411,13 @@ describe('initNavigation()', () => { test('should add the Cloud links to the navigation tree', async () => { const { projectNavigation } = setup(); + projectNavigation.setCloudUrls({ + usersAndRolesUrl: 'https://cloud.elastic.co/userAndRoles/', // trailing slash should be removed! + performanceUrl: 'https://cloud.elastic.co/performance/', + billingUrl: 'https://cloud.elastic.co/billing/', + deploymentUrl: 'https://cloud.elastic.co/deployment/', + }); + projectNavigation.initNavigation( // @ts-expect-error - We pass a non valid cloudLink that is not TS valid of({ @@ -418,15 +434,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { - cloudUrls: { - usersAndRolesUrl: 'https://cloud.elastic.co/userAndRoles/', // trailing slash should be removed! - performanceUrl: 'https://cloud.elastic.co/performance/', - billingUrl: 'https://cloud.elastic.co/billing/', - deploymentUrl: 'https://cloud.elastic.co/deployment/', - }, - } + }) ); const treeDefinition = await lastValueFrom( @@ -516,7 +524,7 @@ describe('breadcrumbs', () => { const obs = subj.asObservable(); if (initiateNavigation) { - projectNavigation.initNavigation(obs, { cloudUrls: {} }); + projectNavigation.initNavigation(obs); } return { @@ -729,7 +737,7 @@ describe('breadcrumbs', () => { { text: 'custom1', href: '/custom1' }, { text: 'custom2', href: '/custom1/custom2' }, ]); - projectNavigation.initNavigation(of(mockNavigation), { cloudUrls: {} }); // init navigation + projectNavigation.initNavigation(of(mockNavigation)); // init navigation const breadcrumbs = await firstValueFrom(projectNavigation.getProjectBreadcrumbs$()); expect(breadcrumbs).toHaveLength(4); @@ -781,8 +789,7 @@ describe('getActiveNodes$()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); activeNodes = await lastValueFrom(projectNavigation.getActiveNodes$().pipe(take(1))); @@ -838,8 +845,7 @@ describe('getActiveNodes$()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); activeNodes = await lastValueFrom(projectNavigation.getActiveNodes$().pipe(take(1))); @@ -877,26 +883,29 @@ describe('getActiveNodes$()', () => { }); describe('solution navigations', () => { - const solution1: SolutionNavigationDefinition = { + const solution1: SolutionNavigationDefinition = { id: 'solution1', title: 'Solution 1', icon: 'logoSolution1', homePage: 'discover', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app1' }] }), }; - const solution2: SolutionNavigationDefinition = { + const solution2: SolutionNavigationDefinition = { id: 'solution2', title: 'Solution 2', icon: 'logoSolution2', - homePage: 'discover', - sideNavComponentGetter: () => () => null, + homePage: 'app2', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app2' }] }), + sideNavComponent: () => null, }; - const solution3: SolutionNavigationDefinition = { + const solution3: SolutionNavigationDefinition = { id: 'solution3', title: 'Solution 3', icon: 'logoSolution3', homePage: 'discover', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app3' }] }), }; const localStorageGetItem = jest.fn(); @@ -973,9 +982,10 @@ describe('solution navigations', () => { const activeSolution = await lastValueFrom( projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1)) ); + expect(activeSolution).not.toBeNull(); // sideNavComponentGetter should not be exposed to consumers - expect('sideNavComponentGetter' in activeSolution!).toBe(false); - const { sideNavComponentGetter, ...rest } = solution2; + expect('sideNavComponent' in activeSolution!).toBe(false); + const { sideNavComponent, ...rest } = solution2; expect(activeSolution).toEqual(rest); } @@ -993,11 +1003,10 @@ describe('solution navigations', () => { const { projectNavigation } = setup(); projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - projectNavigation.changeActiveSolutionNavigation('3'); expect(() => { - return lastValueFrom(projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1))); - }).rejects.toThrowErrorMatchingInlineSnapshot( + projectNavigation.changeActiveSolutionNavigation('3'); + }).toThrowErrorMatchingInlineSnapshot( `"Solution navigation definition with id \\"3\\" does not exist."` ); }); @@ -1009,7 +1018,7 @@ describe('solution navigations', () => { expect(setChromeStyle).not.toHaveBeenCalled(); projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - expect(setChromeStyle).toHaveBeenCalledWith('classic'); // No active solution yet, we are still on classic Kibana + expect(setChromeStyle).not.toHaveBeenCalled(); projectNavigation.changeActiveSolutionNavigation('2'); expect(setChromeStyle).toHaveBeenCalledWith('project'); // We have an active solution nav, we should switch to project style @@ -1017,4 +1026,38 @@ describe('solution navigations', () => { projectNavigation.changeActiveSolutionNavigation(null); expect(setChromeStyle).toHaveBeenCalledWith('classic'); // No active solution, we should switch back to classic Kibana }); + + it('should change the active solution if no node match the current Location', async () => { + const { projectNavigation, navLinksService } = setup({ + locationPathName: '/app/app3', // we are on app3 which only exists in solution3 + navLinkIds: ['app1', 'app2', 'app3'], + }); + + const getActiveDefinition = () => + lastValueFrom(projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1))); + + projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2, 3: solution3 }); + + { + const definition = await getActiveDefinition(); + expect(definition).toBe(null); // No active solution id yet + } + + // Change to solution 2, but we are still on '/app/app3' which only exists in solution3 + projectNavigation.changeActiveSolutionNavigation('2'); + + { + const definition = await getActiveDefinition(); + expect(definition?.id).toBe('solution3'); // The solution3 was activated as it matches the "/app/app3" location + } + + navLinksService.get.mockReturnValue({ url: '/app/app2', href: '/app/app2' } as any); + projectNavigation.changeActiveSolutionNavigation('2', { redirect: true }); // We ask to redirect to the home page of solution 2 + { + const definition = await getActiveDefinition(); + expect(definition?.id).toBe('solution2'); + } + + navLinksService.get.mockReset(); + }); }); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts index b25df903d7ee4..15ebb6f499d42 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts @@ -17,11 +17,11 @@ import type { NavigationTreeDefinition, SolutionNavigationDefinitions, ChromeStyle, + CloudLinks, } from '@kbn/core-chrome-browser'; import type { InternalHttpStart } from '@kbn/core-http-browser-internal'; import { BehaviorSubject, - Observable, combineLatest, map, takeUntil, @@ -30,8 +30,13 @@ import { distinctUntilChanged, skipWhile, filter, + of, + type Observable, + type Subscription, + take, + debounceTime, } from 'rxjs'; -import type { Location } from 'history'; +import { type Location, createLocation } from 'history'; import deepEqual from 'react-fast-compare'; import { @@ -61,9 +66,7 @@ export class ProjectNavigationService { current: SideNavComponent | null; }>({ current: null }); private projectHome$ = new BehaviorSubject(undefined); - private projectsUrl$ = new BehaviorSubject(undefined); private projectName$ = new BehaviorSubject(undefined); - private projectUrl$ = new BehaviorSubject(undefined); private navigationTree$ = new BehaviorSubject( undefined ); @@ -80,8 +83,13 @@ export class ProjectNavigationService { private readonly stop$ = new ReplaySubject(1); private readonly solutionNavDefinitions$ = new BehaviorSubject({}); private readonly activeSolutionNavDefinitionId$ = new BehaviorSubject(null); + private readonly location$ = new BehaviorSubject(createLocation('/')); + private deepLinksMap$: Observable> = of({}); + private cloudLinks$ = new BehaviorSubject({}); private application?: InternalApplicationStart; + private navLinksService?: ChromeNavLinks; private http?: InternalHttpStart; + private navigationChangeSubscription?: Subscription; private unlistenHistory?: () => void; private setChromeStyle: StartDeps['setChromeStyle'] = () => {}; @@ -94,6 +102,7 @@ export class ProjectNavigationService { setChromeStyle, }: StartDeps) { this.application = application; + this.navLinksService = navLinksService; this.http = http; this.logger = logger; this.onHistoryLocationChange(application.history.location); @@ -101,7 +110,16 @@ export class ProjectNavigationService { this.setChromeStyle = setChromeStyle; this.handleActiveNodesChange(); - this.handleSolutionNavDefinitionsChange(); + this.handleEmptyActiveNodes(); + + this.deepLinksMap$ = navLinksService.getNavLinks$().pipe( + map((navLinks) => { + return navLinks.reduce((acc, navLink) => { + acc[navLink.id] = navLink; + return acc; + }, {} as Record); + }) + ); return { setProjectHome: (homeHref: string) => { @@ -110,11 +128,11 @@ export class ProjectNavigationService { getProjectHome$: () => { return this.projectHome$.asObservable(); }, - setProjectsUrl: (projectsUrl: string) => { - this.projectsUrl$.next(projectsUrl); - }, - getProjectsUrl$: () => { - return this.projectsUrl$.asObservable(); + setCloudUrls: (cloudUrls: CloudURLs) => { + // Cloud links never change, so we only need to parse them once + if (Object.keys(this.cloudLinks$.getValue()).length > 0) return; + + this.cloudLinks$.next(getCloudLinks(cloudUrls)); }, setProjectName: (projectName: string) => { this.projectName$.next(projectName); @@ -122,14 +140,10 @@ export class ProjectNavigationService { getProjectName$: () => { return this.projectName$.asObservable(); }, - setProjectUrl: (projectUrl: string) => { - this.projectUrl$.next(projectUrl); - }, initNavigation: ( - navTreeDefinition: Observable>, - { cloudUrls }: { cloudUrls: CloudURLs } + navTreeDefinition: Observable> ) => { - this.initNavigation(navTreeDefinition, { navLinksService, cloudUrls }); + this.initNavigation(navTreeDefinition); }, getNavigationTreeUi$: this.getNavigationTreeUi$.bind(this), getActiveNodes$: () => { @@ -153,26 +167,38 @@ export class ProjectNavigationService { this.projectBreadcrumbs$, this.activeNodes$, chromeBreadcrumbs$, - this.projectsUrl$, - this.projectUrl$, this.projectName$, + this.solutionNavDefinitions$, + this.activeSolutionNavDefinitionId$, + this.cloudLinks$, ]).pipe( map( ([ projectBreadcrumbs, activeNodes, chromeBreadcrumbs, - projectsUrl, - projectUrl, projectName, + solutionNavDefinitions, + activeSolutionNavDefinitionId, + cloudLinks, ]) => { + const solutionNavigations = + Object.keys(solutionNavDefinitions).length > 0 && + activeSolutionNavDefinitionId !== null + ? { + definitions: solutionNavDefinitions, + activeId: activeSolutionNavDefinitionId, + onChange: this.changeActiveSolutionNavigation.bind(this), + } + : undefined; + return buildBreadcrumbs({ - projectUrl, projectName, - projectsUrl, projectBreadcrumbs, activeNodes, chromeBreadcrumbs, + solutionNavigations, + cloudLinks, }); } ) @@ -189,28 +215,30 @@ export class ProjectNavigationService { }; } + /** + * Initialize a "serverless style" navigation. For stateful deployments (not serverless), this + * handler initialize one of the solution navigations registered. + * + * @param navTreeDefinition$ The navigation tree definition + * @param location Optional location to use to detect the active node in the new navigation tree + */ private initNavigation( - navTreeDefinition: Observable, - { navLinksService, cloudUrls }: { navLinksService: ChromeNavLinks; cloudUrls: CloudURLs } + navTreeDefinition$: Observable, + location?: Location ) { - if (this.navigationTree$.getValue() !== undefined) { - throw new Error('Project navigation has already been initiated.'); + if (this.navigationChangeSubscription) { + this.navigationChangeSubscription.unsubscribe(); } - const deepLinksMap$ = navLinksService.getNavLinks$().pipe( - map((navLinks) => { - return navLinks.reduce((acc, navLink) => { - acc[navLink.id] = navLink; - return acc; - }, {} as Record); - }) - ); - - const cloudLinks = getCloudLinks(cloudUrls); - - combineLatest([navTreeDefinition.pipe(takeUntil(this.stop$)), deepLinksMap$]) + this.projectNavigationNavTreeFlattened = {}; + this.navigationChangeSubscription = combineLatest([ + navTreeDefinition$, + this.deepLinksMap$, + this.cloudLinks$, + ]) .pipe( - map(([def, deepLinksMap]) => { + takeUntil(this.stop$), + map(([def, deepLinksMap, cloudLinks]) => { return parseNavigationTree(def, { deepLinks: deepLinksMap, cloudLinks, @@ -223,7 +251,7 @@ export class ProjectNavigationService { this.navigationTreeUi$.next(navigationTreeUI); this.projectNavigationNavTreeFlattened = flattenNav(navigationTree); - this.setActiveProjectNavigationNodes(); + this.updateActiveProjectNavigationNodes(location); }, error: (err) => { this.logger?.error(err); @@ -237,9 +265,15 @@ export class ProjectNavigationService { .pipe(filter((v): v is NavigationTreeDefinitionUI => v !== null)); } - private setActiveProjectNavigationNodes(_location?: Location) { - if (!this.application) return; - if (!Object.keys(this.projectNavigationNavTreeFlattened).length) return; + private findActiveNodes({ + location: _location, + flattendTree = this.projectNavigationNavTreeFlattened, + }: { + location?: Location; + flattendTree?: Record; + } = {}): ChromeProjectNavigationNode[][] { + if (!this.application) return []; + if (!Object.keys(this.projectNavigationNavTreeFlattened).length) return []; const location = _location ?? this.application.history.location; let currentPathname = this.http?.basePath.prepend(location.pathname) ?? location.pathname; @@ -248,13 +282,17 @@ export class ProjectNavigationService { // e.g. /app/kibana#/management currentPathname = stripQueryParams(`${currentPathname}${location.hash}`); - const activeNodes = findActiveNodes( - currentPathname, - this.projectNavigationNavTreeFlattened, - location, - this.http?.basePath.prepend - ); + return findActiveNodes(currentPathname, flattendTree, location, this.http?.basePath.prepend); + } + /** + * Find the active nodes in the navigation tree based on the current location (or a location passed in params) + * and update the activeNodes$ Observable. + * + * @param location Optional location to use to detect the active node in the new navigation tree, if not set the current location is used + */ + private updateActiveProjectNavigationNodes(location?: Location) { + const activeNodes = this.findActiveNodes({ location }); // Each time we call findActiveNodes() we create a new array of activeNodes. As this array is used // in React in useCallback() and useMemo() dependencies arrays it triggers an infinite navigation // tree registration loop. To avoid that we only notify the listeners when the activeNodes array @@ -267,7 +305,8 @@ export class ProjectNavigationService { } private onHistoryLocationChange(location: Location) { - this.setActiveProjectNavigationNodes(location); + this.location$.next(location); + this.updateActiveProjectNavigationNodes(location); } private handleActiveNodesChange() { @@ -292,20 +331,116 @@ export class ProjectNavigationService { }); } - private handleSolutionNavDefinitionsChange() { - combineLatest([this.solutionNavDefinitions$, this.activeSolutionNavDefinitionId$]) - .pipe(takeUntil(this.stop$)) - .subscribe(this.onSolutionNavDefinitionsChange.bind(this)); + /** + * When we are in stateful Kibana with multiple solution navigations, it is possible that a user + * lands on a page that does not belong to the current active solution navigation. In this case, + * we need to find the correct solution navigation based on the current location and switch to it. + */ + private handleEmptyActiveNodes() { + combineLatest([ + this.activeNodes$, + this.solutionNavDefinitions$, + this.activeSolutionNavDefinitionId$.pipe(distinctUntilChanged()), + this.location$, + ]) + .pipe(takeUntil(this.stop$), debounceTime(20)) + .subscribe(([activeNodes, definitions, activeSolution, location]) => { + if ( + activeNodes.length > 0 || + activeSolution === null || + Object.keys(definitions).length === 0 || + Object.keys(this.projectNavigationNavTreeFlattened).length === 0 + ) { + return; + } + + // We have an active solution navigation but no active nodes, this means that + // the current location is not part of the current solution navigation. + // We need to find the correct solution navigation based on the current location. + let found = false; + + Object.entries(definitions).forEach(([id, definition]) => { + combineLatest([definition.navigationTree$, this.deepLinksMap$, this.cloudLinks$]) + .pipe( + take(1), + map(([def, deepLinksMap, cloudLinks]) => + parseNavigationTree(def, { + deepLinks: deepLinksMap, + cloudLinks, + }) + ) + ) + .subscribe(({ navigationTree }) => { + if (found) return; + + const maybeActiveNodes = this.findActiveNodes({ + location, + flattendTree: flattenNav(navigationTree), + }); + + if (maybeActiveNodes.length > 0) { + found = true; + this.changeActiveSolutionNavigation(id); + } + }); + }); + }); } private setSideNavComponent(component: SideNavComponent | null) { this.customProjectSideNavComponent$.next({ current: component }); } - private changeActiveSolutionNavigation(id: string | null, { onlyIfNotSet = false } = {}) { + private changeActiveSolutionNavigation( + id: string | null, + { onlyIfNotSet = false, redirect = false } = {} + ) { + if (this.activeSolutionNavDefinitionId$.getValue() === id) return; if (onlyIfNotSet && this.activeSolutionNavDefinitionId$.getValue() !== null) { return; } + + const definitions = this.solutionNavDefinitions$.getValue(); + this.activeSolutionNavDefinitionId$.next(null); + // We don't want to change to "classic" if `id` is `null` when we haven't received + // any definitions yet. Serverless Kibana could be impacted by this. + // When we **do** have definitions, then passing `null` does mean we should change to "classic". + if (Object.keys(definitions).length > 0) { + if (id === null) { + this.setChromeStyle('classic'); + this.navigationTree$.next(undefined); + } else { + const definition = definitions[id]; + if (!definition) { + throw new Error(`Solution navigation definition with id "${id}" does not exist.`); + } + + this.setChromeStyle('project'); + + const { sideNavComponent } = definition; + if (sideNavComponent) { + this.setSideNavComponent(sideNavComponent); + } + + let location: Location | undefined; + if (redirect) { + // Navigate to the new home page if it's defined, otherwise navigate to the default home page + const link = this.navLinksService?.get(definition.homePage ?? 'home'); + if (link) { + const linkUrl = this.http?.basePath.remove(link.url) ?? link.url; + location = createLocation(linkUrl); + this.location$.next(location); + this.application?.navigateToUrl(link.href); + } + } + + // We want to pass the upcoming location where we are going to navigate to + // so we can immediately set the active nodes based on the new location and we + // don't have to wait for the location change event to be triggered. + this.initNavigation(definition.navigationTree$, location); + } + } + this.activeSolutionNavDefinitionId$.next(id); } @@ -322,8 +457,8 @@ export class ProjectNavigationService { if (!definitions[id]) { throw new Error(`Solution navigation definition with id "${id}" does not exist.`); } - // We strip out the sideNavComponentGetter from the definition as it should only be used internally - const { sideNavComponentGetter, ...definition } = definitions[id]; + // We strip out the sideNavComponent from the definition as it should only be used internally + const { sideNavComponent, ...definition } = definitions[id]; return definition; }) ); @@ -343,33 +478,6 @@ export class ProjectNavigationService { } } - private onSolutionNavDefinitionsChange([definitions, id]: [ - SolutionNavigationDefinitions, - string | null - ]) { - // We don't want to change to "classic" if `id` is `null` when we haven't received - // any definitions yet. Serverless Kibana could be impacted by this. - // When we do have definitions, then passing `null` does mean we should change to "classic". - if (Object.keys(definitions).length === 0) return; - - if (id === null) { - this.setChromeStyle('classic'); - this.navigationTree$.next(undefined); - } else { - const definition = definitions[id]; - if (!definition) { - throw new Error(`Solution navigation definition with id "${id}" does not exist.`); - } - - this.setChromeStyle('project'); - const { sideNavComponentGetter } = definition; - - if (sideNavComponentGetter) { - this.setSideNavComponent(sideNavComponentGetter()); - } - } - } - public stop() { this.stop$.next(); this.unlistenHistory?.(); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/types.ts b/packages/core/chrome/core-chrome-browser-internal/src/types.ts index f1947e05c5301..5497234cce31b 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/types.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/types.ts @@ -49,10 +49,10 @@ export interface InternalChromeStart extends ChromeStart { setHome(homeHref: string): void; /** - * Sets the cloud's projects page. - * @param projectsUrl + * Sets the cloud's URLs. + * @param cloudUrls */ - setProjectsUrl(projectsUrl: string): void; + setCloudUrls(cloudUrls: CloudURLs): void; /** * Sets the project name. @@ -60,19 +60,12 @@ export interface InternalChromeStart extends ChromeStart { */ setProjectName(projectName: string): void; - /** - * Sets the project url. - * @param projectUrl - */ - setProjectUrl(projectUrl: string): void; - initNavigation< LinkId extends AppDeepLinkId = AppDeepLinkId, Id extends string = string, ChildrenId extends string = Id >( - navigationTree$: Observable>, - deps: { cloudUrls: CloudURLs } + navigationTree$: Observable> ): void; getNavigationTreeUi$: () => Observable; @@ -119,6 +112,14 @@ export interface InternalChromeStart extends ChromeStart { * @param id The id of the active solution navigation. If `null` is provided, the solution navigation * will be replaced with the legacy Kibana navigation. */ - changeActiveSolutionNavigation(id: string | null, options?: { onlyIfNotSet?: boolean }): void; + changeActiveSolutionNavigation( + id: string | null, + options?: { + /** only change if there isn't any active solution yet */ + onlyIfNotSet?: boolean; + /** redirect to the new navigation home page */ + redirect?: boolean; + } + ): void; }; } diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx new file mode 100644 index 0000000000000..da9b105b7355b --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.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 { EuiListGroup, EuiListGroupItem, EuiTitle, EuiSpacer, EuiButtonEmpty } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import type { + ChromeProjectBreadcrumb, + SolutionNavigationDefinitions, + CloudLinks, +} from '@kbn/core-chrome-browser'; + +export const getSolutionNavSwitcherBreadCrumb = ({ + definitions, + activeId, + onChange, + cloudLinks, +}: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + cloudLinks: CloudLinks; +}): ChromeProjectBreadcrumb => { + const text = Object.values(definitions).find(({ id }) => id === activeId)?.title; + return { + text, + 'data-test-subj': 'solutionNavSwitcher', + popoverContent: ( + <> + +

+ {i18n.translate('core.ui.primaryNav.cloud.breadCrumbDropdown.title', { + defaultMessage: 'Solution view', + })} +

+
+ + + {Object.values(definitions).map(({ id, title, icon = 'gear' }) => [ + { + onChange(id, { redirect: true }); + }} + />, + ])} + + + + + {cloudLinks.deployment && ( + + {i18n.translate('core.ui.primaryNav.cloud.breadCrumbDropdown.manageDeploymentLabel', { + defaultMessage: 'Manage this deployment', + })} + + )} + + {cloudLinks.deployments && ( + + {cloudLinks.deployments.title} + + )} + + ), + popoverProps: { + panelPaddingSize: 'm', + zIndex: 6000, + panelStyle: { width: 260 }, + panelProps: { + 'data-test-subj': 'solutionNavSwitcherPanel', + }, + }, + }; +}; diff --git a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts index 68fbd2c92a65b..8fdea6e33070d 100644 --- a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts +++ b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts @@ -70,8 +70,7 @@ const createStartContractMock = () => { setChromeStyle: jest.fn(), project: { setHome: jest.fn(), - setProjectsUrl: jest.fn(), - setProjectUrl: jest.fn(), + setCloudUrls: jest.fn(), setProjectName: jest.fn(), initNavigation: jest.fn(), setSideNavComponent: jest.fn(), diff --git a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts index 78d169d4c41fb..463bb473ee7ae 100644 --- a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts +++ b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts @@ -49,11 +49,20 @@ export type AppDeepLinkId = | ObservabilityLink; /** @public */ -export type CloudLinkId = 'userAndRoles' | 'performance' | 'billingAndSub' | 'deployment'; +export type CloudLinkId = + | 'userAndRoles' + | 'performance' + | 'billingAndSub' + | 'deployment' + | 'deployments' + | 'projects'; export interface CloudURLs { + baseUrl?: string; billingUrl?: string; + deploymentsUrl?: string; deploymentUrl?: string; + projectsUrl?: string; performanceUrl?: string; usersAndRolesUrl?: string; } @@ -383,16 +392,19 @@ export interface NavigationTreeDefinitionUI { * for the side navigation evolution to align with the Serverless UX. */ -export interface SolutionNavigationDefinition { +export interface SolutionNavigationDefinition { /** Unique id for the solution navigation. */ id: string; /** Title for the solution navigation. */ title: string; - /** Optional icon for the solution navigation. */ + /** The navigation tree definition */ + navigationTree$: Observable>; + /** Optional icon for the solution navigation to render in the select dropdown. */ icon?: IconType; - sideNavComponentGetter?: () => SideNavComponent; + /** React component to render in the side nav for the navigation */ + sideNavComponent?: SideNavComponent; /** The page to navigate to when switching to this solution navigation. */ - homePage?: AppDeepLinkId; + homePage?: LinkId; } export interface SolutionNavigationDefinitions { diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts index f8e906650fcf1..63aa61c3eced1 100644 --- a/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts +++ b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts @@ -193,3 +193,42 @@ describe('#deprecations', () => { }); }); }); + +describe('#security', () => { + describe('#authc', () => { + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = createCoreRouteHandlerContextParamsMock(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const authc1 = context.security.authc; + const authc2 = context.security.authc; + + expect(authc1).toBe(authc2); + }); + + describe('getCurrentUser', () => { + test('calls coreStart.security.authc.getCurrentUser with the correct parameters', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = createCoreRouteHandlerContextParamsMock(); + const context = new CoreRouteHandlerContext(coreStart, request); + + context.security.authc.getCurrentUser(); + expect(coreStart.security.authc.getCurrentUser).toHaveBeenCalledTimes(1); + expect(coreStart.security.authc.getCurrentUser).toHaveBeenCalledWith(request); + }); + + test('returns the result of coreStart.security.authc.getCurrentUser', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = createCoreRouteHandlerContextParamsMock(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const stubUser: any = Symbol.for('stubUser'); + coreStart.security.authc.getCurrentUser.mockReturnValue(stubUser); + + const user = context.security.authc.getCurrentUser(); + expect(user).toBe(stubUser); + }); + }); + }); +}); diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts index 6cc54130a575c..f8e428f45ed76 100644 --- a/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts +++ b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts @@ -24,6 +24,10 @@ import { CoreUiSettingsRouteHandlerContext, type InternalUiSettingsServiceStart, } from '@kbn/core-ui-settings-server-internal'; +import { + CoreSecurityRouteHandlerContext, + type InternalSecurityServiceStart, +} from '@kbn/core-security-server-internal'; /** * Subset of `InternalCoreStart` used by {@link CoreRouteHandlerContext} @@ -34,6 +38,7 @@ export interface CoreRouteHandlerContextParams { savedObjects: InternalSavedObjectsServiceStart; uiSettings: InternalUiSettingsServiceStart; deprecations: InternalDeprecationsServiceStart; + security: InternalSecurityServiceStart; } /** @@ -42,22 +47,62 @@ export interface CoreRouteHandlerContextParams { * @internal */ export class CoreRouteHandlerContext implements CoreRequestHandlerContext { - readonly elasticsearch: CoreElasticsearchRouteHandlerContext; - readonly savedObjects: CoreSavedObjectsRouteHandlerContext; - readonly uiSettings: CoreUiSettingsRouteHandlerContext; - readonly deprecations: CoreDeprecationsRouteHandlerContext; - - constructor(coreStart: CoreRouteHandlerContextParams, request: KibanaRequest) { - this.elasticsearch = new CoreElasticsearchRouteHandlerContext(coreStart.elasticsearch, request); - this.savedObjects = new CoreSavedObjectsRouteHandlerContext(coreStart.savedObjects, request); - this.uiSettings = new CoreUiSettingsRouteHandlerContext( - coreStart.uiSettings, - this.savedObjects - ); - this.deprecations = new CoreDeprecationsRouteHandlerContext( - coreStart.deprecations, - this.elasticsearch, - this.savedObjects - ); + #elasticsearch?: CoreElasticsearchRouteHandlerContext; + #savedObjects?: CoreSavedObjectsRouteHandlerContext; + #uiSettings?: CoreUiSettingsRouteHandlerContext; + #deprecations?: CoreDeprecationsRouteHandlerContext; + #security?: CoreSecurityRouteHandlerContext; + + constructor( + private readonly coreStart: CoreRouteHandlerContextParams, + private readonly request: KibanaRequest + ) {} + + public get elasticsearch() { + if (!this.#elasticsearch) { + this.#elasticsearch = new CoreElasticsearchRouteHandlerContext( + this.coreStart.elasticsearch, + this.request + ); + } + return this.#elasticsearch; + } + + public get savedObjects() { + if (!this.#savedObjects) { + this.#savedObjects = new CoreSavedObjectsRouteHandlerContext( + this.coreStart.savedObjects, + this.request + ); + } + return this.#savedObjects; + } + + public get uiSettings() { + if (!this.#uiSettings) { + this.#uiSettings = new CoreUiSettingsRouteHandlerContext( + this.coreStart.uiSettings, + this.savedObjects + ); + } + return this.#uiSettings; + } + + public get deprecations() { + if (!this.#deprecations) { + this.#deprecations = new CoreDeprecationsRouteHandlerContext( + this.coreStart.deprecations, + this.elasticsearch, + this.savedObjects + ); + } + return this.#deprecations; + } + + public get security() { + if (!this.#security) { + this.#security = new CoreSecurityRouteHandlerContext(this.coreStart.security, this.request); + } + return this.#security; } } diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts index eaf46eae3c8b6..5e9f30c93e523 100644 --- a/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts +++ b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts @@ -10,6 +10,7 @@ import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; export const createCoreRouteHandlerContextParamsMock = () => { return { @@ -17,5 +18,6 @@ export const createCoreRouteHandlerContextParamsMock = () => { savedObjects: savedObjectsServiceMock.createInternalStartContract(), uiSettings: uiSettingsServiceMock.createStartContract(), deprecations: deprecationsServiceMock.createInternalStartContract(), + security: securityServiceMock.createInternalStart(), }; }; diff --git a/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json b/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json index 5a15616fd2e54..607c0cf7cea7f 100644 --- a/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json +++ b/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json @@ -23,6 +23,8 @@ "@kbn/core-saved-objects-server-mocks", "@kbn/core-ui-settings-server-mocks", "@kbn/core-deprecations-server-mocks", + "@kbn/core-security-server-internal", + "@kbn/core-security-server-mocks", ], "exclude": [ "target/**/*", diff --git a/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts b/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts index 07704752bd8ed..6513775395911 100644 --- a/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts +++ b/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts @@ -11,6 +11,7 @@ import type { ElasticsearchRequestHandlerContext } from '@kbn/core-elasticsearch import type { SavedObjectsRequestHandlerContext } from '@kbn/core-saved-objects-server'; import type { DeprecationsRequestHandlerContext } from '@kbn/core-deprecations-server'; import type { UiSettingsRequestHandlerContext } from '@kbn/core-ui-settings-server'; +import type { SecurityRequestHandlerContext } from '@kbn/core-security-server'; /** * The `core` context provided to route handler. @@ -31,6 +32,7 @@ export interface CoreRequestHandlerContext { elasticsearch: ElasticsearchRequestHandlerContext; uiSettings: UiSettingsRequestHandlerContext; deprecations: DeprecationsRequestHandlerContext; + security: SecurityRequestHandlerContext; } /** diff --git a/packages/core/http/core-http-request-handler-context-server/tsconfig.json b/packages/core/http/core-http-request-handler-context-server/tsconfig.json index 64112effbcc17..5b20b03ce5918 100644 --- a/packages/core/http/core-http-request-handler-context-server/tsconfig.json +++ b/packages/core/http/core-http-request-handler-context-server/tsconfig.json @@ -15,7 +15,8 @@ "@kbn/core-elasticsearch-server", "@kbn/core-saved-objects-server", "@kbn/core-deprecations-server", - "@kbn/core-ui-settings-server" + "@kbn/core-ui-settings-server", + "@kbn/core-security-server" ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_setup.ts b/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_setup.ts index 396c834082422..cc2404071ecd5 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_setup.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_setup.ts @@ -10,11 +10,13 @@ import type { CoreSetup } from '@kbn/core-lifecycle-browser'; import type { InternalApplicationSetup } from '@kbn/core-application-browser-internal'; import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; import type { InternalHttpSetup } from '@kbn/core-http-browser-internal'; +import type { InternalSecurityServiceSetup } from '@kbn/core-security-browser-internal'; /** @internal */ export interface InternalCoreSetup - extends Omit { + extends Omit { application: InternalApplicationSetup; injectedMetadata: InternalInjectedMetadataSetup; http: InternalHttpSetup; + security: InternalSecurityServiceSetup; } diff --git a/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_start.ts b/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_start.ts index 1806f52b8292d..2bfdeaf1da584 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_start.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-internal/src/internal_core_start.ts @@ -10,10 +10,13 @@ import type { CoreStart } from '@kbn/core-lifecycle-browser'; import type { InternalApplicationStart } from '@kbn/core-application-browser-internal'; import type { InternalInjectedMetadataStart } from '@kbn/core-injected-metadata-browser-internal'; import type { InternalHttpStart } from '@kbn/core-http-browser-internal'; +import type { InternalSecurityServiceStart } from '@kbn/core-security-browser-internal'; /** @internal */ -export interface InternalCoreStart extends Omit { +export interface InternalCoreStart + extends Omit { application: InternalApplicationStart; injectedMetadata: InternalInjectedMetadataStart; http: InternalHttpStart; + security: InternalSecurityServiceStart; } diff --git a/packages/core/lifecycle/core-lifecycle-browser-internal/tsconfig.json b/packages/core/lifecycle/core-lifecycle-browser-internal/tsconfig.json index 7d5c7fd5c06fd..ae9e07fa47a54 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-internal/tsconfig.json +++ b/packages/core/lifecycle/core-lifecycle-browser-internal/tsconfig.json @@ -15,7 +15,8 @@ "@kbn/core-lifecycle-browser", "@kbn/core-application-browser-internal", "@kbn/core-injected-metadata-browser-internal", - "@kbn/core-http-browser-internal" + "@kbn/core-http-browser-internal", + "@kbn/core-security-browser-internal" ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts index 400b20d0861a2..8d6f1daddc8e2 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_setup.mock.ts @@ -17,6 +17,7 @@ import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-browser-mocks'; +import { securityServiceMock } from '@kbn/core-security-browser-mocks'; import { createCoreStartMock } from './core_start.mock'; export function createCoreSetupMock({ @@ -44,6 +45,7 @@ export function createCoreSetupMock({ settings: settingsServiceMock.createSetupContract(), deprecations: deprecationsServiceMock.createSetupContract(), theme: themeServiceMock.createSetupContract(), + security: securityServiceMock.createSetup(), plugins: { onSetup: jest.fn(), onStart: jest.fn(), diff --git a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts index 920cf025d3f3d..8451778dbe62e 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-browser-mocks/src/core_start.mock.ts @@ -21,6 +21,7 @@ import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { chromeServiceMock } from '@kbn/core-chrome-browser-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-browser-mocks'; +import { securityServiceMock } from '@kbn/core-security-browser-mocks'; export function createCoreStartMock({ basePath = '' } = {}) { const mock = { @@ -40,6 +41,7 @@ export function createCoreStartMock({ basePath = '' } = {}) { deprecations: deprecationsServiceMock.createStartContract(), theme: themeServiceMock.createStartContract(), fatalErrors: fatalErrorsServiceMock.createStartContract(), + security: securityServiceMock.createStart(), plugins: { onStart: jest.fn(), }, diff --git a/packages/core/lifecycle/core-lifecycle-browser-mocks/tsconfig.json b/packages/core/lifecycle/core-lifecycle-browser-mocks/tsconfig.json index 32f771469ab56..ba02ede1a594e 100644 --- a/packages/core/lifecycle/core-lifecycle-browser-mocks/tsconfig.json +++ b/packages/core/lifecycle/core-lifecycle-browser-mocks/tsconfig.json @@ -26,7 +26,8 @@ "@kbn/core-notifications-browser-mocks", "@kbn/core-application-browser-mocks", "@kbn/core-chrome-browser-mocks", - "@kbn/core-custom-branding-browser-mocks" + "@kbn/core-custom-branding-browser-mocks", + "@kbn/core-security-browser-mocks" ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts b/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts index 0dab68e669906..ac5861cf5667b 100644 --- a/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts +++ b/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts @@ -16,6 +16,7 @@ import type { NotificationsSetup } from '@kbn/core-notifications-browser'; import type { ApplicationSetup } from '@kbn/core-application-browser'; import type { CustomBrandingSetup } from '@kbn/core-custom-branding-browser'; import type { PluginsServiceSetup } from '@kbn/core-plugins-contracts-browser'; +import type { SecurityServiceSetup } from '@kbn/core-security-browser'; import type { CoreStart } from './core_start'; /** @@ -56,6 +57,8 @@ export interface CoreSetup; } diff --git a/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts b/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts index 7ab760e114114..5d1f590b75058 100644 --- a/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts +++ b/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts @@ -22,6 +22,7 @@ import type { ApplicationStart } from '@kbn/core-application-browser'; import type { ChromeStart } from '@kbn/core-chrome-browser'; import type { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; import type { PluginsServiceStart } from '@kbn/core-plugins-contracts-browser'; +import type { SecurityServiceStart } from '@kbn/core-security-browser'; /** * Core services exposed to the `Plugin` start lifecycle @@ -71,4 +72,6 @@ export interface CoreStart { theme: ThemeServiceStart; /** {@link PluginsServiceStart} */ plugins: PluginsServiceStart; + /** {@link SecurityServiceStart} */ + security: SecurityServiceStart; } diff --git a/packages/core/lifecycle/core-lifecycle-browser/tsconfig.json b/packages/core/lifecycle/core-lifecycle-browser/tsconfig.json index fab6ad33f3c01..7bfe8720f403b 100644 --- a/packages/core/lifecycle/core-lifecycle-browser/tsconfig.json +++ b/packages/core/lifecycle/core-lifecycle-browser/tsconfig.json @@ -27,7 +27,8 @@ "@kbn/core-saved-objects-browser", "@kbn/core-chrome-browser", "@kbn/core-custom-branding-browser", - "@kbn/core-plugins-contracts-browser" + "@kbn/core-plugins-contracts-browser", + "@kbn/core-security-browser" ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_setup.ts b/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_setup.ts index ec3408e72e3f4..29f07032df027 100644 --- a/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_setup.ts +++ b/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_setup.ts @@ -26,6 +26,7 @@ import type { InternalUiSettingsServiceSetup } from '@kbn/core-ui-settings-serve import type { InternalCoreUsageDataSetup } from '@kbn/core-usage-data-base-server-internal'; import type { InternalCustomBrandingSetup } from '@kbn/core-custom-branding-server-internal'; import type { InternalUserSettingsServiceSetup } from '@kbn/core-user-settings-server-internal'; +import type { InternalSecurityServiceSetup } from '@kbn/core-security-server-internal'; /** @internal */ export interface InternalCoreSetup { @@ -49,4 +50,5 @@ export interface InternalCoreSetup { coreUsageData: InternalCoreUsageDataSetup; customBranding: InternalCustomBrandingSetup; userSettings: InternalUserSettingsServiceSetup; + security: InternalSecurityServiceSetup; } diff --git a/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_start.ts b/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_start.ts index 9e506542f4440..353b35f92f365 100644 --- a/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_start.ts +++ b/packages/core/lifecycle/core-lifecycle-server-internal/src/internal_core_start.ts @@ -18,6 +18,7 @@ import type { InternalSavedObjectsServiceStart } from '@kbn/core-saved-objects-s import type { InternalUiSettingsServiceStart } from '@kbn/core-ui-settings-server-internal'; import type { CoreUsageDataStart } from '@kbn/core-usage-data-server'; import type { CustomBrandingStart } from '@kbn/core-custom-branding-server'; +import type { InternalSecurityServiceStart } from '@kbn/core-security-server-internal'; /** * @internal @@ -35,4 +36,5 @@ export interface InternalCoreStart { executionContext: InternalExecutionContextStart; deprecations: InternalDeprecationsServiceStart; customBranding: CustomBrandingStart; + security: InternalSecurityServiceStart; } diff --git a/packages/core/lifecycle/core-lifecycle-server-internal/tsconfig.json b/packages/core/lifecycle/core-lifecycle-server-internal/tsconfig.json index c964174dd41f8..dc5f481833ad4 100644 --- a/packages/core/lifecycle/core-lifecycle-server-internal/tsconfig.json +++ b/packages/core/lifecycle/core-lifecycle-server-internal/tsconfig.json @@ -33,7 +33,8 @@ "@kbn/core-usage-data-server", "@kbn/core-custom-branding-server-internal", "@kbn/core-custom-branding-server", - "@kbn/core-user-settings-server-internal" + "@kbn/core-user-settings-server-internal", + "@kbn/core-security-server-internal" ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_setup.mock.ts b/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_setup.mock.ts index c7fbf68319471..3acd1ff2fb6b0 100644 --- a/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_setup.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_setup.mock.ts @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { CoreSetup, StartServicesAccessor } from '@kbn/core-lifecycle-server'; +import type { MockedKeys } from '@kbn/utility-types-jest'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { httpResourcesMock } from '@kbn/core-http-resources-server-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; -import type { CoreSetup, StartServicesAccessor } from '@kbn/core-lifecycle-server'; -import type { MockedKeys } from '@kbn/utility-types-jest'; import { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; import { capabilitiesServiceMock } from '@kbn/core-capabilities-server-mocks'; import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; @@ -25,8 +25,9 @@ import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { coreUsageDataServiceMock } from '@kbn/core-usage-data-server-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-server-mocks'; -import { createCoreStartMock } from './core_start.mock'; import { userSettingsServiceMock } from '@kbn/core-user-settings-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; +import { createCoreStartMock } from './core_start.mock'; type CoreSetupMockType = MockedKeys & { elasticsearch: ReturnType; @@ -67,6 +68,7 @@ export function createCoreSetupMock({ metrics: metricsServiceMock.createSetupContract(), deprecations: deprecationsServiceMock.createSetupContract(), executionContext: executionContextServiceMock.createInternalSetupContract(), + security: securityServiceMock.createSetup(), coreUsageData: { registerUsageCounter: coreUsageDataServiceMock.createSetupContract().registerUsageCounter, }, diff --git a/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_start.mock.ts b/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_start.mock.ts index 850d534f046d6..c01c3c4ec616a 100644 --- a/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_start.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-server-mocks/src/core_start.mock.ts @@ -6,19 +6,20 @@ * Side Public License, v 1. */ +import type { CoreStart } from '@kbn/core-lifecycle-server'; +import type { MockedKeys } from '@kbn/utility-types-jest'; import { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; import { capabilitiesServiceMock } from '@kbn/core-capabilities-server-mocks'; import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; -import type { CoreStart } from '@kbn/core-lifecycle-server'; import { metricsServiceMock } from '@kbn/core-metrics-server-mocks'; import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; import { coreUsageDataServiceMock } from '@kbn/core-usage-data-server-mocks'; -import type { MockedKeys } from '@kbn/utility-types-jest'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; export function createCoreStartMock() { const mock: MockedKeys = { @@ -33,6 +34,7 @@ export function createCoreStartMock() { coreUsageData: coreUsageDataServiceMock.createStartContract(), executionContext: executionContextServiceMock.createInternalStartContract(), customBranding: customBrandingServiceMock.createStartContract(), + security: securityServiceMock.createStart(), plugins: { onStart: jest.fn(), }, diff --git a/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_setup.mock.ts b/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_setup.mock.ts index 686b0a84718db..066ae6633fff8 100644 --- a/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_setup.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_setup.mock.ts @@ -26,6 +26,7 @@ import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; import { coreUsageDataServiceMock } from '@kbn/core-usage-data-server-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-server-mocks'; import { userSettingsServiceMock } from '@kbn/core-user-settings-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; export function createInternalCoreSetupMock() { const setupDeps = { @@ -49,6 +50,7 @@ export function createInternalCoreSetupMock() { coreUsageData: coreUsageDataServiceMock.createSetupContract(), customBranding: customBrandingServiceMock.createSetupContract(), userSettings: userSettingsServiceMock.createSetupContract(), + security: securityServiceMock.createInternalSetup(), }; return setupDeps; } diff --git a/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_start.mock.ts b/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_start.mock.ts index bd9f9aa22cb33..8831435dfbeff 100644 --- a/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_start.mock.ts +++ b/packages/core/lifecycle/core-lifecycle-server-mocks/src/internal_core_start.mock.ts @@ -18,6 +18,7 @@ import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; import { coreUsageDataServiceMock } from '@kbn/core-usage-data-server-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; export function createInternalCoreStartMock() { const startDeps = { @@ -33,6 +34,7 @@ export function createInternalCoreStartMock() { executionContext: executionContextServiceMock.createInternalStartContract(), deprecations: deprecationsServiceMock.createInternalStartContract(), customBranding: customBrandingServiceMock.createStartContract(), + security: securityServiceMock.createInternalStart(), }; return startDeps; } diff --git a/packages/core/lifecycle/core-lifecycle-server-mocks/tsconfig.json b/packages/core/lifecycle/core-lifecycle-server-mocks/tsconfig.json index 99e8f4ed6541d..dfeb7485e9f9c 100644 --- a/packages/core/lifecycle/core-lifecycle-server-mocks/tsconfig.json +++ b/packages/core/lifecycle/core-lifecycle-server-mocks/tsconfig.json @@ -35,6 +35,7 @@ "@kbn/core-logging-server-mocks", "@kbn/core-custom-branding-server-mocks", "@kbn/core-user-settings-server-mocks", + "@kbn/core-security-server-mocks", ], "exclude": [ "target/**/*", diff --git a/packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts b/packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts index 788b875a0de21..eca43897e554f 100644 --- a/packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts +++ b/packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts @@ -6,26 +6,27 @@ * Side Public License, v 1. */ -import { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; -import { CapabilitiesSetup } from '@kbn/core-capabilities-server'; -import { DeprecationsServiceSetup } from '@kbn/core-deprecations-server'; -import { DocLinksServiceSetup } from '@kbn/core-doc-links-server'; -import { ElasticsearchServiceSetup } from '@kbn/core-elasticsearch-server'; -import { ExecutionContextSetup } from '@kbn/core-execution-context-server'; -import { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; -import { HttpResources } from '@kbn/core-http-resources-server'; -import { HttpServiceSetup } from '@kbn/core-http-server'; -import { I18nServiceSetup } from '@kbn/core-i18n-server'; -import { LoggingServiceSetup } from '@kbn/core-logging-server'; -import { MetricsServiceSetup } from '@kbn/core-metrics-server'; -import { SavedObjectsServiceSetup } from '@kbn/core-saved-objects-server'; -import { StatusServiceSetup } from '@kbn/core-status-server'; -import { UiSettingsServiceSetup } from '@kbn/core-ui-settings-server'; -import { CoreUsageDataSetup } from '@kbn/core-usage-data-server'; -import { CustomBrandingSetup } from '@kbn/core-custom-branding-server'; -import { UserSettingsServiceSetup } from '@kbn/core-user-settings-server'; -import { PluginsServiceSetup } from '@kbn/core-plugins-contracts-server'; -import { CoreStart } from './core_start'; +import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; +import type { CapabilitiesSetup } from '@kbn/core-capabilities-server'; +import type { DeprecationsServiceSetup } from '@kbn/core-deprecations-server'; +import type { DocLinksServiceSetup } from '@kbn/core-doc-links-server'; +import type { ElasticsearchServiceSetup } from '@kbn/core-elasticsearch-server'; +import type { ExecutionContextSetup } from '@kbn/core-execution-context-server'; +import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { HttpResources } from '@kbn/core-http-resources-server'; +import type { HttpServiceSetup } from '@kbn/core-http-server'; +import type { I18nServiceSetup } from '@kbn/core-i18n-server'; +import type { LoggingServiceSetup } from '@kbn/core-logging-server'; +import type { MetricsServiceSetup } from '@kbn/core-metrics-server'; +import type { SavedObjectsServiceSetup } from '@kbn/core-saved-objects-server'; +import type { StatusServiceSetup } from '@kbn/core-status-server'; +import type { UiSettingsServiceSetup } from '@kbn/core-ui-settings-server'; +import type { CoreUsageDataSetup } from '@kbn/core-usage-data-server'; +import type { CustomBrandingSetup } from '@kbn/core-custom-branding-server'; +import type { UserSettingsServiceSetup } from '@kbn/core-user-settings-server'; +import type { PluginsServiceSetup } from '@kbn/core-plugins-contracts-server'; +import type { SecurityServiceSetup } from '@kbn/core-security-server'; +import type { CoreStart } from './core_start'; /** * Context passed to the `setup` method of `standard` plugins. @@ -76,6 +77,8 @@ export interface CoreSetup deps.security.registerSecurityApi(api), + }, plugins: { onSetup: (...dependencyNames) => runtimeResolver.onSetup(plugin.name, dependencyNames), onStart: (...dependencyNames) => runtimeResolver.onStart(plugin.name, dependencyNames), @@ -156,6 +159,9 @@ export function createPluginStartContext< fatalErrors: deps.fatalErrors, deprecations: deps.deprecations, theme: deps.theme, + security: { + authc: deps.security.authc, + }, plugins: { onStart: (...dependencyNames) => runtimeResolver.onStart(plugin.name, dependencyNames), }, diff --git a/packages/core/plugins/core-plugins-browser-internal/src/plugins_service.test.ts b/packages/core/plugins/core-plugins-browser-internal/src/plugins_service.test.ts index c1c612d387204..72ba2b6312316 100644 --- a/packages/core/plugins/core-plugins-browser-internal/src/plugins_service.test.ts +++ b/packages/core/plugins/core-plugins-browser-internal/src/plugins_service.test.ts @@ -41,6 +41,7 @@ import type { PluginInitializerContext } from '@kbn/core-plugins-browser'; import type { CoreSetup, CoreStart } from '@kbn/core-lifecycle-browser'; import { savedObjectsServiceMock } from '@kbn/core-saved-objects-browser-mocks'; import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; +import { securityServiceMock } from '@kbn/core-security-browser-mocks'; export let mockPluginInitializers: Map; @@ -98,12 +99,14 @@ describe('PluginsService', () => { notifications: notificationServiceMock.createSetupContract(), uiSettings: uiSettingsServiceMock.createSetupContract(), theme: themeServiceMock.createSetupContract(), + security: securityServiceMock.createInternalSetup(), }; mockSetupContext = { ...omit(mockSetupDeps, 'injectedMetadata'), application: expect.any(Object), plugins: expect.any(Object), getStartServices: expect.any(Function), + security: expect.any(Object), http: { ...mockSetupDeps.http, staticAssets: expect.any(Object), @@ -126,12 +129,14 @@ describe('PluginsService', () => { fatalErrors: fatalErrorsServiceMock.createStartContract(), deprecations: deprecationsServiceMock.createStartContract(), theme: themeServiceMock.createStartContract(), + security: securityServiceMock.createInternalStart(), }; mockStartContext = { ...omit(mockStartDeps, 'injectedMetadata'), application: expect.any(Object), plugins: expect.any(Object), chrome: omit(mockStartDeps.chrome, 'getComponent'), + security: expect.any(Object), http: { ...mockStartDeps.http, staticAssets: expect.any(Object), diff --git a/packages/core/plugins/core-plugins-browser-internal/tsconfig.json b/packages/core/plugins/core-plugins-browser-internal/tsconfig.json index 36b1959b2d394..1df9acab0451e 100644 --- a/packages/core/plugins/core-plugins-browser-internal/tsconfig.json +++ b/packages/core/plugins/core-plugins-browser-internal/tsconfig.json @@ -37,6 +37,7 @@ "@kbn/core-deprecations-browser-mocks", "@kbn/utility-types", "@kbn/core-plugins-contracts-browser", + "@kbn/core-security-browser-mocks", ], "exclude": [ "target/**/*", diff --git a/packages/core/plugins/core-plugins-server-internal/src/plugin_context.ts b/packages/core/plugins/core-plugins-server-internal/src/plugin_context.ts index 3cb8777d647d1..b287407fa106c 100644 --- a/packages/core/plugins/core-plugins-server-internal/src/plugin_context.ts +++ b/packages/core/plugins/core-plugins-server-internal/src/plugin_context.ts @@ -284,6 +284,9 @@ export function createPluginSetupContext({ onSetup: (...dependencyNames) => runtimeResolver.onSetup(plugin.name, dependencyNames), onStart: (...dependencyNames) => runtimeResolver.onStart(plugin.name, dependencyNames), }, + security: { + registerSecurityApi: (api) => deps.security.registerSecurityApi(api), + }, }; } @@ -360,5 +363,8 @@ export function createPluginStartContext({ plugins: { onStart: (...dependencyNames) => runtimeResolver.onStart(plugin.name, dependencyNames), }, + security: { + authc: deps.security.authc, + }, }; } diff --git a/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts b/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts index 1220c4ca7f050..638024a2eb8ed 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.test.mocks.ts @@ -25,6 +25,7 @@ import { integrationsServiceMock } from '@kbn/core-integrations-browser-mocks'; import { coreAppsMock } from '@kbn/core-apps-browser-mocks'; import { loggingSystemMock } from '@kbn/core-logging-browser-mocks'; import { customBrandingServiceMock } from '@kbn/core-custom-branding-browser-mocks'; +import { securityServiceMock } from '@kbn/core-security-browser-mocks'; export const analyticsServiceStartMock = analyticsServiceMock.createAnalyticsServiceStart(); export const MockAnalyticsService = analyticsServiceMock.create(); @@ -156,3 +157,9 @@ export const LoggingSystemConstructor = jest.fn().mockImplementation(() => MockL jest.doMock('@kbn/core-logging-browser-internal', () => ({ BrowserLoggingSystem: LoggingSystemConstructor, })); + +export const MockSecurityService = securityServiceMock.create(); +export const SecurityServiceConstructor = jest.fn().mockImplementation(() => MockSecurityService); +jest.doMock('@kbn/core-security-browser-internal', () => ({ + SecurityService: SecurityServiceConstructor, +})); diff --git a/packages/core/root/core-root-browser-internal/src/core_system.test.ts b/packages/core/root/core-root-browser-internal/src/core_system.test.ts index 54dfeec3934dd..bfe995114b842 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.test.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.test.ts @@ -44,6 +44,8 @@ import { MockSettingsService, MockCustomBrandingService, CustomBrandingServiceConstructor, + MockSecurityService, + SecurityServiceConstructor, } from './core_system.test.mocks'; import type { EnvironmentMode } from '@kbn/config'; import { CoreSystem } from './core_system'; @@ -150,6 +152,7 @@ describe('constructor', () => { expect(AnalyticsServiceConstructor).toHaveBeenCalledTimes(1); expect(LoggingSystemConstructor).toHaveBeenCalledTimes(1); expect(CustomBrandingServiceConstructor).toHaveBeenCalledTimes(1); + expect(SecurityServiceConstructor).toHaveBeenCalledTimes(1); }); it('passes injectedMetadata param to InjectedMetadataService', () => { @@ -309,6 +312,11 @@ describe('#setup()', () => { await setupCore(); expect(MockChromeService.setup).toHaveBeenCalledTimes(1); }); + + it('calls security#setup()', async () => { + await setupCore(); + expect(MockSecurityService.setup).toHaveBeenCalledTimes(1); + }); }); describe('#start()', () => { @@ -495,6 +503,11 @@ describe('#start()', () => { await startCore(); expect(MockThemeService.start).toHaveBeenCalledTimes(1); }); + + it('calls security#start()', async () => { + await startCore(); + expect(MockSecurityService.start).toHaveBeenCalledTimes(1); + }); }); describe('#stop()', () => { diff --git a/packages/core/root/core-root-browser-internal/src/core_system.ts b/packages/core/root/core-root-browser-internal/src/core_system.ts index 817bb9991cc05..1bd06082d0a5e 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.ts @@ -36,9 +36,9 @@ import { CoreAppsService } from '@kbn/core-apps-browser-internal'; import type { InternalCoreSetup, InternalCoreStart } from '@kbn/core-lifecycle-browser-internal'; import { PluginsService } from '@kbn/core-plugins-browser-internal'; import { CustomBrandingService } from '@kbn/core-custom-branding-browser-internal'; +import { SecurityService } from '@kbn/core-security-browser-internal'; import { KBN_LOAD_MARKS } from './events'; import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info'; - import { LOAD_SETUP_DONE, LOAD_START_DONE, @@ -104,6 +104,7 @@ export class CoreSystem { private readonly coreContext: CoreContext; private readonly executionContext: ExecutionContextService; private readonly customBranding: CustomBrandingService; + private readonly security: SecurityService; private fatalErrorsSetup: FatalErrorsSetup | null = null; constructor(params: CoreSystemParams) { @@ -128,6 +129,7 @@ export class CoreSystem { // Stop Core before rendering any fatal errors into the DOM this.stop(); }); + this.security = new SecurityService(this.coreContext); this.theme = new ThemeService(); this.notifications = new NotificationsService(); this.http = new HttpService(); @@ -235,6 +237,7 @@ export class CoreSystem { fatalErrors: this.fatalErrorsSetup, executionContext, }); + const security = this.security.setup(); this.chrome.setup({ analytics }); const uiSettings = this.uiSettings.setup({ http, injectedMetadata }); const settings = this.settings.setup({ http, injectedMetadata }); @@ -256,6 +259,7 @@ export class CoreSystem { settings, executionContext, customBranding, + security, }; // Services that do not expose contracts at setup @@ -280,6 +284,7 @@ export class CoreSystem { public async start() { try { const analytics = this.analytics.start(); + const security = this.security.start(); const injectedMetadata = await this.injectedMetadata.start(); const uiSettings = await this.uiSettings.start(); const settings = await this.settings.start(); @@ -354,6 +359,7 @@ export class CoreSystem { fatalErrors, deprecations, customBranding, + security, }; await this.plugins.start(core); @@ -416,6 +422,7 @@ export class CoreSystem { this.deprecations.stop(); this.theme.stop(); this.analytics.stop(); + this.security.stop(); this.rootDomElement.textContent = ''; } diff --git a/packages/core/root/core-root-browser-internal/tsconfig.json b/packages/core/root/core-root-browser-internal/tsconfig.json index 700ba5e74c5da..8029235949a53 100644 --- a/packages/core/root/core-root-browser-internal/tsconfig.json +++ b/packages/core/root/core-root-browser-internal/tsconfig.json @@ -62,6 +62,8 @@ "@kbn/config", "@kbn/core-custom-branding-browser-internal", "@kbn/core-custom-branding-browser-mocks", + "@kbn/core-security-browser-mocks", + "@kbn/core-security-browser-internal", ], "exclude": [ "target/**/*", diff --git a/packages/core/root/core-root-server-internal/src/server.test.mocks.ts b/packages/core/root/core-root-server-internal/src/server.test.mocks.ts index 8138433d42360..d1fd4d8ba1266 100644 --- a/packages/core/root/core-root-server-internal/src/server.test.mocks.ts +++ b/packages/core/root/core-root-server-internal/src/server.test.mocks.ts @@ -7,37 +7,46 @@ */ import { httpServiceMock } from '@kbn/core-http-server-mocks'; +import { pluginServiceMock } from '@kbn/core-plugins-server-mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { configServiceMock } from '@kbn/config-mocks'; +import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; +import { renderingServiceMock } from '@kbn/core-rendering-server-mocks'; +import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; +import { nodeServiceMock } from '@kbn/core-node-server-mocks'; +import { metricsServiceMock } from '@kbn/core-metrics-server-mocks'; +import { statusServiceMock } from '@kbn/core-status-server-mocks'; +import { loggingServiceMock } from '@kbn/core-logging-server-mocks'; +import { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; +import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; +import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; +import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; +import { userSettingsServiceMock } from '@kbn/core-user-settings-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; export const mockHttpService = httpServiceMock.create(); jest.doMock('@kbn/core-http-server-internal', () => ({ HttpService: jest.fn(() => mockHttpService), })); -import { pluginServiceMock } from '@kbn/core-plugins-server-mocks'; - export const mockPluginsService = pluginServiceMock.create(); jest.doMock('@kbn/core-plugins-server-internal', () => ({ PluginsService: jest.fn(() => mockPluginsService), })); -import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; - export const mockElasticsearchService = elasticsearchServiceMock.create(); jest.doMock('@kbn/core-elasticsearch-server-internal', () => ({ ElasticsearchService: jest.fn(() => mockElasticsearchService), })); -const realKbnConfig = jest.requireActual('@kbn/config'); - -import { configServiceMock } from '@kbn/config-mocks'; - export const mockConfigService = configServiceMock.create(); -jest.doMock('@kbn/config', () => ({ - ...realKbnConfig, - ConfigService: jest.fn(() => mockConfigService), -})); - -import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks'; +jest.doMock('@kbn/config', () => { + const realKbnConfig = jest.requireActual('@kbn/config'); + return { + ...realKbnConfig, + ConfigService: jest.fn(() => mockConfigService), + }; +}); export const mockSavedObjectsService = savedObjectsServiceMock.create(); jest.doMock('@kbn/core-saved-objects-server-internal', () => ({ @@ -75,73 +84,57 @@ jest.doMock('@kbn/core-config-server-internal', () => ({ ensureValidConfiguration: mockEnsureValidConfiguration, })); -import { renderingServiceMock } from '@kbn/core-rendering-server-mocks'; - export const mockRenderingService = renderingServiceMock.create(); jest.doMock('@kbn/core-rendering-server-internal', () => ({ RenderingService: jest.fn(() => mockRenderingService), })); -import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; - export const mockEnvironmentService = environmentServiceMock.create(); jest.doMock('@kbn/core-environment-server-internal', () => ({ EnvironmentService: jest.fn(() => mockEnvironmentService), })); -import { nodeServiceMock } from '@kbn/core-node-server-mocks'; - export const mockNodeService = nodeServiceMock.create(); jest.doMock('@kbn/core-node-server-internal', () => ({ NodeService: jest.fn(() => mockNodeService), })); -import { metricsServiceMock } from '@kbn/core-metrics-server-mocks'; - export const mockMetricsService = metricsServiceMock.create(); jest.doMock('@kbn/core-metrics-server-internal', () => ({ MetricsService: jest.fn(() => mockMetricsService), })); -import { statusServiceMock } from '@kbn/core-status-server-mocks'; - export const mockStatusService = statusServiceMock.create(); jest.doMock('@kbn/core-status-server-internal', () => ({ StatusService: jest.fn(() => mockStatusService), })); -import { loggingServiceMock } from '@kbn/core-logging-server-mocks'; - export const mockLoggingService = loggingServiceMock.create(); jest.doMock('@kbn/core-logging-server-internal', () => ({ LoggingService: jest.fn(() => mockLoggingService), })); -import { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; - export const mockI18nService = i18nServiceMock.create(); jest.doMock('@kbn/core-i18n-server-internal', () => ({ I18nService: jest.fn(() => mockI18nService), })); -import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; - export const mockPrebootService = prebootServiceMock.create(); jest.doMock('@kbn/core-preboot-server-internal', () => ({ PrebootService: jest.fn(() => mockPrebootService), })); -import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; - export const mockDeprecationService = deprecationsServiceMock.create(); jest.doMock('@kbn/core-deprecations-server-internal', () => ({ DeprecationsService: jest.fn(() => mockDeprecationService), })); -import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; -import { userSettingsServiceMock } from '@kbn/core-user-settings-server-mocks'; - export const mockDocLinksService = docLinksServiceMock.create(); jest.doMock('@kbn/core-doc-links-server-internal', () => ({ DocLinksService: jest.fn(() => mockDocLinksService), })); + +export const mockSecurityService = securityServiceMock.create(); +jest.doMock('@kbn/core-security-server-internal', () => ({ + SecurityService: jest.fn(() => mockSecurityService), +})); diff --git a/packages/core/root/core-root-server-internal/src/server.test.ts b/packages/core/root/core-root-server-internal/src/server.test.ts index 2f1ebaa268e84..4fa8bc67ef3f1 100644 --- a/packages/core/root/core-root-server-internal/src/server.test.ts +++ b/packages/core/root/core-root-server-internal/src/server.test.ts @@ -27,6 +27,7 @@ import { mockDocLinksService, mockCustomBrandingService, mockUserSettingsService, + mockSecurityService, } from './server.test.mocks'; import { BehaviorSubject } from 'rxjs'; @@ -117,6 +118,7 @@ test('sets up services on "setup"', async () => { expect(mockDocLinksService.setup).not.toHaveBeenCalled(); expect(mockCustomBrandingService.setup).not.toHaveBeenCalled(); expect(mockUserSettingsService.setup).not.toHaveBeenCalled(); + expect(mockSecurityService.setup).not.toHaveBeenCalled(); await server.setup(); @@ -135,6 +137,7 @@ test('sets up services on "setup"', async () => { expect(mockDocLinksService.setup).toHaveBeenCalledTimes(1); expect(mockCustomBrandingService.setup).toHaveBeenCalledTimes(1); expect(mockUserSettingsService.setup).toHaveBeenCalledTimes(1); + expect(mockSecurityService.setup).toHaveBeenCalledTimes(1); }); test('injects legacy dependency to context#setup()', async () => { @@ -187,6 +190,7 @@ test('runs services on "start"', async () => { expect(mockDeprecationService.start).not.toHaveBeenCalled(); expect(mockDocLinksService.start).not.toHaveBeenCalled(); expect(mockCustomBrandingService.start).not.toHaveBeenCalled(); + expect(mockSecurityService.start).not.toHaveBeenCalled(); await server.start(); @@ -198,6 +202,7 @@ test('runs services on "start"', async () => { expect(mockDeprecationService.start).toHaveBeenCalledTimes(1); expect(mockDocLinksService.start).toHaveBeenCalledTimes(1); expect(mockCustomBrandingService.start).toHaveBeenCalledTimes(1); + expect(mockSecurityService.start).toHaveBeenCalledTimes(1); }); test('does not fail on "setup" if there are unused paths detected', async () => { @@ -225,6 +230,7 @@ test('stops services on "stop"', async () => { expect(mockStatusService.stop).not.toHaveBeenCalled(); expect(mockLoggingService.stop).not.toHaveBeenCalled(); expect(mockCustomBrandingService.stop).not.toHaveBeenCalled(); + expect(mockSecurityService.stop).not.toHaveBeenCalled(); await server.stop(); @@ -238,6 +244,7 @@ test('stops services on "stop"', async () => { expect(mockStatusService.stop).toHaveBeenCalledTimes(1); expect(mockLoggingService.stop).toHaveBeenCalledTimes(1); expect(mockCustomBrandingService.stop).toHaveBeenCalledTimes(1); + expect(mockSecurityService.stop).toHaveBeenCalledTimes(1); }); test(`doesn't preboot core services if config validation fails`, async () => { diff --git a/packages/core/root/core-root-server-internal/src/server.ts b/packages/core/root/core-root-server-internal/src/server.ts index b7aa0f54839c0..804227bff4442 100644 --- a/packages/core/root/core-root-server-internal/src/server.ts +++ b/packages/core/root/core-root-server-internal/src/server.ts @@ -44,7 +44,6 @@ import type { PrebootRequestHandlerContext, } from '@kbn/core-http-request-handler-context-server'; import { RenderingService } from '@kbn/core-rendering-server-internal'; - import { HttpResourcesService } from '@kbn/core-http-resources-server-internal'; import type { InternalCorePreboot, @@ -53,6 +52,7 @@ import type { } from '@kbn/core-lifecycle-server-internal'; import { DiscoveredPlugins, PluginsService } from '@kbn/core-plugins-server-internal'; import { CoreAppsService } from '@kbn/core-apps-server-internal'; +import { SecurityService } from '@kbn/core-security-server-internal'; import { registerServiceConfig } from './register_service_config'; import { MIGRATION_EXCEPTION_CODE } from './constants'; @@ -100,6 +100,7 @@ export class Server { private readonly docLinks: DocLinksService; private readonly customBranding: CustomBrandingService; private readonly userSettingsService: UserSettingsService; + private readonly security: SecurityService; private readonly savedObjectsStartPromise: Promise; private resolveSavedObjectsStartPromise?: (value: SavedObjectsServiceStart) => void; @@ -148,6 +149,7 @@ export class Server { this.docLinks = new DocLinksService(core); this.customBranding = new CustomBrandingService(core); this.userSettingsService = new UserSettingsService(core); + this.security = new SecurityService(core); this.savedObjectsStartPromise = new Promise((resolve) => { this.resolveSavedObjectsStartPromise = resolve; @@ -248,6 +250,7 @@ export class Server { }); const executionContextSetup = this.executionContext.setup(); const docLinksSetup = this.docLinks.setup(); + const securitySetup = this.security.setup(); const httpSetup = await this.http.setup({ context: contextServiceSetup, @@ -344,6 +347,7 @@ export class Server { deprecations: deprecationsSetup, coreUsageData: coreUsageDataSetup, userSettings: userSettingsServiceSetup, + security: securitySetup, }; const pluginsSetup = await this.plugins.setup(coreSetup); @@ -363,6 +367,7 @@ export class Server { const startTransaction = apm.startTransaction('server-start', 'kibana-platform'); const analyticsStart = this.analytics.start(); + const securityStart = this.security.start(); const executionContextStart = this.executionContext.start(); const docLinkStart = this.docLinks.start(); const elasticsearchStart = await this.elasticsearch.start(); @@ -414,6 +419,7 @@ export class Server { uiSettings: uiSettingsStart, coreUsageData: coreUsageDataStart, deprecations: deprecationsStart, + security: securityStart, }; await this.plugins.start(this.coreStart); @@ -444,6 +450,7 @@ export class Server { await this.customBranding.stop(); this.node.stop(); this.deprecations.stop(); + this.security.stop(); } private registerCoreContext(coreSetup: InternalCoreSetup) { diff --git a/packages/core/root/core-root-server-internal/tsconfig.json b/packages/core/root/core-root-server-internal/tsconfig.json index dd2af575ce35b..8c8340b2aca0c 100644 --- a/packages/core/root/core-root-server-internal/tsconfig.json +++ b/packages/core/root/core-root-server-internal/tsconfig.json @@ -71,6 +71,8 @@ "@kbn/core-node-server", "@kbn/core-user-settings-server-internal", "@kbn/core-user-settings-server-mocks", + "@kbn/core-security-server-mocks", + "@kbn/core-security-server-internal", ], "exclude": [ "target/**/*", diff --git a/packages/core/security/core-security-browser-internal/README.md b/packages/core/security/core-security-browser-internal/README.md new file mode 100644 index 0000000000000..7cb6c91d04103 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/README.md @@ -0,0 +1,4 @@ +# @kbn/core-security-browser-internal + +This package contains the internal types and implementation for Core's browser-side `security` service. + diff --git a/packages/core/security/core-security-browser-internal/index.ts b/packages/core/security/core-security-browser-internal/index.ts new file mode 100644 index 0000000000000..2e7be49ea6575 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/index.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 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 { SecurityService } from './src/security_service'; +export type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from './src/internal_contracts'; diff --git a/packages/core/security/core-security-browser-internal/jest.config.js b/packages/core/security/core-security-browser-internal/jest.config.js new file mode 100644 index 0000000000000..ca32eb87d12c0 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-browser-internal'], +}; diff --git a/packages/core/security/core-security-browser-internal/kibana.jsonc b/packages/core/security/core-security-browser-internal/kibana.jsonc new file mode 100644 index 0000000000000..f58fc6ebbcf13 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-browser-internal", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-browser-internal/package.json b/packages/core/security/core-security-browser-internal/package.json new file mode 100644 index 0000000000000..fb657d89c8d70 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-browser-internal", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-browser-internal/src/internal_contracts.ts b/packages/core/security/core-security-browser-internal/src/internal_contracts.ts new file mode 100644 index 0000000000000..7afbdc961825c --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/internal_contracts.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 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 { SecurityServiceSetup, SecurityServiceStart } from '@kbn/core-security-browser'; + +export type InternalSecurityServiceSetup = SecurityServiceSetup; +export type InternalSecurityServiceStart = SecurityServiceStart; diff --git a/packages/core/security/core-security-browser-internal/src/security_service.test.mocks.ts b/packages/core/security/core-security-browser-internal/src/security_service.test.mocks.ts new file mode 100644 index 0000000000000..1693fe1213fd9 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/security_service.test.mocks.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 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 const getDefaultSecurityImplementationMock = jest.fn(); +export const convertSecurityApiMock = jest.fn(); + +jest.doMock('./utils', () => { + const actual = jest.requireActual('./utils'); + return { + ...actual, + getDefaultSecurityImplementation: getDefaultSecurityImplementationMock, + convertSecurityApi: convertSecurityApiMock, + }; +}); diff --git a/packages/core/security/core-security-browser-internal/src/security_service.test.ts b/packages/core/security/core-security-browser-internal/src/security_service.test.ts new file mode 100644 index 0000000000000..e848742586785 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/security_service.test.ts @@ -0,0 +1,97 @@ +/* + * 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 { + convertSecurityApiMock, + getDefaultSecurityImplementationMock, +} from './security_service.test.mocks'; + +import { loggerMock } from '@kbn/logging-mocks'; +import { coreContextMock } from '@kbn/core-base-browser-mocks'; +import type { CoreSecurityContract } from '@kbn/core-security-browser'; +import { SecurityService } from './security_service'; + +const createStubInternalContract = (): CoreSecurityContract => { + return Symbol('stubContract') as unknown as CoreSecurityContract; +}; + +describe('SecurityService', () => { + let coreContext: ReturnType; + let service: SecurityService; + + beforeEach(() => { + coreContext = coreContextMock.create(); + service = new SecurityService(coreContext); + + convertSecurityApiMock.mockReset(); + getDefaultSecurityImplementationMock.mockReset(); + }); + + describe('#setup', () => { + describe('#registerSecurityApi', () => { + it('throws if called more than once', () => { + const { registerSecurityApi } = service.setup(); + + const contract = createStubInternalContract(); + registerSecurityApi(contract); + + expect(() => registerSecurityApi(contract)).toThrowErrorMatchingInlineSnapshot( + `"security API can only be registered once"` + ); + }); + }); + }); + + describe('#start', () => { + it('logs a warning if the security API was not registered', () => { + service.setup(); + service.start(); + + expect(loggerMock.collect(coreContext.logger).warn).toMatchInlineSnapshot(` + Array [ + Array [ + "Security API was not registered, using default implementation", + ], + ] + `); + }); + + it('calls convertSecurityApi with the registered API', () => { + const { registerSecurityApi } = service.setup(); + + const contract = createStubInternalContract(); + registerSecurityApi(contract); + + service.start(); + + expect(convertSecurityApiMock).toHaveBeenCalledTimes(1); + expect(convertSecurityApiMock).toHaveBeenCalledWith(contract); + }); + + it('calls convertSecurityApi with the default implementation when no API was registered', () => { + const contract = createStubInternalContract(); + getDefaultSecurityImplementationMock.mockReturnValue(contract); + + service.setup(); + service.start(); + + expect(convertSecurityApiMock).toHaveBeenCalledTimes(1); + expect(convertSecurityApiMock).toHaveBeenCalledWith(contract); + }); + + it('returns the result of convertSecurityApi as contract', () => { + const convertedContract = { stub: true }; + convertSecurityApiMock.mockReturnValue(convertedContract); + + service.setup(); + const startContract = service.start(); + + expect(startContract).toEqual(convertedContract); + }); + }); +}); diff --git a/packages/core/security/core-security-browser-internal/src/security_service.ts b/packages/core/security/core-security-browser-internal/src/security_service.ts new file mode 100644 index 0000000000000..e3981ab9d8499 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/security_service.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 type { Logger } from '@kbn/logging'; +import type { CoreContext, CoreService } from '@kbn/core-base-browser-internal'; +import type { CoreSecurityContract } from '@kbn/core-security-browser'; +import type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from './internal_contracts'; +import { getDefaultSecurityImplementation, convertSecurityApi } from './utils'; + +export class SecurityService + implements CoreService +{ + private readonly log: Logger; + private securityApi?: CoreSecurityContract; + + constructor(coreContext: CoreContext) { + this.log = coreContext.logger.get('security-service'); + } + + public setup(): InternalSecurityServiceSetup { + return { + registerSecurityApi: (api) => { + if (this.securityApi) { + throw new Error('security API can only be registered once'); + } + this.securityApi = api; + }, + }; + } + + public start(): InternalSecurityServiceStart { + if (!this.securityApi) { + this.log.warn('Security API was not registered, using default implementation'); + } + const apiContract = this.securityApi ?? getDefaultSecurityImplementation(); + return convertSecurityApi(apiContract); + } + + public stop() {} +} diff --git a/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.test.ts b/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.test.ts new file mode 100644 index 0000000000000..11841c5cd25bf --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.test.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 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 { CoreSecurityContract } from '@kbn/core-security-browser'; +import { convertSecurityApi } from './convert_security_api'; + +describe('convertSecurityApi', () => { + it('returns the API from the source', () => { + const source: CoreSecurityContract = { authc: { getCurrentUser: jest.fn() } }; + const output = convertSecurityApi(source); + expect(output.authc.getCurrentUser).toBe(source.authc.getCurrentUser); + }); +}); diff --git a/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.ts b/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.ts new file mode 100644 index 0000000000000..2b8dfcfb5e849 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/utils/convert_security_api.ts @@ -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 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 { CoreSecurityContract } from '@kbn/core-security-browser'; +import type { InternalSecurityServiceStart } from '../internal_contracts'; + +export const convertSecurityApi = ( + privateApi: CoreSecurityContract +): InternalSecurityServiceStart => { + // shapes are the same for now given we only have one API exposed. + return privateApi; +}; diff --git a/packages/core/security/core-security-browser-internal/src/utils/default_implementation.test.ts b/packages/core/security/core-security-browser-internal/src/utils/default_implementation.test.ts new file mode 100644 index 0000000000000..0ea1a7e158e9b --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/utils/default_implementation.test.ts @@ -0,0 +1,26 @@ +/* + * 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 { CoreSecurityContract } from '@kbn/core-security-browser'; +import { getDefaultSecurityImplementation } from './default_implementation'; + +describe('getDefaultSecurityImplementation', () => { + let implementation: CoreSecurityContract; + + beforeEach(() => { + implementation = getDefaultSecurityImplementation(); + }); + + describe('authc.getCurrentUser', () => { + it('rejects with an error', async () => { + await expect(() => + implementation.authc.getCurrentUser() + ).rejects.toThrowErrorMatchingInlineSnapshot(`"No authenticated user"`); + }); + }); +}); diff --git a/packages/core/security/core-security-browser-internal/src/utils/default_implementation.ts b/packages/core/security/core-security-browser-internal/src/utils/default_implementation.ts new file mode 100644 index 0000000000000..2d55d05a1ce9f --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/utils/default_implementation.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 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 { CoreSecurityContract } from '@kbn/core-security-browser'; + +export const getDefaultSecurityImplementation = (): CoreSecurityContract => { + return { + authc: { + getCurrentUser: () => { + return Promise.reject(new Error('No authenticated user')); + }, + }, + }; +}; diff --git a/packages/core/security/core-security-browser-internal/src/utils/index.ts b/packages/core/security/core-security-browser-internal/src/utils/index.ts new file mode 100644 index 0000000000000..e43884f204ece --- /dev/null +++ b/packages/core/security/core-security-browser-internal/src/utils/index.ts @@ -0,0 +1,10 @@ +/* + * 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 { convertSecurityApi } from './convert_security_api'; +export { getDefaultSecurityImplementation } from './default_implementation'; diff --git a/packages/core/security/core-security-browser-internal/tsconfig.json b/packages/core/security/core-security-browser-internal/tsconfig.json new file mode 100644 index 0000000000000..d7fa9fd23c1d0 --- /dev/null +++ b/packages/core/security/core-security-browser-internal/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-browser", + "@kbn/logging", + "@kbn/core-base-browser-internal", + "@kbn/logging-mocks", + "@kbn/core-base-browser-mocks", + ] +} diff --git a/packages/core/security/core-security-browser-mocks/README.md b/packages/core/security/core-security-browser-mocks/README.md new file mode 100644 index 0000000000000..de3a4ee3261e4 --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-security-browser-mocks + +This package contains mocks types for Core's browser-side `security` service. diff --git a/packages/core/security/core-security-browser-mocks/index.ts b/packages/core/security/core-security-browser-mocks/index.ts new file mode 100644 index 0000000000000..0e6eafac658e8 --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/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 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 { securityServiceMock } from './src/security_service.mock'; diff --git a/packages/core/security/core-security-browser-mocks/jest.config.js b/packages/core/security/core-security-browser-mocks/jest.config.js new file mode 100644 index 0000000000000..434d57f8fee78 --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-browser-mocks'], +}; diff --git a/packages/core/security/core-security-browser-mocks/kibana.jsonc b/packages/core/security/core-security-browser-mocks/kibana.jsonc new file mode 100644 index 0000000000000..30caeaf0e9755 --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-browser-mocks", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-browser-mocks/package.json b/packages/core/security/core-security-browser-mocks/package.json new file mode 100644 index 0000000000000..41afd9ddb5a7c --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-browser-mocks", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-browser-mocks/src/security_service.mock.ts b/packages/core/security/core-security-browser-mocks/src/security_service.mock.ts new file mode 100644 index 0000000000000..46cf384f35816 --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/src/security_service.mock.ts @@ -0,0 +1,67 @@ +/* + * 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 { SecurityServiceSetup, SecurityServiceStart } from '@kbn/core-security-browser'; +import type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from '@kbn/core-security-browser-internal'; + +const createSetupMock = () => { + const mock: jest.Mocked = { + registerSecurityApi: jest.fn(), + }; + + return mock; +}; + +const createStartMock = () => { + const mock: jest.MockedObjectDeep = { + authc: { + getCurrentUser: jest.fn(), + }, + }; + + return mock; +}; + +const createInternalSetupMock = () => { + const mock: jest.Mocked = { + registerSecurityApi: jest.fn(), + }; + + return mock; +}; + +const createInternalStartMock = () => { + const mock: jest.MockedObjectDeep = { + authc: { + getCurrentUser: jest.fn(), + }, + }; + + return mock; +}; + +const createServiceMock = () => { + const mock = { + setup: jest.fn().mockReturnValue(createSetupMock()), + start: jest.fn().mockReturnValue(createStartMock()), + stop: jest.fn(), + }; + + return mock; +}; + +export const securityServiceMock = { + create: createServiceMock, + createSetup: createSetupMock, + createStart: createStartMock, + createInternalSetup: createInternalSetupMock, + createInternalStart: createInternalStartMock, +}; diff --git a/packages/core/security/core-security-browser-mocks/tsconfig.json b/packages/core/security/core-security-browser-mocks/tsconfig.json new file mode 100644 index 0000000000000..7e98cd5bed84c --- /dev/null +++ b/packages/core/security/core-security-browser-mocks/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-browser", + "@kbn/core-security-browser-internal", + ] +} diff --git a/packages/core/security/core-security-browser/README.md b/packages/core/security/core-security-browser/README.md new file mode 100644 index 0000000000000..256026cdec067 --- /dev/null +++ b/packages/core/security/core-security-browser/README.md @@ -0,0 +1,3 @@ +# @kbn/core-security-browser + +This package contains the public types for Core's browser-side `security` service. diff --git a/packages/core/security/core-security-browser/index.ts b/packages/core/security/core-security-browser/index.ts new file mode 100644 index 0000000000000..be698afdb1bd9 --- /dev/null +++ b/packages/core/security/core-security-browser/index.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 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 type { SecurityServiceSetup, SecurityServiceStart } from './src/contracts'; +export type { CoreAuthenticationService } from './src/authc'; +export type { CoreSecurityContract, AuthenticationServiceContract } from './src/api_provider'; diff --git a/packages/core/security/core-security-browser/jest.config.js b/packages/core/security/core-security-browser/jest.config.js new file mode 100644 index 0000000000000..7dcd4bb5a45d5 --- /dev/null +++ b/packages/core/security/core-security-browser/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-browser'], +}; diff --git a/packages/core/security/core-security-browser/kibana.jsonc b/packages/core/security/core-security-browser/kibana.jsonc new file mode 100644 index 0000000000000..366bfd7a77512 --- /dev/null +++ b/packages/core/security/core-security-browser/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-browser", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-browser/package.json b/packages/core/security/core-security-browser/package.json new file mode 100644 index 0000000000000..7e917a4e20973 --- /dev/null +++ b/packages/core/security/core-security-browser/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-browser", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-browser/src/api_provider.ts b/packages/core/security/core-security-browser/src/api_provider.ts new file mode 100644 index 0000000000000..846c9295e1c6d --- /dev/null +++ b/packages/core/security/core-security-browser/src/api_provider.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 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 { CoreAuthenticationService } from './authc'; + +/** + * The contract exposed by the security provider for Core to + * consume and re-expose via its security service. + * + * @public + */ +export interface CoreSecurityContract { + authc: AuthenticationServiceContract; +} + +/** + * @public + */ +export type AuthenticationServiceContract = CoreAuthenticationService; diff --git a/packages/core/security/core-security-browser/src/authc.ts b/packages/core/security/core-security-browser/src/authc.ts new file mode 100644 index 0000000000000..d31c88e677f32 --- /dev/null +++ b/packages/core/security/core-security-browser/src/authc.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 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 { AuthenticatedUser } from '@kbn/core-security-common'; + +/** + * Core's authentication service + * + * @public + */ +export interface CoreAuthenticationService { + /** + * Returns currently authenticated user + * and throws if current user isn't authenticated. + */ + getCurrentUser(): Promise; +} diff --git a/packages/core/security/core-security-browser/src/contracts.ts b/packages/core/security/core-security-browser/src/contracts.ts new file mode 100644 index 0000000000000..b5dfa1b45ec72 --- /dev/null +++ b/packages/core/security/core-security-browser/src/contracts.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 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 { CoreAuthenticationService } from './authc'; +import type { CoreSecurityContract } from './api_provider'; + +/** + * Setup contract for Core's security service. + * + * @public + */ +export interface SecurityServiceSetup { + /** + * Register the security implementation that then will be used and re-exposed by Core. + * + * @remark this should **exclusively** be used by the security plugin. + */ + registerSecurityApi(api: CoreSecurityContract): void; +} + +/** + * Start contract for Core's security service. + * + * @public + */ +export interface SecurityServiceStart { + /** + * The {@link CoreAuthenticationService | authentication service} + */ + authc: CoreAuthenticationService; +} diff --git a/packages/core/security/core-security-browser/tsconfig.json b/packages/core/security/core-security-browser/tsconfig.json new file mode 100644 index 0000000000000..460811ea00d14 --- /dev/null +++ b/packages/core/security/core-security-browser/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-common", + ] +} diff --git a/packages/core/security/core-security-common/README.md b/packages/core/security/core-security-common/README.md new file mode 100644 index 0000000000000..fa05fc78caa14 --- /dev/null +++ b/packages/core/security/core-security-common/README.md @@ -0,0 +1,3 @@ +# @kbn/core-security-common + +This package contains the common public types for Core's `security` domain. diff --git a/packages/core/security/core-security-common/index.ts b/packages/core/security/core-security-common/index.ts new file mode 100644 index 0000000000000..d11d52117cfda --- /dev/null +++ b/packages/core/security/core-security-common/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 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 type { + User, + UserRealm, + AuthenticatedUser, + AuthenticationProvider, +} from './src/authentication'; diff --git a/packages/core/security/core-security-common/jest.config.js b/packages/core/security/core-security-common/jest.config.js new file mode 100644 index 0000000000000..081b05658b499 --- /dev/null +++ b/packages/core/security/core-security-common/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-common'], +}; diff --git a/packages/core/security/core-security-common/kibana.jsonc b/packages/core/security/core-security-common/kibana.jsonc new file mode 100644 index 0000000000000..a72829d079241 --- /dev/null +++ b/packages/core/security/core-security-common/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-common", + "owner": ["@elastic/kibana-core", "@elastic/kibana-security"] +} diff --git a/packages/core/security/core-security-common/package.json b/packages/core/security/core-security-common/package.json new file mode 100644 index 0000000000000..7611a804d2f0c --- /dev/null +++ b/packages/core/security/core-security-common/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-common", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts b/packages/core/security/core-security-common/src/authentication/authenticated_user.ts similarity index 88% rename from x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts rename to packages/core/security/core-security-common/src/authentication/authenticated_user.ts index ef58d67982977..9e205fa9ab485 100644 --- a/x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts +++ b/packages/core/security/core-security-common/src/authentication/authenticated_user.ts @@ -1,8 +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. + * 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 { AuthenticationProvider } from './authentication_provider'; diff --git a/x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts b/packages/core/security/core-security-common/src/authentication/authentication_provider.ts similarity index 70% rename from x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts rename to packages/core/security/core-security-common/src/authentication/authentication_provider.ts index 92ec64d83db28..542174b805ca9 100644 --- a/x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts +++ b/packages/core/security/core-security-common/src/authentication/authentication_provider.ts @@ -1,8 +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. + * 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. */ /** diff --git a/packages/core/security/core-security-common/src/authentication/index.ts b/packages/core/security/core-security-common/src/authentication/index.ts new file mode 100644 index 0000000000000..90dcf26813631 --- /dev/null +++ b/packages/core/security/core-security-common/src/authentication/index.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 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 type { AuthenticatedUser, UserRealm } from './authenticated_user'; +export type { User } from './user'; +export type { AuthenticationProvider } from './authentication_provider'; diff --git a/x-pack/packages/security/plugin_types_common/src/authentication/user.ts b/packages/core/security/core-security-common/src/authentication/user.ts similarity index 70% rename from x-pack/packages/security/plugin_types_common/src/authentication/user.ts rename to packages/core/security/core-security-common/src/authentication/user.ts index 17cd7cd100cab..b32bfe72c89b8 100644 --- a/x-pack/packages/security/plugin_types_common/src/authentication/user.ts +++ b/packages/core/security/core-security-common/src/authentication/user.ts @@ -1,8 +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. + * 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. */ /** diff --git a/packages/core/security/core-security-common/tsconfig.json b/packages/core/security/core-security-common/tsconfig.json new file mode 100644 index 0000000000000..b05325b824a67 --- /dev/null +++ b/packages/core/security/core-security-common/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [] +} diff --git a/packages/core/security/core-security-server-internal/README.md b/packages/core/security/core-security-server-internal/README.md new file mode 100644 index 0000000000000..5302357162657 --- /dev/null +++ b/packages/core/security/core-security-server-internal/README.md @@ -0,0 +1,4 @@ +# @kbn/core-security-server-internal + +This package contains the internal types and implementation for Core's server-side `security` service. + diff --git a/packages/core/security/core-security-server-internal/index.ts b/packages/core/security/core-security-server-internal/index.ts new file mode 100644 index 0000000000000..348cb943c7038 --- /dev/null +++ b/packages/core/security/core-security-server-internal/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 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 { SecurityService } from './src/security_service'; +export { CoreSecurityRouteHandlerContext } from './src/security_route_handler_context'; +export type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from './src/internal_contracts'; diff --git a/packages/core/security/core-security-server-internal/jest.config.js b/packages/core/security/core-security-server-internal/jest.config.js new file mode 100644 index 0000000000000..1629dc0b7acbb --- /dev/null +++ b/packages/core/security/core-security-server-internal/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-server-internal'], +}; diff --git a/packages/core/security/core-security-server-internal/kibana.jsonc b/packages/core/security/core-security-server-internal/kibana.jsonc new file mode 100644 index 0000000000000..649d849be4844 --- /dev/null +++ b/packages/core/security/core-security-server-internal/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-server-internal", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-server-internal/package.json b/packages/core/security/core-security-server-internal/package.json new file mode 100644 index 0000000000000..ead8cdc996f3d --- /dev/null +++ b/packages/core/security/core-security-server-internal/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-server-internal", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-server-internal/src/internal_contracts.ts b/packages/core/security/core-security-server-internal/src/internal_contracts.ts new file mode 100644 index 0000000000000..59c2be20233c3 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/internal_contracts.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 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 { SecurityServiceSetup, SecurityServiceStart } from '@kbn/core-security-server'; + +export type InternalSecurityServiceSetup = SecurityServiceSetup; +export type InternalSecurityServiceStart = SecurityServiceStart; diff --git a/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts b/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts new file mode 100644 index 0000000000000..451b0b2aa1114 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts @@ -0,0 +1,32 @@ +/* + * 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 { KibanaRequest } from '@kbn/core-http-server'; +import type { + SecurityRequestHandlerContext, + AuthcRequestHandlerContext, +} from '@kbn/core-security-server'; +import type { InternalSecurityServiceStart } from './internal_contracts'; + +export class CoreSecurityRouteHandlerContext implements SecurityRequestHandlerContext { + #authc?: AuthcRequestHandlerContext; + + constructor( + private readonly securityStart: InternalSecurityServiceStart, + private readonly request: KibanaRequest + ) {} + + public get authc() { + if (this.#authc == null) { + this.#authc = { + getCurrentUser: () => this.securityStart.authc.getCurrentUser(this.request), + }; + } + return this.#authc; + } +} diff --git a/packages/core/security/core-security-server-internal/src/security_service.test.mocks.ts b/packages/core/security/core-security-server-internal/src/security_service.test.mocks.ts new file mode 100644 index 0000000000000..1693fe1213fd9 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/security_service.test.mocks.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 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 const getDefaultSecurityImplementationMock = jest.fn(); +export const convertSecurityApiMock = jest.fn(); + +jest.doMock('./utils', () => { + const actual = jest.requireActual('./utils'); + return { + ...actual, + getDefaultSecurityImplementation: getDefaultSecurityImplementationMock, + convertSecurityApi: convertSecurityApiMock, + }; +}); diff --git a/packages/core/security/core-security-server-internal/src/security_service.test.ts b/packages/core/security/core-security-server-internal/src/security_service.test.ts new file mode 100644 index 0000000000000..4448f4840136b --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/security_service.test.ts @@ -0,0 +1,97 @@ +/* + * 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 { + convertSecurityApiMock, + getDefaultSecurityImplementationMock, +} from './security_service.test.mocks'; + +import { loggerMock, MockedLogger } from '@kbn/logging-mocks'; +import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import type { CoreSecurityContract } from '@kbn/core-security-server'; +import { SecurityService } from './security_service'; + +const createStubInternalContract = (): CoreSecurityContract => { + return Symbol('stubContract') as unknown as CoreSecurityContract; +}; + +describe('SecurityService', () => { + let coreContext: ReturnType; + let service: SecurityService; + + beforeEach(() => { + coreContext = mockCoreContext.create(); + service = new SecurityService(coreContext); + + convertSecurityApiMock.mockReset(); + getDefaultSecurityImplementationMock.mockReset(); + }); + + describe('#setup', () => { + describe('#registerSecurityApi', () => { + it('throws if called more than once', () => { + const { registerSecurityApi } = service.setup(); + + const contract = createStubInternalContract(); + registerSecurityApi(contract); + + expect(() => registerSecurityApi(contract)).toThrowErrorMatchingInlineSnapshot( + `"security API can only be registered once"` + ); + }); + }); + }); + + describe('#start', () => { + it('logs a warning if the security API was not registered', () => { + service.setup(); + service.start(); + + expect(loggerMock.collect(coreContext.logger as MockedLogger).warn).toMatchInlineSnapshot(` + Array [ + Array [ + "Security API was not registered, using default implementation", + ], + ] + `); + }); + + it('calls convertSecurityApi with the registered API', () => { + const { registerSecurityApi } = service.setup(); + + const contract = createStubInternalContract(); + registerSecurityApi(contract); + + service.start(); + + expect(convertSecurityApiMock).toHaveBeenCalledTimes(1); + expect(convertSecurityApiMock).toHaveBeenCalledWith(contract); + }); + + it('calls convertSecurityApi with the default implementation when no API was registered', () => { + const contract = createStubInternalContract(); + getDefaultSecurityImplementationMock.mockReturnValue(contract); + + service.setup(); + service.start(); + + expect(convertSecurityApiMock).toHaveBeenCalledTimes(1); + expect(convertSecurityApiMock).toHaveBeenCalledWith(contract); + }); + + it('returns the result of convertSecurityApi as contract', () => { + const convertedContract = { stub: true }; + convertSecurityApiMock.mockReturnValue(convertedContract); + + service.setup(); + const startContract = service.start(); + + expect(startContract).toEqual(convertedContract); + }); + }); +}); diff --git a/packages/core/security/core-security-server-internal/src/security_service.ts b/packages/core/security/core-security-server-internal/src/security_service.ts new file mode 100644 index 0000000000000..eb9830b6b98e1 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/security_service.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 type { Logger } from '@kbn/logging'; +import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; +import type { CoreSecurityContract } from '@kbn/core-security-server'; +import type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from './internal_contracts'; +import { getDefaultSecurityImplementation, convertSecurityApi } from './utils'; + +export class SecurityService + implements CoreService +{ + private readonly log: Logger; + private securityApi?: CoreSecurityContract; + + constructor(coreContext: CoreContext) { + this.log = coreContext.logger.get('security-service'); + } + + public setup(): InternalSecurityServiceSetup { + return { + registerSecurityApi: (api) => { + if (this.securityApi) { + throw new Error('security API can only be registered once'); + } + this.securityApi = api; + }, + }; + } + + public start(): InternalSecurityServiceStart { + if (!this.securityApi) { + this.log.warn('Security API was not registered, using default implementation'); + } + const apiContract = this.securityApi ?? getDefaultSecurityImplementation(); + return convertSecurityApi(apiContract); + } + + public stop() {} +} diff --git a/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts new file mode 100644 index 0000000000000..19ec68cc5cba6 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.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 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 { CoreSecurityContract } from '@kbn/core-security-server'; +import { convertSecurityApi } from './convert_security_api'; + +describe('convertSecurityApi', () => { + it('returns the API from the source', () => { + const source: CoreSecurityContract = { authc: { getCurrentUser: jest.fn() } }; + const output = convertSecurityApi(source); + expect(output.authc.getCurrentUser).toBe(source.authc.getCurrentUser); + }); +}); diff --git a/packages/core/security/core-security-server-internal/src/utils/convert_security_api.ts b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.ts new file mode 100644 index 0000000000000..2d8e985d4b523 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.ts @@ -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 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 { CoreSecurityContract } from '@kbn/core-security-server'; +import type { InternalSecurityServiceStart } from '../internal_contracts'; + +export const convertSecurityApi = ( + privateApi: CoreSecurityContract +): InternalSecurityServiceStart => { + // shapes are the same for now given we only have one API exposed. + return privateApi; +}; diff --git a/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts b/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts new file mode 100644 index 0000000000000..06a48ef34ab9d --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts @@ -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 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 { CoreSecurityContract } from '@kbn/core-security-server'; +import { getDefaultSecurityImplementation } from './default_implementation'; + +describe('getDefaultSecurityImplementation', () => { + let implementation: CoreSecurityContract; + + beforeEach(() => { + implementation = getDefaultSecurityImplementation(); + }); + + describe('authc.getCurrentUser', () => { + it('returns null', async () => { + const user = implementation.authc.getCurrentUser({} as any); + expect(user).toBeNull(); + }); + }); +}); diff --git a/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts b/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts new file mode 100644 index 0000000000000..ebf19119989c1 --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts @@ -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 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 { CoreSecurityContract } from '@kbn/core-security-server'; + +export const getDefaultSecurityImplementation = (): CoreSecurityContract => { + return { + authc: { + getCurrentUser: () => null, + }, + }; +}; diff --git a/packages/core/security/core-security-server-internal/src/utils/index.ts b/packages/core/security/core-security-server-internal/src/utils/index.ts new file mode 100644 index 0000000000000..e43884f204ece --- /dev/null +++ b/packages/core/security/core-security-server-internal/src/utils/index.ts @@ -0,0 +1,10 @@ +/* + * 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 { convertSecurityApi } from './convert_security_api'; +export { getDefaultSecurityImplementation } from './default_implementation'; diff --git a/packages/core/security/core-security-server-internal/tsconfig.json b/packages/core/security/core-security-server-internal/tsconfig.json new file mode 100644 index 0000000000000..ad66b66deeeeb --- /dev/null +++ b/packages/core/security/core-security-server-internal/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-server", + "@kbn/logging", + "@kbn/core-base-server-internal", + "@kbn/core-http-server", + "@kbn/logging-mocks", + "@kbn/core-base-server-mocks", + ] +} diff --git a/packages/core/security/core-security-server-mocks/README.md b/packages/core/security/core-security-server-mocks/README.md new file mode 100644 index 0000000000000..6810ac3659465 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-security-server-mocks + +This package contains mocks types for Core's server-side `security` service. diff --git a/packages/core/security/core-security-server-mocks/index.ts b/packages/core/security/core-security-server-mocks/index.ts new file mode 100644 index 0000000000000..0e6eafac658e8 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/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 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 { securityServiceMock } from './src/security_service.mock'; diff --git a/packages/core/security/core-security-server-mocks/jest.config.js b/packages/core/security/core-security-server-mocks/jest.config.js new file mode 100644 index 0000000000000..888d40d6fa36d --- /dev/null +++ b/packages/core/security/core-security-server-mocks/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-server-mocks'], +}; diff --git a/packages/core/security/core-security-server-mocks/kibana.jsonc b/packages/core/security/core-security-server-mocks/kibana.jsonc new file mode 100644 index 0000000000000..6c9214ecb3281 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-server-mocks", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-server-mocks/package.json b/packages/core/security/core-security-server-mocks/package.json new file mode 100644 index 0000000000000..3bdaab96b7371 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-server-mocks", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-server-mocks/src/security_service.mock.ts b/packages/core/security/core-security-server-mocks/src/security_service.mock.ts new file mode 100644 index 0000000000000..54dd9718471c3 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/src/security_service.mock.ts @@ -0,0 +1,81 @@ +/* + * 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 { + SecurityServiceSetup, + SecurityServiceStart, + SecurityRequestHandlerContext, +} from '@kbn/core-security-server'; +import type { + InternalSecurityServiceSetup, + InternalSecurityServiceStart, +} from '@kbn/core-security-server-internal'; + +const createSetupMock = () => { + const mock: jest.Mocked = { + registerSecurityApi: jest.fn(), + }; + + return mock; +}; + +const createStartMock = () => { + const mock: jest.MockedObjectDeep = { + authc: { + getCurrentUser: jest.fn(), + }, + }; + + return mock; +}; + +const createInternalSetupMock = () => { + const mock: jest.Mocked = { + registerSecurityApi: jest.fn(), + }; + + return mock; +}; + +const createInternalStartMock = () => { + const mock: jest.MockedObjectDeep = { + authc: { + getCurrentUser: jest.fn(), + }, + }; + + return mock; +}; + +const createServiceMock = () => { + const mock = { + setup: jest.fn().mockReturnValue(createSetupMock()), + start: jest.fn().mockReturnValue(createStartMock()), + stop: jest.fn(), + }; + + return mock; +}; + +const createRequestHandlerContextMock = () => { + const mock: jest.MockedObjectDeep = { + authc: { + getCurrentUser: jest.fn(), + }, + }; + return mock; +}; + +export const securityServiceMock = { + create: createServiceMock, + createSetup: createSetupMock, + createStart: createStartMock, + createInternalSetup: createInternalSetupMock, + createInternalStart: createInternalStartMock, + createRequestHandlerContext: createRequestHandlerContextMock, +}; diff --git a/packages/core/security/core-security-server-mocks/tsconfig.json b/packages/core/security/core-security-server-mocks/tsconfig.json new file mode 100644 index 0000000000000..ca806dd4d5029 --- /dev/null +++ b/packages/core/security/core-security-server-mocks/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-server", + "@kbn/core-security-server-internal", + ] +} diff --git a/packages/core/security/core-security-server/README.md b/packages/core/security/core-security-server/README.md new file mode 100644 index 0000000000000..367c4040e0cac --- /dev/null +++ b/packages/core/security/core-security-server/README.md @@ -0,0 +1,3 @@ +# @kbn/core-security-server + +This package contains the public types for Core's server-side `security` service. diff --git a/packages/core/security/core-security-server/index.ts b/packages/core/security/core-security-server/index.ts new file mode 100644 index 0000000000000..e9507cfee04f4 --- /dev/null +++ b/packages/core/security/core-security-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 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 type { SecurityServiceSetup, SecurityServiceStart } from './src/contracts'; +export type { CoreAuthenticationService } from './src/authc'; +export type { CoreSecurityContract, AuthenticationServiceContract } from './src/api_provider'; +export type { + SecurityRequestHandlerContext, + AuthcRequestHandlerContext, +} from './src/request_handler_context'; diff --git a/packages/core/security/core-security-server/jest.config.js b/packages/core/security/core-security-server/jest.config.js new file mode 100644 index 0000000000000..1a5aff9deaf91 --- /dev/null +++ b/packages/core/security/core-security-server/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/security/core-security-server'], +}; diff --git a/packages/core/security/core-security-server/kibana.jsonc b/packages/core/security/core-security-server/kibana.jsonc new file mode 100644 index 0000000000000..378945f80bb6f --- /dev/null +++ b/packages/core/security/core-security-server/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/core-security-server", + "owner": "@elastic/kibana-core" +} diff --git a/packages/core/security/core-security-server/package.json b/packages/core/security/core-security-server/package.json new file mode 100644 index 0000000000000..60c7d2d456019 --- /dev/null +++ b/packages/core/security/core-security-server/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/core-security-server", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/security/core-security-server/src/api_provider.ts b/packages/core/security/core-security-server/src/api_provider.ts new file mode 100644 index 0000000000000..846c9295e1c6d --- /dev/null +++ b/packages/core/security/core-security-server/src/api_provider.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 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 { CoreAuthenticationService } from './authc'; + +/** + * The contract exposed by the security provider for Core to + * consume and re-expose via its security service. + * + * @public + */ +export interface CoreSecurityContract { + authc: AuthenticationServiceContract; +} + +/** + * @public + */ +export type AuthenticationServiceContract = CoreAuthenticationService; diff --git a/packages/core/security/core-security-server/src/authc.ts b/packages/core/security/core-security-server/src/authc.ts new file mode 100644 index 0000000000000..97654104858ea --- /dev/null +++ b/packages/core/security/core-security-server/src/authc.ts @@ -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 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 { KibanaRequest } from '@kbn/core-http-server'; +import type { AuthenticatedUser } from '@kbn/core-security-common'; + +/** + * Core's authentication service + * + * @public + */ +export interface CoreAuthenticationService { + /** + * Retrieve the user bound to the provided request, or null if + * no user is authenticated. + * + * @param request The request to retrieve the authenticated user for. + */ + getCurrentUser(request: KibanaRequest): AuthenticatedUser | null; +} diff --git a/packages/core/security/core-security-server/src/contracts.ts b/packages/core/security/core-security-server/src/contracts.ts new file mode 100644 index 0000000000000..b5dfa1b45ec72 --- /dev/null +++ b/packages/core/security/core-security-server/src/contracts.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 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 { CoreAuthenticationService } from './authc'; +import type { CoreSecurityContract } from './api_provider'; + +/** + * Setup contract for Core's security service. + * + * @public + */ +export interface SecurityServiceSetup { + /** + * Register the security implementation that then will be used and re-exposed by Core. + * + * @remark this should **exclusively** be used by the security plugin. + */ + registerSecurityApi(api: CoreSecurityContract): void; +} + +/** + * Start contract for Core's security service. + * + * @public + */ +export interface SecurityServiceStart { + /** + * The {@link CoreAuthenticationService | authentication service} + */ + authc: CoreAuthenticationService; +} diff --git a/packages/core/security/core-security-server/src/request_handler_context.ts b/packages/core/security/core-security-server/src/request_handler_context.ts new file mode 100644 index 0000000000000..6433ea9a919e1 --- /dev/null +++ b/packages/core/security/core-security-server/src/request_handler_context.ts @@ -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 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 { AuthenticatedUser } from '@kbn/core-security-common'; + +export interface SecurityRequestHandlerContext { + authc: AuthcRequestHandlerContext; +} + +export interface AuthcRequestHandlerContext { + getCurrentUser(): AuthenticatedUser | null; +} diff --git a/packages/core/security/core-security-server/tsconfig.json b/packages/core/security/core-security-server/tsconfig.json new file mode 100644 index 0000000000000..7b6c07b4a6eba --- /dev/null +++ b/packages/core/security/core-security-server/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-security-common", + "@kbn/core-http-server", + ] +} diff --git a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap index 269499f65547a..76a56fb33c5e4 100644 --- a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap +++ b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap @@ -57,56 +57,61 @@ exports[`SampleDataCard installed renders with app links 1`] = ` class="emotion-euiCard__footer" >
- -
-
+
+
+ +
+
@@ -171,47 +176,52 @@ exports[`SampleDataCard installed renders without app links 1`] = ` class="emotion-euiCard__footer" >
- -
-
-
+
- - View data + + View data + - - + +
@@ -265,27 +275,32 @@ exports[`SampleDataCard not installed renders 1`] = ` class="emotion-euiCard__footer" >
- + +
diff --git a/packages/home/sample_data_card/src/footer/index.tsx b/packages/home/sample_data_card/src/footer/index.tsx index 3ef415d07c507..eaf00c8198b7e 100644 --- a/packages/home/sample_data_card/src/footer/index.tsx +++ b/packages/home/sample_data_card/src/footer/index.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React from 'react'; +import React, { useCallback } from 'react'; import { SampleDataSet, InstalledStatus } from '@kbn/home-sample-data-types'; import { INSTALLED_STATUS, UNINSTALLED_STATUS } from '../constants'; @@ -28,13 +28,27 @@ export interface Props { * Displays the appropriate Footer component based on the status of the Sample Data Set. */ export const Footer = ({ sampleDataSet, onAction }: Props) => { - if (sampleDataSet.status === INSTALLED_STATUS) { - return onAction(id, UNINSTALLED_STATUS)} {...sampleDataSet} />; - } + const renderContent = useCallback(() => { + if (sampleDataSet.status === INSTALLED_STATUS) { + return ( + onAction(id, UNINSTALLED_STATUS)} {...sampleDataSet} /> + ); + } - if (sampleDataSet.status === UNINSTALLED_STATUS) { - return onAction(id, INSTALLED_STATUS)} {...sampleDataSet} />; - } + if (sampleDataSet.status === UNINSTALLED_STATUS) { + return ( + onAction(id, INSTALLED_STATUS)} {...sampleDataSet} /> + ); + } - return ; + return ; + }, [onAction, sampleDataSet]); + + return ( + // the data-status attribute is added to solve issues with failing test, + // see https://github.com/elastic/kibana/issues/112103 +
+ {renderContent()} +
+ ); }; diff --git a/packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts b/packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts index 07ada8b7c06b5..48320fd29e474 100644 --- a/packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts +++ b/packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts @@ -14,6 +14,7 @@ import { ALERT_FLAPPING, ALERT_FLAPPING_HISTORY, ALERT_MAINTENANCE_WINDOW_IDS, + ALERT_CONSECUTIVE_MATCHES, ALERT_INSTANCE_ID, ALERT_LAST_DETECTED, ALERT_REASON, @@ -80,6 +81,11 @@ export const alertFieldMap = { array: true, required: false, }, + [ALERT_CONSECUTIVE_MATCHES]: { + type: 'long', + array: false, + required: false, + }, [ALERT_INSTANCE_ID]: { type: 'keyword', array: false, diff --git a/packages/kbn-alerts-as-data-utils/src/schemas/generated/alert_schema.ts b/packages/kbn-alerts-as-data-utils/src/schemas/generated/alert_schema.ts index b183ca5c792f8..7d1f9304eaa34 100644 --- a/packages/kbn-alerts-as-data-utils/src/schemas/generated/alert_schema.ts +++ b/packages/kbn-alerts-as-data-utils/src/schemas/generated/alert_schema.ts @@ -86,6 +86,7 @@ const AlertOptional = rt.partial({ 'event.kind': schemaString, 'kibana.alert.action_group': schemaString, 'kibana.alert.case_ids': schemaStringArray, + 'kibana.alert.consecutive_matches': schemaStringOrNumber, 'kibana.alert.duration.us': schemaStringOrNumber, 'kibana.alert.end': schemaDate, 'kibana.alert.flapping': schemaBoolean, diff --git a/packages/kbn-alerts-as-data-utils/src/schemas/generated/security_schema.ts b/packages/kbn-alerts-as-data-utils/src/schemas/generated/security_schema.ts index bc8150356e039..c57f9862f4327 100644 --- a/packages/kbn-alerts-as-data-utils/src/schemas/generated/security_schema.ts +++ b/packages/kbn-alerts-as-data-utils/src/schemas/generated/security_schema.ts @@ -127,6 +127,7 @@ const SecurityAlertOptional = rt.partial({ 'kibana.alert.ancestors.rule': schemaString, 'kibana.alert.building_block_type': schemaString, 'kibana.alert.case_ids': schemaStringArray, + 'kibana.alert.consecutive_matches': schemaStringOrNumber, 'kibana.alert.duration.us': schemaStringOrNumber, 'kibana.alert.end': schemaDate, 'kibana.alert.flapping': schemaBoolean, diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index fa70473b0b0a8..696649555ffd2 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -246,6 +246,7 @@ "controlGroupInput.controlStyle", "controlGroupInput.ignoreParentSettingsJSON", "controlGroupInput.panelsJSON", + "controlGroupInput.showApplySelections", "description", "hits", "kibanaSavedObjectMeta", diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 5bfe7f6f20de9..93894be3d1362 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -837,6 +837,11 @@ "panelsJSON": { "index": false, "type": "text" + }, + "showApplySelections": { + "doc_values": false, + "index": false, + "type": "boolean" } } }, diff --git a/packages/kbn-es-types/index.ts b/packages/kbn-es-types/index.ts index 92a0004aaf4bc..64c008978ff27 100644 --- a/packages/kbn-es-types/index.ts +++ b/packages/kbn-es-types/index.ts @@ -18,7 +18,6 @@ export type { AggregationResultOfMap, ESFilter, MaybeReadonlyArray, - ClusterDetails, ESQLColumn, ESQLRow, ESQLSearchReponse, diff --git a/packages/kbn-es-types/src/index.ts b/packages/kbn-es-types/src/index.ts index 3e56bf17603b6..c30bf98233744 100644 --- a/packages/kbn-es-types/src/index.ts +++ b/packages/kbn-es-types/src/index.ts @@ -11,7 +11,6 @@ import { AggregateOf as AggregationResultOf, AggregateOfMap as AggregationResultOfMap, SearchHit, - ClusterDetails, ESQLColumn, ESQLRow, ESQLSearchReponse, @@ -44,7 +43,6 @@ export type { AggregationResultOf, AggregationResultOfMap, SearchHit, - ClusterDetails, ESQLColumn, ESQLRow, ESQLSearchReponse, diff --git a/packages/kbn-es-types/src/search.ts b/packages/kbn-es-types/src/search.ts index df8d24e697468..6b76defd30aaa 100644 --- a/packages/kbn-es-types/src/search.ts +++ b/packages/kbn-es-types/src/search.ts @@ -646,15 +646,6 @@ export type InferSearchResponseOf< }; }; -export interface ClusterDetails { - status: 'running' | 'successful' | 'partial' | 'skipped' | 'failed'; - indices: string; - took?: number; - timed_out: boolean; - _shards?: estypes.ShardStatistics; - failures?: estypes.ShardFailure[]; -} - export interface ESQLColumn { name: string; type: string; diff --git a/packages/kbn-es/src/cli_commands/serverless.ts b/packages/kbn-es/src/cli_commands/serverless.ts index dabd6906cebbf..f74eeb033e9a9 100644 --- a/packages/kbn-es/src/cli_commands/serverless.ts +++ b/packages/kbn-es/src/cli_commands/serverless.ts @@ -92,7 +92,7 @@ export const serverless: Command = { string: ['projectType', 'tag', 'image', 'basePath', 'resources', 'host', 'kibanaUrl'], boolean: ['clean', 'ssl', 'kill', 'background', 'skipTeardown', 'waitForReady'], - default: defaults, + default: { ...defaults, kibanaUrl: 'https://localhost:5601/' }, }) as unknown as ServerlessOptions; if (!options.projectType) { diff --git a/packages/kbn-journeys/journey/journey.ts b/packages/kbn-journeys/journey/journey.ts index bf3de796265f9..f43bb45959945 100644 --- a/packages/kbn-journeys/journey/journey.ts +++ b/packages/kbn-journeys/journey/journey.ts @@ -88,7 +88,7 @@ export class Journey { /** * Create a Journey which should be exported from a file in the - * x-pack/performance/journeys directory. + * x-pack/performance/journeys_e2e directory. */ constructor(opts?: JourneyConfigOptions) { const path = callsites().at(1)?.getFileName(); diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index d943aa0f7e5a5..05b613ab4b222 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -90,7 +90,7 @@ pageLoadAssetSize: licensing: 29004 links: 44490 lists: 22900 - logsExplorer: 55000 + logsExplorer: 60000 logsShared: 281060 logstash: 53548 management: 46112 diff --git a/packages/kbn-profiling-utils/common/profiling.test.ts b/packages/kbn-profiling-utils/common/profiling.test.ts index af89594a5a683..42124df4f683f 100644 --- a/packages/kbn-profiling-utils/common/profiling.test.ts +++ b/packages/kbn-profiling-utils/common/profiling.test.ts @@ -11,10 +11,12 @@ import { FrameSymbolStatus, FrameType, getCalleeFunction, + getCalleeLabel, getCalleeSource, getFrameSymbolStatus, getLanguageType, normalizeFrameType, + StackFrameMetadata, } from './profiling'; describe('Stack frame metadata operations', () => { @@ -136,3 +138,107 @@ describe('getLanguageType', () => { }) ); }); + +describe('getCalleeLabel', () => { + it('returns error message for FrameType.Error', () => { + const metadata: StackFrameMetadata = { + FrameID: '1', + FileID: 'file1', + FrameType: FrameType.Error, + Inline: false, + AddressOrLine: 404, + FunctionName: '', + FunctionOffset: 0, + SourceFilename: '', + SourceLine: 0, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('Error: unwinding error code #404'); + }); + + it('returns label with inline indicator if Inline is true', () => { + const metadata: StackFrameMetadata = { + FrameID: '2', + FileID: 'file2', + FrameType: FrameType.Native, + Inline: true, + AddressOrLine: 123, + FunctionName: 'someFunction', + FunctionOffset: 0, + SourceFilename: 'path/to/file.ts', + SourceLine: 5, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('-> app.exe: someFunction() in file.ts#5'); + }); + + it('returns label without function name if FunctionName is empty', () => { + const metadata: StackFrameMetadata = { + FrameID: '3', + FileID: 'file3', + FrameType: FrameType.Native, + Inline: false, + AddressOrLine: 456, + FunctionName: '', + FunctionOffset: 0, + SourceFilename: 'path/to/file.ts', + SourceLine: 0, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('app.exe'); + }); + + it('returns label without line number if SourceLine is 0', () => { + const metadata: StackFrameMetadata = { + FrameID: '4', + FileID: 'file4', + FrameType: FrameType.Native, + Inline: false, + AddressOrLine: 789, + FunctionName: 'someFunction', + FunctionOffset: 0, + SourceFilename: 'path/to/file.ts', + SourceLine: 0, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('app.exe: someFunction() in file.ts'); + }); + + it('returns label with function name and line number', () => { + const metadata: StackFrameMetadata = { + FrameID: '5', + FileID: 'file5', + FrameType: FrameType.Native, + Inline: false, + AddressOrLine: 101112, + FunctionName: 'someFunction', + FunctionOffset: 0, + SourceFilename: 'path/to/file.ts', + SourceLine: 10, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('app.exe: someFunction() in file.ts#10'); + }); + + it('returns label without function name', () => { + const metadata: StackFrameMetadata = { + FrameID: '5', + FileID: 'file5', + FrameType: FrameType.Native, + Inline: false, + AddressOrLine: 101112, + FunctionName: 'someFunction', + FunctionOffset: 0, + SourceFilename: '', + SourceLine: 10, + ExeFileName: 'app.exe', + }; + + expect(getCalleeLabel(metadata)).toEqual('app.exe: someFunction()'); + }); +}); diff --git a/packages/kbn-profiling-utils/common/profiling.ts b/packages/kbn-profiling-utils/common/profiling.ts index 9c6f643cb5f87..c8b2be802d8a6 100644 --- a/packages/kbn-profiling-utils/common/profiling.ts +++ b/packages/kbn-profiling-utils/common/profiling.ts @@ -220,9 +220,9 @@ function checkIfStringHasParentheses(s: string) { } function getFunctionName(metadata: StackFrameMetadata) { - return metadata.FunctionName !== '' && !checkIfStringHasParentheses(metadata.FunctionName) - ? `${metadata.FunctionName}()` - : metadata.FunctionName; + return checkIfStringHasParentheses(metadata.FunctionName) + ? metadata.FunctionName + : `${metadata.FunctionName}()`; } function getExeFileName(metadata: StackFrameMetadata) { @@ -241,17 +241,32 @@ function getExeFileName(metadata: StackFrameMetadata) { * @returns string */ export function getCalleeLabel(metadata: StackFrameMetadata) { - const inlineLabel = metadata.Inline ? '-> ' : ''; if (metadata.FrameType === FrameType.Error) { return `Error: unwinding error code #${metadata.AddressOrLine.toString()}`; - } else if (metadata.FunctionName !== '') { - const sourceFilename = metadata.SourceFilename; - const sourceURL = sourceFilename ? sourceFilename.split('/').pop() : ''; + } + + const inlineLabel = metadata.Inline ? '-> ' : ''; + + if (metadata.FunctionName === '') { + return `${inlineLabel}${getExeFileName(metadata)}`; + } + + const sourceFilename = metadata.SourceFilename; + const sourceURL = sourceFilename ? sourceFilename.split('/').pop() : ''; + + if (!sourceURL) { + return `${inlineLabel}${getExeFileName(metadata)}: ${getFunctionName(metadata)}`; + } + + if (metadata.SourceLine === 0) { return `${inlineLabel}${getExeFileName(metadata)}: ${getFunctionName( metadata - )} in ${sourceURL}#${metadata.SourceLine}`; + )} in ${sourceURL}`; } - return `${inlineLabel}${getExeFileName(metadata)}`; + + return `${inlineLabel}${getExeFileName(metadata)}: ${getFunctionName(metadata)} in ${sourceURL}#${ + metadata.SourceLine + }`; } /** * Get callee function name diff --git a/packages/kbn-repo-source-classifier/src/config.ts b/packages/kbn-repo-source-classifier/src/config.ts index 283ca70b20c6d..67eb9e97ca390 100644 --- a/packages/kbn-repo-source-classifier/src/config.ts +++ b/packages/kbn-repo-source-classifier/src/config.ts @@ -53,6 +53,7 @@ export const TEST_DIR = new Set([ 'stub', 'e2e', 'ftr_e2e', + 'journeys_e2e', 'storybook', '.storybook', 'integration_tests', diff --git a/packages/kbn-rule-data-utils/src/default_alerts_as_data.ts b/packages/kbn-rule-data-utils/src/default_alerts_as_data.ts index 7c08271478131..dfd51bf737583 100644 --- a/packages/kbn-rule-data-utils/src/default_alerts_as_data.ts +++ b/packages/kbn-rule-data-utils/src/default_alerts_as_data.ts @@ -43,6 +43,9 @@ const ALERT_FLAPPING_HISTORY = `${ALERT_NAMESPACE}.flapping_history` as const; // kibana.alert.maintenance_window_ids - IDs of maintenance windows that are affecting this alert const ALERT_MAINTENANCE_WINDOW_IDS = `${ALERT_NAMESPACE}.maintenance_window_ids` as const; +// kibana.alert.consecutive_matches - count of consecutive times the alert has been active +const ALERT_CONSECUTIVE_MATCHES = `${ALERT_NAMESPACE}.consecutive_matches` as const; + // kibana.alert.instance.id - alert ID, also known as alert instance ID const ALERT_INSTANCE_ID = `${ALERT_NAMESPACE}.instance.id` as const; @@ -120,6 +123,7 @@ const fields = { ALERT_FLAPPING, ALERT_FLAPPING_HISTORY, ALERT_MAINTENANCE_WINDOW_IDS, + ALERT_CONSECUTIVE_MATCHES, ALERT_INSTANCE_ID, ALERT_LAST_DETECTED, ALERT_REASON, @@ -160,6 +164,7 @@ export { ALERT_FLAPPING, ALERT_FLAPPING_HISTORY, ALERT_MAINTENANCE_WINDOW_IDS, + ALERT_CONSECUTIVE_MATCHES, ALERT_INSTANCE_ID, ALERT_LAST_DETECTED, ALERT_REASON, diff --git a/packages/kbn-search-connectors/types/native_connectors.ts b/packages/kbn-search-connectors/types/native_connectors.ts index 04875986c063d..1c3322b689c1e 100644 --- a/packages/kbn-search-connectors/types/native_connectors.ts +++ b/packages/kbn-search-connectors/types/native_connectors.ts @@ -233,6 +233,9 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record { }, _clusters: { total: 2, - successful: 2, + partial: 1, + successful: 1, skipped: 0, details: { '(local)': { @@ -218,7 +219,8 @@ describe('extract search response warnings', () => { }, _clusters: { total: 2, - successful: 2, + partial: 1, + successful: 1, skipped: 0, details: { '(local)': { diff --git a/packages/kbn-search-response-warnings/src/extract_warnings.ts b/packages/kbn-search-response-warnings/src/extract_warnings.ts index f11b424694ec1..1e3d62aaeb989 100644 --- a/packages/kbn-search-response-warnings/src/extract_warnings.ts +++ b/packages/kbn-search-response-warnings/src/extract_warnings.ts @@ -7,7 +7,6 @@ */ import { estypes } from '@elastic/elasticsearch'; -import type { ClusterDetails } from '@kbn/es-types'; import type { Start as InspectorStartContract, RequestAdapter } from '@kbn/inspector-plugin/public'; import type { SearchResponseWarning } from './types'; @@ -24,24 +23,16 @@ export function extractWarnings( const warnings: SearchResponseWarning[] = []; const isPartial = rawResponse._clusters - ? Object.values( - ( - rawResponse._clusters as estypes.ClusterStatistics & { - details: Record; - } - ).details - ).some((clusterDetails) => clusterDetails.status !== 'successful') + ? rawResponse._clusters.partial > 0 || + rawResponse._clusters.skipped > 0 || + rawResponse._clusters.running > 0 : rawResponse.timed_out || rawResponse._shards.failed > 0; if (isPartial) { warnings.push({ type: 'incomplete', requestName, clusters: rawResponse._clusters - ? ( - rawResponse._clusters as estypes.ClusterStatistics & { - details: Record; - } - ).details + ? rawResponse._clusters.details ?? {} : { '(local)': { status: 'partial', diff --git a/packages/kbn-search-response-warnings/src/types.ts b/packages/kbn-search-response-warnings/src/types.ts index df55e012ff7ae..ed7c9e9d8906e 100644 --- a/packages/kbn-search-response-warnings/src/types.ts +++ b/packages/kbn-search-response-warnings/src/types.ts @@ -7,7 +7,6 @@ */ import { estypes } from '@elastic/elasticsearch'; -import type { ClusterDetails } from '@kbn/es-types'; /** * A warning object for a search response with incomplete ES results @@ -31,7 +30,7 @@ export interface SearchResponseIncompleteWarning { /** * clusters: cluster details. */ - clusters: Record; + clusters: Record; /** * openInInspector: callback to open warning in inspector */ diff --git a/packages/kbn-search-response-warnings/tsconfig.json b/packages/kbn-search-response-warnings/tsconfig.json index 963dff502604f..1a1072b08b02b 100644 --- a/packages/kbn-search-response-warnings/tsconfig.json +++ b/packages/kbn-search-response-warnings/tsconfig.json @@ -8,7 +8,6 @@ "@kbn/i18n", "@kbn/inspector-plugin", "@kbn/core", - "@kbn/es-types", "@kbn/react-kibana-mount", "@kbn/core-i18n-browser", "@kbn/core-notifications-browser-mocks", diff --git a/packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts b/packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts index 614eb55297980..e79e27604971b 100644 --- a/packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts +++ b/packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts @@ -18,30 +18,17 @@ export const readPrivileges = async ( body: { cluster: [ 'all', - 'create_snapshot', 'manage', 'manage_api_key', - 'manage_ccr', 'manage_transform', - 'manage_ilm', 'manage_index_templates', - 'manage_ingest_pipelines', 'manage_ml', 'manage_own_api_key', 'manage_pipeline', - 'manage_rollup', - 'manage_saml', 'manage_security', - 'manage_token', - 'manage_watcher', 'monitor', 'monitor_transform', 'monitor_ml', - 'monitor_rollup', - 'monitor_watcher', - 'read_ccr', - 'read_ilm', - 'transport_client', ], index: [ { @@ -56,12 +43,8 @@ export const readPrivileges = async ( 'index', 'manage', 'maintenance', - 'manage_follow_index', - 'manage_ilm', - 'manage_leader_index', 'monitor', 'read', - 'read_cross_cluster', 'view_index_metadata', 'write', ], diff --git a/packages/kbn-securitysolution-grouping/src/components/grouping.test.tsx b/packages/kbn-securitysolution-grouping/src/components/grouping.test.tsx index 0cf16ae4c8217..1a40a9d22b343 100644 --- a/packages/kbn-securitysolution-grouping/src/components/grouping.test.tsx +++ b/packages/kbn-securitysolution-grouping/src/components/grouping.test.tsx @@ -185,4 +185,31 @@ describe('grouping container', () => { true ); }); + + describe('groupsUnit', () => { + it('renders default groupsUnit text correctly', () => { + const { getByTestId } = render( + + + + ); + expect(getByTestId('group-count').textContent).toBe('3 groups'); + }); + it('calls custom groupsUnit callback correctly', () => { + // Provide a custom groupsUnit function in testProps + const customGroupsUnit = jest.fn( + (n, parentSelectedGroup, hasNullGroup) => `${n} custom units` + ); + const customProps = { ...testProps, groupsUnit: customGroupsUnit }; + + const { getByTestId } = render( + + + + ); + + expect(customGroupsUnit).toHaveBeenCalledWith(3, testProps.selectedGroup, true); + expect(getByTestId('group-count').textContent).toBe('3 custom units'); + }); + }); }); diff --git a/packages/kbn-securitysolution-grouping/src/components/grouping.tsx b/packages/kbn-securitysolution-grouping/src/components/grouping.tsx index 5ae1037d9edb3..2b7c0ea4a9dd0 100644 --- a/packages/kbn-securitysolution-grouping/src/components/grouping.tsx +++ b/packages/kbn-securitysolution-grouping/src/components/grouping.tsx @@ -52,6 +52,7 @@ export interface GroupingProps { count?: number | undefined ) => void; unit?: (n: number) => string; + groupsUnit?: (n: number, parentSelectedGroup: string, hasNullGroup: boolean) => string; } const GroupingComponent = ({ @@ -74,6 +75,7 @@ const GroupingComponent = ({ takeActionItems, tracker, unit = defaultUnit, + groupsUnit = GROUPS_UNIT, }: GroupingProps) => { const [trigger, setTrigger] = useState>( {} @@ -85,10 +87,14 @@ const GroupingComponent = ({ }, [unitCount, unit]); const groupCount = useMemo(() => data?.groupsCount?.value ?? 0, [data?.groupsCount?.value]); - const groupCountText = useMemo( - () => `${groupCount.toLocaleString()} ${GROUPS_UNIT(groupCount)}`, - [groupCount] - ); + const groupCountText = useMemo(() => { + const hasNullGroup = + data?.groupByFields?.buckets?.some( + (groupBucket: GroupingBucket) => groupBucket.isNullGroup + ) || false; + + return `${groupsUnit(groupCount, selectedGroup, hasNullGroup)}`; + }, [data?.groupByFields?.buckets, groupCount, groupsUnit, selectedGroup]); const groupPanels = useMemo( () => diff --git a/packages/kbn-securitysolution-grouping/src/components/translations.ts b/packages/kbn-securitysolution-grouping/src/components/translations.ts index de5337db904da..e319a18e0f25c 100644 --- a/packages/kbn-securitysolution-grouping/src/components/translations.ts +++ b/packages/kbn-securitysolution-grouping/src/components/translations.ts @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; export const GROUPS_UNIT = (totalCount: number) => i18n.translate('grouping.total.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {group} other {groups}}`, + values: { totalCount, groupCount: totalCount.toLocaleString() }, + defaultMessage: `{groupCount} {totalCount, plural, =1 {group} other {groups}}`, }); export const TAKE_ACTION = i18n.translate('grouping.additionalActions.takeAction', { diff --git a/packages/kbn-securitysolution-grouping/src/hooks/use_grouping.tsx b/packages/kbn-securitysolution-grouping/src/hooks/use_grouping.tsx index 38ada10a74b9b..af3ae458de285 100644 --- a/packages/kbn-securitysolution-grouping/src/hooks/use_grouping.tsx +++ b/packages/kbn-securitysolution-grouping/src/hooks/use_grouping.tsx @@ -31,7 +31,7 @@ export interface UseGrouping { */ type StaticGroupingProps = Pick< GroupingProps, - 'groupPanelRenderer' | 'groupStatsRenderer' | 'onGroupToggle' | 'unit' + 'groupPanelRenderer' | 'groupStatsRenderer' | 'onGroupToggle' | 'unit' | 'groupsUnit' >; /** Type for dynamic grouping component props where T is the consumer `GroupingAggregation` diff --git a/packages/kbn-test/src/jest/setup/setup_test.js b/packages/kbn-test/src/jest/setup/setup_test.js index ee386f894a71e..5179c350b2f8e 100644 --- a/packages/kbn-test/src/jest/setup/setup_test.js +++ b/packages/kbn-test/src/jest/setup/setup_test.js @@ -13,7 +13,10 @@ import 'jest-styled-components'; import '@testing-library/jest-dom'; -import 'web-streams-polyfill/es6'; // ReadableStream polyfill + +// uses subpath exports +// eslint-disable-next-line @kbn/imports/no_unresolvable_imports +import 'web-streams-polyfill/polyfill'; // ReadableStream polyfill /** * Removed in Jest 27/jsdom, used in some transitive dependencies diff --git a/packages/kbn-unified-data-table/src/components/source_document.tsx b/packages/kbn-unified-data-table/src/components/source_document.tsx index 15924fc02521e..3726159a6b2ea 100644 --- a/packages/kbn-unified-data-table/src/components/source_document.tsx +++ b/packages/kbn-unified-data-table/src/components/source_document.tsx @@ -66,7 +66,7 @@ export function SourceDocument({ {pairs.map(([fieldDisplayName, value, fieldName]) => { // temporary solution for text based mode. As there are a lot of unsupported fields we want to // hide the empty one from the Document view - if (isPlainRecord && fieldName && !row.flattened[fieldName]) return null; + if (isPlainRecord && fieldName && (row.flattened[fieldName] ?? null) === null) return null; return ( diff --git a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx index 9e211bee1cad7..4b00a85a29f39 100644 --- a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx +++ b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx @@ -166,7 +166,7 @@ describe('Unified data table cell rendering', function () { /> ); expect(component.html()).toMatchInlineSnapshot( - `"
100
"` + `"
100
"` ); }); @@ -193,7 +193,7 @@ describe('Unified data table cell rendering', function () { /> ); expect(component.html()).toMatchInlineSnapshot( - `"
100
"` + `"
100
"` ); findTestSubject(component, 'docTableClosePopover').simulate('click'); expect(closePopoverMockFn).toHaveBeenCalledTimes(1); diff --git a/packages/presentation/presentation_containers/index.ts b/packages/presentation/presentation_containers/index.ts index 47c8d8783a663..7d5c9c435c98f 100644 --- a/packages/presentation/presentation_containers/index.ts +++ b/packages/presentation/presentation_containers/index.ts @@ -20,7 +20,11 @@ export { type PresentationContainer, } from './interfaces/presentation_container'; export { tracksOverlays, type TracksOverlays } from './interfaces/tracks_overlays'; -export { type SerializedPanelState } from './interfaces/serialized_state'; +export { + type SerializedPanelState, + type HasSerializableState, + apiHasSerializableState, +} from './interfaces/serialized_state'; export { type PublishesLastSavedState, apiPublishesLastSavedState, diff --git a/packages/presentation/presentation_containers/interfaces/serialized_state.ts b/packages/presentation/presentation_containers/interfaces/serialized_state.ts index 87d51580ca6dd..56fa2066e80fa 100644 --- a/packages/presentation/presentation_containers/interfaces/serialized_state.ts +++ b/packages/presentation/presentation_containers/interfaces/serialized_state.ts @@ -17,3 +17,11 @@ export interface SerializedPanelState { rawState: RawStateType; version?: string; } + +export interface HasSerializableState { + serializeState: () => SerializedPanelState; +} + +export const apiHasSerializableState = (api: unknown | null): api is HasSerializableState => { + return Boolean((api as HasSerializableState)?.serializeState); +}; diff --git a/packages/presentation/presentation_publishing/index.ts b/packages/presentation/presentation_publishing/index.ts index 53ad12d74a373..31bf58c113ba9 100644 --- a/packages/presentation/presentation_publishing/index.ts +++ b/packages/presentation/presentation_publishing/index.ts @@ -56,15 +56,12 @@ export { type PublishesDisabledActionIds, } from './interfaces/publishes_disabled_action_ids'; export { - apiPublishesLocalUnifiedSearch, - apiPublishesPartialLocalUnifiedSearch, - apiPublishesWritableLocalUnifiedSearch, - useLocalFilters, - useLocalQuery, - useLocalTimeRange, - type PublishesLocalUnifiedSearch, - type PublishesWritableLocalUnifiedSearch, -} from './interfaces/publishes_local_unified_search'; + apiPublishesUnifiedSearch, + apiPublishesPartialUnifiedSearch, + apiPublishesWritableUnifiedSearch, + type PublishesUnifiedSearch, + type PublishesWritableUnifiedSearch, +} from './interfaces/publishes_unified_search'; export { apiPublishesPanelDescription, apiPublishesWritablePanelDescription, diff --git a/packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts b/packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts deleted file mode 100644 index 623c107d47e8c..0000000000000 --- a/packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts +++ /dev/null @@ -1,77 +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 { TimeRange, Filter, Query, AggregateQuery } from '@kbn/es-query'; -import { PublishingSubject, useStateFromPublishingSubject } from '../publishing_subject'; - -export interface PublishesLocalUnifiedSearch { - isCompatibleWithLocalUnifiedSearch?: () => boolean; - localTimeRange: PublishingSubject; - getFallbackTimeRange?: () => TimeRange | undefined; - localFilters: PublishingSubject; - localQuery: PublishingSubject; -} - -export type PublishesWritableLocalUnifiedSearch = PublishesLocalUnifiedSearch & { - setLocalTimeRange: (timeRange: TimeRange | undefined) => void; - setLocalFilters: (filters: Filter[] | undefined) => void; - setLocalQuery: (query: Query | undefined) => void; -}; - -export const apiPublishesLocalUnifiedSearch = ( - unknownApi: null | unknown -): unknownApi is PublishesLocalUnifiedSearch => { - return Boolean( - unknownApi && - (unknownApi as PublishesLocalUnifiedSearch)?.localTimeRange !== undefined && - (unknownApi as PublishesLocalUnifiedSearch)?.localFilters !== undefined && - (unknownApi as PublishesLocalUnifiedSearch)?.localQuery !== undefined - ); -}; - -export const apiPublishesPartialLocalUnifiedSearch = ( - unknownApi: null | unknown -): unknownApi is Partial => { - return Boolean( - (unknownApi && (unknownApi as PublishesLocalUnifiedSearch)?.localTimeRange !== undefined) || - (unknownApi as PublishesLocalUnifiedSearch)?.localFilters !== undefined || - (unknownApi as PublishesLocalUnifiedSearch)?.localQuery !== undefined - ); -}; - -export const apiPublishesWritableLocalUnifiedSearch = ( - unknownApi: null | unknown -): unknownApi is PublishesWritableLocalUnifiedSearch => { - return ( - apiPublishesLocalUnifiedSearch(unknownApi) && - (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalTimeRange !== undefined && - typeof (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalTimeRange === 'function' && - (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalFilters !== undefined && - typeof (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalFilters === 'function' && - (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalQuery !== undefined && - typeof (unknownApi as PublishesWritableLocalUnifiedSearch).setLocalQuery === 'function' - ); -}; - -/** - * A hook that gets this API's local time range as a reactive variable which will cause re-renders on change. - */ -export const useLocalTimeRange = (api: Partial | undefined) => - useStateFromPublishingSubject(api?.localTimeRange); - -/** - * A hook that gets this API's local filters as a reactive variable which will cause re-renders on change. - */ -export const useLocalFilters = (api: Partial | undefined) => - useStateFromPublishingSubject(api?.localFilters); - -/** - * A hook that gets this API's local query as a reactive variable which will cause re-renders on change. - */ -export const useLocalQuery = (api: Partial | undefined) => - useStateFromPublishingSubject(api?.localQuery); diff --git a/packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts b/packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts new file mode 100644 index 0000000000000..ff6fee8cf8b67 --- /dev/null +++ b/packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts @@ -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 { TimeRange, Filter, Query, AggregateQuery } from '@kbn/es-query'; +import { PublishingSubject } from '../publishing_subject'; + +export interface PublishesUnifiedSearch { + isCompatibleWithUnifiedSearch?: () => boolean; + timeRange$: PublishingSubject; + filters$: PublishingSubject; + query$: PublishingSubject; +} + +export type PublishesWritableUnifiedSearch = PublishesUnifiedSearch & { + setTimeRange: (timeRange: TimeRange | undefined) => void; + setFilters: (filters: Filter[] | undefined) => void; + setQuery: (query: Query | undefined) => void; +}; + +export const apiPublishesUnifiedSearch = ( + unknownApi: null | unknown +): unknownApi is PublishesUnifiedSearch => { + return Boolean( + unknownApi && + (unknownApi as PublishesUnifiedSearch)?.timeRange$ !== undefined && + (unknownApi as PublishesUnifiedSearch)?.filters$ !== undefined && + (unknownApi as PublishesUnifiedSearch)?.query$ !== undefined + ); +}; + +export const apiPublishesPartialUnifiedSearch = ( + unknownApi: null | unknown +): unknownApi is Partial => { + return Boolean( + (unknownApi && (unknownApi as PublishesUnifiedSearch)?.timeRange$ !== undefined) || + (unknownApi as PublishesUnifiedSearch)?.filters$ !== undefined || + (unknownApi as PublishesUnifiedSearch)?.query$ !== undefined + ); +}; + +export const apiPublishesWritableUnifiedSearch = ( + unknownApi: null | unknown +): unknownApi is PublishesWritableUnifiedSearch => { + return ( + apiPublishesUnifiedSearch(unknownApi) && + typeof (unknownApi as PublishesWritableUnifiedSearch).setTimeRange === 'function' && + typeof (unknownApi as PublishesWritableUnifiedSearch).setFilters === 'function' && + typeof (unknownApi as PublishesWritableUnifiedSearch).setQuery === 'function' + ); +}; diff --git a/packages/solution-nav/es/README.md b/packages/solution-nav/es/README.md new file mode 100644 index 0000000000000..02c517e04ced5 --- /dev/null +++ b/packages/solution-nav/es/README.md @@ -0,0 +1,3 @@ +# @kbn/solution-nav-es + +## This package contains the navigation definition for the Search solution in Kibana stateful. diff --git a/packages/solution-nav/es/definition.ts b/packages/solution-nav/es/definition.ts new file mode 100644 index 0000000000000..e539fe71efdba --- /dev/null +++ b/packages/solution-nav/es/definition.ts @@ -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 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 { SolutionNavigationDefinition } from '@kbn/core-chrome-browser'; +import { of } from 'rxjs'; + +export const definition: SolutionNavigationDefinition = { + id: 'es', + title: 'Search', + icon: 'logoElasticsearch', + homePage: 'dev_tools', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'search_project_nav', + title: 'Search', + icon: 'logoElasticsearch', + defaultIsCollapsed: false, + isCollapsible: false, + breadcrumbStatus: 'hidden', + children: [ + { + id: 'dev_tools', + title: 'Dev Tools', + link: 'dev_tools:console', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/dev_tools')); + }, + spaceBefore: 'm', + }, + ], + }, + ], + }), +}; diff --git a/packages/solution-nav/es/index.ts b/packages/solution-nav/es/index.ts new file mode 100644 index 0000000000000..8024948fb3cd1 --- /dev/null +++ b/packages/solution-nav/es/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 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 { definition } from './definition'; diff --git a/packages/solution-nav/es/jest.config.js b/packages/solution-nav/es/jest.config.js new file mode 100644 index 0000000000000..5c651f7bb9bbe --- /dev/null +++ b/packages/solution-nav/es/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/solution-nav/es'], +}; diff --git a/packages/solution-nav/es/kibana.jsonc b/packages/solution-nav/es/kibana.jsonc new file mode 100644 index 0000000000000..7e02c576c397b --- /dev/null +++ b/packages/solution-nav/es/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/solution-nav-es", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/solution-nav/es/package.json b/packages/solution-nav/es/package.json new file mode 100644 index 0000000000000..a73bd66a9ddcc --- /dev/null +++ b/packages/solution-nav/es/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/solution-nav-es", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/solution-nav/es/tsconfig.json b/packages/solution-nav/es/tsconfig.json new file mode 100644 index 0000000000000..6793f0abe08ec --- /dev/null +++ b/packages/solution-nav/es/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-chrome-browser", + ], +} diff --git a/packages/solution-nav/oblt/README.md b/packages/solution-nav/oblt/README.md new file mode 100644 index 0000000000000..c01cf9968c143 --- /dev/null +++ b/packages/solution-nav/oblt/README.md @@ -0,0 +1,3 @@ +# @kbn/solution-nav-oblt + +## This package contains the navigation definition for the Observability solution in Kibana stateful. \ No newline at end of file diff --git a/packages/solution-nav/oblt/definition.ts b/packages/solution-nav/oblt/definition.ts new file mode 100644 index 0000000000000..2ba8dab9edaeb --- /dev/null +++ b/packages/solution-nav/oblt/definition.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 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 { SolutionNavigationDefinition } from '@kbn/core-chrome-browser'; +import { of } from 'rxjs'; + +export const definition: SolutionNavigationDefinition = { + id: 'oblt', + title: 'Observability', + icon: 'logoObservability', + homePage: 'discover', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'observability_project_nav', + title: 'Observability', + icon: 'logoObservability', + defaultIsCollapsed: false, + isCollapsible: false, + breadcrumbStatus: 'hidden', + children: [ + { + link: 'discover', + spaceBefore: 'm', + }, + ], + }, + ], + }), +}; diff --git a/packages/solution-nav/oblt/index.ts b/packages/solution-nav/oblt/index.ts new file mode 100644 index 0000000000000..8024948fb3cd1 --- /dev/null +++ b/packages/solution-nav/oblt/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 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 { definition } from './definition'; diff --git a/packages/solution-nav/oblt/jest.config.js b/packages/solution-nav/oblt/jest.config.js new file mode 100644 index 0000000000000..35039f0fc7cd6 --- /dev/null +++ b/packages/solution-nav/oblt/jest.config.js @@ -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 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/solution-nav/oblt'], +}; diff --git a/packages/solution-nav/oblt/kibana.jsonc b/packages/solution-nav/oblt/kibana.jsonc new file mode 100644 index 0000000000000..50c103d9c87ea --- /dev/null +++ b/packages/solution-nav/oblt/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/solution-nav-oblt", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/solution-nav/oblt/package.json b/packages/solution-nav/oblt/package.json new file mode 100644 index 0000000000000..e8985b19e9c63 --- /dev/null +++ b/packages/solution-nav/oblt/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/solution-nav-oblt", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/solution-nav/oblt/tsconfig.json b/packages/solution-nav/oblt/tsconfig.json new file mode 100644 index 0000000000000..6793f0abe08ec --- /dev/null +++ b/packages/solution-nav/oblt/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-chrome-browser", + ], +} diff --git a/renovate.json b/renovate.json index 724f2a4f0803f..70595b721b871 100644 --- a/renovate.json +++ b/renovate.json @@ -649,6 +649,25 @@ "Team:Monitoring" ], "enabled": true + }, + { + "groupName": "csp", + "packageNames": [ + "content-security-policy-parser" + ], + "reviewers": [ + "team:kibana-security", + "team:kibana-core" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "ci:serverless-test-all" + ], + "enabled": true } ] } diff --git a/scripts/es.js b/scripts/es.js index 1cee27b7685b5..1fcd221c97904 100644 --- a/scripts/es.js +++ b/scripts/es.js @@ -20,7 +20,6 @@ kbnEs 'source-path': resolve(__dirname, '../../elasticsearch'), 'base-path': resolve(__dirname, '../.es'), ssl: false, - kibanaUrl: 'https://localhost:5601/', }) .catch(function (e) { console.error(e); diff --git a/src/core/public/index.ts b/src/core/public/index.ts index d9fae6f9a7ddf..bb859c559b8b9 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -198,6 +198,18 @@ export type { export type { IHttpFetchError } from '@kbn/core-http-browser'; +export type { + AuthenticatedUser, + User, + AuthenticationProvider, + UserRealm, +} from '@kbn/core-security-common'; +export type { + SecurityServiceSetup, + SecurityServiceStart, + CoreAuthenticationService, +} from '@kbn/core-security-browser'; + export type { OverlayStart, OverlayBannersStart, diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index c4f04ec3c3312..bc45122b68b48 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -33,6 +33,7 @@ export { export { applicationServiceMock, scopedHistoryMock } from '@kbn/core-application-browser-mocks'; export { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; export { loggingSystemMock } from '@kbn/core-logging-browser-mocks'; +export { securityServiceMock } from '@kbn/core-security-browser-mocks'; function createStorageMock() { const storageMock: jest.Mocked = { diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 46496fe79a365..e8ac9f9139066 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -118,6 +118,18 @@ export type { UnauthorizedErrorHandler, } from '@kbn/core-elasticsearch-server'; +export type { + SecurityServiceSetup, + SecurityServiceStart, + CoreAuthenticationService, +} from '@kbn/core-security-server'; +export type { + User, + UserRealm, + AuthenticatedUser, + AuthenticationProvider, +} from '@kbn/core-security-common'; + export { CspConfig } from '@kbn/core-http-server-internal'; export { CoreKibanaRequest, kibanaResponseFactory } from '@kbn/core-http-router-server-internal'; diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index fdf7ba4c9f42c..9a0009c5948f0 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -82,7 +82,7 @@ describe('checking migration metadata changes on all registered SO types', () => "connector_token": "5a9ac29fe9c740eb114e9c40517245c71706b005", "core-usage-stats": "b3c04da317c957741ebcdedfea4524049fdc79ff", "csp-rule-template": "c151324d5f85178169395eecb12bac6b96064654", - "dashboard": "0611794ce10d25a36da0770c91376c575e92e8f2", + "dashboard": "211e9ca30f5a95d5f3c27b1bf2b58e6cfa0c9ae9", "endpoint:user-artifact-manifest": "1c3533161811a58772e30cdc77bac4631da3ef2b", "enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d", "epm-packages": "c23d3d00c051a08817335dba26f542b64b18a56a", @@ -151,7 +151,7 @@ describe('checking migration metadata changes on all registered SO types', () => "synthetics-param": "3ebb744e5571de678b1312d5c418c8188002cf5e", "synthetics-privates-locations": "f53d799d5c9bc8454aaa32c6abc99a899b025d5c", "tag": "e2544392fe6563e215bb677abc8b01c2601ef2dc", - "task": "04f30bd7bae923f3a53c31ab3b9745a93872fc02", + "task": "d17f2fc0bf6759a070c2221ec2787ad785c680fe", "telemetry": "7b00bcf1c7b4f6db1192bb7405a6a63e78b699fd", "threshold-explorer-view": "175306806f9fc8e13fcc1c8953ec4ba89bda1b70", "ui-metric": "d227284528fd19904e9d972aea0a13716fc5fe24", diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 1294bc56ead54..4618204e7c70a 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -19,6 +19,7 @@ import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; import { coreLifecycleMock, coreInternalLifecycleMock } from '@kbn/core-lifecycle-server-mocks'; +import { securityServiceMock } from '@kbn/core-security-server-mocks'; import type { SharedGlobalConfig, PluginInitializerContext } from '@kbn/core-plugins-server'; export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks'; @@ -45,6 +46,7 @@ export { i18nServiceMock } from '@kbn/core-i18n-server-mocks'; export { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; export { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; export { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; +export { securityServiceMock } from '@kbn/core-security-server-mocks'; export type { ElasticsearchClientMock, @@ -132,6 +134,7 @@ function createCoreRequestHandlerContextMock() { deprecations: { client: deprecationsServiceMock.createClient(), }, + security: securityServiceMock.createRequestHandlerContext(), }; } diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json index 868fc07bf7808..0b81bff41acf1 100644 --- a/src/core/tsconfig.json +++ b/src/core/tsconfig.json @@ -158,6 +158,11 @@ "@kbn/server-http-tools", "@kbn/security-hardening", "@kbn/core-base-server-mocks", + "@kbn/core-security-server", + "@kbn/core-security-common", + "@kbn/core-security-server-mocks", + "@kbn/core-security-browser", + "@kbn/core-security-browser-mocks", ], "exclude": [ "target/**/*", diff --git a/src/dev/buildkite_migration/rewrite_buildkite_agent_rules.ts b/src/dev/buildkite_migration/rewrite_buildkite_agent_rules.ts index 00843a474d510..64d94bda5a970 100644 --- a/src/dev/buildkite_migration/rewrite_buildkite_agent_rules.ts +++ b/src/dev/buildkite_migration/rewrite_buildkite_agent_rules.ts @@ -50,6 +50,7 @@ interface GobldGCPConfig { enableSecureBoot?: boolean; enableNestedVirtualization?: boolean; image: string; + provider: 'gcp'; localSsds?: number; localSsdInterface?: string; machineType: string; @@ -75,16 +76,32 @@ if (!fs.existsSync('data/agents.json')) { * rewrites all agent targeting rules from the shorthands to the full targeting syntax */ run( - async ({ log, flags }) => { + async ({ log, flags, flagsReader }) => { + const filterExpressions = flagsReader.getPositionals(); + const paths = await globby('.buildkite/**/*.yml', { cwd: REPO_ROOT, onlyFiles: true, gitignore: true, }); + const pathsFiltered = + filterExpressions.length === 0 + ? paths + : paths.filter((path) => { + return filterExpressions.some((expression) => path.includes(expression)); + }); + + if (pathsFiltered.length === 0) { + log.warning('No .yml files found to rewrite after filtering.'); + return; + } + + log.info('Applying rewrite to the following paths: \n', pathsFiltered.join('\n')); + const failedRewrites: Array<{ path: string; error: Error }> = []; - const rewritePromises: Array> = paths.map((ymlPath) => { + const rewritePromises: Array> = pathsFiltered.map((ymlPath) => { return rewriteFile(ymlPath, log).catch((e) => { // eslint-disable-next-line no-console console.error('Failed to rewrite: ' + ymlPath, e); @@ -193,6 +210,7 @@ function getFullAgentTargetingRule(queue: string): GobldGCPConfig { return removeNullish({ image: 'family/kibana-ubuntu-2004', imageProject: 'elastic-images-qa', + provider: 'gcp', assignExternalIP: agent.disableExternalIp === true ? false : undefined, diskSizeGb: agent.diskSizeGb, diskType: agent.diskType, diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index e21de7b953d0a..4b7738bcc0ab7 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.5.1': ['Elastic License 2.0'], - '@elastic/eui@93.2.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@93.3.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/dev/performance/run_performance_cli.ts b/src/dev/performance/run_performance_cli.ts index 810827a89f73f..d25795efc2c8a 100644 --- a/src/dev/performance/run_performance_cli.ts +++ b/src/dev/performance/run_performance_cli.ts @@ -14,7 +14,7 @@ import { ToolingLog } from '@kbn/tooling-log'; import fs from 'fs'; import path from 'path'; -const JOURNEY_BASE_PATH = 'x-pack/performance/journeys'; +const JOURNEY_BASE_PATH = 'x-pack/performance/journeys_e2e'; export interface Journey { name: string; @@ -126,7 +126,7 @@ run( if (journeyPath && fs.statSync(journeyPath).isFile()) { journeys.push({ name: path.parse(journeyPath).name, path: journeyPath }); } else { - // default dir is x-pack/performance/journeys + // default dir is x-pack/performance/journeys_e2e const dir = journeyPath ?? path.resolve(REPO_ROOT, JOURNEY_BASE_PATH); readFilesRecursively(dir, (filePath: string) => journeys.push({ diff --git a/src/plugins/controls/common/control_group/control_group_panel_diff_system.ts b/src/plugins/controls/common/control_group/control_group_panel_diff_system.ts index c07713dd32280..5c1e5746ea777 100644 --- a/src/plugins/controls/common/control_group/control_group_panel_diff_system.ts +++ b/src/plugins/controls/common/control_group/control_group_panel_diff_system.ts @@ -16,7 +16,11 @@ import { TimeSliderControlEmbeddableInput, TIME_SLIDER_CONTROL } from '../time_s import { ControlPanelState } from './types'; interface DiffSystem { - getPanelIsEqual: (initialInput: ControlPanelState, newInput: ControlPanelState) => boolean; + getPanelIsEqual: ( + initialInput: ControlPanelState, + newInput: ControlPanelState, + compareSelections?: boolean + ) => boolean; } export const genericControlPanelDiffSystem: DiffSystem = { @@ -29,7 +33,7 @@ export const ControlPanelDiffSystems: { [key: string]: DiffSystem; } = { [RANGE_SLIDER_CONTROL]: { - getPanelIsEqual: (initialInput, newInput) => { + getPanelIsEqual: (initialInput, newInput, compareSelections) => { if (!deepEqual(omit(initialInput, 'explicitInput'), omit(newInput, 'explicitInput'))) { return false; } @@ -38,11 +42,11 @@ export const ControlPanelDiffSystems: { initialInput.explicitInput; const { value: valueB = ['', ''], ...inputB }: Partial = newInput.explicitInput; - return isEqual(valueA, valueB) && deepEqual(inputA, inputB); + return (compareSelections ? isEqual(valueA, valueB) : true) && deepEqual(inputA, inputB); }, }, [OPTIONS_LIST_CONTROL]: { - getPanelIsEqual: (initialInput, newInput) => { + getPanelIsEqual: (initialInput, newInput, compareSelections) => { if (!deepEqual(omit(initialInput, 'explicitInput'), omit(newInput, 'explicitInput'))) { return false; } @@ -75,22 +79,24 @@ export const ControlPanelDiffSystems: { }: Partial = newInput.explicitInput; return ( - Boolean(excludeA) === Boolean(excludeB) && Boolean(hideSortA) === Boolean(hideSortB) && Boolean(hideExistsA) === Boolean(hideExistsB) && Boolean(hideExcludeA) === Boolean(hideExcludeB) && Boolean(singleSelectA) === Boolean(singleSelectB) && - Boolean(existsSelectedA) === Boolean(existsSelectedB) && Boolean(runPastTimeoutA) === Boolean(runPastTimeoutB) && isEqual(searchTechniqueA ?? 'prefix', searchTechniqueB ?? 'prefix') && deepEqual(sortA ?? OPTIONS_LIST_DEFAULT_SORT, sortB ?? OPTIONS_LIST_DEFAULT_SORT) && - isEqual(selectedA ?? [], selectedB ?? []) && + (compareSelections + ? Boolean(excludeA) === Boolean(excludeB) && + Boolean(existsSelectedA) === Boolean(existsSelectedB) && + isEqual(selectedA ?? [], selectedB ?? []) + : true) && deepEqual(inputA, inputB) ); }, }, [TIME_SLIDER_CONTROL]: { - getPanelIsEqual: (initialInput, newInput) => { + getPanelIsEqual: (initialInput, newInput, compareSelections) => { if (!deepEqual(omit(initialInput, 'explicitInput'), omit(newInput, 'explicitInput'))) { return false; } @@ -107,10 +113,12 @@ export const ControlPanelDiffSystems: { }: Partial = newInput.explicitInput; return ( Boolean(isAnchoredA) === Boolean(isAnchoredB) && - Boolean(startA) === Boolean(startB) && - startA === startB && - Boolean(endA) === Boolean(endB) && - endA === endB + (compareSelections + ? Boolean(startA) === Boolean(startB) && + startA === startB && + Boolean(endA) === Boolean(endB) && + endA === endB + : true) ); }, }, diff --git a/src/plugins/controls/common/control_group/control_group_persistence.ts b/src/plugins/controls/common/control_group/control_group_persistence.ts index 8c51c4a2212b5..8e9a795c2ec4c 100644 --- a/src/plugins/controls/common/control_group/control_group_persistence.ts +++ b/src/plugins/controls/common/control_group/control_group_persistence.ts @@ -44,6 +44,7 @@ export const getDefaultControlGroupInput = (): Omit => defaultControlGrow: DEFAULT_CONTROL_GROW, controlStyle: DEFAULT_CONTROL_STYLE, chainingSystem: 'HIERARCHICAL', + showApplySelections: false, ignoreParentSettings: { ignoreFilters: false, ignoreQuery: false, @@ -57,30 +58,29 @@ export const getDefaultControlGroupPersistableInput = (): PersistableControlGrou export const persistableControlGroupInputIsEqual = ( a: PersistableControlGroupInput | undefined, - b: PersistableControlGroupInput | undefined + b: PersistableControlGroupInput | undefined, + compareSelections: boolean = true ) => { - const defaultInput = getDefaultControlGroupInput(); + const defaultInput = getDefaultControlGroupPersistableInput(); const inputA = { ...defaultInput, - ...pick(a, ['panels', 'chainingSystem', 'controlStyle', 'ignoreParentSettings']), + ...pick(a, persistableControlGroupInputKeys), }; const inputB = { ...defaultInput, - ...pick(b, ['panels', 'chainingSystem', 'controlStyle', 'ignoreParentSettings']), + ...pick(b, persistableControlGroupInputKeys), }; - if ( - getPanelsAreEqual(inputA.panels, inputB.panels) && - deepEqual(omit(inputA, 'panels'), omit(inputB, 'panels')) - ) - return true; - - return false; + return ( + getPanelsAreEqual(inputA.panels, inputB.panels, compareSelections) && + deepEqual(omit(inputA, ['panels']), omit(inputB, ['panels'])) + ); }; const getPanelsAreEqual = ( originalPanels: PersistableControlGroupInput['panels'], - newPanels: PersistableControlGroupInput['panels'] + newPanels: PersistableControlGroupInput['panels'], + compareSelections: boolean ) => { const originalPanelIds = Object.keys(originalPanels); const newPanelIds = Object.keys(newPanels); @@ -94,7 +94,8 @@ const getPanelsAreEqual = ( const panelIsEqual = ControlPanelDiffSystems[newPanelType] ? ControlPanelDiffSystems[newPanelType].getPanelIsEqual( originalPanels[panelId], - newPanels[panelId] + newPanels[panelId], + compareSelections ) : genericControlPanelDiffSystem.getPanelIsEqual(originalPanels[panelId], newPanels[panelId]); if (!panelIsEqual) return false; @@ -108,6 +109,7 @@ export const controlGroupInputToRawControlGroupAttributes = ( return { controlStyle: controlGroupInput.controlStyle, chainingSystem: controlGroupInput.chainingSystem, + showApplySelections: controlGroupInput.showApplySelections, panelsJSON: JSON.stringify(controlGroupInput.panels), ignoreParentSettingsJSON: JSON.stringify(controlGroupInput.ignoreParentSettings), }; @@ -131,8 +133,13 @@ export const rawControlGroupAttributesToControlGroupInput = ( rawControlGroupAttributes: RawControlGroupAttributes ): PersistableControlGroupInput | undefined => { const defaultControlGroupInput = getDefaultControlGroupInput(); - const { chainingSystem, controlStyle, ignoreParentSettingsJSON, panelsJSON } = - rawControlGroupAttributes; + const { + chainingSystem, + controlStyle, + showApplySelections, + ignoreParentSettingsJSON, + panelsJSON, + } = rawControlGroupAttributes; const panels = safeJSONParse(panelsJSON); const ignoreParentSettings = safeJSONParse(ignoreParentSettingsJSON); @@ -140,6 +147,7 @@ export const rawControlGroupAttributesToControlGroupInput = ( ...defaultControlGroupInput, ...(chainingSystem ? { chainingSystem } : {}), ...(controlStyle ? { controlStyle } : {}), + ...(showApplySelections ? { showApplySelections } : {}), ...(ignoreParentSettings ? { ignoreParentSettings } : {}), ...(panels ? { panels } : {}), }; @@ -152,6 +160,7 @@ export const rawControlGroupAttributesToSerializable = ( return { chainingSystem: rawControlGroupAttributes?.chainingSystem, controlStyle: rawControlGroupAttributes?.controlStyle ?? defaultControlGroupInput.controlStyle, + showApplySelections: rawControlGroupAttributes?.showApplySelections, ignoreParentSettings: safeJSONParse(rawControlGroupAttributes?.ignoreParentSettingsJSON) ?? {}, panels: safeJSONParse(rawControlGroupAttributes?.panelsJSON) ?? {}, }; @@ -163,6 +172,7 @@ export const serializableToRawControlGroupAttributes = ( return { controlStyle: serializable.controlStyle as RawControlGroupAttributes['controlStyle'], chainingSystem: serializable.chainingSystem as RawControlGroupAttributes['chainingSystem'], + showApplySelections: Boolean(serializable.showApplySelections), ignoreParentSettingsJSON: JSON.stringify(serializable.ignoreParentSettings), panelsJSON: JSON.stringify(serializable.panels), }; diff --git a/src/plugins/controls/common/control_group/mocks.tsx b/src/plugins/controls/common/control_group/mocks.tsx index fb469a53b1a24..a39812dfc0191 100644 --- a/src/plugins/controls/common/control_group/mocks.tsx +++ b/src/plugins/controls/common/control_group/mocks.tsx @@ -7,9 +7,10 @@ */ import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common'; -import { ControlGroupInput } from './types'; import { getDefaultControlGroupInput } from '..'; import { ControlGroupContainerFactory } from '../../public'; +import { ControlGroupComponentState } from '../../public/control_group/types'; +import { ControlGroupInput } from './types'; export const mockControlGroupInput = (partial?: Partial): ControlGroupInput => ({ id: 'mocked_control_group', @@ -48,14 +49,25 @@ export const mockControlGroupInput = (partial?: Partial): Con ...(partial ?? {}), }); -export const mockControlGroupContainer = async (explicitInput?: Partial) => { +export const mockControlGroupContainer = async ( + explicitInput?: Partial, + initialComponentState?: Partial +) => { const controlGroupFactoryStub = new ControlGroupContainerFactory( {} as unknown as EmbeddablePersistableStateService ); - const controlGroupContainer = await controlGroupFactoryStub.create({ + const input: ControlGroupInput = { id: 'mocked-control-group', ...getDefaultControlGroupInput(), ...explicitInput, + }; + const controlGroupContainer = await controlGroupFactoryStub.create(input, undefined, { + ...initialComponentState, + lastSavedInput: { + panels: input.panels, + chainingSystem: 'HIERARCHICAL', + controlStyle: 'twoLine', + }, }); return controlGroupContainer; diff --git a/src/plugins/controls/common/control_group/types.ts b/src/plugins/controls/common/control_group/types.ts index eeda06437cd55..5852dc392a6c4 100644 --- a/src/plugins/controls/common/control_group/types.ts +++ b/src/plugins/controls/common/control_group/types.ts @@ -31,6 +31,7 @@ export interface ControlGroupInput extends EmbeddableInput, ControlInput { defaultControlGrow?: boolean; controlStyle: ControlStyle; panels: ControlsPanels; + showApplySelections?: boolean; } /** @@ -39,9 +40,9 @@ export interface ControlGroupInput extends EmbeddableInput, ControlInput { export const persistableControlGroupInputKeys: Array< keyof Pick< ControlGroupInput, - 'panels' | 'chainingSystem' | 'controlStyle' | 'ignoreParentSettings' + 'panels' | 'chainingSystem' | 'controlStyle' | 'ignoreParentSettings' | 'showApplySelections' > -> = ['panels', 'chainingSystem', 'controlStyle', 'ignoreParentSettings']; +> = ['panels', 'chainingSystem', 'controlStyle', 'ignoreParentSettings', 'showApplySelections']; export type PersistableControlGroupInput = Pick< ControlGroupInput, typeof persistableControlGroupInputKeys[number] diff --git a/src/plugins/controls/common/types.ts b/src/plugins/controls/common/types.ts index 7eb0d69f98a4f..ac140825563c4 100644 --- a/src/plugins/controls/common/types.ts +++ b/src/plugins/controls/common/types.ts @@ -12,6 +12,8 @@ import { EmbeddableInput } from '@kbn/embeddable-plugin/common/types'; export type ControlWidth = 'small' | 'medium' | 'large'; export type ControlStyle = 'twoLine' | 'oneLine'; +export type TimeSlice = [number, number]; + export interface ParentIgnoreSettings { ignoreFilters?: boolean; ignoreQuery?: boolean; @@ -23,7 +25,7 @@ export type ControlInput = EmbeddableInput & { query?: Query; filters?: Filter[]; timeRange?: TimeRange; - timeslice?: [number, number]; + timeslice?: TimeSlice; controlStyle?: ControlStyle; ignoreParentSettings?: ParentIgnoreSettings; }; diff --git a/src/plugins/controls/public/control_group/component/control_frame_component.tsx b/src/plugins/controls/public/control_group/component/control_frame_component.tsx index babf862a05c9e..771f6d7d9c596 100644 --- a/src/plugins/controls/public/control_group/component/control_frame_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_frame_component.tsx @@ -19,11 +19,11 @@ import { import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import { FloatingActions } from '@kbn/presentation-util-plugin/public'; +import { useChildEmbeddable } from '../../hooks/use_child_embeddable'; import { controlGroupSelector, useControlGroupContainer, } from '../embeddable/control_group_container'; -import { useChildEmbeddable } from '../../hooks/use_child_embeddable'; import { ControlError } from './control_error_component'; export interface ControlFrameProps { @@ -58,13 +58,15 @@ export const ControlFrame = ({ const usingTwoLineLayout = controlStyle === 'twoLine'; useEffect(() => { + let mounted = true; if (embeddableRoot.current) { embeddable?.render(embeddableRoot.current); } - const inputSubscription = embeddable - ?.getInput$() - .subscribe((newInput) => setTitle(newInput.title)); + const inputSubscription = embeddable?.getInput$().subscribe((newInput) => { + if (mounted) setTitle(newInput.title); + }); return () => { + mounted = false; inputSubscription?.unsubscribe(); }; }, [embeddable, embeddableRoot]); diff --git a/src/plugins/controls/public/control_group/component/control_group_component.test.tsx b/src/plugins/controls/public/control_group/component/control_group_component.test.tsx new file mode 100644 index 0000000000000..5fee973d1033e --- /dev/null +++ b/src/plugins/controls/public/control_group/component/control_group_component.test.tsx @@ -0,0 +1,202 @@ +/* + * 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 { stubDataView } from '@kbn/data-views-plugin/common/data_view.stub'; +import { pluginServices as presentationUtilPluginServices } from '@kbn/presentation-util-plugin/public/services'; +import { registry as presentationUtilServicesRegistry } from '@kbn/presentation-util-plugin/public/services/plugin_services.story'; +import { act, render, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { Provider } from 'react-redux'; +import { OptionsListEmbeddableFactory } from '../..'; +import { OPTIONS_LIST_CONTROL, RANGE_SLIDER_CONTROL } from '../../../common'; +import { mockControlGroupContainer, mockControlGroupInput } from '../../../common/mocks'; +import { RangeSliderEmbeddableFactory } from '../../range_slider'; +import { pluginServices } from '../../services'; +import { ControlGroupContainerContext } from '../embeddable/control_group_container'; +import { ControlGroupComponentState, ControlGroupInput } from '../types'; +import { ControlGroup } from './control_group_component'; + +jest.mock('@dnd-kit/core', () => ({ + /** DnD kit has a memory leak based on this layout measuring strategy on unmount; setting it to undefined prevents this */ + ...jest.requireActual('@dnd-kit/core'), + LayoutMeasuringStrategy: { Always: undefined }, +})); + +describe('Control group component', () => { + interface MountOptions { + explicitInput?: Partial; + initialComponentState?: Partial; + } + + presentationUtilServicesRegistry.start({}); + presentationUtilPluginServices.setRegistry(presentationUtilServicesRegistry); + + pluginServices.getServices().dataViews.get = jest.fn().mockResolvedValue(stubDataView); + pluginServices.getServices().dataViews.getIdsWithTitle = jest + .fn() + .mockResolvedValue([{ id: stubDataView.id, title: stubDataView.getIndexPattern() }]); + pluginServices.getServices().controls.getControlTypes = jest + .fn() + .mockReturnValue([OPTIONS_LIST_CONTROL, RANGE_SLIDER_CONTROL]); + pluginServices.getServices().controls.getControlFactory = jest + .fn() + .mockImplementation((type: string) => { + if (type === OPTIONS_LIST_CONTROL) return new OptionsListEmbeddableFactory(); + if (type === RANGE_SLIDER_CONTROL) return new RangeSliderEmbeddableFactory(); + }); + + async function mountComponent(options?: MountOptions) { + const controlGroupContainer = await mockControlGroupContainer( + mockControlGroupInput(options?.explicitInput), + options?.initialComponentState + ); + + const controlGroupComponent = render( + + + + + + ); + + await waitFor(() => { + // wait for control group to render all 3 controls before returning + expect(controlGroupComponent.queryAllByTestId('control-frame').length).toBe(3); + }); + + return { controlGroupComponent, controlGroupContainer }; + } + + test('does not render end button group by default', async () => { + const { controlGroupComponent } = await mountComponent(); + expect( + controlGroupComponent.queryByTestId('controlGroup--endButtonGroup') + ).not.toBeInTheDocument(); + }); + + test('can render **just** add control button', async () => { + const { controlGroupComponent } = await mountComponent({ + initialComponentState: { showAddButton: true }, + }); + expect(controlGroupComponent.queryByTestId('controlGroup--endButtonGroup')).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--addControlButton') + ).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--applyFiltersButton') + ).not.toBeInTheDocument(); + }); + + test('can render **just** apply button', async () => { + const { controlGroupComponent } = await mountComponent({ + explicitInput: { showApplySelections: true }, + }); + expect(controlGroupComponent.queryByTestId('controlGroup--endButtonGroup')).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--addControlButton') + ).not.toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--applyFiltersButton') + ).toBeInTheDocument(); + }); + + test('can render both buttons in the end button group', async () => { + const { controlGroupComponent } = await mountComponent({ + explicitInput: { showApplySelections: true }, + initialComponentState: { showAddButton: true }, + }); + expect(controlGroupComponent.queryByTestId('controlGroup--endButtonGroup')).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--addControlButton') + ).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('controlGroup--applyFiltersButton') + ).toBeInTheDocument(); + }); + + test('enables apply button based on unpublished filters', async () => { + const { controlGroupComponent, controlGroupContainer } = await mountComponent({ + explicitInput: { showApplySelections: true }, + }); + expect(controlGroupComponent.getByTestId('controlGroup--applyFiltersButton')).toBeDisabled(); + + act(() => controlGroupContainer.dispatch.setUnpublishedFilters({ filters: [] })); + expect(controlGroupComponent.getByTestId('controlGroup--applyFiltersButton')).toBeEnabled(); + + act(() => controlGroupContainer.dispatch.setUnpublishedFilters(undefined)); + expect(controlGroupComponent.getByTestId('controlGroup--applyFiltersButton')).toBeDisabled(); + + act(() => controlGroupContainer.dispatch.setUnpublishedFilters({ timeslice: [0, 1] })); + expect(controlGroupComponent.getByTestId('controlGroup--applyFiltersButton')).toBeEnabled(); + }); + + test('calls publish when apply button is clicked', async () => { + const { controlGroupComponent, controlGroupContainer } = await mountComponent({ + explicitInput: { showApplySelections: true }, + }); + let applyButton = controlGroupComponent.getByTestId('controlGroup--applyFiltersButton'); + expect(applyButton).toBeDisabled(); + controlGroupContainer.publishFilters = jest.fn(); + + const unpublishedFilters: ControlGroupComponentState['unpublishedFilters'] = { + filters: [ + { + query: { exists: { field: 'foo' } }, + meta: { type: 'exists' }, + }, + ], + timeslice: [0, 1], + }; + act(() => controlGroupContainer.dispatch.setUnpublishedFilters(unpublishedFilters)); + applyButton = controlGroupComponent.getByTestId('controlGroup--applyFiltersButton'); + expect(applyButton).toBeEnabled(); + + userEvent.click(applyButton); + expect(controlGroupContainer.publishFilters).toBeCalledWith(unpublishedFilters); + }); + + test('ensure actions get rendered', async () => { + presentationUtilPluginServices.getServices().uiActions.getTriggerCompatibleActions = jest + .fn() + .mockImplementation(() => { + return [ + { + isCompatible: jest.fn().mockResolvedValue(true), + id: 'testAction', + MenuItem: () =>
test1
, + }, + + { + isCompatible: jest.fn().mockResolvedValue(true), + id: 'testAction2', + MenuItem: () =>
test2
, + }, + ]; + }); + + const { controlGroupComponent } = await mountComponent(); + expect( + controlGroupComponent.queryByTestId('presentationUtil__floatingActions__control1') + ).toBeInTheDocument(); + expect( + controlGroupComponent.queryByTestId('presentationUtil__floatingActions__control2') + ).toBeInTheDocument(); + }); +}); diff --git a/src/plugins/controls/public/control_group/component/control_group_component.tsx b/src/plugins/controls/public/control_group/component/control_group_component.tsx index 20d599aed0eb4..ebbcf20b66366 100644 --- a/src/plugins/controls/public/control_group/component/control_group_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_group_component.tsx @@ -10,7 +10,6 @@ import '../control_group.scss'; import classNames from 'classnames'; import React, { useEffect, useMemo, useState } from 'react'; -import { TypedUseSelectorHook, useSelector } from 'react-redux'; import { closestCenter, @@ -38,28 +37,36 @@ import { EuiIcon, EuiPanel, EuiText, + EuiToolTip, EuiTourStep, } from '@elastic/eui'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { ControlGroupStrings } from '../control_group_strings'; -import { useControlGroupContainer } from '../embeddable/control_group_container'; -import { ControlGroupReduxState } from '../types'; +import { + controlGroupSelector, + useControlGroupContainer, +} from '../embeddable/control_group_container'; import { ControlClone, SortableControl } from './control_group_sortable_item'; -const contextSelect = useSelector as TypedUseSelectorHook; - export const ControlGroup = () => { const controlGroup = useControlGroupContainer(); // current state - const panels = contextSelect((state) => state.explicitInput.panels); - const viewMode = contextSelect((state) => state.explicitInput.viewMode); - const controlStyle = contextSelect((state) => state.explicitInput.controlStyle); - const showAddButton = contextSelect((state) => state.componentState.showAddButton); - const controlWithInvalidSelectionsId = contextSelect( + const panels = controlGroupSelector((state) => state.explicitInput.panels); + const viewMode = controlGroupSelector((state) => state.explicitInput.viewMode); + const controlStyle = controlGroupSelector((state) => state.explicitInput.controlStyle); + const showApplySelections = controlGroupSelector( + (state) => state.explicitInput.showApplySelections + ); + const showAddButton = controlGroupSelector((state) => state.componentState.showAddButton); + const unpublishedFilters = controlGroupSelector( + (state) => state.componentState.unpublishedFilters + ); + const controlWithInvalidSelectionsId = controlGroupSelector( (state) => state.componentState.controlWithInvalidSelectionsId ); + const [tourStepOpen, setTourStepOpen] = useState(true); const [suppressTourChecked, setSuppressTourChecked] = useState(false); const [renderTourStep, setRenderTourStep] = useState(false); @@ -82,10 +89,49 @@ export const ControlGroup = () => { * This forces the tour step to get unmounted so that it can attach to the new invalid * control - otherwise, the anchor will remain attached to the old invalid control */ + let mounted = true; setRenderTourStep(false); - setTimeout(() => setRenderTourStep(true), 100); + setTimeout(() => { + if (mounted) { + setRenderTourStep(true); + } + }, 100); + return () => { + mounted = false; + }; }, [controlWithInvalidSelectionsId]); + const applyButtonEnabled = useMemo(() => { + /** + * this is undefined if there are no unpublished filters / timeslice; note that an empty filter array counts + * as unpublished filters and so the apply button should still be enabled in this case + */ + return Boolean(unpublishedFilters); + }, [unpublishedFilters]); + + const showAppendedButtonGroup = useMemo( + () => showAddButton || showApplySelections, + [showAddButton, showApplySelections] + ); + + const ApplyButtonComponent = useMemo(() => { + return ( + { + if (unpublishedFilters) controlGroup.publishFilters(unpublishedFilters); + }} + /> + ); + }, [applyButtonEnabled, unpublishedFilters, controlGroup]); + const tourStep = useMemo(() => { if ( !renderTourStep || @@ -208,10 +254,11 @@ export const ControlGroup = () => { > {tourStep} @@ -254,16 +301,42 @@ export const ControlGroup = () => { - {showAddButton && ( - - controlGroup.openAddDataControlFlyout()} - /> + {showAppendedButtonGroup && ( + + + {showAddButton && ( + + + controlGroup.openAddDataControlFlyout()} + /> + + + )} + {showApplySelections && ( + + {applyButtonEnabled ? ( + ApplyButtonComponent + ) : ( + + {ApplyButtonComponent} + + )} + + )} + )} diff --git a/src/plugins/controls/public/control_group/control_group.scss b/src/plugins/controls/public/control_group/control_group.scss index 4ad7753a9cb53..bfc1b79bac2bf 100644 --- a/src/plugins/controls/public/control_group/control_group.scss +++ b/src/plugins/controls/public/control_group/control_group.scss @@ -3,8 +3,14 @@ $mediumControl: $euiSize * 25; $largeControl: $euiSize * 50; $controlMinWidth: $euiSize * 14; -.controlGroup { +.controlsWrapper { + display: flex; + align-items: center; min-height: $euiSize * 4; + + .controlGroup--endButtonGroup { + align-self: end; + } } .controlsWrapper--twoLine { diff --git a/src/plugins/controls/public/control_group/control_group_strings.ts b/src/plugins/controls/public/control_group/control_group_strings.ts index 7b1b3ff3c1169..8a2d74c84292a 100644 --- a/src/plugins/controls/public/control_group/control_group_strings.ts +++ b/src/plugins/controls/public/control_group/control_group_strings.ts @@ -172,6 +172,14 @@ export const ControlGroupStrings = { i18n.translate('controls.controlGroup.management.addControl', { defaultMessage: 'Add control', }), + getApplyButtonTitle: (applyResetButtonsEnabled: boolean) => + applyResetButtonsEnabled + ? i18n.translate('controls.controlGroup.management.applyButtonTooltip.enabled', { + defaultMessage: 'Apply selections', + }) + : i18n.translate('controls.controlGroup.management.applyButtonTooltip.disabled', { + defaultMessage: 'No new selections to apply', + }), getFlyoutTitle: () => i18n.translate('controls.controlGroup.management.flyoutTitle', { defaultMessage: 'Control settings', @@ -292,8 +300,8 @@ export const ControlGroupStrings = { i18n.translate('controls.controlGroup.management.validate.title', { defaultMessage: 'Validate user selections', }), - getValidateSelectionsSubTitle: () => - i18n.translate('controls.controlGroup.management.validate.subtitle', { + getValidateSelectionsTooltip: () => + i18n.translate('controls.controlGroup.management.validate.tooltip', { defaultMessage: 'Highlight control selections that result in no data.', }), }, @@ -302,12 +310,23 @@ export const ControlGroupStrings = { i18n.translate('controls.controlGroup.management.hierarchy.title', { defaultMessage: 'Chain controls', }), - getHierarchySubTitle: () => - i18n.translate('controls.controlGroup.management.hierarchy.subtitle', { + getHierarchyTooltip: () => + i18n.translate('controls.controlGroup.management.hierarchy.tooltip', { defaultMessage: 'Selections in one control narrow down available options in the next. Controls are chained from left to right.', }), }, + showApplySelections: { + getShowApplySelectionsTitle: () => + i18n.translate('controls.controlGroup.management.showApplySelections.title', { + defaultMessage: 'Apply selections automatically', + }), + getShowApplySelectionsTooltip: () => + i18n.translate('controls.controlGroup.management.showApplySelections.tooltip', { + defaultMessage: + 'If disabled, control selections will only be applied after clicking apply.', + }), + }, }, filteringSettings: { getFilteringSettingsTitle: () => diff --git a/src/plugins/controls/public/control_group/editor/control_group_editor.tsx b/src/plugins/controls/public/control_group/editor/control_group_editor.tsx index 70abc8ee86e74..aad2ca51bc578 100644 --- a/src/plugins/controls/public/control_group/editor/control_group_editor.tsx +++ b/src/plugins/controls/public/control_group/editor/control_group_editor.tsx @@ -50,8 +50,6 @@ interface EditControlGroupProps { onClose: () => void; } -type EditorControlGroupInput = ControlGroupInput; - const editorControlGroupInputIsEqual = (a: ControlGroupInput, b: ControlGroupInput) => fastIsEqual(a, b); @@ -62,7 +60,7 @@ export const ControlGroupEditor = ({ onDeleteAll, onClose, }: EditControlGroupProps) => { - const [controlGroupEditorState, setControlGroupEditorState] = useState({ + const [controlGroupEditorState, setControlGroupEditorState] = useState({ ...getDefaultControlGroupInput(), ...initialInput, }); @@ -92,7 +90,9 @@ export const ControlGroupEditor = ({ const applyChangesToInput = useCallback(() => { const inputToApply = { ...controlGroupEditorState }; - if (!editorControlGroupInputIsEqual(inputToApply, initialInput)) updateInput(inputToApply); + if (!editorControlGroupInputIsEqual(inputToApply, initialInput)) { + updateInput(inputToApply); + } }, [controlGroupEditorState, initialInput, updateInput]); return ( @@ -160,7 +160,7 @@ export const ControlGroupEditor = ({ label={ } checked={!Boolean(controlGroupEditorState.ignoreParentSettings?.ignoreValidations)} @@ -173,7 +173,7 @@ export const ControlGroupEditor = ({ label={ } checked={controlGroupEditorState.chainingSystem === 'HIERARCHICAL'} @@ -183,6 +183,23 @@ export const ControlGroupEditor = ({ }) } /> + + + } + checked={!controlGroupEditorState.showApplySelections} + onChange={(e) => + updateControlGroupEditorSetting({ + showApplySelections: !e.target.checked, + }) + } + /> diff --git a/src/plugins/controls/public/control_group/embeddable/control_group_chaining_system.ts b/src/plugins/controls/public/control_group/embeddable/control_group_chaining_system.ts index 1857bd8a8df07..093d52a28bb7f 100644 --- a/src/plugins/controls/public/control_group/embeddable/control_group_chaining_system.ts +++ b/src/plugins/controls/public/control_group/embeddable/control_group_chaining_system.ts @@ -18,6 +18,7 @@ import { ControlGroupInput, ControlsPanels, } from '../../../common/control_group/types'; +import { TimeSlice } from '../../../common/types'; interface GetPrecedingFiltersProps { id: string; @@ -38,7 +39,7 @@ interface ChainingSystem { ) => EmbeddableContainerSettings | undefined; getPrecedingFilters: ( props: GetPrecedingFiltersProps - ) => { filters: Filter[]; timeslice?: [number, number] } | undefined; + ) => { filters: Filter[]; timeslice?: TimeSlice } | undefined; onChildChange: (props: OnChildChangedProps) => void; } diff --git a/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx b/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx index 0663d3a3d9c61..4d1ecc6458ce0 100644 --- a/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx +++ b/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx @@ -10,9 +10,9 @@ import { compareFilters, COMPARE_ALL_OPTIONS, Filter, uniqFilters } from '@kbn/e import { isEqual, pick } from 'lodash'; import React, { createContext, useContext } from 'react'; import ReactDOM from 'react-dom'; -import { Provider, TypedUseSelectorHook, useSelector } from 'react-redux'; +import { batch, Provider, TypedUseSelectorHook, useSelector } from 'react-redux'; import { BehaviorSubject, merge, Subject, Subscription } from 'rxjs'; -import { debounceTime, distinctUntilChanged, skip } from 'rxjs/operators'; +import { debounceTime, distinctUntilChanged, filter, first, skip } from 'rxjs/operators'; import { OverlayRef } from '@kbn/core/public'; import { Container, EmbeddableFactory } from '@kbn/embeddable-plugin/public'; @@ -24,6 +24,7 @@ import { persistableControlGroupInputIsEqual, persistableControlGroupInputKeys, } from '../../../common'; +import { TimeSlice } from '../../../common/types'; import { pluginServices } from '../../services'; import { ControlsStorageService } from '../../services/storage/types'; import { ControlEmbeddable, ControlInput, ControlOutput } from '../../types'; @@ -43,6 +44,7 @@ import { startDiffingControlGroupState } from '../state/control_group_diffing_in import { controlGroupReducers } from '../state/control_group_reducers'; import { ControlGroupComponentState, + ControlGroupFilterOutput, ControlGroupInput, ControlGroupOutput, ControlGroupReduxState, @@ -168,8 +170,9 @@ export class ControlGroupContainer extends Container< // when all children are ready setup subscriptions this.untilAllChildrenReady().then(() => { this.recalculateDataViews(); - this.recalculateFilters(); this.setupSubscriptions(); + const { filters, timeslice } = this.recalculateFilters(); + this.publishFilters({ filters, timeslice }); this.initialized$.next(true); }); @@ -203,6 +206,29 @@ export class ControlGroupContainer extends Container< }; private setupSubscriptions = () => { + /** + * on initialization, in order for comparison to be performed, calculate the last saved filters based on the + * selections from the last saved input and save them to component state. This is done as a subscription so that + * it can be done async without actually slowing down the loading of the controls. + */ + this.subscriptions.add( + this.initialized$ + .pipe( + filter((isInitialized) => isInitialized), + first() + ) + .subscribe(async () => { + const { + componentState: { lastSavedInput }, + explicitInput: { panels }, + } = this.getState(); + const filterOutput = await this.calculateFiltersFromSelections( + lastSavedInput?.panels ?? panels + ); + this.dispatch.setLastSavedFilters(filterOutput); + }) + ); + /** * refresh control order cache and make all panels refreshInputFromParent whenever panel orders change */ @@ -214,12 +240,29 @@ export class ControlGroupContainer extends Container< ) .subscribe((input) => { this.recalculateDataViews(); - this.recalculateFilters(); + this.recalculateFilters$.next(null); const childOrderCache = cachedChildEmbeddableOrder(input.panels); childOrderCache.idsInOrder.forEach((id) => this.getChild(id)?.refreshInputFromParent()); }) ); + /** + * force publish filters when `showApplySelections` value changes to keep state clean + */ + this.subscriptions.add( + this.getInput$() + .pipe( + skip(1), + distinctUntilChanged( + (a, b) => Boolean(a.showApplySelections) === Boolean(b.showApplySelections) + ) + ) + .subscribe(() => { + const { filters, timeslice } = this.recalculateFilters(); + this.publishFilters({ filters, timeslice }); + }) + ); + /** * run OnChildOutputChanged when any child's output has changed */ @@ -240,17 +283,37 @@ export class ControlGroupContainer extends Container< */ this.subscriptions.add( this.recalculateFilters$.pipe(debounceTime(10)).subscribe(() => { - this.recalculateFilters(); + const { filters, timeslice } = this.recalculateFilters(); + this.tryPublishFilters({ filters, timeslice }); }) ); }; + public setSavedState(lastSavedInput: PersistableControlGroupInput): void { + batch(() => { + this.dispatch.setLastSavedInput(lastSavedInput); + const { filters, timeslice } = this.getState().output; + this.dispatch.setLastSavedFilters({ filters, timeslice }); + }); + } + public resetToLastSavedState() { const { + explicitInput: { showApplySelections: currentShowApplySelections }, componentState: { lastSavedInput }, } = this.getState(); - if (!persistableControlGroupInputIsEqual(this.getPersistableInput(), lastSavedInput)) { + + if ( + lastSavedInput && + !persistableControlGroupInputIsEqual(this.getPersistableInput(), lastSavedInput) + ) { this.updateInput(lastSavedInput); + if (currentShowApplySelections || lastSavedInput.showApplySelections) { + /** If either the current or past state has auto-apply off, calling reset should force the changes to be published */ + this.calculateFiltersFromSelections(lastSavedInput.panels).then((filterOutput) => { + this.publishFilters(filterOutput); + }); + } this.reload(); // this forces the children to update their inputs + perform validation as necessary } } @@ -271,7 +334,8 @@ export class ControlGroupContainer extends Container< this.updateInput(newInput); this.untilAllChildrenReady().then(() => { this.recalculateDataViews(); - this.recalculateFilters(); + const { filters, timeslice } = this.recalculateFilters(); + this.publishFilters({ filters, timeslice }); this.setupSubscriptions(); this.initialized$.next(true); }); @@ -326,7 +390,7 @@ export class ControlGroupContainer extends Container< this.updateInput({ filters }); }; - private recalculateFilters = () => { + private recalculateFilters = (): ControlGroupFilterOutput => { const allFilters: Filter[] = []; let timeslice; Object.values(this.children).map((child: ControlEmbeddable) => { @@ -336,17 +400,71 @@ export class ControlGroupContainer extends Container< timeslice = childOutput.timeslice; } }); + return { filters: uniqFilters(allFilters), timeslice }; + }; - // if filters are different, publish them + private async calculateFiltersFromSelections( + panels: PersistableControlGroupInput['panels'] + ): Promise { + let filtersArray: Filter[] = []; + let timeslice; + await Promise.all( + Object.values(this.children).map(async (child) => { + if (panels[child.id]) { + const controlOutput = + (await (child as ControlEmbeddable).selectionsToFilters?.( + panels[child.id].explicitInput + )) ?? ({} as ControlGroupFilterOutput); + if (controlOutput.filters) { + filtersArray = [...filtersArray, ...controlOutput.filters]; + } else if (controlOutput.timeslice) { + timeslice = controlOutput.timeslice; + } + } + }) + ); + return { filters: filtersArray, timeslice }; + } + + /** + * If apply button is enabled, add the new filters to the unpublished filters component state; + * otherwise, publish new filters right away + */ + private tryPublishFilters = ({ + filters, + timeslice, + }: { + filters?: Filter[]; + timeslice?: TimeSlice; + }) => { + // if filters are different, try publishing them if ( - !compareFilters(this.output.filters ?? [], allFilters ?? [], COMPARE_ALL_OPTIONS) || + !compareFilters(this.output.filters ?? [], filters ?? [], COMPARE_ALL_OPTIONS) || !isEqual(this.output.timeslice, timeslice) ) { - this.updateOutput({ filters: uniqFilters(allFilters), timeslice }); - this.onFiltersPublished$.next(allFilters); + const { + explicitInput: { showApplySelections }, + } = this.getState(); + + if (!showApplySelections) { + this.publishFilters({ filters, timeslice }); + } else { + this.dispatch.setUnpublishedFilters({ filters, timeslice }); + } + } else { + this.dispatch.setUnpublishedFilters(undefined); } }; + public publishFilters = ({ filters, timeslice }: ControlGroupFilterOutput) => { + this.updateOutput({ + filters, + timeslice, + }); + this.dispatch.setUnpublishedFilters(undefined); + this.onFiltersPublished$.next(filters ?? []); + }; + private recalculateDataViews = () => { const allDataViewIds: Set = new Set(); Object.values(this.children).map((child) => { diff --git a/src/plugins/controls/public/control_group/state/control_group_diffing_integration.ts b/src/plugins/controls/public/control_group/state/control_group_diffing_integration.ts index 23f20ff885bcd..f85dcd21bdce3 100644 --- a/src/plugins/controls/public/control_group/state/control_group_diffing_integration.ts +++ b/src/plugins/controls/public/control_group/state/control_group_diffing_integration.ts @@ -6,9 +6,11 @@ * Side Public License, v 1. */ +import { isEqual } from 'lodash'; import { AnyAction, Middleware } from 'redux'; import { debounceTime, Observable, startWith, Subject, switchMap } from 'rxjs'; +import { compareFilters, COMPARE_ALL_OPTIONS } from '@kbn/es-query'; import { ControlGroupContainer } from '..'; import { persistableControlGroupInputIsEqual } from '../../../common'; import { CHANGE_CHECK_DEBOUNCE } from '../../constants'; @@ -41,12 +43,20 @@ export function startDiffingControlGroupState(this: ControlGroupContainer) { const { explicitInput: currentInput, - componentState: { lastSavedInput }, + componentState: { lastSavedInput, lastSavedFilters }, + output: { filters, timeslice }, } = this.getState(); - const hasUnsavedChanges = !persistableControlGroupInputIsEqual( - currentInput, - lastSavedInput + + const hasUnsavedChanges = !( + persistableControlGroupInputIsEqual( + currentInput, + lastSavedInput, + false // never diff selections for unsaved changes - compare the output filters instead + ) && + compareFilters(filters ?? [], lastSavedFilters?.filters ?? [], COMPARE_ALL_OPTIONS) && + isEqual(timeslice, lastSavedFilters?.timeslice) ); + this.unsavedChanges.next(hasUnsavedChanges ? this.getPersistableInput() : undefined); }); }) diff --git a/src/plugins/controls/public/control_group/state/control_group_reducers.ts b/src/plugins/controls/public/control_group/state/control_group_reducers.ts index 313b21af5745b..8be7c9ce03836 100644 --- a/src/plugins/controls/public/control_group/state/control_group_reducers.ts +++ b/src/plugins/controls/public/control_group/state/control_group_reducers.ts @@ -13,17 +13,29 @@ import { ControlWidth } from '../../types'; import { ControlGroupComponentState, ControlGroupInput, ControlGroupReduxState } from '../types'; export const controlGroupReducers = { + setControlWithInvalidSelectionsId: ( + state: WritableDraft, + action: PayloadAction + ) => { + state.componentState.controlWithInvalidSelectionsId = action.payload; + }, setLastSavedInput: ( state: WritableDraft, action: PayloadAction ) => { state.componentState.lastSavedInput = action.payload; }, - setControlWithInvalidSelectionsId: ( + setLastSavedFilters: ( state: WritableDraft, - action: PayloadAction + action: PayloadAction ) => { - state.componentState.controlWithInvalidSelectionsId = action.payload; + state.componentState.lastSavedFilters = action.payload; + }, + setUnpublishedFilters: ( + state: WritableDraft, + action: PayloadAction + ) => { + state.componentState.unpublishedFilters = action.payload; }, setControlStyle: ( state: WritableDraft, diff --git a/src/plugins/controls/public/control_group/types.ts b/src/plugins/controls/public/control_group/types.ts index c48aee3f1ace9..76b2e1f4d84a5 100644 --- a/src/plugins/controls/public/control_group/types.ts +++ b/src/plugins/controls/public/control_group/types.ts @@ -8,12 +8,23 @@ import { DataViewField } from '@kbn/data-views-plugin/common'; import { ContainerOutput } from '@kbn/embeddable-plugin/public'; +import { Filter } from '@kbn/es-query'; import { ReduxEmbeddableState } from '@kbn/presentation-util-plugin/public'; + import { ControlGroupInput, PersistableControlGroupInput } from '../../common/control_group/types'; -import { CommonControlOutput } from '../types'; +import { TimeSlice } from '../../common/types'; + +export interface ControlFilterOutput { + filters?: Filter[]; +} +export interface ControlTimesliceOutput { + timeslice?: TimeSlice; +} + +export type ControlGroupFilterOutput = ControlFilterOutput & ControlTimesliceOutput; export type ControlGroupOutput = ContainerOutput & - Omit & { dataViewIds: string[] }; + ControlGroupFilterOutput & { dataViewIds: string[] }; // public only - redux embeddable state type export type ControlGroupReduxState = ReduxEmbeddableState< @@ -41,7 +52,9 @@ export interface ControlGroupSettings { } export type ControlGroupComponentState = ControlGroupSettings & { - lastSavedInput: PersistableControlGroupInput; + lastSavedInput?: PersistableControlGroupInput; + lastSavedFilters?: ControlGroupFilterOutput; + unpublishedFilters?: ControlGroupFilterOutput; controlWithInvalidSelectionsId?: string; }; diff --git a/src/plugins/controls/public/options_list/components/options_list_popover_footer.tsx b/src/plugins/controls/public/options_list/components/options_list_popover_footer.tsx index 9eef78edde7db..28ed16a3f4f0a 100644 --- a/src/plugins/controls/public/options_list/components/options_list_popover_footer.tsx +++ b/src/plugins/controls/public/options_list/components/options_list_popover_footer.tsx @@ -26,10 +26,12 @@ import { useOptionsList } from '../embeddable/options_list_embeddable'; const aggregationToggleButtons = [ { id: 'optionsList__includeResults', + key: 'optionsList__includeResults', label: OptionsListStrings.popover.getIncludeLabel(), }, { id: 'optionsList__excludeResults', + key: 'optionsList__excludeResults', label: OptionsListStrings.popover.getExcludeLabel(), }, ]; diff --git a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.test.tsx b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.test.tsx index d3c5bb4736e4f..00d9ec69687d2 100644 --- a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.test.tsx +++ b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.test.tsx @@ -6,15 +6,13 @@ * Side Public License, v 1. */ -import { ControlGroupInput } from '../../../common'; -import { lazyLoadReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; import { storybookFlightsDataView } from '@kbn/presentation-util-plugin/public/mocks'; -import { OPTIONS_LIST_CONTROL } from '../../../common'; -import { ControlGroupContainer } from '../../control_group/embeddable/control_group_container'; +import { ControlGroupInput, OPTIONS_LIST_CONTROL } from '../../../common'; +import { mockControlGroupContainer } from '../../../common/mocks'; import { pluginServices } from '../../services'; import { injectStorybookDataView } from '../../services/data_views/data_views.story'; -import { OptionsListEmbeddableFactory } from './options_list_embeddable_factory'; import { OptionsListEmbeddable } from './options_list_embeddable'; +import { OptionsListEmbeddableFactory } from './options_list_embeddable_factory'; pluginServices.getServices().controls.getControlFactory = jest .fn() @@ -25,9 +23,8 @@ pluginServices.getServices().controls.getControlFactory = jest describe('initialize', () => { describe('without selected options', () => { test('should notify control group when initialization is finished', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); // data view not required for test case // setInitializationFinished is called before fetching options when value is not provided @@ -45,9 +42,8 @@ describe('initialize', () => { describe('with selected options', () => { test('should set error message when data view can not be found', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(undefined); @@ -68,9 +64,8 @@ describe('initialize', () => { }); test('should set error message when field can not be found', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); @@ -89,9 +84,8 @@ describe('initialize', () => { }); test('should notify control group when initialization is finished', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); diff --git a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx index ea3d4d80399c5..506530edc1857 100644 --- a/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx +++ b/src/plugins/controls/public/options_list/embeddable/options_list_embeddable.tsx @@ -35,6 +35,7 @@ import { OptionsListEmbeddableInput, OPTIONS_LIST_CONTROL, } from '../..'; +import { ControlFilterOutput } from '../../control_group/types'; import { pluginServices } from '../../services'; import { ControlsDataViewsService } from '../../services/data_views/types'; import { ControlsOptionsListService } from '../../services/options_list/types'; @@ -145,7 +146,14 @@ export class OptionsListEmbeddable private initialize = async () => { const { selectedOptions: initialSelectedOptions } = this.getInput(); if (initialSelectedOptions) { - const filters = await this.buildFilter(); + const { + explicitInput: { existsSelected, exclude }, + } = this.getState(); + const { filters } = await this.selectionsToFilters({ + existsSelected, + exclude, + selectedOptions: initialSelectedOptions, + }); this.dispatch.publishFilters(filters); } this.setInitializationFinished(); @@ -231,7 +239,7 @@ export class OptionsListEmbeddable } }), switchMap(async () => { - const newFilters = await this.buildFilter(); + const { filters: newFilters } = await this.buildFilter(); this.dispatch.publishFilters(newFilters); }) ) @@ -389,15 +397,17 @@ export class OptionsListEmbeddable }); }; - private buildFilter = async () => { - const { existsSelected, selectedOptions } = this.getState().explicitInput ?? {}; - const { exclude } = this.getInput(); + public selectionsToFilters = async ( + input: Partial + ): Promise => { + const { existsSelected, exclude, selectedOptions } = input; if ((!selectedOptions || isEmpty(selectedOptions)) && !existsSelected) { - return []; + return { filters: [] }; } + const { dataView, field } = await this.getCurrentDataViewAndField(); - if (!dataView || !field) return; + if (!dataView || !field) return { filters: [] }; let newFilter: Filter | undefined; if (existsSelected) { @@ -410,11 +420,23 @@ export class OptionsListEmbeddable } } - if (!newFilter) return []; - + if (!newFilter) return { filters: [] }; newFilter.meta.key = field?.name; if (exclude) newFilter.meta.negate = true; - return [newFilter]; + return { filters: [newFilter] }; + }; + + private buildFilter = async (): Promise => { + const { + componentState: { validSelections }, + explicitInput: { existsSelected, exclude }, + } = this.getState(); + + return await this.selectionsToFilters({ + existsSelected, + exclude, + selectedOptions: validSelections, + }); }; public clearSelections() { diff --git a/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.test.tsx b/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.test.tsx index 6a07cd531f8e5..9454e5ad3617b 100644 --- a/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.test.tsx +++ b/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.test.tsx @@ -6,16 +6,14 @@ * Side Public License, v 1. */ -import { of } from 'rxjs'; -import { ControlGroupInput } from '../../../common'; -import { lazyLoadReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; import { storybookFlightsDataView } from '@kbn/presentation-util-plugin/public/mocks'; -import { RANGE_SLIDER_CONTROL } from '../../../common'; -import { ControlGroupContainer } from '../../control_group/embeddable/control_group_container'; +import { of } from 'rxjs'; +import { ControlGroupInput, RANGE_SLIDER_CONTROL } from '../../../common'; +import { mockControlGroupContainer } from '../../../common/mocks'; import { pluginServices } from '../../services'; import { injectStorybookDataView } from '../../services/data_views/data_views.story'; -import { RangeSliderEmbeddableFactory } from './range_slider_embeddable_factory'; import { RangeSliderEmbeddable } from './range_slider_embeddable'; +import { RangeSliderEmbeddableFactory } from './range_slider_embeddable_factory'; let totalResults = 20; beforeEach(() => { @@ -51,9 +49,8 @@ beforeEach(() => { describe('initialize', () => { describe('without selected range', () => { test('should notify control group when initialization is finished', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); // data view not required for test case // setInitializationFinished is called before fetching slider range when value is not provided @@ -71,9 +68,8 @@ describe('initialize', () => { describe('with selected range', () => { test('should set error message when data view can not be found', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(undefined); @@ -94,9 +90,8 @@ describe('initialize', () => { }); test('should set error message when field can not be found', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); @@ -115,9 +110,8 @@ describe('initialize', () => { }); test('should set invalid state when filter returns zero results', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); totalResults = 0; @@ -137,9 +131,8 @@ describe('initialize', () => { }); test('should set range and filter', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); @@ -168,9 +161,8 @@ describe('initialize', () => { }); test('should notify control group when initialization is finished', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); @@ -185,9 +177,8 @@ describe('initialize', () => { }); test('should notify control group when initialization throws', async () => { - const reduxEmbeddablePackage = await lazyLoadReduxToolsPackage(); const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput; - const container = new ControlGroupContainer(reduxEmbeddablePackage, controlGroupInput); + const container = await mockControlGroupContainer(controlGroupInput); injectStorybookDataView(storybookFlightsDataView); diff --git a/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx b/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx index 6efc6e9fc1a65..368fca384742f 100644 --- a/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx +++ b/src/plugins/controls/public/range_slider/embeddable/range_slider_embeddable.tsx @@ -34,6 +34,7 @@ import { RangeSliderEmbeddableInput, RANGE_SLIDER_CONTROL, } from '../..'; +import { ControlFilterOutput } from '../../control_group/types'; import { pluginServices } from '../../services'; import { ControlsDataService } from '../../services/data/types'; import { ControlsDataViewsService } from '../../services/data_views/types'; @@ -135,8 +136,8 @@ export class RangeSliderEmbeddable private initialize = async () => { const [initialMin, initialMax] = this.getInput().value ?? []; if (!isEmpty(initialMin) || !isEmpty(initialMax)) { - const filter = await this.buildFilter(); - this.dispatch.publishFilters(filter); + const { filters: rangeFilter } = await this.buildFilter(); + this.dispatch.publishFilters(rangeFilter); } this.setInitializationFinished(); @@ -190,7 +191,7 @@ export class RangeSliderEmbeddable switchMap(async () => { try { this.dispatch.setLoading(true); - const rangeFilter = await this.buildFilter(); + const { filters: rangeFilter } = await this.buildFilter(); this.dispatch.publishFilters(rangeFilter); await this.runValidations(); this.dispatch.setLoading(false); @@ -300,25 +301,22 @@ export class RangeSliderEmbeddable return { min, max }; }; - private buildFilter = async () => { - const { - explicitInput: { value }, - } = this.getState(); - + public selectionsToFilters = async ( + input: Partial + ): Promise => { + const { value } = input; const [selectedMin, selectedMax] = value ?? ['', '']; const [min, max] = [selectedMin, selectedMax].map(parseFloat); const { dataView, field } = await this.getCurrentDataViewAndField(); - if (!dataView || !field) return []; - - if (isEmpty(selectedMin) && isEmpty(selectedMax)) return []; + if (!dataView || !field || (isEmpty(selectedMin) && isEmpty(selectedMax))) { + return { filters: [] }; + } const params = {} as RangeFilterParams; - if (selectedMin) { params.gte = min; } - if (selectedMax) { params.lte = max; } @@ -328,7 +326,14 @@ export class RangeSliderEmbeddable rangeFilter.meta.type = 'range'; rangeFilter.meta.params = params; - return [rangeFilter]; + return { filters: [rangeFilter] }; + }; + + private buildFilter = async () => { + const { + explicitInput: { value }, + } = this.getState(); + return await this.selectionsToFilters({ value }); }; private onLoadingError(errorMessage: string) { diff --git a/src/plugins/controls/public/time_slider/components/index.scss b/src/plugins/controls/public/time_slider/components/index.scss index c23667f314f05..794b27bddc059 100644 --- a/src/plugins/controls/public/time_slider/components/index.scss +++ b/src/plugins/controls/public/time_slider/components/index.scss @@ -4,7 +4,7 @@ max-inline-size: 100% !important; } -.timeSlider-playToggle { +.timeSlider-playToggle:enabled { background-color: $euiColorPrimary !important; } diff --git a/src/plugins/controls/public/time_slider/components/time_slider.tsx b/src/plugins/controls/public/time_slider/components/time_slider.tsx index 0a40e1c8420e3..a9b0ffd2508e1 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider.tsx +++ b/src/plugins/controls/public/time_slider/components/time_slider.tsx @@ -6,11 +6,13 @@ * Side Public License, v 1. */ -import React, { FC } from 'react'; import { EuiInputPopover } from '@elastic/eui'; -import { FROM_INDEX, TO_INDEX } from '../time_utils'; -import { getRoundedTimeRangeBounds } from '../time_slider_selectors'; +import React, { FC } from 'react'; + +import { TimeSlice } from '../../../common/types'; import { useTimeSlider } from '../embeddable/time_slider_embeddable'; +import { getRoundedTimeRangeBounds } from '../time_slider_selectors'; +import { FROM_INDEX, TO_INDEX } from '../time_utils'; import { TimeSliderPopoverButton } from './time_slider_popover_button'; import { TimeSliderPopoverContent } from './time_slider_popover_content'; @@ -18,7 +20,7 @@ import './index.scss'; interface Props { formatDate: (epoch: number) => string; - onChange: (value?: [number, number]) => void; + onChange: (value?: TimeSlice) => void; } export const TimeSlider: FC = (props: Props) => { diff --git a/src/plugins/controls/public/time_slider/components/time_slider_anchored_range.tsx b/src/plugins/controls/public/time_slider/components/time_slider_anchored_range.tsx index 9e8a8451d0833..041c3301acbcf 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider_anchored_range.tsx +++ b/src/plugins/controls/public/time_slider/components/time_slider_anchored_range.tsx @@ -9,10 +9,11 @@ import React from 'react'; import { EuiRange, EuiRangeTick } from '@elastic/eui'; import { _SingleRangeChangeEvent } from '@elastic/eui/src/components/form/range/types'; +import { TimeSlice } from '../../../common/types'; interface Props { - value: [number, number]; - onChange: (value?: [number, number]) => void; + value: TimeSlice; + onChange: (value?: TimeSlice) => void; stepSize: number; ticks: EuiRangeTick[]; timeRangeMin: number; diff --git a/src/plugins/controls/public/time_slider/components/time_slider_popover_content.tsx b/src/plugins/controls/public/time_slider/components/time_slider_popover_content.tsx index 1e8a9f838ac04..5878a8983e932 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider_popover_content.tsx +++ b/src/plugins/controls/public/time_slider/components/time_slider_popover_content.tsx @@ -14,10 +14,11 @@ import { TimeSliderStrings } from './time_slider_strings'; import { useTimeSlider } from '../embeddable/time_slider_embeddable'; import { TimeSliderAnchoredRange } from './time_slider_anchored_range'; import { TimeSliderSlidingWindowRange } from './time_slider_sliding_window_range'; +import { TimeSlice } from '../../../common/types'; interface Props { - value: [number, number]; - onChange: (value?: [number, number]) => void; + value: TimeSlice; + onChange: (value?: TimeSlice) => void; stepSize: number; ticks: EuiRangeTick[]; timeRangeMin: number; diff --git a/src/plugins/controls/public/time_slider/components/time_slider_prepend.tsx b/src/plugins/controls/public/time_slider/components/time_slider_prepend.tsx index bf27042190acf..0502592a68a88 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider_prepend.tsx +++ b/src/plugins/controls/public/time_slider/components/time_slider_prepend.tsx @@ -6,12 +6,14 @@ * Side Public License, v 1. */ -import { i18n } from '@kbn/i18n'; -import { first } from 'rxjs/operators'; -import React, { FC, useState } from 'react'; -import { EuiButtonIcon } from '@elastic/eui'; +import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; +import { ViewMode } from '@kbn/embeddable-plugin/common'; +import React, { FC, useCallback, useMemo, useState } from 'react'; import { Observable, Subscription } from 'rxjs'; +import { first } from 'rxjs/operators'; +import { useControlGroupContainer } from '../../control_group/embeddable/control_group_container'; import { useTimeSlider } from '../embeddable/time_slider_embeddable'; +import { TimeSliderStrings } from './time_slider_strings'; interface Props { onNext: () => void; @@ -21,12 +23,18 @@ interface Props { export const TimeSliderPrepend: FC = (props: Props) => { const timeSlider = useTimeSlider(); + const controlGroup = useControlGroupContainer(); + + const showApplySelectionsButton = controlGroup.select( + (state) => state.explicitInput.showApplySelections + ); + const viewMode = controlGroup.select((state) => state.explicitInput.viewMode); const [isPaused, setIsPaused] = useState(true); const [timeoutId, setTimeoutId] = useState(undefined); const [subscription, setSubscription] = useState(undefined); - const playNextFrame = () => { + const playNextFrame = useCallback(() => { // advance to next frame props.onNext(); @@ -42,15 +50,15 @@ export const TimeSliderPrepend: FC = (props: Props) => { }); setSubscription(nextFrameSubscription); } - }; + }, [props]); - const onPlay = () => { + const onPlay = useCallback(() => { timeSlider.dispatch.setIsOpen({ isOpen: true }); setIsPaused(false); playNextFrame(); - }; + }, [timeSlider.dispatch, playNextFrame]); - const onPause = () => { + const onPause = useCallback(() => { timeSlider.dispatch.setIsOpen({ isOpen: true }); setIsPaused(true); if (subscription) { @@ -61,7 +69,32 @@ export const TimeSliderPrepend: FC = (props: Props) => { clearTimeout(timeoutId); setTimeoutId(undefined); } - }; + }, [timeSlider.dispatch, subscription, timeoutId]); + + const PlayButton = useMemo(() => { + const Button = ( + + ); + return ( + <> + {showApplySelectionsButton ? ( + + {Button} + + ) : ( + Button + )} + + ); + }, [isPaused, onPlay, onPause, showApplySelectionsButton]); return (
@@ -72,29 +105,13 @@ export const TimeSliderPrepend: FC = (props: Props) => { }} iconType="framePrevious" color="text" - aria-label={i18n.translate('controls.timeSlider.previousLabel', { - defaultMessage: 'Previous time window', - })} + aria-label={TimeSliderStrings.control.getPreviousButtonAriaLabel()} data-test-subj="timeSlider-previousTimeWindow" /> - {props.waitForControlOutputConsumersToLoad$ === undefined ? null : ( - - )} + {props.waitForControlOutputConsumersToLoad$ === undefined || + (showApplySelectionsButton && viewMode === ViewMode.VIEW) + ? null + : PlayButton} { onPause(); @@ -102,9 +119,7 @@ export const TimeSliderPrepend: FC = (props: Props) => { }} iconType="frameNext" color="text" - aria-label={i18n.translate('controls.timeSlider.nextLabel', { - defaultMessage: 'Next time window', - })} + aria-label={TimeSliderStrings.control.getNextButtonAriaLabel()} data-test-subj="timeSlider-nextTimeWindow" />
diff --git a/src/plugins/controls/public/time_slider/components/time_slider_sliding_window_range.tsx b/src/plugins/controls/public/time_slider/components/time_slider_sliding_window_range.tsx index 4b87e8d3405c1..8e1f4c2862b6a 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider_sliding_window_range.tsx +++ b/src/plugins/controls/public/time_slider/components/time_slider_sliding_window_range.tsx @@ -8,10 +8,11 @@ import React from 'react'; import { EuiDualRange, EuiRangeTick } from '@elastic/eui'; +import { TimeSlice } from '../../../common/types'; interface Props { - value: [number, number]; - onChange: (value?: [number, number]) => void; + value: TimeSlice; + onChange: (value?: TimeSlice) => void; stepSize: number; ticks: EuiRangeTick[]; timeRangeMin: number; @@ -20,7 +21,7 @@ interface Props { export function TimeSliderSlidingWindowRange(props: Props) { function onChange(value?: [number | string, number | string]) { - props.onChange(value as [number, number]); + props.onChange(value as TimeSlice); } return ( diff --git a/src/plugins/controls/public/time_slider/components/time_slider_strings.ts b/src/plugins/controls/public/time_slider/components/time_slider_strings.ts index a80a5d477e1da..8d0e4a65962e4 100644 --- a/src/plugins/controls/public/time_slider/components/time_slider_strings.ts +++ b/src/plugins/controls/public/time_slider/components/time_slider_strings.ts @@ -18,5 +18,25 @@ export const TimeSliderStrings = { i18n.translate('controls.timeSlider.settings.unpinStart', { defaultMessage: 'Unpin start', }), + getPlayButtonAriaLabel: (isPaused: boolean) => + isPaused + ? i18n.translate('controls.timeSlider.playLabel', { + defaultMessage: 'Play', + }) + : i18n.translate('controls.timeSlider.pauseLabel', { + defaultMessage: 'Pause', + }), + getPreviousButtonAriaLabel: () => + i18n.translate('controls.timeSlider.previousLabel', { + defaultMessage: 'Previous time window', + }), + getNextButtonAriaLabel: () => + i18n.translate('controls.timeSlider.nextLabel', { + defaultMessage: 'Next time window', + }), + getPlayButtonDisabledTooltip: () => + i18n.translate('controls.timeSlider.playButtonTooltip.disabled', { + defaultMessage: '"Apply selections automatically" is disabled in Control Settings.', + }), }, }; diff --git a/src/plugins/controls/public/time_slider/embeddable/time_slider_embeddable.tsx b/src/plugins/controls/public/time_slider/embeddable/time_slider_embeddable.tsx index cd073e5f94629..84ed946f56a9a 100644 --- a/src/plugins/controls/public/time_slider/embeddable/time_slider_embeddable.tsx +++ b/src/plugins/controls/public/time_slider/embeddable/time_slider_embeddable.tsx @@ -20,7 +20,9 @@ import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import { TIME_SLIDER_CONTROL } from '../..'; import { TimeSliderControlEmbeddableInput } from '../../../common/time_slider/types'; +import { TimeSlice } from '../../../common/types'; import { ControlGroupContainer } from '../../control_group/embeddable/control_group_container'; +import { ControlTimesliceOutput } from '../../control_group/types'; import { pluginServices } from '../../services'; import { ControlsDataService } from '../../services/data/types'; import { ControlsSettingsService } from '../../services/settings/types'; @@ -156,11 +158,36 @@ export class TimeSliderControlEmbeddable } }; + public selectionsToFilters = async ( + input: Partial + ): Promise => { + const { timesliceStartAsPercentageOfTimeRange, timesliceEndAsPercentageOfTimeRange } = input; + if ( + timesliceStartAsPercentageOfTimeRange === undefined || + timesliceEndAsPercentageOfTimeRange === undefined + ) { + return { timeslice: undefined }; + } + + const { + componentState: { stepSize, timeRangeBounds }, + } = this.getState(); + + const timeRange = timeRangeBounds[TO_INDEX] - timeRangeBounds[FROM_INDEX]; + const from = timeRangeBounds[FROM_INDEX] + timesliceStartAsPercentageOfTimeRange * timeRange; + const to = timeRangeBounds[FROM_INDEX] + timesliceEndAsPercentageOfTimeRange * timeRange; + const value = [ + roundDownToNextStepSizeFactor(from, stepSize), + roundUpToNextStepSizeFactor(to, stepSize), + ] as TimeSlice; + + return { timeslice: value }; + }; + private onInputChange() { const input = this.getInput(); const { timesliceStartAsPercentageOfTimeRange, timesliceEndAsPercentageOfTimeRange } = this.prevTimesliceAsPercentage ?? {}; - if ( timesliceStartAsPercentageOfTimeRange !== input.timesliceStartAsPercentageOfTimeRange || timesliceEndAsPercentageOfTimeRange !== input.timesliceEndAsPercentageOfTimeRange @@ -193,25 +220,18 @@ export class TimeSliderControlEmbeddable private syncWithTimeRange() { this.prevTimeRange = this.getInput().timeRange; - const stepSize = this.getState().componentState.stepSize; + const { explicitInput: currentInput } = this.getState(); const { timesliceStartAsPercentageOfTimeRange, timesliceEndAsPercentageOfTimeRange } = - this.getState().explicitInput; - + currentInput; if ( timesliceStartAsPercentageOfTimeRange !== undefined && timesliceEndAsPercentageOfTimeRange !== undefined ) { - const timeRangeBounds = this.getState().componentState.timeRangeBounds; - const timeRange = timeRangeBounds[TO_INDEX] - timeRangeBounds[FROM_INDEX]; - const from = timeRangeBounds[FROM_INDEX] + timesliceStartAsPercentageOfTimeRange * timeRange; - const to = timeRangeBounds[FROM_INDEX] + timesliceEndAsPercentageOfTimeRange * timeRange; - const value = [ - roundDownToNextStepSizeFactor(from, stepSize), - roundUpToNextStepSizeFactor(to, stepSize), - ] as [number, number]; - this.dispatch.publishValue({ value }); - this.dispatch.setValue({ value }); - this.onRangeChange(value[TO_INDEX] - value[FROM_INDEX]); + this.selectionsToFilters(currentInput).then(({ timeslice }) => { + this.dispatch.publishValue({ value: timeslice }); + this.dispatch.setValue({ value: timeslice }); + if (timeslice) this.onRangeChange(timeslice[TO_INDEX] - timeslice[FROM_INDEX]); + }); } } @@ -226,11 +246,11 @@ export class TimeSliderControlEmbeddable return; } - private debouncedPublishChange = _.debounce((value?: [number, number]) => { + private debouncedPublishChange = _.debounce((value?: TimeSlice) => { this.dispatch.publishValue({ value }); }, 500); - private getTimeSliceAsPercentageOfTimeRange(value?: [number, number]) { + private getTimeSliceAsPercentageOfTimeRange(value?: TimeSlice) { let timesliceStartAsPercentageOfTimeRange: number | undefined; let timesliceEndAsPercentageOfTimeRange: number | undefined; if (value) { @@ -248,7 +268,7 @@ export class TimeSliderControlEmbeddable return { timesliceStartAsPercentageOfTimeRange, timesliceEndAsPercentageOfTimeRange }; } - private onTimesliceChange = (value?: [number, number]) => { + private onTimesliceChange = (value?: TimeSlice) => { const { timesliceStartAsPercentageOfTimeRange, timesliceEndAsPercentageOfTimeRange } = this.getTimeSliceAsPercentageOfTimeRange(value); @@ -371,7 +391,7 @@ export class TimeSliderControlEmbeddable { + onChange={(value?: TimeSlice) => { this.onTimesliceChange(value); const range = value ? value[TO_INDEX] - value[FROM_INDEX] : undefined; this.onRangeChange(range); diff --git a/src/plugins/controls/public/time_slider/time_slider_reducers.ts b/src/plugins/controls/public/time_slider/time_slider_reducers.ts index 4d4d599a06aaa..e4bbda565d739 100644 --- a/src/plugins/controls/public/time_slider/time_slider_reducers.ts +++ b/src/plugins/controls/public/time_slider/time_slider_reducers.ts @@ -6,15 +6,17 @@ * Side Public License, v 1. */ +import { EuiRangeTick } from '@elastic/eui'; import { PayloadAction } from '@reduxjs/toolkit'; import { WritableDraft } from 'immer/dist/types/types-external'; -import { EuiRangeTick } from '@elastic/eui'; + +import { TimeSlice } from '../../common/types'; import { TimeSliderReduxState } from './types'; export const timeSliderReducers = { publishValue: ( state: WritableDraft, - action: PayloadAction<{ value?: [number, number] }> + action: PayloadAction<{ value?: TimeSlice }> ) => { state.output.timeslice = action.payload.value; }, @@ -47,7 +49,7 @@ export const timeSliderReducers = { setValue: ( state: WritableDraft, action: PayloadAction<{ - value?: [number, number]; + value?: TimeSlice; }> ) => { state.componentState.value = action.payload.value; diff --git a/src/plugins/controls/public/time_slider/types.ts b/src/plugins/controls/public/time_slider/types.ts index 9e72b7dd50113..3ec0cead0b750 100644 --- a/src/plugins/controls/public/time_slider/types.ts +++ b/src/plugins/controls/public/time_slider/types.ts @@ -11,6 +11,7 @@ import { EuiRangeTick } from '@elastic/eui'; import { ControlOutput } from '../types'; import { TimeSliderControlEmbeddableInput } from '../../common/time_slider/types'; +import { TimeSlice } from '../../common/types'; export * from '../../common/time_slider/types'; @@ -22,7 +23,7 @@ export interface TimeSliderSubjectState { stepSize: number; ticks: EuiRangeTick[]; timeRangeBounds: [number, number]; - value?: [number, number]; + value?: TimeSlice; } // public only - redux embeddable state type diff --git a/src/plugins/controls/public/types.ts b/src/plugins/controls/public/types.ts index 43b0e12f3fcb6..bb1bbf87b62e4 100644 --- a/src/plugins/controls/public/types.ts +++ b/src/plugins/controls/public/types.ts @@ -8,7 +8,8 @@ import { ReactNode } from 'react'; -import { Filter } from '@kbn/es-query'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DataViewField, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { EmbeddableFactory, EmbeddableOutput, @@ -17,18 +18,15 @@ import { IEmbeddable, } from '@kbn/embeddable-plugin/public'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { DataViewField, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import { ControlInput, ControlWidth, DataControlInput } from '../common/types'; +import { ControlGroupFilterOutput } from './control_group/types'; import { ControlsServiceType } from './services/controls/types'; -export interface CommonControlOutput { - filters?: Filter[]; +export type CommonControlOutput = ControlGroupFilterOutput & { dataViewId?: string; - timeslice?: [number, number]; -} +}; export type ControlOutput = EmbeddableOutput & CommonControlOutput; @@ -44,9 +42,14 @@ export type ControlEmbeddable< > = IEmbeddable & { isChained?: () => boolean; renderPrepend?: () => ReactNode | undefined; + selectionsToFilters?: ( + input: Partial + ) => Promise; }; -export interface IClearableControl extends ControlEmbeddable { +export interface IClearableControl< + TClearableControlEmbeddableInput extends ControlInput = ControlInput +> extends ControlEmbeddable { clearSelections: () => void; } @@ -113,4 +116,4 @@ export interface ControlsPluginStartDeps { } // re-export from common -export type { ControlWidth, ControlInput, DataControlInput, ControlStyle } from '../common/types'; +export type { ControlInput, ControlStyle, ControlWidth, DataControlInput } from '../common/types'; diff --git a/src/plugins/dashboard/common/content_management/cm_services.ts b/src/plugins/dashboard/common/content_management/cm_services.ts index 14f6a731e1402..4e812bbf37b41 100644 --- a/src/plugins/dashboard/common/content_management/cm_services.ts +++ b/src/plugins/dashboard/common/content_management/cm_services.ts @@ -13,8 +13,10 @@ import type { // We export the versioned service definition from this file and not the barrel to avoid adding // the schemas in the "public" js bundle -import { serviceDefinition as v1 } from './v1/cm_services'; +import { serviceDefinition as v1 } from './v1'; +import { serviceDefinition as v2 } from './v2'; export const cmServicesDefinition: { [version: Version]: ServicesDefinition } = { 1: v1, + 2: v2, }; diff --git a/src/plugins/dashboard/common/content_management/constants.ts b/src/plugins/dashboard/common/content_management/constants.ts index dcbb1ac7d6974..eaa6575eb82b7 100644 --- a/src/plugins/dashboard/common/content_management/constants.ts +++ b/src/plugins/dashboard/common/content_management/constants.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export const LATEST_VERSION = 1; +export const LATEST_VERSION = 2; export const CONTENT_ID = 'dashboard'; diff --git a/src/plugins/dashboard/common/content_management/index.ts b/src/plugins/dashboard/common/content_management/index.ts index 5f0a06d35f734..ac4a1373e5104 100644 --- a/src/plugins/dashboard/common/content_management/index.ts +++ b/src/plugins/dashboard/common/content_management/index.ts @@ -17,8 +17,3 @@ export type { DashboardAttributes, SavedDashboardPanel, } from './latest'; - -// Today "v1" === "latest" so the export under DashboardV1 namespace is not really useful -// We leave it as a reference for future version when it will be needed to export/support older types -// in the UIs. -export * as DashboardV1 from './v1'; diff --git a/src/plugins/dashboard/common/content_management/latest.ts b/src/plugins/dashboard/common/content_management/latest.ts index f02d0a348e543..5616c4b4b3ffb 100644 --- a/src/plugins/dashboard/common/content_management/latest.ts +++ b/src/plugins/dashboard/common/content_management/latest.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -// Latest version is 1 -export * from './v1'; +// Latest version is 2 +export * from './v2'; diff --git a/src/plugins/dashboard/common/content_management/v1/cm_services.ts b/src/plugins/dashboard/common/content_management/v1/cm_services.ts index 3de67a1dd3cd9..e1fa81338a192 100644 --- a/src/plugins/dashboard/common/content_management/v1/cm_services.ts +++ b/src/plugins/dashboard/common/content_management/v1/cm_services.ts @@ -14,7 +14,16 @@ import { createResultSchema, } from '@kbn/content-management-utils'; -const dashboardAttributesSchema = schema.object( +export const controlGroupInputSchema = schema + .object({ + panelsJSON: schema.maybe(schema.string()), + controlStyle: schema.maybe(schema.string()), + chainingSystem: schema.maybe(schema.string()), + ignoreParentSettingsJSON: schema.maybe(schema.string()), + }) + .extends({}, { unknowns: 'ignore' }); + +export const dashboardAttributesSchema = schema.object( { // General title: schema.string(), @@ -39,14 +48,7 @@ const dashboardAttributesSchema = schema.object( ), // Dashboard Content - controlGroupInput: schema.maybe( - schema.object({ - panelsJSON: schema.maybe(schema.string()), - controlStyle: schema.maybe(schema.string()), - chainingSystem: schema.maybe(schema.string()), - ignoreParentSettingsJSON: schema.maybe(schema.string()), - }) - ), + controlGroupInput: schema.maybe(controlGroupInputSchema), panelsJSON: schema.string({ defaultValue: '[]' }), optionsJSON: schema.string({ defaultValue: '{}' }), @@ -57,7 +59,7 @@ const dashboardAttributesSchema = schema.object( { unknowns: 'forbid' } ); -const dashboardSavedObjectSchema = savedObjectSchema(dashboardAttributesSchema); +export const dashboardSavedObjectSchema = savedObjectSchema(dashboardAttributesSchema); const searchOptionsSchema = schema.maybe( schema.object( diff --git a/src/plugins/dashboard/common/content_management/v1/index.ts b/src/plugins/dashboard/common/content_management/v1/index.ts index ecfe16506e3ee..4fb96a584691e 100644 --- a/src/plugins/dashboard/common/content_management/v1/index.ts +++ b/src/plugins/dashboard/common/content_management/v1/index.ts @@ -6,11 +6,17 @@ * Side Public License, v 1. */ -import { DashboardCrudTypes } from './types'; export type { GridData, + DashboardItem, DashboardCrudTypes, DashboardAttributes, SavedDashboardPanel, } from './types'; -export type DashboardItem = DashboardCrudTypes['Item']; + +export { + serviceDefinition, + dashboardSavedObjectSchema, + controlGroupInputSchema, + dashboardAttributesSchema, +} from './cm_services'; diff --git a/src/plugins/dashboard/common/content_management/v1/types.ts b/src/plugins/dashboard/common/content_management/v1/types.ts index 05d216e8a785e..55546f9f0679c 100644 --- a/src/plugins/dashboard/common/content_management/v1/types.ts +++ b/src/plugins/dashboard/common/content_management/v1/types.ts @@ -28,6 +28,8 @@ export type DashboardCrudTypes = ContentManagementCrudTypes< } >; +export type DashboardItem = DashboardCrudTypes['Item']; + /** * Grid type for React Grid Layout */ @@ -59,9 +61,14 @@ export interface SavedDashboardPanel { version?: string; } +type ControlGroupAttributesV1 = Pick< + RawControlGroupAttributes, + 'panelsJSON' | 'chainingSystem' | 'controlStyle' | 'ignoreParentSettingsJSON' +>; + /* eslint-disable-next-line @typescript-eslint/consistent-type-definitions */ export type DashboardAttributes = { - controlGroupInput?: RawControlGroupAttributes; + controlGroupInput?: ControlGroupAttributesV1; refreshInterval?: RefreshInterval; timeRestore: boolean; optionsJSON?: string; diff --git a/src/plugins/dashboard/common/content_management/v2/cm_services.ts b/src/plugins/dashboard/common/content_management/v2/cm_services.ts new file mode 100644 index 0000000000000..2c9bb746312c4 --- /dev/null +++ b/src/plugins/dashboard/common/content_management/v2/cm_services.ts @@ -0,0 +1,77 @@ +/* + * 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 { schema } from '@kbn/config-schema'; +import { + createResultSchema, + objectTypeToGetResultSchema, + savedObjectSchema, +} from '@kbn/content-management-utils'; +import type { ContentManagementServicesDefinition as ServicesDefinition } from '@kbn/object-versioning'; +import { + controlGroupInputSchema as controlGroupInputSchemaV1, + dashboardAttributesSchema as dashboardAttributesSchemaV1, + serviceDefinition as serviceDefinitionV1, +} from '../v1'; + +export const dashboardAttributesSchema = dashboardAttributesSchemaV1.extends( + { + controlGroupInput: schema.maybe( + controlGroupInputSchemaV1.extends( + { + showApplySelections: schema.maybe(schema.boolean()), + }, + { unknowns: 'ignore' } + ) + ), + }, + { unknowns: 'ignore' } +); + +export const dashboardSavedObjectSchema = savedObjectSchema(dashboardAttributesSchema); + +// Content management service definition. +export const serviceDefinition: ServicesDefinition = { + get: { + out: { + result: { + schema: objectTypeToGetResultSchema(dashboardSavedObjectSchema), + }, + }, + }, + create: { + in: { + ...serviceDefinitionV1?.create?.in, + data: { + schema: dashboardAttributesSchema, + }, + }, + out: { + result: { + schema: createResultSchema(dashboardSavedObjectSchema), + }, + }, + }, + update: { + in: { + ...serviceDefinitionV1.update?.in, + data: { + schema: dashboardAttributesSchema, + }, + }, + }, + search: { + in: serviceDefinitionV1.search?.in, + }, + mSearch: { + out: { + result: { + schema: dashboardSavedObjectSchema, + }, + }, + }, +}; diff --git a/src/plugins/dashboard/common/content_management/v2/index.ts b/src/plugins/dashboard/common/content_management/v2/index.ts new file mode 100644 index 0000000000000..15105c60d5aba --- /dev/null +++ b/src/plugins/dashboard/common/content_management/v2/index.ts @@ -0,0 +1,16 @@ +/* + * 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 { + serviceDefinition, + dashboardSavedObjectSchema, + dashboardAttributesSchema, +} from './cm_services'; + +export type { GridData, DashboardItem, SavedDashboardPanel } from '../v1/types'; // no changes made to types from v1 to v2 +export type { DashboardCrudTypes, DashboardAttributes } from './types'; diff --git a/src/plugins/dashboard/common/content_management/v2/types.ts b/src/plugins/dashboard/common/content_management/v2/types.ts new file mode 100644 index 0000000000000..00859c1f5cae6 --- /dev/null +++ b/src/plugins/dashboard/common/content_management/v2/types.ts @@ -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 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 { + ContentManagementCrudTypes, + SavedObjectCreateOptions, + SavedObjectUpdateOptions, +} from '@kbn/content-management-utils'; +import { RawControlGroupAttributes } from '@kbn/controls-plugin/common'; +import { DashboardContentType } from '../types'; +import { DashboardAttributes as DashboardAttributesV1 } from '../v1/types'; + +type ControlGroupAttributesV2 = Pick< + RawControlGroupAttributes, + | 'panelsJSON' + | 'chainingSystem' + | 'controlStyle' + | 'ignoreParentSettingsJSON' + | 'showApplySelections' +>; + +export type DashboardAttributes = Omit & { + controlGroupInput?: ControlGroupAttributesV2; +}; + +export type DashboardCrudTypes = ContentManagementCrudTypes< + DashboardContentType, + DashboardAttributes, + Pick, + Pick, + { + /** Flag to indicate to only search the text on the "title" field */ + onlyTitle?: boolean; + } +>; diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.test.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.test.tsx index f6859d44a713f..98b60904564a2 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.test.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.test.tsx @@ -61,8 +61,8 @@ describe('filters notification action', () => { getAllDataViews: jest.fn(), getDashboardPanelFromId: jest.fn(), }, - localFilters: filtersSubject, - localQuery: querySubject, + filters$: filtersSubject, + query$: querySubject, }, }; }); diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx index ce1a958959a92..9a5d5377acba3 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_action.tsx @@ -14,14 +14,14 @@ import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { apiCanAccessViewMode, - apiPublishesPartialLocalUnifiedSearch, + apiPublishesPartialUnifiedSearch, apiHasUniqueId, CanAccessViewMode, EmbeddableApiContext, getInheritedViewMode, getViewModeSubject, HasParentApi, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, HasUniqueId, } from '@kbn/presentation-publishing'; import { merge } from 'rxjs'; @@ -34,19 +34,19 @@ export const BADGE_FILTERS_NOTIFICATION = 'ACTION_FILTERS_NOTIFICATION'; export type FiltersNotificationActionApi = HasUniqueId & CanAccessViewMode & - Partial & + Partial & HasParentApi; const isApiCompatible = (api: unknown | null): api is FiltersNotificationActionApi => Boolean( - apiHasUniqueId(api) && apiCanAccessViewMode(api) && apiPublishesPartialLocalUnifiedSearch(api) + apiHasUniqueId(api) && apiCanAccessViewMode(api) && apiPublishesPartialUnifiedSearch(api) ); const compatibilityCheck = (api: EmbeddableApiContext['embeddable']) => { if (!isApiCompatible(api) || getInheritedViewMode(api) !== 'edit') return false; - const query = api.localQuery?.value; + const query = api.query$?.value; return ( - (api.localFilters?.value ?? []).length > 0 || + (api.filters$?.value ?? []).length > 0 || (isOfQueryType(query) && query.query !== '') || isOfAggregateQueryType(query) ); @@ -93,7 +93,7 @@ export class FiltersNotificationAction implements Action { }; public couldBecomeCompatible({ embeddable }: EmbeddableApiContext) { - return apiPublishesPartialLocalUnifiedSearch(embeddable); + return apiPublishesPartialUnifiedSearch(embeddable); } public subscribeToCompatibilityChanges( @@ -102,8 +102,8 @@ export class FiltersNotificationAction implements Action { ) { if (!isApiCompatible(embeddable)) return; return merge( - ...[embeddable.localQuery, embeddable.localFilters, getViewModeSubject(embeddable)].filter( - (value) => Boolean(value) + ...[embeddable.query$, embeddable.filters$, getViewModeSubject(embeddable)].filter((value) => + Boolean(value) ) ).subscribe(() => onChange(compatibilityCheck(embeddable), this)); } diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.test.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.test.tsx index fe14ade703b63..1ce1647e34ffa 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.test.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.test.tsx @@ -63,8 +63,8 @@ describe('filters notification popover', () => { getAllDataViews: jest.fn(), getDashboardPanelFromId: jest.fn(), }, - localFilters: filtersSubject, - localQuery: querySubject, + filters$: filtersSubject, + query$: querySubject, }; }); diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx index fd41c43854eee..91de530d4fc29 100644 --- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx @@ -34,23 +34,23 @@ export function FiltersNotificationPopover({ api }: { api: FiltersNotificationAc const editPanelAction = getEditPanelAction(); - const filters = useMemo(() => api.localFilters?.value, [api]); + const filters = useMemo(() => api.filters$?.value, [api]); const displayName = dashboardFilterNotificationActionStrings.getDisplayName(); const { queryString, queryLanguage } = useMemo(() => { - const localQuery = api.localQuery?.value; - if (!localQuery) return {}; - if (isOfQueryType(localQuery)) { - if (typeof localQuery.query === 'string') { - return { queryString: localQuery.query }; + const query = api.query$?.value; + if (!query) return {}; + if (isOfQueryType(query)) { + if (typeof query.query === 'string') { + return { queryString: query.query }; } else { - return { queryString: JSON.stringify(localQuery.query, null, 2) }; + return { queryString: JSON.stringify(query.query, null, 2) }; } } else { setDisableEditButton(true); - const language: 'sql' | 'esql' | undefined = getAggregateQueryMode(localQuery); + const language: 'sql' | 'esql' | undefined = getAggregateQueryMode(query); return { - queryString: localQuery[language as keyof AggregateQuery], + queryString: query[language as keyof AggregateQuery], queryLanguage: language, }; } diff --git a/src/plugins/dashboard/public/dashboard_app/_dashboard_app_strings.ts b/src/plugins/dashboard/public/dashboard_app/_dashboard_app_strings.ts index df343c3cf9d9c..1d53561b619d9 100644 --- a/src/plugins/dashboard/public/dashboard_app/_dashboard_app_strings.ts +++ b/src/plugins/dashboard/public/dashboard_app/_dashboard_app_strings.ts @@ -28,7 +28,7 @@ export const dashboardReadonlyBadge = { export const dashboardManagedBadge = { getTooltip: () => i18n.translate('dashboard.badge.managed.tooltip', { - defaultMessage: 'This dashboard is system managed. Clone this dashboard to make changes.', + defaultMessage: 'Elastic manages this dashboard. Clone it to make changes.', }), }; diff --git a/src/plugins/dashboard/public/dashboard_app/locator/get_dashboard_locator_params.ts b/src/plugins/dashboard/public/dashboard_app/locator/get_dashboard_locator_params.ts index 0843029ac3fc0..1235eb6609123 100644 --- a/src/plugins/dashboard/public/dashboard_app/locator/get_dashboard_locator_params.ts +++ b/src/plugins/dashboard/public/dashboard_app/locator/get_dashboard_locator_params.ts @@ -7,17 +7,17 @@ */ import { isFilterPinned, type Query } from '@kbn/es-query'; -import type { HasParentApi, PublishesLocalUnifiedSearch } from '@kbn/presentation-publishing'; +import type { HasParentApi, PublishesUnifiedSearch } from '@kbn/presentation-publishing'; import type { DashboardDrilldownOptions } from '@kbn/presentation-util-plugin/public'; import type { DashboardLocatorParams } from '../../dashboard_container'; export const getDashboardLocatorParamsFromEmbeddable = ( - api: Partial>>, + api: Partial>>, options: DashboardDrilldownOptions ): Partial => { const params: DashboardLocatorParams = {}; - const query = api.parentApi?.localQuery?.value; + const query = api.parentApi?.query$?.value; if (query && options.useCurrentFilters) { params.query = query as Query; } @@ -25,14 +25,14 @@ export const getDashboardLocatorParamsFromEmbeddable = ( // if useCurrentDashboardDataRange is enabled, then preserve current time range // if undefined is passed, then destination dashboard will figure out time range itself // for brush event this time range would be overwritten - const timeRange = api.localTimeRange?.value ?? api.parentApi?.localTimeRange?.value; + const timeRange = api.timeRange$?.value ?? api.parentApi?.timeRange$?.value; if (timeRange && options.useCurrentDateRange) { params.timeRange = timeRange; } // if useCurrentDashboardFilters enabled, then preserve all the filters (pinned, unpinned, and from controls) // otherwise preserve only pinned - const filters = api.parentApi?.localFilters?.value ?? []; + const filters = api.parentApi?.filters$?.value ?? []; params.filters = options.useCurrentFilters ? filters : filters?.filter((f) => isFilterPinned(f)); return params; diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss new file mode 100644 index 0000000000000..859a0ee11067e --- /dev/null +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss @@ -0,0 +1,6 @@ +.dshSolutionToolbar__editorContextMenu { + @include euiScrollBar; + @include euiOverflowShadow; + max-height: 60vh; + overflow-y: scroll; +} \ No newline at end of file diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx index 7fe5c9343aa64..1b460d247d67c 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import './editor_menu.scss'; + import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react'; import { EuiBadge, diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx index 948b9f7bc6332..7bbb29c3013e6 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx @@ -105,9 +105,10 @@ export const Item = React.forwardRef( if (reactEmbeddableRegistryHasKey(type)) { return ( ); diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx index 64187ccd2d9e4..d311cc005793b 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx @@ -14,7 +14,6 @@ import { isReferenceOrValueEmbeddable, reactEmbeddableRegistryHasKey, } from '@kbn/embeddable-plugin/public'; -import { SerializedPanelState } from '@kbn/presentation-containers'; import { showSaveModal } from '@kbn/saved-objects-plugin/public'; import { cloneDeep } from 'lodash'; import React from 'react'; @@ -36,28 +35,16 @@ const serializeAllPanelState = async ( dashboard: DashboardContainer ): Promise<{ panels: DashboardContainerInput['panels']; references: Reference[] }> => { const references: Reference[] = []; - const reactEmbeddableSavePromises: Array< - Promise<{ serializedState: SerializedPanelState; uuid: string }> - > = []; const panels = cloneDeep(dashboard.getInput().panels); for (const [uuid, panel] of Object.entries(panels)) { if (!reactEmbeddableRegistryHasKey(panel.type)) continue; const api = dashboard.reactEmbeddableChildren.value[uuid]; if (api) { - reactEmbeddableSavePromises.push( - new Promise((resolve) => { - api.serializeState().then((serializedState) => { - resolve({ serializedState, uuid }); - }); - }) - ); + const serializedState = api.serializeState(); + panels[uuid].explicitInput = { ...serializedState.rawState, id: uuid }; + references.push(...prefixReferencesFromPanel(uuid, serializedState.references ?? [])); } } - const saveResults = await Promise.all(reactEmbeddableSavePromises); - for (const { serializedState, uuid } of saveResults) { - panels[uuid].explicitInput = { ...serializedState.rawState, id: uuid }; - references.push(...prefixReferencesFromPanel(uuid, serializedState.references ?? [])); - } return { panels, references }; }; @@ -153,7 +140,7 @@ export function runSaveAs(this: DashboardContainer) { this.dispatch.setStateFromSaveModal(stateFromSaveModal); this.dispatch.setLastSavedInput(dashboardStateToSave); if (this.controlGroup && persistableControlGroupInput) { - this.controlGroup.dispatch.setLastSavedInput(persistableControlGroupInput); + this.controlGroup.setSavedState(persistableControlGroupInput); } }); } @@ -214,7 +201,7 @@ export async function runQuickSave(this: DashboardContainer) { this.dispatch.setLastSavedInput(dashboardStateToSave); this.lastSavedState.next(); if (this.controlGroup && persistableControlGroupInput) { - this.controlGroup.dispatch.setLastSavedInput(persistableControlGroupInput); + this.controlGroup.setSavedState(persistableControlGroupInput); } return saveResult; 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 e23c7cdb09846..c52f50f755620 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 @@ -472,7 +472,7 @@ export const initializeDashboard = async ({ ); // -------------------------------------------------------------------------------------- - // Set parentApi.localFilters to include dashboardContainer filters and control group filters + // Set parentApi.filters$ to include dashboardContainer filters and control group filters // -------------------------------------------------------------------------------------- untilDashboardReady().then((dashboardContainer) => { if (!dashboardContainer.controlGroup) { @@ -486,8 +486,8 @@ export const initializeDashboard = async ({ ); } - const localFilters = new BehaviorSubject(getCombinedFilters()); - dashboardContainer.localFilters = localFilters; + const filters$ = new BehaviorSubject(getCombinedFilters()); + dashboardContainer.filters$ = filters$; const inputFilters$ = dashboardContainer.getInput$().pipe( startWith(dashboardContainer.getInput()), @@ -505,7 +505,7 @@ export const initializeDashboard = async ({ dashboardContainer.integrationSubscriptions.add( combineLatest([inputFilters$, controlGroupFilters$]).subscribe(() => { - localFilters.next(getCombinedFilters()); + filters$.next(getCombinedFilters()); }) ); }); diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx index 22eb43994911c..90b4fb3094274 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx @@ -20,7 +20,6 @@ import { EmbeddableFactoryNotFoundError, isExplicitInputWithAttributes, PanelNotFoundError, - ReactEmbeddableParentContext, reactEmbeddableRegistryHasKey, ViewMode, type EmbeddableFactory, @@ -304,9 +303,7 @@ export class DashboardContainer > - - - + diff --git a/src/plugins/dashboard/public/dashboard_container/external_api/dashboard_api.ts b/src/plugins/dashboard/public/dashboard_container/external_api/dashboard_api.ts index ad9a32d31f861..c2ea5f818bfbc 100644 --- a/src/plugins/dashboard/public/dashboard_container/external_api/dashboard_api.ts +++ b/src/plugins/dashboard/public/dashboard_container/external_api/dashboard_api.ts @@ -11,7 +11,7 @@ import { CanDuplicatePanels, CanExpandPanels, TracksOverlays } from '@kbn/presen import { HasType, HasTypeDisplayName, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, PublishesPanelTitle, PublishesSavedObjectId, } from '@kbn/presentation-publishing'; @@ -21,10 +21,7 @@ import { DashboardContainer } from '../embeddable/dashboard_container'; // TODO lock down DashboardAPI export type DashboardAPI = DashboardContainer & Partial< - HasType<'dashboard'> & - PublishesLocalUnifiedSearch & - PublishesPanelTitle & - PublishesSavedObjectId + HasType<'dashboard'> & PublishesUnifiedSearch & PublishesPanelTitle & PublishesSavedObjectId >; export type AwaitingDashboardAPI = DashboardAPI | null; diff --git a/src/plugins/dashboard/public/dashboard_container/index.ts b/src/plugins/dashboard/public/dashboard_container/index.ts index d09b5014064d9..e0b421d65fd15 100644 --- a/src/plugins/dashboard/public/dashboard_container/index.ts +++ b/src/plugins/dashboard/public/dashboard_container/index.ts @@ -6,11 +6,12 @@ * Side Public License, v 1. */ +import { LATEST_VERSION } from '../../common/content_management'; import { convertNumberToDashboardVersion } from '../services/dashboard_content_management/lib/dashboard_versioning'; export const DASHBOARD_CONTAINER_TYPE = 'dashboard'; -export const LATEST_DASHBOARD_CONTAINER_VERSION = convertNumberToDashboardVersion(1); +export const LATEST_DASHBOARD_CONTAINER_VERSION = convertNumberToDashboardVersion(LATEST_VERSION); export type { DashboardContainer } from './embeddable/dashboard_container'; export { diff --git a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts index a2b0c3f8609b2..93f535b9b4d40 100644 --- a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts +++ b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts @@ -91,7 +91,6 @@ export const saveDashboardState = async ({ query, title, filters, - version, timeRestore, description, @@ -153,7 +152,7 @@ export const saveDashboardState = async ({ : undefined; const rawDashboardAttributes: DashboardAttributes = { - version: convertDashboardVersionToNumber(version ?? LATEST_DASHBOARD_CONTAINER_VERSION), + version: convertDashboardVersionToNumber(LATEST_DASHBOARD_CONTAINER_VERSION), controlGroupInput: serializeControlGroupInput(controlGroupInput), kibanaSavedObjectMeta: { searchSourceJSON }, description: description ?? '', diff --git a/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.test.ts b/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.test.ts new file mode 100644 index 0000000000000..3e5c5d3a5b134 --- /dev/null +++ b/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.test.ts @@ -0,0 +1,59 @@ +/* + * 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 { + createModelVersionTestMigrator, + type ModelVersionTestMigrator, +} from '@kbn/core-test-helpers-model-versions'; +import { createEmbeddableSetupMock } from '@kbn/embeddable-plugin/server/mocks'; + +import { createDashboardSavedObjectType } from './dashboard_saved_object'; + +const embeddableSetupMock = createEmbeddableSetupMock(); + +describe('dashboard saved object model version transformations', () => { + let migrator: ModelVersionTestMigrator; + + beforeEach(() => { + migrator = createModelVersionTestMigrator({ + type: createDashboardSavedObjectType({ migrationDeps: { embeddable: embeddableSetupMock } }), + }); + }); + + describe('model version 2', () => { + const dashboard = { + id: 'some-id', + type: 'dashboard', + attributes: { + title: 'Some Title', + description: 'some description', + panelsJSON: 'some panels', + kibanaSavedObjectMeta: {}, + optionsJSON: 'some options', + controlGroupInput: {}, + }, + references: [], + }; + + it('should properly remove the controlGroupInput.showApplySelections field when converting from v2 to v1', () => { + const migrated = migrator.migrate({ + document: { + ...dashboard, + attributes: { + ...dashboard.attributes, + controlGroupInput: { showApplySelections: false }, + }, + }, + fromVersion: 2, + toVersion: 1, + }); + + expect(migrated.attributes).toEqual(dashboard.attributes); + }); + }); +}); diff --git a/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts b/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts index 31595cb6268bb..2cf913919b912 100644 --- a/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts +++ b/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts @@ -6,9 +6,11 @@ * Side Public License, v 1. */ -import { schema } from '@kbn/config-schema'; import { ANALYTICS_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; import { SavedObjectsType } from '@kbn/core/server'; + +import { dashboardAttributesSchema as dashboardAttributesSchemaV1 } from '../../common/content_management/v1'; +import { dashboardAttributesSchema as dashboardAttributesSchemaV2 } from '../../common/content_management/v2'; import { createDashboardSavedObjectTypeMigrations, DashboardSavedObjectTypeMigrationsDeps, @@ -38,6 +40,33 @@ export const createDashboardSavedObjectType = ({ }; }, }, + modelVersions: { + 1: { + changes: [], + schemas: { + forwardCompatibility: dashboardAttributesSchemaV1.extends({}, { unknowns: 'ignore' }), + create: dashboardAttributesSchemaV1, + }, + }, + 2: { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + controlGroupInput: { + properties: { + showApplySelections: { type: 'boolean', index: false, doc_values: false }, + }, + }, + }, + }, + ], + schemas: { + forwardCompatibility: dashboardAttributesSchemaV2.extends({}, { unknowns: 'ignore' }), + create: dashboardAttributesSchemaV2, + }, + }, + }, mappings: { properties: { description: { type: 'text' }, @@ -60,6 +89,7 @@ export const createDashboardSavedObjectType = ({ controlStyle: { type: 'keyword', index: false, doc_values: false }, chainingSystem: { type: 'keyword', index: false, doc_values: false }, panelsJSON: { type: 'text', index: false }, + showApplySelections: { type: 'boolean', index: false, doc_values: false }, ignoreParentSettingsJSON: { type: 'text', index: false }, }, }, @@ -71,45 +101,7 @@ export const createDashboardSavedObjectType = ({ }, }, schemas: { - '8.9.0': schema.object({ - // General - title: schema.string(), - description: schema.string({ defaultValue: '' }), - - // Search - kibanaSavedObjectMeta: schema.object({ - searchSourceJSON: schema.maybe(schema.string()), - }), - - // Time - timeRestore: schema.maybe(schema.boolean()), - timeFrom: schema.maybe(schema.string()), - timeTo: schema.maybe(schema.string()), - refreshInterval: schema.maybe( - schema.object({ - pause: schema.boolean(), - value: schema.number(), - display: schema.maybe(schema.string()), - section: schema.maybe(schema.number()), - }) - ), - - // Dashboard Content - controlGroupInput: schema.maybe( - schema.object({ - panelsJSON: schema.maybe(schema.string()), - controlStyle: schema.maybe(schema.string()), - chainingSystem: schema.maybe(schema.string()), - ignoreParentSettingsJSON: schema.maybe(schema.string()), - }) - ), - panelsJSON: schema.string({ defaultValue: '[]' }), - optionsJSON: schema.string({ defaultValue: '{}' }), - - // Legacy - hits: schema.maybe(schema.number()), - version: schema.maybe(schema.number()), - }), + '8.9.0': dashboardAttributesSchemaV1, }, migrations: () => createDashboardSavedObjectTypeMigrations(migrationDeps), }); diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index 371ec81c3d2cf..f3245510cb6bf 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -76,6 +76,7 @@ "@kbn/content-management-table-list-view-common", "@kbn/shared-ux-utility", "@kbn/managed-content-badge", + "@kbn/core-test-helpers-model-versions", ], "exclude": ["target/**/*"] } diff --git a/src/plugins/data/common/search/aggs/agg_configs.ts b/src/plugins/data/common/search/aggs/agg_configs.ts index 7cab863fba11d..4a95724b6ccf3 100644 --- a/src/plugins/data/common/search/aggs/agg_configs.ts +++ b/src/plugins/data/common/search/aggs/agg_configs.ts @@ -117,7 +117,7 @@ export class AggConfigs { isSamplingEnabled() { return ( isSamplingEnabled(this.opts.probability) && - this.getRequestAggs().filter((agg) => !agg.type.hasNoDsl).length > 0 + this.getRequestAggs().some((agg) => !agg.type.hasNoDsl) ); } diff --git a/src/plugins/data/common/search/tabify/fixtures/fake_timeoffset_data.ts b/src/plugins/data/common/search/tabify/fixtures/fake_timeoffset_data.ts new file mode 100644 index 0000000000000..f17f2a99a2559 --- /dev/null +++ b/src/plugins/data/common/search/tabify/fixtures/fake_timeoffset_data.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 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 const timeOffsetFiltersWithZeroDocCountResponse = { + hits: { + total: 474, + max_score: 0, + hits: [], + }, + aggregations: { + doc_count: 0, + doc_count_86400000: 234, + }, +}; diff --git a/src/plugins/data/common/search/tabify/tabify.test.ts b/src/plugins/data/common/search/tabify/tabify.test.ts index 4230782f60209..87766f62b6376 100644 --- a/src/plugins/data/common/search/tabify/tabify.test.ts +++ b/src/plugins/data/common/search/tabify/tabify.test.ts @@ -12,15 +12,19 @@ import { AggConfigs, BucketAggParam, IAggConfig, IAggConfigs } from '../aggs'; import { mockAggTypesRegistry } from '../aggs/test_helpers'; import { metricOnly, threeTermBuckets } from './fixtures/fake_hierarchical_data'; import { isSamplingEnabled } from '../aggs/utils/sampler'; +import { timeOffsetFiltersWithZeroDocCountResponse } from './fixtures/fake_timeoffset_data'; describe('tabifyAggResponse Integration', () => { const typesRegistry = mockAggTypesRegistry(); for (const probability of [1, 0.5, undefined]) { function getTitlePostfix() { - if (!isSamplingEnabled(probability)) { + if (probability == null) { return ''; } + if (probability === 1) { + return ` - with no sampling (probability = 1)`; + } return ` - with sampling (probability = ${probability})`; } @@ -243,5 +247,20 @@ describe('tabifyAggResponse Integration', () => { }); }); }); + + describe(`edge cases${getTitlePostfix()}`, () => { + test('it should correctly report zero doc count for unshifted bucket', () => { + const aggConfigs = createAggConfigs([ + mockAggConfig({ type: 'count', schema: 'metric' }), + mockAggConfig({ type: 'count', schema: 'metric', params: { timeShift: '1d' } }), + ]); + + // no need to wrap with sampling as count is not affected by it + const tabbed = tabifyAggResponse(aggConfigs, timeOffsetFiltersWithZeroDocCountResponse, { + metricsAtAllLevels: false, + }); + expect(tabbed.rows[0]).toEqual({ 'col-0-1': 0, 'col-1-2': 234 }); + }); + }); } }); diff --git a/src/plugins/data/common/search/tabify/tabify.ts b/src/plugins/data/common/search/tabify/tabify.ts index 82c91c3579456..67278e44ec438 100644 --- a/src/plugins/data/common/search/tabify/tabify.ts +++ b/src/plugins/data/common/search/tabify/tabify.ts @@ -146,13 +146,27 @@ export function tabifyAggResponse( } const write = new TabbedAggResponseWriter(aggConfigs, respOpts || {}); + // Check whether there's a time shift for a count operation at root level + const hasMultipleDocCountAtRootWithFilters = Object.keys(esResponse.aggregations ?? {}).some( + (key) => /doc_count_/.test(key) + ); + const topLevelBucket: AggResponseBucket = { ...(aggConfigs.isSamplingEnabled() ? esResponse.aggregations?.sampling : esResponse.aggregations), - doc_count: esResponse.aggregations?.doc_count || esResponse.hits?.total, + doc_count: esResponse.aggregations?.doc_count, }; + // The fix itself is one line, but it's a bit hard to clear assess the full impact of it + // therefore here's a check to scope down the impact to the known scenario with the bug https://github.com/elastic/kibana/issues/178073 + // this can be lifted off once the full impact is assessed + if (!topLevelBucket.doc_count) { + if (!hasMultipleDocCountAtRootWithFilters) { + topLevelBucket.doc_count = esResponse.hits?.total; + } + } + collectBucket(aggConfigs, write, topLevelBucket, '', 1); return { diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index 0e7cf4a97f4d1..41a05a18da62b 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -83,8 +83,10 @@ export function DiscoverLayout({ stateContainer }: DiscoverLayoutProps) { state.columns, state.sort, ]); + const isPlainRecord = useMemo(() => getRawRecordType(query) === RecordRawType.PLAIN, [query]); const viewMode: VIEW_MODE = useAppStateSelector((state) => { - if (uiSettings.get(SHOW_FIELD_STATISTICS) !== true) return VIEW_MODE.DOCUMENT_LEVEL; + if (uiSettings.get(SHOW_FIELD_STATISTICS) !== true || isPlainRecord) + return VIEW_MODE.DOCUMENT_LEVEL; return state.viewMode ?? VIEW_MODE.DOCUMENT_LEVEL; }); const [dataView, dataViewLoading] = useInternalStateSelector((state) => [ @@ -112,7 +114,6 @@ export function DiscoverLayout({ stateContainer }: DiscoverLayoutProps) { const useNewFieldsApi = useMemo(() => !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [uiSettings]); - const isPlainRecord = useMemo(() => getRawRecordType(query) === RecordRawType.PLAIN, [query]); const resultState = useMemo( () => getResultState(dataState.fetchStatus, dataState.foundDocuments ?? false), [dataState.fetchStatus, dataState.foundDocuments] diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 443a528e26e6e..84c056f60ad01 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -284,7 +284,7 @@ const SaveSearchObjectModal: React.FC<{ managed ? i18n.translate('discover.localMenu.mustCopyOnSave', { defaultMessage: - 'This saved search is managed by Elastic. Changes here must be saved to a new saved search.', + 'Elastic manages this saved search. Save any changes to a new saved search.', }) : undefined } diff --git a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx index 3b14bf3b80fcb..559f2bf03b27a 100644 --- a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx +++ b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx @@ -102,36 +102,25 @@ describe('useTextBasedQueryLanguage', () => { test('a text based query should change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(true); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); - replaceUrlState.mockReset(); stateContainer.dataState.data$.documents$.next(msgComplete); expect(replaceUrlState).toHaveBeenCalledTimes(0); }); - test('should change viewMode to DOCUMENT_LEVEL if it was AGGREGATED_LEVEL', async () => { + test('should change viewMode to undefined (default) if it was AGGREGATED_LEVEL', async () => { const { replaceUrlState } = renderHookWithContext(false, { viewMode: VIEW_MODE.AGGREGATED_LEVEL, }); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - viewMode: VIEW_MODE.DOCUMENT_LEVEL, - columns: [], + viewMode: undefined, }); }); test('changing a text based query with different result columns should change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); replaceUrlState.mockReset(); documents$.next({ @@ -151,18 +140,15 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); }); - test('changing a text based query with same result columns should change state when loading and finished', async () => { + test('changing a text based query with same result columns should not change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -176,52 +162,16 @@ describe('useTextBasedQueryLanguage', () => { ], query: { esql: 'from the-data-view-2' }, }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); }); - test('changing a text based query with no transformational commands should only change dataview state when loading and finished', async () => { - const { replaceUrlState, stateContainer } = renderHookWithContext(false); - const documents$ = stateContainer.dataState.data$.documents$; - stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - replaceUrlState.mockReset(); - - documents$.next({ - recordRawType: RecordRawType.PLAIN, - fetchStatus: FetchStatus.PARTIAL, - result: [ - { - id: '1', - raw: { field1: 1 }, - flattened: { field1: 1 }, - } as unknown as DataTableRecord, - ], - // non transformational command - query: { esql: 'from the-data-view-title | where field1 > 0' }, - }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); - }); test('only changing a text based query with same result columns should not change columns', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -237,6 +187,11 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field1' }, }); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => { + expect(replaceUrlState).toHaveBeenCalledWith({ + columns: ['field1'], + }); + }); replaceUrlState.mockReset(); documents$.next({ @@ -252,14 +207,14 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field 1 | WHERE field1=1' }, }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); }); test('if its not a text based query coming along, it should be ignored', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -289,7 +244,6 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); @@ -298,9 +252,9 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite existing state columns on initial fetch', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: ['field1'], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; + expect(replaceUrlState).toHaveBeenCalledTimes(0); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -315,6 +269,14 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field 1 | WHERE field1=1' }, }); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => { + expect(replaceUrlState).toHaveBeenCalledWith({ + columns: ['field1', 'field2'], + }); + }); + replaceUrlState.mockReset(); + documents$.next({ recordRawType: RecordRawType.PLAIN, fetchStatus: FetchStatus.PARTIAL, @@ -336,7 +298,6 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite existing state columns on initial fetch and non transformational commands', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: ['field1'], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; @@ -356,9 +317,8 @@ describe('useTextBasedQueryLanguage', () => { }); test('it should overwrite existing state columns on transitioning from a query with non transformational commands to a query with transformational', async () => { - const { replaceUrlState, stateContainer } = renderHookWithContext(false, { - index: 'the-data-view-id', - }); + const { replaceUrlState, stateContainer } = renderHookWithContext(false, {}); + const documents$ = stateContainer.dataState.data$.documents$; documents$.next({ @@ -395,7 +355,6 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite state column when successfully fetching after an error fetch', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: [], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; @@ -468,7 +427,7 @@ describe('useTextBasedQueryLanguage', () => { renderHook(() => useTextBasedQueryLanguage(props), { wrapper: getHookContext(stateContainer) }); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -488,7 +447,6 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts index 49e010d13a041..485ce689ba415 100644 --- a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts +++ b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts @@ -9,7 +9,6 @@ import { isEqual } from 'lodash'; import { isOfAggregateQueryType, getAggregateQueryMode } from '@kbn/es-query'; import { useCallback, useEffect, useRef } from 'react'; import type { DataViewsContract } from '@kbn/data-views-plugin/public'; -import { VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { switchMap } from 'rxjs'; import { useSavedSearchInitial } from '../services/discover_state_provider'; import type { DiscoverStateContainer } from '../services/discover_state'; @@ -87,7 +86,7 @@ export function useTextBasedQueryLanguage({ if (next.fetchStatus !== FetchStatus.PARTIAL) { return; } - const dataViewObj = stateContainer.internalState.getState().dataView!; + const dataViewObj = stateContainer.internalState.getState().dataView; if (hasResults) { // check if state needs to contain column transformation due to a different columns in the resultset @@ -110,8 +109,10 @@ export function useTextBasedQueryLanguage({ const addColumnsToState = !isEqual(nextColumns, prev.current.columns); const queryChanged = query[language] !== prev.current.query; // no need to reset index to state if it hasn't changed - const addDataViewToState = Boolean(dataViewObj?.id !== index); - if (!queryChanged || (!addDataViewToState && !addColumnsToState)) { + const addDataViewToState = index !== undefined; + const changeViewMode = + viewMode !== getValidViewMode({ viewMode, isTextBasedQueryMode: true }); + if (!queryChanged || (!addDataViewToState && !addColumnsToState && !changeViewMode)) { sendComplete(); return; } @@ -120,14 +121,16 @@ export function useTextBasedQueryLanguage({ prev.current.query = query[language]; prev.current.columns = nextColumns; } - const nextState = { - ...(addDataViewToState && { index: dataViewObj.id }), - ...((addColumnsToState || queryChanged) && { columns: nextColumns }), - ...(viewMode === VIEW_MODE.AGGREGATED_LEVEL && { - viewMode: getValidViewMode({ viewMode, isTextBasedQueryMode: true }), - }), - }; - await stateContainer.appState.replaceUrlState(nextState); + // just change URL state if necessary + if (addDataViewToState || addColumnsToState || changeViewMode) { + const nextState = { + ...(addDataViewToState && { index: undefined }), + ...(addColumnsToState && { columns: nextColumns }), + ...(changeViewMode && { viewMode: undefined }), + }; + await stateContainer.appState.replaceUrlState(nextState); + } + sendComplete(); } else { // cleanup for a "regular" query diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts index 27407822553bb..305f67d61a0ae 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts @@ -47,7 +47,19 @@ export const buildStateSubscribe = const nextQuery = nextState.query; const savedSearch = savedSearchState.getState(); const prevQuery = savedSearch.searchSource.getField('query'); + const isTextBasedQueryLang = isTextBasedQuery(nextQuery); const queryChanged = !isEqual(nextQuery, prevQuery) || !isEqual(nextQuery, prevState.query); + + if ( + isTextBasedQueryLang && + isEqualState(prevState, nextState, ['index', 'viewMode']) && + !queryChanged + ) { + // When there's a switch from data view to es|ql, this just leads to a cleanup of index and viewMode + // And there's no subsequent action in this function required + addLog('[appstate] subscribe update ignored for es|ql', { prevState, nextState }); + return; + } if (isEqualState(prevState, nextState) && !queryChanged) { addLog('[appstate] subscribe update ignored due to no changes', { prevState, nextState }); return; @@ -55,7 +67,6 @@ export const buildStateSubscribe = addLog('[appstate] subscribe triggered', nextState); const { hideChart, interval, breakdownField, sampleSize, sort, index } = prevState; - const isTextBasedQueryLang = isTextBasedQuery(nextQuery); if (isTextBasedQueryLang) { const isTextBasedQueryLangPrev = isTextBasedQuery(prevQuery); if (!isTextBasedQueryLangPrev) { diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts index dab98134db317..0ddc8c47c2767 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts @@ -11,14 +11,14 @@ import { dataViewMock } from '@kbn/discover-utils/src/__mocks__'; import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import type { Filter } from '@kbn/es-query'; import { History } from 'history'; - import { savedSearchMock } from '../../../__mocks__/saved_search'; import { discoverServiceMock } from '../../../__mocks__/services'; import { DiscoverAppStateContainer, getDiscoverAppStateContainer, + isEqualState, } from './discover_app_state_container'; -import { SavedSearch } from '@kbn/saved-search-plugin/common'; +import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/common'; let history: History; let state: DiscoverAppStateContainer; @@ -161,4 +161,66 @@ describe('Test discover app state container', () => { ); }); }); + + describe('isEqualState', () => { + const initialState = { + index: 'the-index', + columns: ['the-column'], + sort: [], + query: { query: 'the-query', language: 'kuery' }, + filters: [], + interval: 'auto', + hideChart: true, + sampleSize: 100, + viewMode: VIEW_MODE.DOCUMENT_LEVEL, + savedQuery: undefined, + hideAggregatedPreview: true, + rowHeight: 25, + headerRowHeight: 25, + grid: {}, + breakdownField: 'the-breakdown-field', + }; + + test('returns true if the states are equal', () => { + expect(isEqualState(initialState, { ...initialState })).toBeTruthy(); + }); + + test('handles the special filter change case correctly ', () => { + // this is some sort of legacy behavior, especially for the filter case + const previousState = { initialState, filters: [{ index: 'test', meta: {} }] }; + const nextState = { + initialState, + filters: [{ index: 'test', meta: {}, $$hashKey: 'hi' }], + }; + expect(isEqualState(previousState, nextState)).toBeTruthy(); + }); + + test('returns true if the states are not equal', () => { + const changedParams = [ + { index: 'the-new-index' }, + { columns: ['newColumns'] }, + { sort: [['column', 'desc']] }, + { query: { query: 'ok computer', language: 'pirate-english' } }, + { filters: [{ index: 'test', meta: {} }] }, + { interval: 'eternity' }, + { hideChart: undefined }, + { sampleSize: 1 }, + { viewMode: undefined }, + { savedQuery: 'sdsd' }, + { hideAggregatedPreview: false }, + { rowHeight: 100 }, + { headerRowHeight: 1 }, + { grid: { test: 'test' } }, + { breakdownField: 'new-breakdown-field' }, + ]; + changedParams.forEach((param) => { + expect(isEqualState(initialState, { ...initialState, ...param })).toBeFalsy(); + }); + }); + test('allows to exclude variables from comparison', () => { + expect( + isEqualState(initialState, { ...initialState, index: undefined }, ['index']) + ).toBeTruthy(); + }); + }); }); diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts index 7d75d76cb6f8b..9f073e14b2e6d 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts @@ -22,7 +22,7 @@ import { } from '@kbn/es-query'; import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { IKbnUrlStateStorage, ISyncStateRef, syncState } from '@kbn/kibana-utils-plugin/public'; -import { isEqual } from 'lodash'; +import { isEqual, omit } from 'lodash'; import { connectToQueryState, syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; import type { DiscoverGridSettings } from '@kbn/saved-search-plugin/common'; import type { DiscoverServices } from '../../../build_services'; @@ -350,13 +350,19 @@ export function isEqualFilters( * Helper function to compare 2 different state, is needed since comparing filters * works differently */ -export function isEqualState(stateA: DiscoverAppState, stateB: DiscoverAppState) { +export function isEqualState( + stateA: DiscoverAppState, + stateB: DiscoverAppState, + exclude: string[] = [] +) { if (!stateA && !stateB) { return true; } else if (!stateA || !stateB) { return false; } - const { filters: stateAFilters = [], ...stateAPartial } = stateA; - const { filters: stateBFilters = [], ...stateBPartial } = stateB; + + const { filters: stateAFilters = [], ...stateAPartial } = omit(stateA, exclude); + const { filters: stateBFilters = [], ...stateBPartial } = omit(stateB, exclude); + return isEqual(stateAPartial, stateBPartial) && isEqualFilters(stateAFilters, stateBFilters); } diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index 9e742f7238410..43a3a63dc2ce4 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -444,7 +444,6 @@ describe('Test discover state actions', () => { "sampleSize": undefined, "sort": Array [], "timeRange": undefined, - "usesAdHocDataView": false, } `); expect(searchSource.getField('index')?.id).toEqual('the-data-view-id'); diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts index bc15de09a8b60..7f5783f98e13e 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts @@ -108,6 +108,7 @@ describe('getStateDefaults', () => { }, }); expect(actualForTextBasedWithValidViewMode.viewMode).toBe(VIEW_MODE.DOCUMENT_LEVEL); + expect(actualForTextBasedWithValidViewMode.index).toBe(undefined); const actualForWithValidViewMode = getStateDefaults({ services: discoverServiceMock, @@ -117,5 +118,8 @@ describe('getStateDefaults', () => { }, }); expect(actualForWithValidViewMode.viewMode).toBe(VIEW_MODE.AGGREGATED_LEVEL); + expect(actualForWithValidViewMode.index).toBe( + savedSearchMock.searchSource.getField('index')?.id + ); }); }); diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts index 2c1c9fd7d9702..77a9971640e2a 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts @@ -47,6 +47,7 @@ export function getStateDefaults({ const dataView = searchSource.getField('index'); const query = searchSource.getField('query') || data.query.queryString.getDefaultQuery(); + const isTextBasedQueryMode = isTextBasedQuery(query); const sort = getSortArray(savedSearch.sort ?? [], dataView!); const columns = getDefaultColumns(savedSearch, uiSettings); const chartHidden = getChartHidden(storage, 'discover'); @@ -61,7 +62,7 @@ export function getStateDefaults({ ) : sort, columns, - index: dataView?.id, + index: isTextBasedQueryMode ? undefined : dataView?.id, interval: 'auto', filters: cloneDeep(searchSource.getOwnField('filter')) as DiscoverAppState['filters'], hideChart: typeof chartHidden === 'boolean' ? chartHidden : undefined, @@ -75,6 +76,7 @@ export function getStateDefaults({ grid: undefined, breakdownField: undefined, }; + if (savedSearch.grid) { defaultState.grid = savedSearch.grid; } @@ -90,7 +92,7 @@ export function getStateDefaults({ if (savedSearch.viewMode) { defaultState.viewMode = getValidViewMode({ viewMode: savedSearch.viewMode, - isTextBasedQueryMode: isTextBasedQuery(query), + isTextBasedQueryMode, }); } if (savedSearch.hideAggregatedPreview) { diff --git a/src/plugins/discover/public/application/main/utils/update_saved_search.ts b/src/plugins/discover/public/application/main/utils/update_saved_search.ts index fe3cdac90fc97..05c17cd3ebcd9 100644 --- a/src/plugins/discover/public/application/main/utils/update_saved_search.ts +++ b/src/plugins/discover/public/application/main/utils/update_saved_search.ts @@ -20,6 +20,7 @@ import type { DiscoverGlobalStateContainer } from '../services/discover_global_s * @param savedSearch * @param dataView * @param state + * @param globalStateContainer * @param services * @param useFilterAndQueryServices - when true data services are being used for updating filter + query */ @@ -38,9 +39,11 @@ export function updateSavedSearch({ services: DiscoverServices; useFilterAndQueryServices?: boolean; }) { - if (dataView) { + if (dataView && savedSearch.searchSource.getField('index')?.id !== dataView.id) { savedSearch.searchSource.setField('index', dataView); - savedSearch.usesAdHocDataView = !dataView.isPersisted(); + if (!dataView.isPersisted()) { + savedSearch.usesAdHocDataView = true; + } } if (useFilterAndQueryServices) { savedSearch.searchSource diff --git a/src/plugins/discover/public/embeddable/get_discover_locator_params.ts b/src/plugins/discover/public/embeddable/get_discover_locator_params.ts index 27c7b51d707b6..49956cdb7ee28 100644 --- a/src/plugins/discover/public/embeddable/get_discover_locator_params.ts +++ b/src/plugins/discover/public/embeddable/get_discover_locator_params.ts @@ -7,12 +7,12 @@ */ import type { Filter } from '@kbn/es-query'; -import { PublishesLocalUnifiedSearch, PublishesSavedObjectId } from '@kbn/presentation-publishing'; +import { PublishesUnifiedSearch, PublishesSavedObjectId } from '@kbn/presentation-publishing'; import type { DiscoverAppLocatorParams } from '../../common'; import { HasSavedSearch } from './types'; export const getDiscoverLocatorParams = ( - api: HasSavedSearch & Partial + api: HasSavedSearch & Partial ) => { const savedSearch = api.getSavedSearch(); diff --git a/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.tsx b/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.tsx index a407fb025e2c8..b0bdcdbf6a91d 100644 --- a/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.tsx +++ b/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.tsx @@ -159,7 +159,7 @@ export const AddPanelFlyout = ({ return item.managed ? i18n.translate('embeddableApi.addPanel.managedPanelTooltip', { defaultMessage: - 'This panel is managed by Elastic. It can be added but will be unlinked from the library.', + 'Elastic manages this panel. Adding it to a dashboard unlinks it from the library.', }) : undefined; }} diff --git a/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx b/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx index e98acc44e61e7..01a63f6171d93 100644 --- a/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx +++ b/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx @@ -10,17 +10,21 @@ import { css } from '@emotion/react'; import { PresentationPanel } from '@kbn/presentation-panel-plugin/public'; import { PanelCompatibleComponent } from '@kbn/presentation-panel-plugin/public/panel_component/types'; import { isPromise } from '@kbn/std'; -import React, { ReactNode, useEffect, useImperativeHandle, useMemo, useState } from 'react'; +import React, { ReactNode, useEffect, useImperativeHandle, useMemo, useState, useRef } from 'react'; import { untilPluginStartServicesReady } from '../kibana_services'; import { EmbeddablePanelProps } from './types'; const getComponentFromEmbeddable = async ( - embeddable: EmbeddablePanelProps['embeddable'] -): Promise => { + embeddable: EmbeddablePanelProps['embeddable'], + isMounted: () => boolean +): Promise => { const startServicesPromise = untilPluginStartServicesReady(); const embeddablePromise = typeof embeddable === 'function' ? embeddable() : Promise.resolve(embeddable); const [, unwrappedEmbeddable] = await Promise.all([startServicesPromise, embeddablePromise]); + if (!isMounted()) { + return null; + } if (unwrappedEmbeddable.parent) { await unwrappedEmbeddable.parent.untilEmbeddableLoaded(unwrappedEmbeddable.id); } @@ -55,9 +59,33 @@ const getComponentFromEmbeddable = async ( /** * Loads and renders a legacy embeddable. + * + * Ancestry chain must use 'key' attribute to reset DOM and state when embeddable changes + * For example */ export const EmbeddablePanel = (props: EmbeddablePanelProps) => { + // can not use useMountedState + // 1. useMountedState defaults mountedRef to false and sets mountedRef to true in useEffect + // 2. embeddable can be an object or a function that returns a promise + // 3. when embeddable is an object, Promise.resolve(embeddable) returns before + // useMountedState useEffect is called and thus isMounted() returns false when component has not been unmounted + const mountedRef = useRef(true); + useEffect(() => { + return () => { + mountedRef.current = false; + }; + }, []); + const isMounted = () => { + return mountedRef.current; + }; const { embeddable, ...passThroughProps } = props; - const componentPromise = useMemo(() => getComponentFromEmbeddable(embeddable), [embeddable]); + const componentPromise = useMemo( + () => getComponentFromEmbeddable(embeddable, isMounted), + // Ancestry chain is expected to use 'key' attribute to reset DOM and state + // when embeddable needs to be re-loaded + // empty array is consistent with PresentationPanel useAsync dependency check + // eslint-disable-next-line react-hooks/exhaustive-deps + [] + ); return ; }; diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index 2eec70d591db3..3214e18aeff26 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -96,21 +96,15 @@ export type { EnhancementRegistryDefinition } from './types'; export { ReactEmbeddableRenderer, reactEmbeddableRegistryHasKey, - RegisterReactEmbeddable, registerReactEmbeddableFactory, - useReactEmbeddableApiHandle, type DefaultEmbeddableApi, - type ReactEmbeddable, type ReactEmbeddableFactory, type ReactEmbeddableRegistration, type ReactEmbeddableTitlesApi, type SerializedReactEmbeddableTitles, - ReactEmbeddableParentContext, - useReactEmbeddableParentApi, - useReactEmbeddableUnsavedChanges, - initializeReactEmbeddableUuid, initializeReactEmbeddableTitles, serializeReactEmbeddableTitles, + startTrackingEmbeddableUnsavedChanges, } from './react_embeddable_system'; export { registerSavedObjectToPanelMethod } from './registry/saved_object_to_panel_methods'; diff --git a/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts b/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts index 2345217a3fd5f..b44d49b903d9f 100644 --- a/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts +++ b/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts @@ -178,30 +178,29 @@ export const legacyEmbeddableToApi = ( * to tell when given a legacy embeddable what it's input could contain. All existing actions treat these as optional * so if the Embeddable is incapable of publishing unified search state (i.e. markdown) then it will just be ignored. */ - const localTimeRange = inputKeyToSubject('timeRange', true); - const setLocalTimeRange = (timeRange?: TimeRange) => embeddable.updateInput({ timeRange }); - const getFallbackTimeRange = () => - (embeddable.parent?.getInput() as unknown as CommonLegacyInput)?.timeRange; + const timeRange$ = inputKeyToSubject('timeRange', true); + const setTimeRange = (nextTimeRange?: TimeRange) => + embeddable.updateInput({ timeRange: nextTimeRange }); - const localFilters: BehaviorSubject = new BehaviorSubject< - Filter[] | undefined - >(undefined); - const localQuery: BehaviorSubject = new BehaviorSubject< + const filters$: BehaviorSubject = new BehaviorSubject( + undefined + ); + const query$: BehaviorSubject = new BehaviorSubject< Query | AggregateQuery | undefined >(undefined); // if this embeddable is a legacy filterable embeddable, publish changes to those filters to the panelFilters subject. if (isFilterableEmbeddable(embeddable)) { embeddable.untilInitializationFinished().then(() => { - localFilters.next(embeddable.getFilters()); - localQuery.next(embeddable.getQuery()); + filters$.next(embeddable.getFilters()); + query$.next(embeddable.getQuery()); subscriptions.add( embeddable.getInput$().subscribe(() => { - if (!compareFilters(embeddable.localFilters.getValue() ?? [], embeddable.getFilters())) { - localFilters.next(embeddable.getFilters()); + if (!compareFilters(embeddable.filters$.getValue() ?? [], embeddable.getFilters())) { + filters$.next(embeddable.getFilters()); } - if (!deepEqual(embeddable.localQuery.getValue() ?? [], embeddable.getQuery())) { - localQuery.next(embeddable.getQuery()); + if (!deepEqual(embeddable.query$.getValue() ?? [], embeddable.getQuery())) { + query$.next(embeddable.getQuery()); } }) ); @@ -209,7 +208,7 @@ export const legacyEmbeddableToApi = ( } const dataViews = outputKeyToSubject('indexPatterns'); - const isCompatibleWithLocalUnifiedSearch = () => { + const isCompatibleWithUnifiedSearch = () => { const isInputControl = isVisualizeEmbeddable(embeddable) && (embeddable as unknown as VisualizeEmbeddable).getOutput().visTypeName === @@ -239,12 +238,11 @@ export const legacyEmbeddableToApi = ( isEditingEnabled, getTypeDisplayName, - localTimeRange, - setLocalTimeRange, - localFilters, - localQuery, - getFallbackTimeRange, - isCompatibleWithLocalUnifiedSearch, + timeRange$, + setTimeRange, + filters$, + query$, + isCompatibleWithUnifiedSearch, dataViews, disabledActionIds, diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx index d9d5ba60572b4..3bb51bc2f71a5 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx @@ -123,15 +123,15 @@ export abstract class Embeddable< dataViews: this.dataViews, parentApi: this.parentApi, panelTitle: this.panelTitle, - localQuery: this.localQuery, + query$: this.query$, dataLoading: this.dataLoading, - localFilters: this.localFilters, + filters$: this.filters$, blockingError: this.blockingError, onPhaseChange: this.onPhaseChange, setPanelTitle: this.setPanelTitle, linkToLibrary: this.linkToLibrary, hidePanelTitle: this.hidePanelTitle, - localTimeRange: this.localTimeRange, + timeRange$: this.timeRange$, isEditingEnabled: this.isEditingEnabled, panelDescription: this.panelDescription, canLinkToLibrary: this.canLinkToLibrary, @@ -139,12 +139,11 @@ export abstract class Embeddable< unlinkFromLibrary: this.unlinkFromLibrary, setHidePanelTitle: this.setHidePanelTitle, defaultPanelTitle: this.defaultPanelTitle, - setLocalTimeRange: this.setLocalTimeRange, + setTimeRange: this.setTimeRange, getTypeDisplayName: this.getTypeDisplayName, setPanelDescription: this.setPanelDescription, - getFallbackTimeRange: this.getFallbackTimeRange, canUnlinkFromLibrary: this.canUnlinkFromLibrary, - isCompatibleWithLocalUnifiedSearch: this.isCompatibleWithLocalUnifiedSearch, + isCompatibleWithUnifiedSearch: this.isCompatibleWithUnifiedSearch, savedObjectId: this.savedObjectId, } = api); @@ -164,29 +163,28 @@ export abstract class Embeddable< public viewMode: LegacyEmbeddableAPI['viewMode']; public parentApi: LegacyEmbeddableAPI['parentApi']; public dataViews: LegacyEmbeddableAPI['dataViews']; - public localQuery: LegacyEmbeddableAPI['localQuery']; + public query$: LegacyEmbeddableAPI['query$']; public panelTitle: LegacyEmbeddableAPI['panelTitle']; public dataLoading: LegacyEmbeddableAPI['dataLoading']; - public localFilters: LegacyEmbeddableAPI['localFilters']; + public filters$: LegacyEmbeddableAPI['filters$']; public onPhaseChange: LegacyEmbeddableAPI['onPhaseChange']; public linkToLibrary: LegacyEmbeddableAPI['linkToLibrary']; public blockingError: LegacyEmbeddableAPI['blockingError']; public setPanelTitle: LegacyEmbeddableAPI['setPanelTitle']; - public localTimeRange: LegacyEmbeddableAPI['localTimeRange']; + public timeRange$: LegacyEmbeddableAPI['timeRange$']; public hidePanelTitle: LegacyEmbeddableAPI['hidePanelTitle']; public isEditingEnabled: LegacyEmbeddableAPI['isEditingEnabled']; public canLinkToLibrary: LegacyEmbeddableAPI['canLinkToLibrary']; public panelDescription: LegacyEmbeddableAPI['panelDescription']; public disabledActionIds: LegacyEmbeddableAPI['disabledActionIds']; public unlinkFromLibrary: LegacyEmbeddableAPI['unlinkFromLibrary']; - public setLocalTimeRange: LegacyEmbeddableAPI['setLocalTimeRange']; + public setTimeRange: LegacyEmbeddableAPI['setTimeRange']; public defaultPanelTitle: LegacyEmbeddableAPI['defaultPanelTitle']; public setHidePanelTitle: LegacyEmbeddableAPI['setHidePanelTitle']; public getTypeDisplayName: LegacyEmbeddableAPI['getTypeDisplayName']; public setPanelDescription: LegacyEmbeddableAPI['setPanelDescription']; public canUnlinkFromLibrary: LegacyEmbeddableAPI['canUnlinkFromLibrary']; - public getFallbackTimeRange: LegacyEmbeddableAPI['getFallbackTimeRange']; - public isCompatibleWithLocalUnifiedSearch: LegacyEmbeddableAPI['isCompatibleWithLocalUnifiedSearch']; + public isCompatibleWithUnifiedSearch: LegacyEmbeddableAPI['isCompatibleWithUnifiedSearch']; public savedObjectId: LegacyEmbeddableAPI['savedObjectId']; public getEditHref(): string | undefined { diff --git a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts index 82eba8c94edd4..7d8a11ac52153 100644 --- a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts +++ b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts @@ -17,7 +17,7 @@ import { PublishesDataLoading, PublishesDataViews, PublishesDisabledActionIds, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, HasParentApi, HasUniqueId, PublishesViewMode, @@ -49,7 +49,7 @@ export type LegacyEmbeddableAPI = HasType & PublishesDataLoading & HasInspectorAdapters & PublishesBlockingError & - PublishesLocalUnifiedSearch & + PublishesUnifiedSearch & PublishesDisabledActionIds & PublishesWritablePanelTitle & PublishesWritablePanelDescription & diff --git a/src/plugins/embeddable/public/lib/filterable_embeddable/types.ts b/src/plugins/embeddable/public/lib/filterable_embeddable/types.ts index 036784557da73..a079451dcbaa6 100644 --- a/src/plugins/embeddable/public/lib/filterable_embeddable/types.ts +++ b/src/plugins/embeddable/public/lib/filterable_embeddable/types.ts @@ -7,7 +7,7 @@ */ import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; -import { PublishesWritableLocalUnifiedSearch } from '@kbn/presentation-publishing'; +import { PublishesWritableUnifiedSearch } from '@kbn/presentation-publishing'; import { EmbeddableInput } from '../embeddables'; export type FilterableEmbeddableInput = EmbeddableInput & { @@ -19,11 +19,8 @@ export type FilterableEmbeddableInput = EmbeddableInput & { }; export type EmbeddableHasTimeRange = Pick< - PublishesWritableLocalUnifiedSearch, - | 'localTimeRange' - | 'setLocalTimeRange' - | 'getFallbackTimeRange' - | 'isCompatibleWithLocalUnifiedSearch' + PublishesWritableUnifiedSearch, + 'timeRange$' | 'setTimeRange' | 'isCompatibleWithUnifiedSearch' >; /** diff --git a/src/plugins/embeddable/public/react_embeddable_system/index.ts b/src/plugins/embeddable/public/react_embeddable_system/index.ts index 4bfd9e7efa2cf..b48289b7c4127 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/index.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/index.ts @@ -6,16 +6,8 @@ * Side Public License, v 1. */ -export { - useReactEmbeddableApiHandle, - initializeReactEmbeddableUuid, - ReactEmbeddableParentContext, - useReactEmbeddableParentApi, -} from './react_embeddable_api'; -export { useReactEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; export { reactEmbeddableRegistryHasKey, - RegisterReactEmbeddable, registerReactEmbeddableFactory, } from './react_embeddable_registry'; export { ReactEmbeddableRenderer } from './react_embeddable_renderer'; @@ -25,9 +17,9 @@ export { type ReactEmbeddableTitlesApi, type SerializedReactEmbeddableTitles, } from './react_embeddable_titles'; +export { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; export type { DefaultEmbeddableApi, - ReactEmbeddable, ReactEmbeddableFactory, ReactEmbeddableRegistration, } from './types'; diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.test.tsx deleted file mode 100644 index 4ec729119d87e..0000000000000 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.test.tsx +++ /dev/null @@ -1,87 +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 { render, waitFor } from '@testing-library/react'; -import { getMockPresentationContainer } from '@kbn/presentation-containers/mocks'; -import { renderHook } from '@testing-library/react-hooks'; -import React from 'react'; -import { BehaviorSubject } from 'rxjs'; -import { useReactEmbeddableApiHandle, ReactEmbeddableParentContext } from './react_embeddable_api'; -import { DefaultEmbeddableApi } from './types'; - -describe('react embeddable api', () => { - const defaultApi = { - unsavedChanges: new BehaviorSubject(undefined), - resetUnsavedChanges: jest.fn(), - serializeState: jest.fn().mockReturnValue({ bork: 'borkbork' }), - }; - - const parentApi = getMockPresentationContainer(); - - const TestComponent = React.forwardRef((_, ref) => { - useReactEmbeddableApiHandle(defaultApi, ref, '123'); - return
; - }); - - it('returns the given API', () => { - const { result } = renderHook(() => - useReactEmbeddableApiHandle 'bork' }>( - { - ...defaultApi, - bork: jest.fn().mockReturnValue('bork'), - }, - {} as any, - 'superBork' - ) - ); - - expect(result.current.bork()).toEqual('bork'); - expect(result.current.serializeState()).toEqual({ bork: 'borkbork' }); - }); - - it('publishes the API into the provided ref', async () => { - const ref = React.createRef(); - renderHook(() => useReactEmbeddableApiHandle(defaultApi, ref, '123')); - await waitFor(() => expect(ref.current).toBeDefined()); - expect(ref.current?.serializeState); - expect(ref.current?.serializeState()).toEqual({ bork: 'borkbork' }); - }); - - it('publishes the API into an imperative handle', async () => { - const ref = React.createRef(); - render(); - await waitFor(() => expect(ref.current).toBeDefined()); - expect(ref.current?.serializeState); - expect(ref.current?.serializeState()).toEqual({ bork: 'borkbork' }); - }); - - it('returns an API with a parent when rendered inside a parent context', async () => { - const ref = React.createRef(); - render( - - - - ); - await waitFor(() => expect(ref.current).toBeDefined()); - expect(ref.current?.serializeState); - expect(ref.current?.serializeState()).toEqual({ bork: 'borkbork' }); - - expect(ref.current?.parentApi?.getLastSavedStateForChild).toBeDefined(); - expect(ref.current?.parentApi?.registerPanelApi).toBeDefined(); - }); - - it('calls registerPanelApi on its parent', async () => { - const ref = React.createRef(); - render( - - - - ); - expect(parentApi?.registerPanelApi).toHaveBeenCalledWith('123', expect.any(Object)); - }); -}); diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts deleted file mode 100644 index 896a9fb05468b..0000000000000 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_api.ts +++ /dev/null @@ -1,74 +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 { apiIsPresentationContainer, PresentationContainer } from '@kbn/presentation-containers'; -import { createContext, useContext, useImperativeHandle, useMemo } from 'react'; -import { v4 as generateId } from 'uuid'; -import { DefaultEmbeddableApi } from './types'; - -/** - * Pushes any API to the passed in ref. Note that any API passed in will not be rebuilt on - * subsequent renders, so it does not support reactive variables. Instead, pass in setter functions - * and publishing subjects to allow other components to listen to changes. - */ -export const useReactEmbeddableApiHandle = < - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi ->( - apiToRegister: Omit, - ref: React.ForwardedRef, - uuid: string -) => { - const { parentApi } = useReactEmbeddableParentContext() ?? {}; - - /** - * Publish the api for this embeddable. - */ - const thisApi = useMemo( - () => { - const api = { - ...apiToRegister, - uuid, - - // allow this embeddable access to its parent - parentApi, - } as ApiType; - // register this api with its parent - if (parentApi && apiIsPresentationContainer(parentApi)) - parentApi.registerPanelApi(uuid, api); - return api; - }, - // disabling exhaustive deps because the API should only be rebuilt when the uuid changes. - // eslint-disable-next-line react-hooks/exhaustive-deps - [uuid] - ); - - // eslint-disable-next-line react-hooks/exhaustive-deps - useImperativeHandle(ref, () => thisApi, [uuid]); - - return thisApi; -}; - -export const initializeReactEmbeddableUuid = (maybeId?: string) => maybeId ?? generateId(); - -/** - * Parenting - */ -interface ReactEmbeddableParentContext { - parentApi?: PresentationContainer; -} - -export const ReactEmbeddableParentContext = createContext( - null -); -export const useReactEmbeddableParentApi = (): unknown | null => { - return useContext(ReactEmbeddableParentContext)?.parentApi; -}; - -export const useReactEmbeddableParentContext = (): ReactEmbeddableParentContext | null => { - return useContext(ReactEmbeddableParentContext); -}; diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.test.tsx index 11d7a58fa0890..8ffb5500979dd 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.test.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.test.tsx @@ -15,8 +15,9 @@ import { ReactEmbeddableFactory } from './types'; describe('react embeddable registry', () => { const testEmbeddableFactory: ReactEmbeddableFactory = { + type: 'test', deserializeState: jest.fn(), - getComponent: jest.fn(), + buildEmbeddable: jest.fn(), }; it('throws an error if requested embeddable factory type is not registered', () => { @@ -26,7 +27,7 @@ describe('react embeddable registry', () => { }); it('can register and get an embeddable factory', () => { - registerReactEmbeddableFactory('test', testEmbeddableFactory); + registerReactEmbeddableFactory(testEmbeddableFactory); expect(getReactEmbeddableFactory('test')).toBe(testEmbeddableFactory); }); diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts index 2f014b84c07ab..964cba236e31b 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_registry.ts @@ -7,38 +7,31 @@ */ import { i18n } from '@kbn/i18n'; -import React from 'react'; -import { - DefaultEmbeddableApi, - ReactEmbeddable, - ReactEmbeddableFactory, - ReactEmbeddableRegistration, -} from './types'; +import { DefaultEmbeddableApi, ReactEmbeddableFactory } from './types'; const registry: { [key: string]: ReactEmbeddableFactory } = {}; export const registerReactEmbeddableFactory = < - StateType extends unknown = unknown, - APIType extends DefaultEmbeddableApi = DefaultEmbeddableApi + StateType extends object = object, + APIType extends DefaultEmbeddableApi = DefaultEmbeddableApi >( - key: string, factory: ReactEmbeddableFactory ) => { - if (registry[key] !== undefined) + if (registry[factory.type] !== undefined) throw new Error( i18n.translate('embeddableApi.reactEmbeddable.factoryAlreadyExistsError', { defaultMessage: 'An embeddable factory for for type: {key} is already registered.', - values: { key }, + values: { key: factory.type }, }) ); - registry[key] = factory; + registry[factory.type] = factory; }; export const reactEmbeddableRegistryHasKey = (key: string) => registry[key] !== undefined; export const getReactEmbeddableFactory = < - StateType extends unknown = unknown, - ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi + StateType extends object = object, + ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi >( key: string ): ReactEmbeddableFactory => { @@ -51,11 +44,3 @@ export const getReactEmbeddableFactory = < ); return registry[key]; }; - -/** - * A helper function which transforms a component into an Embeddable component by forwarding a ref which - * should be used with `useEmbeddableApiHandle` to expose an API for your component. - */ -export const RegisterReactEmbeddable: ( - component: ReactEmbeddableRegistration -) => ReactEmbeddable = (component) => React.forwardRef((_, apiRef) => component(apiRef)); diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx index 376923de108d1..d2afc6fbb29e9 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.test.tsx @@ -5,36 +5,122 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import { getMockPresentationContainer } from '@kbn/presentation-containers/mocks'; import { render, waitFor, screen } from '@testing-library/react'; import React from 'react'; +import { BehaviorSubject } from 'rxjs'; import { registerReactEmbeddableFactory } from './react_embeddable_registry'; import { ReactEmbeddableRenderer } from './react_embeddable_renderer'; import { ReactEmbeddableFactory } from './types'; describe('react embeddable renderer', () => { const testEmbeddableFactory: ReactEmbeddableFactory<{ name: string; bork: string }> = { - deserializeState: jest.fn(), - getComponent: jest.fn().mockResolvedValue(() => { - return
SUPER TEST COMPONENT
; - }), + type: 'test', + deserializeState: jest.fn().mockImplementation((state) => state.rawState), + buildEmbeddable: async (state, registerApi) => { + const api = registerApi( + { + serializeState: () => ({ + rawState: { + name: state.name, + bork: state.bork, + }, + }), + }, + { + name: [new BehaviorSubject(state.name), () => {}], + bork: [new BehaviorSubject(state.bork), () => {}], + } + ); + return { + Component: () => ( +
+ SUPER TEST COMPONENT, name: {state.name} bork: {state.bork} +
+ ), + api, + }; + }, }; beforeAll(() => { - registerReactEmbeddableFactory('test', testEmbeddableFactory); + registerReactEmbeddableFactory(testEmbeddableFactory); }); it('deserializes given state', () => { - render(); + render(); expect(testEmbeddableFactory.deserializeState).toHaveBeenCalledWith({ - rawState: { blorp: 'blorp?' }, + rawState: { bork: 'blorp?' }, }); }); + it('builds the embeddable', () => { + const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); + render(); + expect(buildEmbeddableSpy).toHaveBeenCalledWith({ bork: 'blorp?' }, expect.any(Function)); + }); + it('renders the given component once it resolves', () => { - render(); + render(); waitFor(() => { - expect(screen.findByText('SUPER TEST COMPONENT')).toBeInTheDocument(); + expect(screen.findByText('SUPER TEST COMPONENT, name: Kuni Garu')).toBeInTheDocument(); + }); + }); + + it('publishes the API into the provided callback', async () => { + const onApiAvailable = jest.fn(); + render( + + ); + await waitFor(() => + expect(onApiAvailable).toHaveBeenCalledWith({ + type: 'test', + uuid: '12345', + parentApi: undefined, + unsavedChanges: expect.any(Object), + serializeState: expect.any(Function), + resetUnsavedChanges: expect.any(Function), + }) + ); + }); + + it('initializes a new ID when one is not given', async () => { + const onApiAvailable = jest.fn(); + render( + + ); + await waitFor(() => + expect(onApiAvailable).toHaveBeenCalledWith( + expect.objectContaining({ uuid: expect.any(String) }) + ) + ); + }); + + it('registers the API with the parent API', async () => { + const onApiAvailable = jest.fn(); + const parentApi = getMockPresentationContainer(); + render( + + ); + await waitFor(() => { + expect(onApiAvailable).toHaveBeenCalledWith(expect.objectContaining({ parentApi })); + expect(parentApi.registerPanelApi).toHaveBeenCalledWith('12345', expect.any(Object)); }); }); }); 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 80b43cde5dd00..64340dc2d05bc 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 @@ -6,30 +6,92 @@ * Side Public License, v 1. */ -import { SerializedPanelState } from '@kbn/presentation-containers'; +import { + apiIsPresentationContainer, + PresentationContainer, + SerializedPanelState, +} from '@kbn/presentation-containers'; import { PresentationPanel } from '@kbn/presentation-panel-plugin/public'; -import React, { useMemo } from 'react'; +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'; /** * Renders a component from the React Embeddable registry into a Presentation Panel. * * TODO: Rename this to simply `Embeddable` when the legacy Embeddable system is removed. */ -export const ReactEmbeddableRenderer = ({ - uuid, +export const ReactEmbeddableRenderer = < + StateType extends object = object, + ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi +>({ + maybeId, type, state, + parentApi, + onApiAvailable, }: { - uuid?: string; + maybeId?: string; type: string; - state: SerializedPanelState; + state: SerializedPanelState; + parentApi?: PresentationContainer; + onApiAvailable?: (api: ApiType) => void; }) => { + const cleanupFunction = useRef<(() => void) | null>(null); + const componentPromise = useMemo( () => (async () => { - const factory = getReactEmbeddableFactory(type); - return await factory.getComponent(factory.deserializeState(state), uuid); + const factory = getReactEmbeddableFactory(type) as ReactEmbeddableFactory< + StateType, + ApiType + >; + const registerApi = ( + apiRegistration: ReactEmbeddableApiRegistration, + comparators: EmbeddableStateComparators + ) => { + const uuid = maybeId ?? generateId(); + const { unsavedChanges, resetUnsavedChanges, cleanup } = + startTrackingEmbeddableUnsavedChanges( + uuid, + parentApi, + comparators, + factory.deserializeState + ); + const fullApi = { + ...apiRegistration, + uuid, + parentApi, + unsavedChanges, + resetUnsavedChanges, + type: factory.type, + } as unknown as ApiType; + if (parentApi && apiIsPresentationContainer(parentApi)) { + parentApi.registerPanelApi(uuid, fullApi); + } + cleanupFunction.current = () => cleanup(); + onApiAvailable?.(fullApi); + return fullApi; + }; + + const { api, Component } = await factory.buildEmbeddable( + factory.deserializeState(state), + registerApi + ); + + return React.forwardRef((_, ref) => { + // expose the api into the imperative handle + useImperativeHandle(ref, () => api, []); + + return ; + }); })(), /** * Disabling exhaustive deps because we do not want to re-fetch the component @@ -38,5 +100,12 @@ export const ReactEmbeddableRenderer = ({ // eslint-disable-next-line react-hooks/exhaustive-deps [type] ); + + useEffect(() => { + return () => { + cleanupFunction.current?.(); + }; + }, []); + return ; }; 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 cdc123f0dc004..be3ecb4645fae 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,13 +12,10 @@ import { SerializedPanelState, } from '@kbn/presentation-containers'; import { getMockPresentationContainer } from '@kbn/presentation-containers/mocks'; -import { PublishesUnsavedChanges } from '@kbn/presentation-publishing'; -import { render, waitFor } from '@testing-library/react'; -import React, { useImperativeHandle } from 'react'; +import { waitFor } from '@testing-library/react'; import { BehaviorSubject, Subject } from 'rxjs'; -import { ReactEmbeddableParentContext } from './react_embeddable_api'; -import { useReactEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; -import { EmbeddableStateComparators, ReactEmbeddableFactory } from './types'; +import { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; +import { EmbeddableStateComparators } from './types'; interface SuperTestStateType { name: string; @@ -58,7 +55,7 @@ describe('react embeddable unsaved changes', () => { return defaultComparators; }; - const renderTestComponent = async ( + const startTrackingUnsavedChanges = ( customComparators?: EmbeddableStateComparators ) => { comparators = customComparators ?? initializeDefaultComparators(); @@ -69,70 +66,36 @@ describe('react embeddable unsaved changes', () => { getLastSavedStateForChild: () => ({ rawState: lastSavedState }), lastSavedState: new Subject(), }; - - let apiToReturn: PublishesUnsavedChanges | null = null; - const TestComponent = React.forwardRef((props, ref) => { - const unsavedChangesApi = useReactEmbeddableUnsavedChanges( - 'someId', - { deserializeState } as ReactEmbeddableFactory, - comparators - ); - useImperativeHandle(ref, () => unsavedChangesApi); - - return
A Test Component
; - }); - - const componentElement = ( - { - apiToReturn = outApi; - }} - /> - ); - - if (parentApi) { - render( - - {componentElement} - - ); - } else { - render(componentElement); - } - - await waitFor(() => { - expect(apiToReturn).toBeDefined(); - }); - return apiToReturn as unknown as PublishesUnsavedChanges; + return startTrackingEmbeddableUnsavedChanges('id', parentApi, comparators, deserializeState); }; it('should return undefined unsaved changes when used without a parent context to provide the last saved state', async () => { parentApi = null; - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi).toBeDefined(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); it('runs factory deserialize function on last saved state', async () => { - await renderTestComponent(); + startTrackingUnsavedChanges(); expect(deserializeState).toHaveBeenCalledWith({ rawState: lastSavedState }); }); it('should return unsaved changes subject initialized to undefined when no unsaved changes are detected', async () => { - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); }); it('should return unsaved changes subject initialized with diff when unsaved changes are detected', async () => { initialState.tagline = 'Testing is my speciality!'; - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toEqual({ tagline: 'Testing is my speciality!', }); }); it('should detect unsaved changes when state changes during the lifetime of the component', async () => { - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); comparators.tagline[1]('Testing is my speciality!'); @@ -144,7 +107,7 @@ describe('react embeddable unsaved changes', () => { }); it('should detect unsaved changes when last saved state changes during the lifetime of the component', async () => { - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); lastSavedState.tagline = 'Some other tagline'; @@ -158,7 +121,7 @@ describe('react embeddable unsaved changes', () => { }); it('should reset unsaved changes, calling given setters with last saved values. This should remove all unsaved state', async () => { - const unsavedChangesApi = await renderTestComponent(); + const unsavedChangesApi = startTrackingUnsavedChanges(); expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); comparators.tagline[1]('Testing is my speciality!'); @@ -188,7 +151,7 @@ describe('react embeddable unsaved changes', () => { ], }; - const unsavedChangesApi = await renderTestComponent(customComparators); + const unsavedChangesApi = startTrackingUnsavedChanges(customComparators); // here we expect there to be no unsaved changes, both unsaved state and last saved state have two digits. expect(unsavedChangesApi.unsavedChanges.value).toBe(undefined); 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 1e760b55f748a..b717c47737ad6 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 @@ -6,13 +6,15 @@ * Side Public License, v 1. */ -import { getLastSavedStateSubjectForChild } from '@kbn/presentation-containers'; +import { + getLastSavedStateSubjectForChild, + PresentationContainer, + SerializedPanelState, +} from '@kbn/presentation-containers'; import { PublishingSubject } from '@kbn/presentation-publishing'; -import { useCallback, useEffect, useMemo } from 'react'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { combineLatestWith, debounceTime, map } from 'rxjs/operators'; -import { useReactEmbeddableParentContext } from './react_embeddable_api'; -import { EmbeddableStateComparators, ReactEmbeddableFactory } from './types'; +import { EmbeddableStateComparators } from './types'; const defaultComparator = (a: T, b: T) => a === b; @@ -28,6 +30,14 @@ const getInitialValuesFromComparators = ( return initialValues; }; +const getDefaultDiffingApi = () => { + return { + unsavedChanges: new BehaviorSubject(undefined), + resetUnsavedChanges: () => {}, + cleanup: () => {}, + }; +}; + const runComparators = ( comparators: EmbeddableStateComparators, comparatorKeys: Array, @@ -49,85 +59,64 @@ const runComparators = ( return Object.keys(latestChanges).length > 0 ? latestChanges : undefined; }; -export const useReactEmbeddableUnsavedChanges = ( +export const startTrackingEmbeddableUnsavedChanges = ( uuid: string, - factory: ReactEmbeddableFactory, - comparators: EmbeddableStateComparators + parentApi: PresentationContainer | undefined, + comparators: EmbeddableStateComparators, + deserializeState: (state: SerializedPanelState) => StateType ) => { - const { parentApi } = useReactEmbeddableParentContext() ?? {}; - const lastSavedStateSubject = useMemo( - () => getLastSavedStateSubjectForChild(parentApi, uuid, factory.deserializeState), - [factory.deserializeState, parentApi, uuid] - ); - - const { comparatorSubjects, comparatorKeys } = useMemo(() => { - const subjects: Array> = []; - const keys: Array = []; - for (const key of Object.keys(comparators) as Array) { - const comparatorSubject = comparators[key][0]; // 0th element of tuple is the subject - subjects.push(comparatorSubject as PublishingSubject); - keys.push(key); - } - return { comparatorKeys: keys, comparatorSubjects: subjects }; - // disable exhaustive deps because the comparators must be static - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + if (Object.keys(comparators).length === 0) return getDefaultDiffingApi(); - /** - * set up unsaved changes subject, running an initial diff. If the parent API cannot provide - * last saved state, we return undefined. - */ - const unsavedChanges = useMemo( - () => - new BehaviorSubject | undefined>( - lastSavedStateSubject - ? runComparators( - comparators, - comparatorKeys, - lastSavedStateSubject?.getValue(), - getInitialValuesFromComparators(comparators, comparatorKeys) - ) - : undefined - ), - // disable exhaustive deps because the comparators must be static - // eslint-disable-next-line react-hooks/exhaustive-deps - [] + const lastSavedStateSubject = getLastSavedStateSubjectForChild( + parentApi, + uuid, + deserializeState ); + if (!lastSavedStateSubject) return getDefaultDiffingApi(); - useEffect(() => { - if (!lastSavedStateSubject) return; - // subscribe to last saved state subject and all state comparators - const subscription = combineLatest(comparatorSubjects) - .pipe( - debounceTime(100), - map((latestStates) => - comparatorKeys.reduce((acc, key, index) => { - acc[key] = latestStates[index] as StateType[typeof key]; - return acc; - }, {} as Partial) - ), - combineLatestWith(lastSavedStateSubject) - ) - .subscribe(([latestStates, lastSavedState]) => { - unsavedChanges.next( - runComparators(comparators, comparatorKeys, lastSavedState, latestStates) - ); - }); - return () => subscription.unsubscribe(); - // disable exhaustive deps because the comparators must be static - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + const comparatorSubjects: Array> = []; + const comparatorKeys: Array = []; + for (const key of Object.keys(comparators) as Array) { + const comparatorSubject = comparators[key][0]; // 0th element of tuple is the subject + comparatorSubjects.push(comparatorSubject as PublishingSubject); + comparatorKeys.push(key); + } - const resetUnsavedChanges = useCallback(() => { - const lastSaved = lastSavedStateSubject?.getValue(); - for (const key of comparatorKeys) { - const setter = comparators[key][1]; // setter function is the 1st element of the tuple - setter(lastSaved?.[key] as StateType[typeof key]); - } + const unsavedChanges = new BehaviorSubject | undefined>( + runComparators( + comparators, + comparatorKeys, + lastSavedStateSubject?.getValue(), + getInitialValuesFromComparators(comparators, comparatorKeys) + ) + ); - // disable exhaustive deps because the comparators must be static - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + const subscription = combineLatest(comparatorSubjects) + .pipe( + debounceTime(100), + map((latestStates) => + comparatorKeys.reduce((acc, key, index) => { + acc[key] = latestStates[index] as StateType[typeof key]; + return acc; + }, {} as Partial) + ), + combineLatestWith(lastSavedStateSubject) + ) + .subscribe(([latestStates, lastSavedState]) => { + unsavedChanges.next( + runComparators(comparators, comparatorKeys, lastSavedState, latestStates) + ); + }); - return { unsavedChanges, resetUnsavedChanges }; + return { + unsavedChanges, + resetUnsavedChanges: () => { + const lastSaved = lastSavedStateSubject?.getValue(); + for (const key of comparatorKeys) { + const setter = comparators[key][1]; // setter function is the 1st element of the tuple + setter(lastSaved?.[key] as StateType[typeof key]); + } + }, + cleanup: () => subscription.unsubscribe(), + }; }; diff --git a/src/plugins/embeddable/public/react_embeddable_system/types.ts b/src/plugins/embeddable/public/react_embeddable_system/types.ts index 1a8c78476a963..247c2f891b718 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/types.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/types.ts @@ -5,10 +5,10 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { SerializedPanelState } from '@kbn/presentation-containers'; +import { HasSerializableState, SerializedPanelState } from '@kbn/presentation-containers'; import { DefaultPresentationPanelApi } from '@kbn/presentation-panel-plugin/public/panel_component/types'; -import { PublishesUnsavedChanges, PublishingSubject } from '@kbn/presentation-publishing'; -import { ReactElement } from 'react'; +import { HasType, PublishesUnsavedChanges, PublishingSubject } from '@kbn/presentation-publishing'; +import React, { ReactElement } from 'react'; export type ReactEmbeddableRegistration< ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi @@ -19,26 +19,33 @@ export type ReactEmbeddableRegistration< * * Before adding anything to this interface, please be certain that it belongs in *every* embeddable. */ -export type DefaultEmbeddableApi = DefaultPresentationPanelApi & - PublishesUnsavedChanges & { - serializeState: () => Promise; - }; +export interface DefaultEmbeddableApi + extends DefaultPresentationPanelApi, + HasType, + PublishesUnsavedChanges, + HasSerializableState {} -export type ReactEmbeddable = - React.ForwardRefExoticComponent>; +export type ReactEmbeddableApiRegistration< + StateType extends object = object, + ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi +> = Omit; export interface ReactEmbeddableFactory< - StateType extends unknown = unknown, - APIType extends DefaultEmbeddableApi = DefaultEmbeddableApi + StateType extends object = object, + ApiType extends DefaultEmbeddableApi = DefaultEmbeddableApi > { - getComponent: (initialState: StateType, maybeId?: string) => Promise>; - deserializeState: (state: SerializedPanelState) => StateType; + type: string; latestVersion?: string; + deserializeState: (state: SerializedPanelState) => StateType; + buildEmbeddable: ( + initialState: StateType, + buildApi: ( + apiRegistration: ReactEmbeddableApiRegistration, + comparators: EmbeddableStateComparators + ) => ApiType + ) => Promise<{ Component: React.FC<{}>; api: ApiType }>; } -export type StateTypeFromFactory> = - F extends ReactEmbeddableFactory ? S : never; - /** * State comparators */ diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_health/clusters_health.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_health/clusters_health.tsx index 088e28c5e5787..996c0d236e369 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_health/clusters_health.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_health/clusters_health.tsx @@ -7,16 +7,16 @@ */ import React from 'react'; +import { estypes } from '@elastic/elasticsearch'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; -import type { ClusterDetails } from '@kbn/es-types'; import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import { ClusterHealth } from './cluster_health'; import { getHeathBarLinearGradient } from './gradient'; interface Props { - clusters: Record; + clusters: Record; } export function ClustersHealth({ clusters }: Props) { diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.test.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.test.tsx index 762896bfb20d7..4c0bbb4fde7e1 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.test.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.test.tsx @@ -7,8 +7,8 @@ */ import React from 'react'; +import { estypes } from '@elastic/elasticsearch'; import { shallow } from 'enzyme'; -import type { ClusterDetails } from '@kbn/es-types'; import { ClusterView } from './cluster_view'; describe('render', () => { @@ -24,7 +24,7 @@ describe('render', () => { skipped: 0, failed: 0, }, - } as ClusterDetails; + } as estypes.ClusterDetails; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); @@ -61,7 +61,7 @@ describe('render', () => { }, }, ], - } as ClusterDetails; + } as estypes.ClusterDetails; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); @@ -79,7 +79,7 @@ describe('render', () => { skipped: 0, failed: 0, }, - } as ClusterDetails; + } as estypes.ClusterDetails; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); @@ -101,7 +101,7 @@ describe('render', () => { }, }, ], - } as unknown as ClusterDetails; + } as unknown as estypes.ClusterDetails; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); @@ -154,7 +154,7 @@ describe('render', () => { }, }, ], - } as unknown as ClusterDetails; + } as unknown as estypes.ClusterDetails; const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.tsx index ef0509110153e..bba65f58954e8 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/cluster_view.tsx @@ -7,14 +7,14 @@ */ import React from 'react'; +import { estypes } from '@elastic/elasticsearch'; import { i18n } from '@kbn/i18n'; -import type { ClusterDetails } from '@kbn/es-types'; import { EuiCallOut, EuiText } from '@elastic/eui'; import { ShardsView } from './shards_view'; import { OpenShardFailureFlyoutButton } from './shards_view'; interface Props { - clusterDetails: ClusterDetails; + clusterDetails: estypes.ClusterDetails; } export function ClusterView({ clusterDetails }: Props) { diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.test.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.test.tsx index 19c269886041c..667c8937aa649 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.test.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.test.tsx @@ -7,7 +7,7 @@ */ import React from 'react'; -import type { ClusterDetails } from '@kbn/es-types'; +import { estypes } from '@elastic/elasticsearch'; import { render, screen, fireEvent } from '@testing-library/react'; import { ClustersTable } from './clusters_table'; @@ -17,15 +17,15 @@ describe('ClustersTable', () => { remote1: { status: 'successful', took: 50, - } as unknown as ClusterDetails, + } as unknown as estypes.ClusterDetails, remote2: { status: 'skipped', took: 1000, - } as unknown as ClusterDetails, + } as unknown as estypes.ClusterDetails, remote3: { status: 'failed', took: 90, - } as unknown as ClusterDetails, + } as unknown as estypes.ClusterDetails, }; test('should render rows in native order', () => { diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.tsx index 03de4a0b999f4..1cd0f0864742f 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/clusters_table.tsx @@ -7,7 +7,7 @@ */ import React, { useMemo, useState, ReactNode } from 'react'; -import type { ClusterDetails } from '@kbn/es-types'; +import { estypes } from '@elastic/elasticsearch'; import { i18n } from '@kbn/i18n'; import { Comparators, @@ -21,7 +21,7 @@ import { ClusterView } from './cluster_view'; import { ClusterHealth } from '../clusters_health'; import { LOCAL_CLUSTER_KEY } from '../local_cluster'; -function getInitialExpandedRow(clusters: Record) { +function getInitialExpandedRow(clusters: Record) { const clusterNames = Object.keys(clusters); return clusterNames.length === 1 ? { [clusterNames[0]]: } @@ -35,7 +35,7 @@ interface ClusterItem { } interface Props { - clusters: Record; + clusters: Record; } export function ClustersTable({ clusters }: Props) { diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_view.tsx b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_view.tsx index c14822d93561a..fb07c7db33a76 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_view.tsx +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_view.tsx @@ -10,7 +10,6 @@ import React, { Component } from 'react'; import { estypes } from '@elastic/elasticsearch'; import { EuiSearchBar, type EuiSearchBarOnChangeArgs, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import type { ClusterDetails } from '@kbn/es-types'; import { Request } from '../../../../../../common/adapters/request/types'; import type { DetailViewProps } from '../types'; import { ClusterHealth, ClustersHealth } from './clusters_health'; @@ -18,7 +17,7 @@ import { ClustersTable } from './clusters_table'; import { findClusters } from './find_clusters'; interface State { - clusters: Record; + clusters: Record; showSearchAndStatusBar: boolean; } diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/find_clusters.ts b/src/plugins/inspector/public/views/requests/components/details/clusters_view/find_clusters.ts index 8b62cf20d1b48..701b20f1bab5d 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/find_clusters.ts +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/find_clusters.ts @@ -7,12 +7,14 @@ */ import { estypes } from '@elastic/elasticsearch'; -import type { ClusterDetails } from '@kbn/es-types'; import { EuiSearchBar, type Query } from '@elastic/eui'; import { Request } from '../../../../../../common/adapters/request/types'; import { getLocalClusterDetails, LOCAL_CLUSTER_KEY } from './local_cluster'; -export function findClusters(request: Request, query?: Query): Record { +export function findClusters( + request: Request, + query?: Query +): Record { const rawResponse = (request.response?.json as { rawResponse?: estypes.SearchResponse }) ?.rawResponse; if (!rawResponse) { @@ -22,7 +24,7 @@ export function findClusters(request: Request, query?: Query): Record; + details: Record; } ).details : { @@ -44,7 +46,7 @@ export function findClusters(request: Request, query?: Query): Record = {}; + const narrowedClusers: Record = {}; narrowedClusterItems.forEach(({ name }) => { narrowedClusers[name] = clusters[name]; }); diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/local_cluster.ts b/src/plugins/inspector/public/views/requests/components/details/clusters_view/local_cluster.ts index aac2266500bab..55663c8d17d79 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/local_cluster.ts +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/local_cluster.ts @@ -7,11 +7,10 @@ */ import { estypes } from '@elastic/elasticsearch'; -import type { ClusterDetails } from '@kbn/es-types'; export const LOCAL_CLUSTER_KEY = '(local)'; -function getLocalClusterStatus(rawResponse: estypes.SearchResponse): ClusterDetails['status'] { +function getLocalClusterStatus(rawResponse: estypes.SearchResponse): estypes.ClusterSearchStatus { if (rawResponse._shards?.successful === 0) { return 'failed'; } diff --git a/src/plugins/inspector/tsconfig.json b/src/plugins/inspector/tsconfig.json index 8a3025cdad7dd..325fada617ac5 100644 --- a/src/plugins/inspector/tsconfig.json +++ b/src/plugins/inspector/tsconfig.json @@ -15,7 +15,6 @@ "@kbn/core-ui-settings-browser-mocks", "@kbn/core-ui-settings-browser", "@kbn/std", - "@kbn/es-types", "@kbn/ui-theme", "@kbn/code-editor" ], diff --git a/src/plugins/links/public/components/dashboard_link/dashboard_link_component.tsx b/src/plugins/links/public/components/dashboard_link/dashboard_link_component.tsx index 90bf4a03002b7..57d881cecd705 100644 --- a/src/plugins/links/public/components/dashboard_link/dashboard_link_component.tsx +++ b/src/plugins/links/public/components/dashboard_link/dashboard_link_component.tsx @@ -22,7 +22,7 @@ import { DashboardDrilldownOptions, DEFAULT_DASHBOARD_DRILLDOWN_OPTIONS, } from '@kbn/presentation-util-plugin/public'; -import type { HasParentApi, PublishesLocalUnifiedSearch } from '@kbn/presentation-publishing'; +import type { HasParentApi, PublishesUnifiedSearch } from '@kbn/presentation-publishing'; import { DASHBOARD_LINK_TYPE, @@ -118,7 +118,7 @@ export const DashboardLinkComponent = ({ dashboardId: link.destination, ...getDashboardLocatorParamsFromEmbeddable( linksEmbeddable as Partial< - PublishesLocalUnifiedSearch & HasParentApi> + PublishesUnifiedSearch & HasParentApi> >, linkOptions ), diff --git a/src/plugins/navigation/public/mocks.ts b/src/plugins/navigation/public/mocks.ts index 26a43d4c10109..3625be538f249 100644 --- a/src/plugins/navigation/public/mocks.ts +++ b/src/plugins/navigation/public/mocks.ts @@ -27,6 +27,7 @@ const createStartContract = (): jest.Mocked => { AggregateQueryTopNavMenu: jest.fn(), }, addSolutionNavigation: jest.fn(), + isSolutionNavigationEnabled: jest.fn(), }; return startContract; }; diff --git a/src/plugins/navigation/public/plugin.test.ts b/src/plugins/navigation/public/plugin.test.ts index fbc9bb7b1e3fb..5a30125f9e5ca 100644 --- a/src/plugins/navigation/public/plugin.test.ts +++ b/src/plugins/navigation/public/plugin.test.ts @@ -8,6 +8,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; +import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; import { of } from 'rxjs'; import { DEFAULT_SOLUTION_NAV_UI_SETTING_ID, @@ -16,6 +17,7 @@ import { } from '../common'; import { NavigationPublicPlugin } from './plugin'; import { ConfigSchema } from './types'; +import type { BuildFlavor } from '@kbn/config'; const defaultConfig: ConfigSchema['solutionNavigation'] = { featureOn: true, @@ -27,18 +29,23 @@ const defaultConfig: ConfigSchema['solutionNavigation'] = { const setup = ( partialConfig: Partial & { featureOn: boolean; - } + }, + { buildFlavor = 'traditional' }: { buildFlavor?: BuildFlavor } = {} ) => { - const initializerContext = coreMock.createPluginInitializerContext({ - solutionNavigation: { - ...defaultConfig, - ...partialConfig, + const initializerContext = coreMock.createPluginInitializerContext( + { + solutionNavigation: { + ...defaultConfig, + ...partialConfig, + }, }, - }); + { buildFlavor } + ); const plugin = new NavigationPublicPlugin(initializerContext); const coreStart = coreMock.createStart(); const unifiedSearch = unifiedSearchPluginMock.createStartContract(); + const cloud = cloudMock.createStart(); const getGlobalSetting$ = jest.fn(); const settingsGlobalClient = { @@ -47,7 +54,7 @@ const setup = ( }; coreStart.settings.globalClient = settingsGlobalClient; - return { plugin, coreStart, unifiedSearch, getGlobalSetting$ }; + return { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ }; }; describe('Navigation Plugin', () => { @@ -60,13 +67,18 @@ describe('Navigation Plugin', () => { expect(coreStart.chrome.project.updateSolutionNavigations).not.toHaveBeenCalled(); expect(coreStart.chrome.project.changeActiveSolutionNavigation).not.toHaveBeenCalled(); }); + + it('should return flag to indicate that the solution navigation is disabled', () => { + const { plugin, coreStart, unifiedSearch } = setup({ featureOn }); + expect(plugin.start(coreStart, { unifiedSearch }).isSolutionNavigationEnabled()).toBe(false); + }); }); describe('feature flag enabled', () => { const featureOn = true; it('should add the default solution navs but **not** set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: false, // NOT enabled, so we should not set the active nav @@ -79,17 +91,17 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); const [arg] = coreStart.chrome.project.updateSolutionNavigations.mock.calls[0]; - expect(Object.keys(arg)).toEqual(['es', 'oblt', 'security']); + expect(Object.keys(arg)).toEqual(['es', 'oblt']); expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith(null); }); it('should add the default solution navs **and** set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: true, @@ -102,7 +114,7 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); @@ -113,7 +125,7 @@ describe('Navigation Plugin', () => { }); it('if not "visible", should not set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: true, @@ -126,12 +138,29 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith(null, { onlyIfNotSet: true, }); }); + + it('should return flag to indicate that the solution navigation is enabled', () => { + const { plugin, coreStart, unifiedSearch, cloud } = setup({ featureOn }); + expect(plugin.start(coreStart, { unifiedSearch, cloud }).isSolutionNavigationEnabled()).toBe( + true + ); + }); + + it('on serverless should return flag to indicate that the solution navigation is disabled', () => { + const { plugin, coreStart, unifiedSearch, cloud } = setup( + { featureOn }, + { buildFlavor: 'serverless' } + ); + expect(plugin.start(coreStart, { unifiedSearch, cloud }).isSolutionNavigationEnabled()).toBe( + false + ); + }); }); }); diff --git a/src/plugins/navigation/public/plugin.ts b/src/plugins/navigation/public/plugin.ts deleted file mode 100644 index ffdbe978dca24..0000000000000 --- a/src/plugins/navigation/public/plugin.ts +++ /dev/null @@ -1,233 +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 { combineLatest, debounceTime, of, ReplaySubject, takeUntil } from 'rxjs'; -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; -import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import type { - CloudURLs, - NavigationTreeDefinition, - SolutionNavigationDefinition, - SolutionNavigationDefinitions, -} from '@kbn/core-chrome-browser'; -import { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; -import { - ENABLE_SOLUTION_NAV_UI_SETTING_ID, - OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID, - DEFAULT_SOLUTION_NAV_UI_SETTING_ID, -} from '../common'; -import { - NavigationPublicSetup, - NavigationPublicStart, - NavigationPublicSetupDependencies, - NavigationPublicStartDependencies, - ConfigSchema, - SolutionNavigation, -} from './types'; -import { TopNavMenuExtensionsRegistry, createTopNav } from './top_nav_menu'; -import { RegisteredTopNavMenuData } from './top_nav_menu/top_nav_menu_data'; -import { getSideNavComponent } from './side_navigation'; - -export class NavigationPublicPlugin - implements - Plugin< - NavigationPublicSetup, - NavigationPublicStart, - NavigationPublicSetupDependencies, - NavigationPublicStartDependencies - > -{ - private readonly topNavMenuExtensionsRegistry: TopNavMenuExtensionsRegistry = - new TopNavMenuExtensionsRegistry(); - private readonly stop$ = new ReplaySubject(1); - - constructor(private initializerContext: PluginInitializerContext) {} - - public setup(_core: CoreSetup): NavigationPublicSetup { - return { - registerMenuItem: this.topNavMenuExtensionsRegistry.register.bind( - this.topNavMenuExtensionsRegistry - ), - }; - } - - public start( - core: CoreStart, - { unifiedSearch, cloud }: NavigationPublicStartDependencies - ): NavigationPublicStart { - const extensions = this.topNavMenuExtensionsRegistry.getAll(); - const chrome = core.chrome as InternalChromeStart; - - /* - * - * This helps clients of navigation to create - * a TopNav Search Bar which does not uses global unifiedSearch/data/query service - * - * Useful in creating multiple stateful SearchBar in the same app without affecting - * global filters - * - * */ - const createCustomTopNav = ( - /* - * Custom instance of unified search if it needs to be overridden - * - * */ - customUnifiedSearch?: UnifiedSearchPublicPluginStart, - customExtensions?: RegisteredTopNavMenuData[] - ) => { - return createTopNav(customUnifiedSearch ?? unifiedSearch, customExtensions ?? extensions); - }; - - const config = this.initializerContext.config.get(); - const { - solutionNavigation: { featureOn: isSolutionNavigationFeatureOn }, - } = config; - - if (isSolutionNavigationFeatureOn) { - this.addDefaultSolutionNavigation({ core, chrome, cloud }); - - combineLatest([ - core.settings.globalClient.get$(ENABLE_SOLUTION_NAV_UI_SETTING_ID), - core.settings.globalClient.get$(OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID), - core.settings.globalClient.get$(DEFAULT_SOLUTION_NAV_UI_SETTING_ID), - ]) - .pipe(takeUntil(this.stop$), debounceTime(10)) - .subscribe(([enabled, status, defaultSolution]) => { - if (!enabled) { - chrome.project.changeActiveSolutionNavigation(null); - } else { - // TODO: Here we will need to check if the user has opt-in or not.... (value set in their user profile) - const changeImmediately = status === 'visible'; - chrome.project.changeActiveSolutionNavigation( - changeImmediately ? defaultSolution : null, - { onlyIfNotSet: true } - ); - } - }); - } - - return { - ui: { - TopNavMenu: createTopNav(unifiedSearch, extensions), - AggregateQueryTopNavMenu: createTopNav(unifiedSearch, extensions), - createTopNavWithCustomContext: createCustomTopNav, - }, - addSolutionNavigation: this.addSolutionNavigation.bind(this), - }; - } - - public stop() { - this.stop$.next(); - } - - private addSolutionNavigation(solutionNavigation: SolutionNavigation) { - // TODO: Implement. This handler will allow any plugin (e.g. security) to register a solution navigation. - } - - private addDefaultSolutionNavigation({ - core, - chrome, - cloud = {}, - }: { - core: CoreStart; - chrome: InternalChromeStart; - cloud?: CloudURLs; - }) { - const { project } = chrome; - const activeNavigationNodes$ = project.getActiveNavigationNodes$(); - const navigationTreeUi$ = project.getNavigationTreeUi$(); - - const getSideNavComponentGetter: ( - navTree: NavigationTreeDefinition, - id: string - ) => SolutionNavigationDefinition['sideNavComponentGetter'] = (navTree, id) => () => { - project.initNavigation(of(navTree), { cloudUrls: cloud }); - - return getSideNavComponent({ - navProps: { navigationTree$: navigationTreeUi$ }, - deps: { core, activeNodes$: activeNavigationNodes$ }, - }); - }; - - const solutionNavs: SolutionNavigationDefinitions = { - es: { - id: 'es', - title: 'Search', - icon: 'logoElasticsearch', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'search_project_nav', - title: 'Search', - icon: 'logoElasticsearch', - defaultIsCollapsed: false, - isCollapsible: false, - breadcrumbStatus: 'hidden', - children: [], - }, - ], - }, - 'search' - ), - }, - oblt: { - id: 'oblt', - title: 'Observability', - icon: 'logoObservability', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'observability_project_nav', - title: 'Observability', - icon: 'logoObservability', - defaultIsCollapsed: false, - isCollapsible: false, - breadcrumbStatus: 'hidden', - children: [], - }, - ], - }, - 'oblt' - ), - }, - security: { - id: 'security', - title: 'Security', - icon: 'logoSecurity', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'security_project_nav', - title: 'Security', - icon: 'logoSecurity', - breadcrumbStatus: 'hidden', - defaultIsCollapsed: false, - children: [], - }, - ], - }, - 'security' - ), - }, - }; - - chrome.project.updateSolutionNavigations(solutionNavs, true); - } -} diff --git a/src/plugins/navigation/public/plugin.tsx b/src/plugins/navigation/public/plugin.tsx new file mode 100644 index 0000000000000..9877e92675d19 --- /dev/null +++ b/src/plugins/navigation/public/plugin.tsx @@ -0,0 +1,241 @@ +/* + * 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 { combineLatest, debounceTime, of, ReplaySubject, takeUntil } from 'rxjs'; +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { + SolutionNavigationDefinition, + SolutionNavigationDefinitions, +} from '@kbn/core-chrome-browser'; +import { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; +import { definition as esDefinition } from '@kbn/solution-nav-es'; +import { definition as obltDefinition } from '@kbn/solution-nav-oblt'; +import type { PanelContentProvider } from '@kbn/shared-ux-chrome-navigation'; +import { + ENABLE_SOLUTION_NAV_UI_SETTING_ID, + OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID, + DEFAULT_SOLUTION_NAV_UI_SETTING_ID, +} from '../common'; +import { + NavigationPublicSetup, + NavigationPublicStart, + NavigationPublicSetupDependencies, + NavigationPublicStartDependencies, + ConfigSchema, + SolutionNavigation, +} from './types'; +import { TopNavMenuExtensionsRegistry, createTopNav } from './top_nav_menu'; +import { RegisteredTopNavMenuData } from './top_nav_menu/top_nav_menu_data'; +import { SideNavComponent } from './side_navigation'; + +export class NavigationPublicPlugin + implements + Plugin< + NavigationPublicSetup, + NavigationPublicStart, + NavigationPublicSetupDependencies, + NavigationPublicStartDependencies + > +{ + private readonly topNavMenuExtensionsRegistry: TopNavMenuExtensionsRegistry = + new TopNavMenuExtensionsRegistry(); + private readonly stop$ = new ReplaySubject(1); + private coreStart?: CoreStart; + private depsStart?: NavigationPublicStartDependencies; + + constructor(private initializerContext: PluginInitializerContext) {} + + public setup(_core: CoreSetup): NavigationPublicSetup { + return { + registerMenuItem: this.topNavMenuExtensionsRegistry.register.bind( + this.topNavMenuExtensionsRegistry + ), + }; + } + + public start( + core: CoreStart, + depsStart: NavigationPublicStartDependencies + ): NavigationPublicStart { + this.coreStart = core; + this.depsStart = depsStart; + + const { unifiedSearch, cloud } = depsStart; + const extensions = this.topNavMenuExtensionsRegistry.getAll(); + const chrome = core.chrome as InternalChromeStart; + + /* + * + * This helps clients of navigation to create + * a TopNav Search Bar which does not uses global unifiedSearch/data/query service + * + * Useful in creating multiple stateful SearchBar in the same app without affecting + * global filters + * + * */ + const createCustomTopNav = ( + /* + * Custom instance of unified search if it needs to be overridden + * + * */ + customUnifiedSearch?: UnifiedSearchPublicPluginStart, + customExtensions?: RegisteredTopNavMenuData[] + ) => { + return createTopNav(customUnifiedSearch ?? unifiedSearch, customExtensions ?? extensions); + }; + + const config = this.initializerContext.config.get(); + const { + solutionNavigation: { featureOn: isSolutionNavigationFeatureOn }, + } = config; + + const onCloud = cloud !== undefined; // The new side nav will initially only be available to cloud users + const isServerless = this.initializerContext.env.packageInfo.buildFlavor === 'serverless'; + const isSolutionNavEnabled = isSolutionNavigationFeatureOn && onCloud && !isServerless; + + if (isSolutionNavEnabled) { + chrome.project.setCloudUrls(cloud); + this.addDefaultSolutionNavigation({ chrome }); + this.susbcribeToSolutionNavUiSettings(core); + + // Temp. This is temporary to simulate adding a solution nav after bootstrapping + setTimeout(() => { + this.addSolutionNavigation({ + id: 'security', + title: 'Security', + icon: 'logoSecurity', + homePage: 'dashboards', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'security_project_nav', + title: 'Security', + icon: 'logoSecurity', + breadcrumbStatus: 'hidden', + defaultIsCollapsed: false, + children: [ + { + link: 'dashboards', + spaceBefore: 'm', + }, + ], + }, + ], + }), + }); + }, 5000); + } + + return { + ui: { + TopNavMenu: createTopNav(unifiedSearch, extensions), + AggregateQueryTopNavMenu: createTopNav(unifiedSearch, extensions), + createTopNavWithCustomContext: createCustomTopNav, + }, + addSolutionNavigation: ( + solutionNavigation: Omit & { + /** Data test subj for the side navigation */ + dataTestSubj?: string; + /** Panel content provider for the side navigation */ + panelContentProvider?: PanelContentProvider; + } + ) => { + if (!isSolutionNavEnabled) return; + return this.addSolutionNavigation(solutionNavigation); + }, + isSolutionNavigationEnabled: () => isSolutionNavEnabled, + }; + } + + public stop() { + this.stop$.next(); + } + + private susbcribeToSolutionNavUiSettings(core: CoreStart) { + const chrome = core.chrome as InternalChromeStart; + + combineLatest([ + core.settings.globalClient.get$(ENABLE_SOLUTION_NAV_UI_SETTING_ID), + core.settings.globalClient.get$(OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID), + core.settings.globalClient.get$(DEFAULT_SOLUTION_NAV_UI_SETTING_ID), + ]) + .pipe(takeUntil(this.stop$), debounceTime(10)) + .subscribe(([enabled, status, defaultSolution]) => { + if (!enabled) { + chrome.project.changeActiveSolutionNavigation(null); + } else { + // TODO: Here we will need to check if the user has opt-in or not.... (value set in their user profile) + const changeImmediately = status === 'visible'; + chrome.project.changeActiveSolutionNavigation( + changeImmediately ? defaultSolution : null, + { onlyIfNotSet: true } + ); + } + }); + } + + private getSideNavComponent({ + dataTestSubj, + panelContentProvider, + }: { + panelContentProvider?: PanelContentProvider; + dataTestSubj?: string; + } = {}): SolutionNavigationDefinition['sideNavComponent'] { + if (!this.coreStart) throw new Error('coreStart is not available'); + if (!this.depsStart) throw new Error('depsStart is not available'); + + const core = this.coreStart; + const { project } = core.chrome as InternalChromeStart; + const activeNavigationNodes$ = project.getActiveNavigationNodes$(); + const navigationTreeUi$ = project.getNavigationTreeUi$(); + + return () => ( + + ); + } + + private addSolutionNavigation( + solutionNavigation: SolutionNavigation & { + /** Data test subj for the side navigation */ + dataTestSubj?: string; + /** Panel content provider for the side navigation */ + panelContentProvider?: PanelContentProvider; + } + ) { + if (!this.coreStart) throw new Error('coreStart is not available'); + const { dataTestSubj, panelContentProvider, ...rest } = solutionNavigation; + const sideNavComponent = + solutionNavigation.sideNavComponent ?? + this.getSideNavComponent({ dataTestSubj, panelContentProvider }); + const { project } = this.coreStart.chrome as InternalChromeStart; + project.updateSolutionNavigations({ + [solutionNavigation.id]: { ...rest, sideNavComponent }, + }); + } + + private addDefaultSolutionNavigation({ chrome }: { chrome: InternalChromeStart }) { + const solutionNavs: SolutionNavigationDefinitions = { + es: { + ...esDefinition, + sideNavComponent: this.getSideNavComponent({ dataTestSubj: 'svlSearchSideNav' }), + }, + oblt: { + ...obltDefinition, + sideNavComponent: this.getSideNavComponent({ dataTestSubj: 'svlObservabilitySideNav' }), + }, + }; + + chrome.project.updateSolutionNavigations(solutionNavs, true); + } +} diff --git a/src/plugins/navigation/public/side_navigation/index.tsx b/src/plugins/navigation/public/side_navigation/index.tsx index 959413fbe523f..3aa7170295a18 100644 --- a/src/plugins/navigation/public/side_navigation/index.tsx +++ b/src/plugins/navigation/public/side_navigation/index.tsx @@ -8,18 +8,13 @@ import React, { Suspense, type FC } from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; -import type { SideNavComponent as SideNavComponentType } from '@kbn/core-chrome-browser'; import type { Props as NavigationProps } from './side_navigation'; const SideNavComponentLazy = React.lazy(() => import('./side_navigation')); -const SideNavComponent: FC = (props) => ( +export const SideNavComponent: FC = (props) => ( }> ); - -export const getSideNavComponent = (props: NavigationProps): SideNavComponentType => { - return () => ; -}; diff --git a/src/plugins/navigation/public/types.ts b/src/plugins/navigation/public/types.ts index 9ba333ec641c1..b7bfaab6a2957 100644 --- a/src/plugins/navigation/public/types.ts +++ b/src/plugins/navigation/public/types.ts @@ -31,6 +31,11 @@ export interface NavigationPublicStart { }; /** Add a solution navigation to the header nav switcher. */ addSolutionNavigation: (solutionNavigation: SolutionNavigation) => void; + /** + * Use this handler verify if the solution navigation is enabled. + * @returns true if the solution navigation is enabled, false otherwise. + */ + isSolutionNavigationEnabled: () => boolean; } export interface NavigationPublicSetupDependencies { diff --git a/src/plugins/navigation/tsconfig.json b/src/plugins/navigation/tsconfig.json index 6befc349f606d..1450b9f0aa1a7 100644 --- a/src/plugins/navigation/tsconfig.json +++ b/src/plugins/navigation/tsconfig.json @@ -24,6 +24,9 @@ "@kbn/config-schema", "@kbn/core-plugins-server", "@kbn/i18n", + "@kbn/solution-nav-es", + "@kbn/solution-nav-oblt", + "@kbn/config", ], "exclude": [ "target/**/*", diff --git a/src/plugins/presentation_panel/public/mocks.tsx b/src/plugins/presentation_panel/public/mocks.tsx index 8d55026619ec0..816d369bda5dc 100644 --- a/src/plugins/presentation_panel/public/mocks.tsx +++ b/src/plugins/presentation_panel/public/mocks.tsx @@ -38,7 +38,7 @@ export const getMockPresentationPanelCompatibleComponent = < ): Promise => Promise.resolve( React.forwardRef((_, apiRef) => { - useImperativeHandle(apiRef, () => api ?? {}); + useImperativeHandle(apiRef, () => api ?? { uuid: 'test' }); return (
This is a test component
); diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.test.ts b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.test.ts index 4054628165cb0..ca4332d7657c7 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.test.ts +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.test.ts @@ -15,7 +15,7 @@ import { Filter, TimeRange, type AggregateQuery, type Query } from '@kbn/es-query'; -import { PublishesLocalUnifiedSearch } from '@kbn/presentation-publishing'; +import { PublishesUnifiedSearch } from '@kbn/presentation-publishing'; import { BehaviorSubject } from 'rxjs'; import { CustomTimeRangeBadge } from './custom_time_range_badge'; @@ -23,7 +23,7 @@ const mockTimeRange: TimeRange = { from: 'now-17m', to: 'now' }; describe('custom time range badge action', () => { let action: CustomTimeRangeBadge; - let context: { embeddable: PublishesLocalUnifiedSearch }; + let context: { embeddable: PublishesUnifiedSearch }; let updateTimeRange: (timeRange: TimeRange | undefined) => void; @@ -34,9 +34,9 @@ describe('custom time range badge action', () => { action = new CustomTimeRangeBadge(); context = { embeddable: { - localTimeRange: timeRangeSubject, - localFilters: new BehaviorSubject(undefined), - localQuery: new BehaviorSubject(undefined), + timeRange$: timeRangeSubject, + filters$: new BehaviorSubject(undefined), + query$: new BehaviorSubject(undefined), }, }; }); 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 602398b7bb1a2..ef43514bbfde6 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 { apiPublishesLocalUnifiedSearch, EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { apiPublishesUnifiedSearch, EmbeddableApiContext } from '@kbn/presentation-publishing'; import { core } from '../../kibana_services'; import { customizePanelAction } from '../panel_actions'; @@ -30,8 +30,8 @@ export class CustomTimeRangeBadge public order = 7; public getDisplayName({ embeddable }: EmbeddableApiContext) { - if (!apiPublishesLocalUnifiedSearch(embeddable)) throw new IncompatibleActionError(); - const timeRange = embeddable.localTimeRange.value; + if (!apiPublishesUnifiedSearch(embeddable)) throw new IncompatibleActionError(); + const timeRange = embeddable.timeRange$.value; if (!timeRange) return ''; return renderToString( void ) { - if (!apiPublishesLocalUnifiedSearch(embeddable)) return; - return embeddable.localTimeRange.subscribe((localTimeRange) => { - onChange(Boolean(localTimeRange), this); + if (!apiPublishesUnifiedSearch(embeddable)) return; + return embeddable.timeRange$.subscribe((timeRange) => { + onChange(Boolean(timeRange), this); }); } @@ -65,8 +65,8 @@ export class CustomTimeRangeBadge } public async isCompatible({ embeddable }: EmbeddableApiContext) { - if (apiPublishesLocalUnifiedSearch(embeddable)) { - const timeRange = embeddable.localTimeRange.value; + if (apiPublishesUnifiedSearch(embeddable)) { + const timeRange = embeddable.timeRange$.value; return Boolean(timeRange); } return false; diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.test.ts b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.test.ts index 174ea807edca8..d38a9705b142c 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.test.ts +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.test.ts @@ -36,14 +36,12 @@ describe('Customize panel action', () => { it('is compatible in view mode when API exposes writable unified search', async () => { (context.embeddable as PublishesViewMode).viewMode = new BehaviorSubject('view'); - context.embeddable.localTimeRange = new BehaviorSubject({ + context.embeddable.timeRange$ = new BehaviorSubject({ from: 'now-15m', to: 'now', }); - context.embeddable.localFilters = new BehaviorSubject([]); - context.embeddable.localQuery = new BehaviorSubject( - undefined - ); + context.embeddable.filters$ = new BehaviorSubject([]); + context.embeddable.query$ = new BehaviorSubject(undefined); expect(await action.isCompatible(context)).toBe(true); }); @@ -63,6 +61,7 @@ describe('Customize panel action', () => { it('opens overlay on parent if parent is an overlay tracker', async () => { context.embeddable.parentApi = { openOverlay: jest.fn(), + timeRange$: undefined, clearOverlays: jest.fn(), }; await action.execute(context); diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.tsx b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.tsx index 017203f961a08..fd5810755dd83 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.tsx +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_action.tsx @@ -7,19 +7,21 @@ */ import { i18n } from '@kbn/i18n'; +import { TracksOverlays } from '@kbn/presentation-containers'; import { apiCanAccessViewMode, apiPublishesDataViews, - apiPublishesLocalUnifiedSearch, + apiPublishesUnifiedSearch, apiPublishesPanelTitle, CanAccessViewMode, EmbeddableApiContext, getInheritedViewMode, HasParentApi, PublishesDataViews, - PublishesWritableLocalUnifiedSearch, + PublishesWritableUnifiedSearch, PublishesWritablePanelDescription, PublishesWritablePanelTitle, + PublishesUnifiedSearch, } from '@kbn/presentation-publishing'; import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { openCustomizePanelFlyout } from './open_customize_panel'; @@ -29,10 +31,10 @@ export const ACTION_CUSTOMIZE_PANEL = 'ACTION_CUSTOMIZE_PANEL'; export type CustomizePanelActionApi = CanAccessViewMode & Partial< PublishesDataViews & - PublishesWritableLocalUnifiedSearch & + PublishesWritableUnifiedSearch & PublishesWritablePanelDescription & PublishesWritablePanelTitle & - HasParentApi + HasParentApi> >; export const isApiCompatibleWithCustomizePanelAction = ( @@ -62,8 +64,8 @@ export class CustomizePanelAction implements Action { // It should be possible to customize just the time range in View mode return ( getInheritedViewMode(embeddable) === 'edit' || - (apiPublishesLocalUnifiedSearch(embeddable) && - (embeddable.isCompatibleWithLocalUnifiedSearch?.() ?? true)) + (apiPublishesUnifiedSearch(embeddable) && + (embeddable.isCompatibleWithUnifiedSearch?.() ?? true)) ); } diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.test.tsx b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.test.tsx index f3413568b4064..44d1847af1dce 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.test.tsx +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.test.tsx @@ -159,12 +159,12 @@ describe('customize panel editor', () => { describe('local time range', () => { it('renders local time picker if API supports it', async () => { - api.localTimeRange = new BehaviorSubject({ + api.timeRange$ = new BehaviorSubject({ from: '', to: '', }); - api.localFilters = new BehaviorSubject([]); - api.localQuery = new BehaviorSubject(undefined); + api.filters$ = new BehaviorSubject([]); + api.query$ = new BehaviorSubject(undefined); renderPanelEditor(); const customTimeRangeComponent = await screen.findByTestId( @@ -194,15 +194,15 @@ describe('customize panel editor', () => { }); test('renders local filters, if provided', async () => { - api.localTimeRange = new BehaviorSubject(undefined); - api.localFilters = new BehaviorSubject([ + api.timeRange$ = new BehaviorSubject(undefined); + api.filters$ = new BehaviorSubject([ { meta: {}, query: {}, $state: {}, }, ] as Filter[]); - api.localQuery = new BehaviorSubject(undefined); + api.query$ = new BehaviorSubject(undefined); renderPanelEditor(); const customPanelQuery = await screen.findByTestId('panelCustomFiltersRow'); @@ -210,9 +210,9 @@ describe('customize panel editor', () => { }); test('renders a local query, if provided', async () => { - api.localTimeRange = new BehaviorSubject(undefined); - api.localFilters = new BehaviorSubject([]); - api.localQuery = new BehaviorSubject({ + api.timeRange$ = new BehaviorSubject(undefined); + api.filters$ = new BehaviorSubject([]); + api.query$ = new BehaviorSubject({ query: 'field : value', language: 'kql', }); 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 4cae2db5dcea9..964b4e76ff4ff 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,7 +30,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { - apiPublishesLocalUnifiedSearch, + apiPublishesUnifiedSearch, getInheritedViewMode, getPanelTitle, } from '@kbn/presentation-publishing'; @@ -64,9 +64,10 @@ export const CustomizePanelEditor = ({ api.panelDescription?.value ?? api.defaultPanelDescription?.value ); const [panelTitle, setPanelTitle] = useState(getPanelTitle(api)); - const [localTimeRange, setLocalTimeRange] = useState( - api.localTimeRange?.value ?? api?.getFallbackTimeRange?.() + const [timeRange, setTimeRange] = useState( + api.timeRange$?.value ?? api.parentApi?.timeRange$?.value ); + const initialFocusRef = useRef(null); useEffect(() => { @@ -75,9 +76,7 @@ export const CustomizePanelEditor = ({ } }, [initialFocusRef, focusOnTitle]); - const [hasOwnTimeRange, setHasOwnTimeRange] = useState( - Boolean(api.localTimeRange?.value) - ); + const [hasOwnTimeRange, setHasOwnTimeRange] = useState(Boolean(api.timeRange$?.value)); const commonlyUsedRangesForDatePicker = useMemo(() => { const commonlyUsedRanges = core.uiSettings.get( @@ -103,9 +102,9 @@ export const CustomizePanelEditor = ({ if (panelDescription !== api.panelDescription?.value) api.setPanelDescription?.(panelDescription); - const newTimeRange = hasOwnTimeRange ? localTimeRange : undefined; - if (newTimeRange !== api.localTimeRange?.value) { - api.setLocalTimeRange?.(newTimeRange); + const newTimeRange = hasOwnTimeRange ? timeRange : undefined; + if (newTimeRange !== api.timeRange$?.value) { + api.setTimeRange?.(newTimeRange); } onClose(); @@ -226,10 +225,7 @@ export const CustomizePanelEditor = ({ }; const renderCustomTimeRangeComponent = () => { - if ( - !apiPublishesLocalUnifiedSearch(api) || - !(api.isCompatibleWithLocalUnifiedSearch?.() ?? true) - ) + if (!apiPublishesUnifiedSearch(api) || !(api.isCompatibleWithUnifiedSearch?.() ?? true)) return null; return ( @@ -258,9 +254,9 @@ export const CustomizePanelEditor = ({ } > setLocalTimeRange({ from: start, to: end })} + start={timeRange?.from ?? undefined} + end={timeRange?.to ?? undefined} + onTimeChange={({ start, end }) => setTimeRange({ from: start, to: end })} showUpdateButton={false} dateFormat={dateFormat} commonlyUsedRanges={commonlyUsedRangesForDatePicker} @@ -273,7 +269,7 @@ export const CustomizePanelEditor = ({ }; const renderFilterDetails = () => { - if (!apiPublishesLocalUnifiedSearch(api)) return null; + if (!apiPublishesUnifiedSearch(api)) return null; return ( <> diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/filters_details.tsx b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/filters_details.tsx index 8f29e4fd4aa5d..540545d689d36 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/filters_details.tsx +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/filters_details.tsx @@ -39,13 +39,13 @@ export function FiltersDetails({ editMode, api }: FiltersDetailsProps) { const [queryLanguage, setQueryLanguage] = useState<'sql' | 'esql' | undefined>(); const dataViews = api.dataViews?.value ?? []; - const filters = useMemo(() => api.localFilters?.value ?? [], [api]); + const filters = useMemo(() => api.filters$?.value ?? [], [api]); const [incompatibleQueryLanguage, setIncompatibleQueryLanguage] = useState(false); const showEditButton = hasEditCapabilities(api) && editMode && !incompatibleQueryLanguage; useMount(() => { - const localQuery = api.localQuery?.value; + const localQuery = api.query$?.value; if (localQuery) { if (isOfQueryType(localQuery)) { if (typeof localQuery.query === 'string') { diff --git a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx index 561fefe8d1ec6..afc7714ea022c 100644 --- a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx +++ b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx @@ -36,6 +36,8 @@ export const PresentationPanel = < ]); const Panel = panelModule.PresentationPanelInternal; return { Panel, unwrappedComponent }; + // Ancestry chain is expected to use 'key' attribute to reset DOM and state + // when unwrappedComponent needs to be re-loaded }, []); if (error || (!loading && (!value?.Panel || !value?.unwrappedComponent))) { diff --git a/src/plugins/presentation_panel/public/panel_component/presentation_panel_internal.test.tsx b/src/plugins/presentation_panel/public/panel_component/presentation_panel_internal.test.tsx index f937dfe643dce..8386535a7ebeb 100644 --- a/src/plugins/presentation_panel/public/panel_component/presentation_panel_internal.test.tsx +++ b/src/plugins/presentation_panel/public/panel_component/presentation_panel_internal.test.tsx @@ -49,6 +49,7 @@ describe('Presentation panel', () => { it('renders a blocking error when one is present', async () => { const api: DefaultPresentationPanelApi = { + uuid: 'test', blockingError: new BehaviorSubject(new Error('UH OH')), }; render(); @@ -64,7 +65,7 @@ describe('Presentation panel', () => { function getComponent(api?: DefaultPresentationPanelApi): Promise { return Promise.resolve( React.forwardRef((_, apiRef) => { - useImperativeHandle(apiRef, () => api ?? {}); + useImperativeHandle(apiRef, () => api ?? { uuid: 'test' }); return ; }) ); @@ -88,6 +89,7 @@ describe('Presentation panel', () => { it('gets compatible actions for the given API', async () => { const api: DefaultPresentationPanelApi = { + uuid: 'test', panelTitle: new BehaviorSubject('superTest'), }; await renderPresentationPanel({ api }); @@ -112,6 +114,7 @@ describe('Presentation panel', () => { it('does not show actions which are disabled by the API', async () => { const api: DefaultPresentationPanelApi = { + uuid: 'test', disabledActionIds: new BehaviorSubject(['actionA']), }; const getActions = jest.fn().mockReturnValue([mockAction('actionA'), mockAction('actionB')]); @@ -156,6 +159,7 @@ describe('Presentation panel', () => { describe('titles', () => { it('renders the panel title from the api', async () => { const api: DefaultPresentationPanelApi = { + uuid: 'test', panelTitle: new BehaviorSubject('SUPER TITLE'), }; await renderPresentationPanel({ api }); @@ -166,6 +170,7 @@ describe('Presentation panel', () => { it('renders an info icon when the api provides a panel description', async () => { const api: DefaultPresentationPanelApi = { + uuid: 'test', panelTitle: new BehaviorSubject('SUPER TITLE'), panelDescription: new BehaviorSubject('SUPER DESCRIPTION'), }; @@ -177,6 +182,7 @@ describe('Presentation panel', () => { it('does not render a title when in view mode when the provided title is blank', async () => { const api: DefaultPresentationPanelApi & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject(''), viewMode: new BehaviorSubject('view'), }; @@ -188,6 +194,7 @@ describe('Presentation panel', () => { it('renders a placeholder title when in edit mode and the provided title is blank', async () => { const api: DefaultPresentationPanelApi & PublishesDataViews & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject(''), viewMode: new BehaviorSubject('edit'), dataViews: new BehaviorSubject([]), @@ -202,6 +209,7 @@ describe('Presentation panel', () => { const spy = jest.spyOn(openCustomizePanel, 'openCustomizePanelFlyout'); const api: DefaultPresentationPanelApi & PublishesDataViews & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject('TITLE'), viewMode: new BehaviorSubject('edit'), dataViews: new BehaviorSubject([]), @@ -218,6 +226,7 @@ describe('Presentation panel', () => { it('does not show title customize link in view mode', async () => { const api: DefaultPresentationPanelApi & PublishesDataViews & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject('SUPER TITLE'), viewMode: new BehaviorSubject('view'), dataViews: new BehaviorSubject([]), @@ -231,6 +240,7 @@ describe('Presentation panel', () => { it('hides title when API hide title option is true', async () => { const api: DefaultPresentationPanelApi & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject('SUPER TITLE'), hidePanelTitle: new BehaviorSubject(true), viewMode: new BehaviorSubject('view'), @@ -241,6 +251,7 @@ describe('Presentation panel', () => { it('hides title when parent hide title option is true', async () => { const api: DefaultPresentationPanelApi & PublishesViewMode = { + uuid: 'test', panelTitle: new BehaviorSubject('SUPER TITLE'), viewMode: new BehaviorSubject('view'), parentApi: { diff --git a/src/plugins/presentation_panel/public/panel_component/types.ts b/src/plugins/presentation_panel/public/panel_component/types.ts index 654626e5959d6..61f6eaca887f5 100644 --- a/src/plugins/presentation_panel/public/panel_component/types.ts +++ b/src/plugins/presentation_panel/public/panel_component/types.ts @@ -60,22 +60,23 @@ export interface PresentationPanelInternalProps< * The API that any component passed to the `Component` prop of `PresentationPanel` should implement. * Everything in this API is Partial because it is valid for a component to implement none of these methods. */ -export type DefaultPresentationPanelApi = Partial< - HasUniqueId & - PublishesPanelTitle & - PublishesDataLoading & - PublishesBlockingError & - PublishesPanelDescription & - PublishesDisabledActionIds & - HasParentApi< - PresentationContainer & - Partial & PublishesViewMode> - > ->; +export interface DefaultPresentationPanelApi + extends HasUniqueId, + Partial< + PublishesPanelTitle & + PublishesDataLoading & + PublishesBlockingError & + PublishesPanelDescription & + PublishesDisabledActionIds & + HasParentApi< + PresentationContainer & + Partial & PublishesViewMode> + > + > {} export type PresentationPanelProps< ApiType extends DefaultPresentationPanelApi = DefaultPresentationPanelApi, PropsType extends {} = {} > = Omit, 'Component'> & { - Component: MaybePromise>; + Component: MaybePromise | null>; }; diff --git a/src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx b/src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx index be0e6ef1054f9..7cb462a5f1de7 100644 --- a/src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx +++ b/src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx @@ -5,15 +5,15 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import React, { FC, ReactElement, useEffect, useState } from 'react'; import classNames from 'classnames'; +import React, { FC, ReactElement, useEffect, useState } from 'react'; import { - type ViewMode, - type IEmbeddable, - type EmbeddableInput, panelHoverTrigger, PANEL_HOVER_TRIGGER, + type EmbeddableInput, + type IEmbeddable, + type ViewMode, } from '@kbn/embeddable-plugin/public'; import { Action } from '@kbn/ui-actions-plugin/public'; @@ -41,13 +41,13 @@ export const FloatingActions: FC = ({ const { uiActions: { getTriggerCompatibleActions }, } = pluginServices.getServices(); - const [floatingActions, setFloatingActions] = useState(undefined); useEffect(() => { if (!embeddable) return; const getActions = async () => { + let mounted = true; const context = { embeddable, trigger: panelHoverTrigger, @@ -57,6 +57,8 @@ export const FloatingActions: FC = ({ return action.MenuItem !== undefined && (disabledActions ?? []).indexOf(action.id) === -1; }) .sort((a, b) => (a.order || 0) - (b.order || 0)); + + if (!mounted) return; if (actions.length > 0) { setFloatingActions( <> @@ -71,6 +73,9 @@ export const FloatingActions: FC = ({ } else { setFloatingActions(undefined); } + return () => { + mounted = false; + }; }; getActions(); @@ -80,7 +85,10 @@ export const FloatingActions: FC = ({
{children} {isEnabled && floatingActions && ( -
+
{floatingActions}
)} diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap index 39bd053c069b3..06893662c8454 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap @@ -26,20 +26,33 @@ exports[`Table prevents saved objects from being deleted 1`] = ` onChange={[Function]} toolsRight={ Array [ - + } + delay="regular" + display="inlineBlock" + position="top" > - - , + + + + , + } + delay="regular" + display="inlineBlock" + position="top" > - - , + + + + , { onChange={this.onChange} defaultQuery={this.props.initialQuery} toolsRight={[ - !managed && !hiddenType - ).length === 0 || !capabilities.savedObjectsManagement.delete - } - title={ - capabilities.savedObjectsManagement.delete - ? undefined - : i18n.translate('savedObjectsManagement.objectsTable.table.deleteButtonTitle', { - defaultMessage: 'Unable to delete saved objects', - }) + } - data-test-subj="savedObjectsManagementDelete" > - - , + !managed && !hiddenType + ).length === 0 || !capabilities.savedObjectsManagement.delete + } + title={ + capabilities.savedObjectsManagement.delete + ? undefined + : i18n.translate( + 'savedObjectsManagement.objectsTable.table.deleteButtonTitle', + { + defaultMessage: 'Unable to delete saved objects', + } + ) + } + data-test-subj="savedObjectsManagementDelete" + > + + + , { expect(telemetryService.canSendTelemetry()).toBe(true); }); }); + + describe('updateLastReported', () => { + let telemetryService: ReturnType; + + beforeEach(() => { + telemetryService = mockTelemetryService(); + }); + + it('calls expected URL with expected headers', async () => { + await telemetryService.updateLastReported(); + expect(telemetryService['http'].put).toBeCalledWith(LastReportedRoute, INTERNAL_VERSION); + }); + }); }); diff --git a/src/plugins/telemetry/public/services/telemetry_service.ts b/src/plugins/telemetry/public/services/telemetry_service.ts index ec67a4e675e26..a617a181a14d6 100644 --- a/src/plugins/telemetry/public/services/telemetry_service.ts +++ b/src/plugins/telemetry/public/services/telemetry_service.ts @@ -171,7 +171,7 @@ export class TelemetryService { }; public updateLastReported = async (): Promise => { - return this.http.put(LastReportedRoute); + return this.http.put(LastReportedRoute, INTERNAL_VERSION); }; /** Fetches an unencrypted telemetry payload, so we can show it to the user **/ diff --git a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap index d23c14423efbb..017ab7b6425d8 100644 --- a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap +++ b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap @@ -2,4 +2,4 @@ exports[`VisLegend Component Legend closed should match the snapshot 1`] = `"
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/src/plugins/visualizations/public/actions/edit_in_lens_action.tsx b/src/plugins/visualizations/public/actions/edit_in_lens_action.tsx index 10f2c26de4178..7b63af3ccd851 100644 --- a/src/plugins/visualizations/public/actions/edit_in_lens_action.tsx +++ b/src/plugins/visualizations/public/actions/edit_in_lens_action.tsx @@ -18,7 +18,7 @@ import { EmbeddableApiContext, getInheritedViewMode, HasUniqueId, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, PublishesPanelDescription, PublishesPanelTitle, } from '@kbn/presentation-publishing'; @@ -64,7 +64,7 @@ type EditInLensActionApi = HasUniqueId & HasVisualizeConfig & CanAccessViewMode & Partial< - PublishesLocalUnifiedSearch & + PublishesUnifiedSearch & HasExpressionVariables & PublishesPanelTitle & PublishesPanelDescription @@ -105,7 +105,7 @@ export class EditInLensAction implements Action { const searchFilters = parentSearchSource?.getField('filter') ?? visFilters; const searchQuery = parentSearchSource?.getField('query') ?? visQuery; const title = vis.title || embeddable.panelTitle?.getValue(); - const panelTimeRange = embeddable.localTimeRange?.getValue(); + const panelTimeRange = embeddable.timeRange$?.getValue(); const updatedWithMeta = { ...navigateToLensConfig, title, diff --git a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx index 267b9baf6adf4..1bd4a14c2e7da 100644 --- a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx +++ b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx @@ -269,7 +269,7 @@ const useTableListViewProps = ( reason: managed ? i18n.translate('visualizations.managedLegacyVisMessage', { defaultMessage: - 'This visualization is managed by Elastic and cannot be changed.', + 'Elastic manages this visualisation. Changing it is not possible.', }) : i18n.translate('visualizations.readOnlyLegacyVisMessage', { defaultMessage: diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx index 955c3f6111762..6cbe7864031aa 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx +++ b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx @@ -609,7 +609,7 @@ export const getTopNavConfig = ( savedVis.managed ? i18n.translate('visualizations.topNavMenu.mustCopyOnSave', { defaultMessage: - 'This visualization is managed by Elastic. Changes here must be saved to a new visualization.', + 'Elastic manages this visualization. Save any changes to a new visualization.', }) : undefined } diff --git a/src/setup_node_env/harden/child_process.js b/src/setup_node_env/harden/child_process.js index 81aff65ce6c4e..c4524da367fcd 100644 --- a/src/setup_node_env/harden/child_process.js +++ b/src/setup_node_env/harden/child_process.js @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -var ritm = require('require-in-the-middle'); - // Ensure, when spawning a new child process, that the `options` and the // `options.env` object passed to the child process function doesn't inherit // from `Object.prototype`. This protects against similar RCE vulnerabilities // as described in CVE-2019-7609 -new ritm.Hook(['child_process'], function (cp) { +function patchChildProcess(cp) { // The `exec` function is currently just a wrapper around `execFile`. So for // now there's no need to patch it. If this changes in the future, our tests // will fail and we can uncomment the line below. @@ -27,7 +25,7 @@ new ritm.Hook(['child_process'], function (cp) { cp.spawnSync = new Proxy(cp.spawnSync, { apply: patchOptions(true) }); return cp; -}); +} function patchOptions(hasArgs) { return function apply(target, thisArg, args) { @@ -65,3 +63,5 @@ function prototypelessSpawnOpts(obj) { prototypelessObj.env = Object.assign(Object.create(null), prototypelessObj.env || process.env); return prototypelessObj; } + +module.exports = patchChildProcess; diff --git a/src/setup_node_env/harden/index.js b/src/setup_node_env/harden/index.js index 5bb9b89aa9ee3..7c3c1528ec2d9 100644 --- a/src/setup_node_env/harden/index.js +++ b/src/setup_node_env/harden/index.js @@ -6,5 +6,36 @@ * Side Public License, v 1. */ -require('./child_process'); -require('./lodash_template'); +var ritm = require('require-in-the-middle'); +var lodashPatch = require('./lodash_template'); +var patchChildProcess = require('./child_process'); + +// the performance cost of using require-in-the-middle is atm directly related to the number of +// registered hooks (as require is patched once for EACH hook) +// This is why we are defining a single hook delegating for each of the patches we need to apply +new ritm.Hook( + ['child_process', 'lodash', 'lodash/template', 'lodash/fp', 'lodash/fp/template'], + function (module, name) { + switch (name) { + case 'child_process': { + return patchChildProcess(module); + } + case 'lodash': { + module.template = lodashPatch.createProxy(module.template); + return module; + } + case 'lodash/template': { + return lodashPatch.createProxy(module); + } + case 'lodash/fp': { + module.template = lodashPatch.createFpProxy(module.template); + return module; + } + case 'lodash/fp/template': { + lodashPatch.createFpProxy(module); + return module; + } + } + return module; + } +); diff --git a/src/setup_node_env/harden/lodash_template.js b/src/setup_node_env/harden/lodash_template.js index 75bca22f018a0..89756a22b0a13 100644 --- a/src/setup_node_env/harden/lodash_template.js +++ b/src/setup_node_env/harden/lodash_template.js @@ -6,29 +6,8 @@ * Side Public License, v 1. */ -var ritm = require('require-in-the-middle'); var isIterateeCall = require('lodash/_isIterateeCall'); -new ritm.Hook(['lodash'], function (lodash) { - // we use lodash.template here to harden third-party usage of this otherwise banned function. - // eslint-disable-next-line no-restricted-properties - lodash.template = createProxy(lodash.template); - return lodash; -}); - -new ritm.Hook(['lodash/template'], function (template) { - return createProxy(template); -}); - -new ritm.Hook(['lodash/fp'], function (fp) { - fp.template = createFpProxy(fp.template); - return fp; -}); - -new ritm.Hook(['lodash/fp/template'], function (template) { - return createFpProxy(template); -}); - function createProxy(template) { return new Proxy(template, { apply: function (target, thisArg, args) { @@ -61,3 +40,5 @@ function createFpProxy(template) { }, }); } + +module.exports = { createProxy, createFpProxy }; diff --git a/test/api_integration/apis/saved_objects/bulk_get.ts b/test/api_integration/apis/saved_objects/bulk_get.ts index 62f95c718ab16..d9a6dfc2f7434 100644 --- a/test/api_integration/apis/saved_objects/bulk_get.ts +++ b/test/api_integration/apis/saved_objects/bulk_get.ts @@ -230,10 +230,10 @@ export default function ({ getService }: FtrProviderContext) { type: 'dashboard', namespaces: ['default'], migrationVersion: { - dashboard: '8.9.0', + dashboard: '10.2.0', }, coreMigrationVersion: '8.8.0', - typeMigrationVersion: '8.9.0', + typeMigrationVersion: '10.2.0', updated_at: '2015-01-01T00:00:00.000Z', created_at: '2015-01-01T00:00:00.000Z', version: resp.body.saved_objects[3].version, diff --git a/test/api_integration/apis/saved_objects/get.ts b/test/api_integration/apis/saved_objects/get.ts index 7a1b272b515fc..a399e095da0a7 100644 --- a/test/api_integration/apis/saved_objects/get.ts +++ b/test/api_integration/apis/saved_objects/get.ts @@ -80,10 +80,10 @@ export default function ({ getService }: FtrProviderContext) { type: 'dashboard', namespaces: ['default'], migrationVersion: { - dashboard: '8.9.0', + dashboard: '10.2.0', }, coreMigrationVersion: '8.8.0', - typeMigrationVersion: '8.9.0', + typeMigrationVersion: '10.2.0', updated_at: resp.body.updated_at, created_at: resp.body.created_at, version: resp.body.version, diff --git a/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts b/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts index 0645fe3cd68ef..1c314b9a66b7a 100644 --- a/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts +++ b/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts @@ -14,7 +14,8 @@ export default function ({ getService }: PluginFunctionalProviderContext) { const testSubjects = getService('testSubjects'); const find = getService('find'); - describe('', () => { + // FLAKY: https://github.com/elastic/kibana/issues/170047 + describe.skip('', () => { it('finds a data view', async () => { await testSubjects.existOrFail('dataViewTitle'); }); diff --git a/test/functional/apps/dashboard/group5/embed_mode.ts b/test/functional/apps/dashboard/group5/embed_mode.ts index 25eabca77f718..d8ff2f42a3a38 100644 --- a/test/functional/apps/dashboard/group5/embed_mode.ts +++ b/test/functional/apps/dashboard/group5/embed_mode.ts @@ -24,7 +24,8 @@ export default function ({ const screenshot = getService('screenshots'); const log = getService('log'); - describe('embed mode', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('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/dashboard_elements/controls/common/control_group_apply_button.ts b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts new file mode 100644 index 0000000000000..ba11c502b0738 --- /dev/null +++ b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts @@ -0,0 +1,228 @@ +/* + * 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 { OPTIONS_LIST_CONTROL, RANGE_SLIDER_CONTROL } from '@kbn/controls-plugin/common'; +import expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const pieChart = getService('pieChart'); + const elasticChart = getService('elasticChart'); + const testSubjects = getService('testSubjects'); + const dashboardAddPanel = getService('dashboardAddPanel'); + + const { dashboard, header, dashboardControls, timePicker } = getPageObjects([ + 'dashboardControls', + 'timePicker', + 'dashboard', + 'header', + ]); + + // FLAKY: https://github.com/elastic/kibana/issues/178581 + describe.skip('Dashboard control group apply button', () => { + let controlIds: string[]; + + before(async () => { + await dashboard.navigateToApp(); + await dashboard.gotoDashboardLandingPage(); + await dashboard.clickNewDashboard(); + await timePicker.setDefaultDataRange(); + + await elasticChart.setNewChartUiDebugFlag(); + await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie'); + + // populate an initial set of controls and get their ids. + await dashboardControls.createControl({ + controlType: OPTIONS_LIST_CONTROL, + dataViewTitle: 'animals-*', + fieldName: 'animal.keyword', + title: 'Animal', + }); + await dashboardControls.createControl({ + controlType: RANGE_SLIDER_CONTROL, + dataViewTitle: 'animals-*', + fieldName: 'weightLbs', + title: 'Animal Name', + }); + await dashboardControls.createTimeSliderControl(); + + // wait for all controls to finish loading before saving + controlIds = await dashboardControls.getAllControlIds(); + await dashboardControls.optionsListWaitForLoading(controlIds[0]); + await dashboardControls.rangeSliderWaitForLoading(controlIds[1]); + + // save the dashboard + await dashboard.saveDashboard('Test Control Group Apply Button', { exitFromEditMode: false }); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + await dashboard.expectMissingUnsavedChangesBadge(); + }); + + it('able to set apply button setting', async () => { + await dashboardControls.updateShowApplyButtonSetting(true); + await testSubjects.existOrFail('controlGroup--applyFiltersButton'); + await dashboard.expectUnsavedChangesBadge(); + + await dashboard.clickQuickSave(); + await header.waitUntilLoadingHasFinished(); + await dashboard.expectMissingUnsavedChangesBadge(); + }); + + it('renabling auto-apply forces filters to be published', async () => { + const optionsListId = controlIds[0]; + await dashboardControls.verifyApplyButtonEnabled(false); + await dashboardControls.optionsListOpenPopover(optionsListId); + await dashboardControls.optionsListPopoverSelectOption('cat'); + await dashboardControls.optionsListEnsurePopoverIsClosed(optionsListId); + await header.waitUntilLoadingHasFinished(); + await dashboardControls.verifyApplyButtonEnabled(); + + await dashboardControls.updateShowApplyButtonSetting(false); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + await dashboard.expectUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(4); + await dashboard.clickDiscardChanges(); + }); + + describe('options list selections', () => { + let optionsListId: string; + + before(async () => { + optionsListId = controlIds[0]; + }); + + it('making selection enables apply button', async () => { + await dashboardControls.verifyApplyButtonEnabled(false); + await dashboardControls.optionsListOpenPopover(optionsListId); + await dashboardControls.optionsListPopoverSelectOption('cat'); + await dashboardControls.optionsListEnsurePopoverIsClosed(optionsListId); + await header.waitUntilLoadingHasFinished(); + await dashboardControls.verifyApplyButtonEnabled(); + }); + + it('waits to apply filters until button is pressed', async () => { + await dashboard.expectMissingUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(5); + + await dashboardControls.clickApplyButton(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + await dashboard.expectUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(4); + }); + + it('hitting dashboard resets selections + unapplies filters', async () => { + await dashboardControls.optionsListOpenPopover(optionsListId); + await dashboardControls.optionsListPopoverSelectOption('dog'); + await dashboardControls.optionsListEnsurePopoverIsClosed(optionsListId); + await header.waitUntilLoadingHasFinished(); + await dashboardControls.verifyApplyButtonEnabled(); + + await dashboard.clickDiscardChanges(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + expect(await pieChart.getPieSliceCount()).to.be(5); + await dashboardControls.verifyApplyButtonEnabled(false); + expect(await dashboardControls.optionsListGetSelectionsString(optionsListId)).to.be('Any'); + }); + }); + + describe('range slider selections', () => { + let rangeSliderId: string; + + before(async () => { + rangeSliderId = controlIds[1]; + }); + + it('making selection enables apply button', async () => { + await dashboardControls.verifyApplyButtonEnabled(false); + await dashboardControls.rangeSliderSetUpperBound(rangeSliderId, '30'); + await dashboardControls.verifyApplyButtonEnabled(); + }); + + it('waits to apply filters until apply button is pressed', async () => { + await dashboard.expectMissingUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(5); + + await dashboardControls.clickApplyButton(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + await dashboard.expectUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(4); + }); + + it('hitting dashboard resets selections + unapplies filters', async () => { + await dashboardControls.rangeSliderSetLowerBound(rangeSliderId, '15'); + await dashboardControls.rangeSliderEnsurePopoverIsClosed(rangeSliderId); + await header.waitUntilLoadingHasFinished(); + await dashboardControls.verifyApplyButtonEnabled(); + + await dashboard.clickDiscardChanges(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + expect(await pieChart.getPieSliceCount()).to.be(5); + await dashboardControls.verifyApplyButtonEnabled(false); + expect( + await dashboardControls.rangeSliderGetLowerBoundAttribute(rangeSliderId, 'value') + ).to.be(''); + expect( + await dashboardControls.rangeSliderGetUpperBoundAttribute(rangeSliderId, 'value') + ).to.be(''); + }); + }); + + describe('time slider selections', () => { + let valueBefore: string; + + before(async () => { + valueBefore = await dashboardControls.getTimeSliceFromTimeSlider(); + }); + + it('making selection enables apply button', async () => { + await dashboardControls.verifyApplyButtonEnabled(false); + await dashboardControls.gotoNextTimeSlice(); + await dashboardControls.gotoNextTimeSlice(); // go to an empty timeslice + await header.waitUntilLoadingHasFinished(); + await dashboardControls.verifyApplyButtonEnabled(); + }); + + it('waits to apply timeslice until apply button is pressed', async () => { + await dashboard.expectMissingUnsavedChangesBadge(); + expect(await pieChart.getPieSliceCount()).to.be(5); + + await dashboardControls.clickApplyButton(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + await dashboard.expectUnsavedChangesBadge(); + pieChart.expectEmptyPieChart(); + }); + + it('hitting dashboard resets selections + unapplies timeslice', async () => { + await dashboardControls.gotoNextTimeSlice(); + await dashboardControls.verifyApplyButtonEnabled(); + + await dashboard.clickDiscardChanges(); + await header.waitUntilLoadingHasFinished(); + await dashboard.waitForRenderComplete(); + + expect(await pieChart.getPieSliceCount()).to.be(5); + await dashboardControls.verifyApplyButtonEnabled(false); + const valueNow = await dashboardControls.getTimeSliceFromTimeSlider(); + expect(valueNow).to.equal(valueBefore); + }); + }); + }); +} diff --git a/test/functional/apps/dashboard_elements/controls/common/index.ts b/test/functional/apps/dashboard_elements/controls/common/index.ts index 74e64052f1663..c9098b1a2c688 100644 --- a/test/functional/apps/dashboard_elements/controls/common/index.ts +++ b/test/functional/apps/dashboard_elements/controls/common/index.ts @@ -44,6 +44,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid loadTestFile(require.resolve('./range_slider')); loadTestFile(require.resolve('./time_slider')); loadTestFile(require.resolve('./control_group_chaining')); + loadTestFile(require.resolve('./control_group_apply_button')); loadTestFile(require.resolve('./replace_controls')); }); } diff --git a/test/functional/apps/discover/group1/_discover.ts b/test/functional/apps/discover/group1/_discover.ts index c931187250cc3..3885230c861cd 100644 --- a/test/functional/apps/discover/group1/_discover.ts +++ b/test/functional/apps/discover/group1/_discover.ts @@ -31,7 +31,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { defaultIndex: 'logstash-*', }; - describe('discover test', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('discover test', function describeIndexTests() { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); diff --git a/test/functional/apps/discover/group1/_url_state.ts b/test/functional/apps/discover/group1/_url_state.ts index e97ac332e8b6e..95ef40a58698c 100644 --- a/test/functional/apps/discover/group1/_url_state.ts +++ b/test/functional/apps/discover/group1/_url_state.ts @@ -35,7 +35,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { hideAnnouncements: true, }; - describe('discover URL state', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('discover URL state', () => { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); diff --git a/test/functional/apps/navigation/_solution_nav_switcher.ts b/test/functional/apps/navigation/_solution_nav_switcher.ts new file mode 100644 index 0000000000000..1f66d5d18fc3e --- /dev/null +++ b/test/functional/apps/navigation/_solution_nav_switcher.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 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard']); + const testSubjects = getService('testSubjects'); + const navigation = getService('globalNav'); + + describe('solution navigation switcher', function describeIndexTests() { + it('should be able to switch between solutions', async () => { + await PageObjects.common.navigateToApp('home'); + + // Default to "search" solution + await testSubjects.existOrFail('svlSearchSideNav'); + await testSubjects.missingOrFail('svlObservabilitySideNav'); + + // Change to "observability" solution + await navigation.changeSolutionNavigation('oblt'); + await testSubjects.existOrFail('svlObservabilitySideNav'); + await testSubjects.missingOrFail('svlSearchSideNav'); + }); + + it('should contain links to manage deployment and view all deployments', async () => { + await PageObjects.common.navigateToApp('home'); + + await navigation.openSolutionNavSwitcher(); + + await testSubjects.existOrFail('manageDeploymentBtn', { timeout: 2000 }); + await testSubjects.existOrFail('viewDeploymentsBtn', { timeout: 2000 }); + }); + }); +} diff --git a/test/functional/apps/navigation/config.ts b/test/functional/apps/navigation/config.ts new file mode 100644 index 0000000000000..19df1f83ec844 --- /dev/null +++ b/test/functional/apps/navigation/config.ts @@ -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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + kbnTestServer: { + ...functionalConfig.get('kbnTestServer'), + serverArgs: [ + ...functionalConfig.get('kbnTestServer.serverArgs'), + '--navigation.solutionNavigation.featureOn=true', + '--navigation.solutionNavigation.enabled=true', + '--navigation.solutionNavigation.optInStatus=visible', + '--navigation.solutionNavigation.defaultSolution=es', + // Note: the base64 string in the cloud.id config contains the ES endpoint required in the functional tests + '--xpack.cloud.id=ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM=', + '--xpack.cloud.base_url=https://cloud.elastic.co', + '--xpack.cloud.deployment_url=/deployments/deploymentId', + '--xpack.cloud.organization_url=/organization/organizationId', + '--xpack.cloud.billing_url=/billing', + '--xpack.cloud.profile_url=/user/userId', + ], + }, + }; +} diff --git a/test/functional/apps/navigation/index.ts b/test/functional/apps/navigation/index.ts new file mode 100644 index 0000000000000..6a05d098e794e --- /dev/null +++ b/test/functional/apps/navigation/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 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('navigation app', function () { + loadTestFile(require.resolve('./_solution_nav_switcher')); + }); +} diff --git a/test/functional/apps/visualize/group3/_annotation_listing.ts b/test/functional/apps/visualize/group3/_annotation_listing.ts index 53ae9d48e2b5c..f58f2fd386028 100644 --- a/test/functional/apps/visualize/group3/_annotation_listing.ts +++ b/test/functional/apps/visualize/group3/_annotation_listing.ts @@ -50,8 +50,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('by text', () => { it('matches on the first word', async function () { - await listingTable.searchForItemWithName('search'); - await listingTable.expectItemsCount('eventAnnotation', 1); + await retry.try(async () => { + await listingTable.searchForItemWithName('search'); + await listingTable.expectItemsCount('eventAnnotation', 1); + }); }); it('matches the second word', async function () { diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index f5acc43f88273..01fe52270cc82 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -348,12 +348,14 @@ export class DashboardPageObject extends FtrService { } public async expectUnsavedChangesBadge() { + this.log.debug('Expect unsaved changes badge to be present'); await this.retry.try(async () => { await this.testSubjects.existOrFail('dashboardUnsavedChangesBadge'); }); } public async expectMissingUnsavedChangesBadge() { + this.log.debug('Expect there to be no unsaved changes badge'); await this.retry.try(async () => { await this.testSubjects.missingOrFail('dashboardUnsavedChangesBadge'); }); diff --git a/test/functional/page_objects/dashboard_page_controls.ts b/test/functional/page_objects/dashboard_page_controls.ts index 8f7a64260c37a..119b347c2ca69 100644 --- a/test/functional/page_objects/dashboard_page_controls.ts +++ b/test/functional/page_objects/dashboard_page_controls.ts @@ -203,6 +203,34 @@ export class DashboardPageControls extends FtrService { await this.testSubjects.click('control-group-editor-save'); } + public async updateShowApplyButtonSetting(showApplyButton: boolean) { + this.log.debug(`Update show apply button setting to ${showApplyButton}`); + await this.openControlGroupSettingsFlyout(); + // the "showApplyButton" toggle has in inverse relationship with the `showApplyButton` seting - so, negate `showApplyButton` + await this.setSwitchState(!showApplyButton, 'control-group-auto-apply-selections'); + await this.testSubjects.click('control-group-editor-save'); + } + + public async clickApplyButton() { + this.log.debug('Clicking the apply button'); + await this.verifyApplyButtonEnabled(); + + const applyButton = await this.testSubjects.find('controlGroup--applyFiltersButton'); + await applyButton.click(); + + await this.verifyApplyButtonEnabled(false); + } + + public async verifyApplyButtonEnabled(enabled: boolean = true) { + this.log.debug( + `Checking that control group apply button is ${enabled ? 'enabled' : 'not enabled'}` + ); + const applyButton = await this.testSubjects.find('controlGroup--applyFiltersButton'); + await this.retry.try(async () => { + expect(await applyButton.isEnabled()).to.be(enabled); + }); + } + /* ----------------------------------------------------------- Individual controls functions ----------------------------------------------------------- */ @@ -670,6 +698,10 @@ export class DashboardPageControls extends FtrService { `range-slider-control-${controlId} > rangeSlider__lowerBoundFieldNumber`, value ); + await this.testSubjects.pressEnter( + // force the change without waiting for the debounce + `range-slider-control-${controlId} > rangeSlider__lowerBoundFieldNumber` + ); expect(await this.rangeSliderGetLowerBoundAttribute(controlId, 'value')).to.be(value); }); } @@ -681,6 +713,10 @@ export class DashboardPageControls extends FtrService { `range-slider-control-${controlId} > rangeSlider__upperBoundFieldNumber`, value ); + await this.testSubjects.pressEnter( + // force the change without waiting for the debounce + `range-slider-control-${controlId} > rangeSlider__upperBoundFieldNumber` + ); expect(await this.rangeSliderGetUpperBoundAttribute(controlId, 'value')).to.be(value); }); } diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 1901f12073438..4225f52b16994 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -48,9 +48,12 @@ export class HomePageObject extends FtrService { async isSampleDataSetInstalled(id: string) { const sampleDataCard = await this.testSubjects.find(`sampleDataSetCard${id}`); + const installStatus = await ( + await sampleDataCard.findByCssSelector('[data-status]') + ).getAttribute('data-status'); const deleteButton = await sampleDataCard.findAllByTestSubject(`removeSampleDataSet${id}`); this.log.debug(`Sample data installed: ${deleteButton.length > 0}`); - return deleteButton.length > 0; + return installStatus === 'installed' && deleteButton.length > 0; } async isWelcomeInterstitialDisplayed() { diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 9bf108d106712..fc1064f1b0464 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -857,6 +857,9 @@ export class SettingsPageObject extends FtrService { async clickAddField() { this.log.debug('click Add Field'); await this.testSubjects.click('addField'); + await this.retry.try(async () => { + await this.testSubjects.existOrFail('flyoutTitle'); + }); } async clickSaveField() { @@ -872,8 +875,7 @@ export class SettingsPageObject extends FtrService { async setFieldType(type: string) { this.log.debug('set type = ' + type); - await this.testSubjects.setValue('typeField', type); - await this.browser.pressKeys(this.browser.keys.ENTER); + await this.comboBox.set('typeField', type); } async setFieldTypeComposite() { diff --git a/test/functional/services/global_nav.ts b/test/functional/services/global_nav.ts index 4ce8ed6cb79dd..4bbea9c9fd7a7 100644 --- a/test/functional/services/global_nav.ts +++ b/test/functional/services/global_nav.ts @@ -52,4 +52,18 @@ export class GlobalNavService extends FtrService { public async badgeMissingOrFail(): Promise { await this.testSubjects.missingOrFail('headerBadge'); } + + public async openSolutionNavSwitcher(): Promise { + if (await this.testSubjects.exists(`~solutionNavSwitcherPanel`, { timeout: 0 })) return; + + await this.testSubjects.click('~solutionNavSwitcher'); + await this.testSubjects.existOrFail('~solutionNavSwitcherPanel'); + } + + public async changeSolutionNavigation(id: 'es' | 'oblt' | 'search'): Promise { + if (!(await this.testSubjects.exists(`~solutionNavSwitcherPanel`, { timeout: 0 }))) { + await this.openSolutionNavSwitcher(); + } + await this.testSubjects.click(`~solutionNavSwitcherPanel > ${`~solutionNavSwitcher-${id}`}`); + } } diff --git a/test/functional/services/index.ts b/test/functional/services/index.ts index 1966755f157ed..43a588cdf9385 100644 --- a/test/functional/services/index.ts +++ b/test/functional/services/index.ts @@ -17,6 +17,7 @@ import { SnapshotsService, } from './common'; import { ComboBoxService } from './combo_box'; +import { SelectableService } from './selectable'; import { DashboardAddPanelService, DashboardReplacePanelService, @@ -76,6 +77,7 @@ export const services = { dashboardSettings: DashboardSettingsProvider, flyout: FlyoutService, comboBox: ComboBoxService, + selectable: SelectableService, dataGrid: DataGridService, embedding: EmbeddingService, renderable: RenderableService, diff --git a/test/functional/services/selectable.ts b/test/functional/services/selectable.ts new file mode 100644 index 0000000000000..8dd347ace74af --- /dev/null +++ b/test/functional/services/selectable.ts @@ -0,0 +1,91 @@ +/* + * 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 { FtrService } from '../ftr_provider_context'; + +/** + * Wrapper around EuiSelectable to provide abstraction for selecting options + * + * @example + * ```tsx + * const button = ( + * + * {label} + * + * ); + * + * + * + * {listOptions} + * + * + * ``` + * + * // Select only options with text 'option1' and 'option2' + * ```typescript + * await selectableService.selectOnlyOptionsWithText('buttonTestId', 'selectableTestId', ['option1', 'option2']); + * ``` + */ +export class SelectableService extends FtrService { + private readonly log = this.ctx.getService('log'); + private readonly testSubjects = this.ctx.getService('testSubjects'); + private readonly common = this.ctx.getPageObject('common'); + + public async selectOnlyOptionsWithText( + buttonTestSubjectId: string, + selectableBodyTestSubjectId: string, + textsToSelect: string[] + ) { + this.log.debug( + `Selectable.selectOnlyOptionsWithText, buttonTestSubjectId: ${buttonTestSubjectId},` + + `selectableBodyTestSubjectId: ${selectableBodyTestSubjectId}, textsToSelect: ${textsToSelect}` + ); + + // Open the selectable + await this.testSubjects.click(buttonTestSubjectId); + await this.common.sleep(500); + + const selectableBodyContainer = await this.testSubjects.find(selectableBodyTestSubjectId); + const listContainer = await selectableBodyContainer.findByClassName('euiSelectableList'); + const optionListElements = await listContainer.findAllByCssSelector('li[role="option"]'); + + for (let i = 0; i < optionListElements.length; i++) { + const option = optionListElements[i]; + const isSelected = (await option.getAttribute('aria-checked')) === 'true'; + const textWrapper = await option.findByClassName('euiSelectableListItem__text'); + + // Use innerText as getVisibleText doesn't return deeply nested text + const innerText = await textWrapper.getAttribute('innerText'); + + // Replace screen reader and other Eui related text + const visibleText = innerText + .replace(screenReaderOptionText, '') + .replace('\n.', '') + .replace('.\n', '') + .trim(); + const doesOptionTextMatch = textsToSelect.some((text) => text === visibleText); + + if ((doesOptionTextMatch && !isSelected) || (!doesOptionTextMatch && isSelected)) { + await option.click(); + } + } + + // Close selectable + return this.testSubjects.click(buttonTestSubjectId); + } + + public async clearSelection(buttonTestSubjectId: string, selectableBodyTestSubjectId: string) { + return this.selectOnlyOptionsWithText(buttonTestSubjectId, selectableBodyTestSubjectId, []); + } +} + +const screenReaderOptionText = 'To check this option, press Enter.'; diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 28f2590fc3b20..5b06a48809c4c 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -232,6 +232,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'xpack.cloud.base_url (string)', 'xpack.cloud.cname (string)', 'xpack.cloud.deployment_url (string)', + 'xpack.cloud.deployments_url (string)', 'xpack.cloud.is_elastic_staff_owned (boolean)', 'xpack.cloud.trial_end_date (string)', 'xpack.cloud_integrations.chat.chatURL (string)', diff --git a/tsconfig.base.json b/tsconfig.base.json index f0c0a36383b5b..517dd69b103f9 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -548,6 +548,20 @@ "@kbn/core-saved-objects-server-mocks/*": ["packages/core/saved-objects/core-saved-objects-server-mocks/*"], "@kbn/core-saved-objects-utils-server": ["packages/core/saved-objects/core-saved-objects-utils-server"], "@kbn/core-saved-objects-utils-server/*": ["packages/core/saved-objects/core-saved-objects-utils-server/*"], + "@kbn/core-security-browser": ["packages/core/security/core-security-browser"], + "@kbn/core-security-browser/*": ["packages/core/security/core-security-browser/*"], + "@kbn/core-security-browser-internal": ["packages/core/security/core-security-browser-internal"], + "@kbn/core-security-browser-internal/*": ["packages/core/security/core-security-browser-internal/*"], + "@kbn/core-security-browser-mocks": ["packages/core/security/core-security-browser-mocks"], + "@kbn/core-security-browser-mocks/*": ["packages/core/security/core-security-browser-mocks/*"], + "@kbn/core-security-common": ["packages/core/security/core-security-common"], + "@kbn/core-security-common/*": ["packages/core/security/core-security-common/*"], + "@kbn/core-security-server": ["packages/core/security/core-security-server"], + "@kbn/core-security-server/*": ["packages/core/security/core-security-server/*"], + "@kbn/core-security-server-internal": ["packages/core/security/core-security-server-internal"], + "@kbn/core-security-server-internal/*": ["packages/core/security/core-security-server-internal/*"], + "@kbn/core-security-server-mocks": ["packages/core/security/core-security-server-mocks"], + "@kbn/core-security-server-mocks/*": ["packages/core/security/core-security-server-mocks/*"], "@kbn/core-status-common": ["packages/core/status/core-status-common"], "@kbn/core-status-common/*": ["packages/core/status/core-status-common/*"], "@kbn/core-status-common-internal": ["packages/core/status/core-status-common-internal"], @@ -970,6 +984,8 @@ "@kbn/kubernetes-security-plugin/*": ["x-pack/plugins/kubernetes_security/*"], "@kbn/language-documentation-popover": ["packages/kbn-language-documentation-popover"], "@kbn/language-documentation-popover/*": ["packages/kbn-language-documentation-popover/*"], + "@kbn/lens-config-builder-example-plugin": ["x-pack/examples/lens_config_builder_example"], + "@kbn/lens-config-builder-example-plugin/*": ["x-pack/examples/lens_config_builder_example/*"], "@kbn/lens-embeddable-utils": ["packages/kbn-lens-embeddable-utils"], "@kbn/lens-embeddable-utils/*": ["packages/kbn-lens-embeddable-utils/*"], "@kbn/lens-formula-docs": ["packages/kbn-lens-formula-docs"], @@ -1546,6 +1562,10 @@ "@kbn/slo-schema/*": ["x-pack/packages/kbn-slo-schema/*"], "@kbn/snapshot-restore-plugin": ["x-pack/plugins/snapshot_restore"], "@kbn/snapshot-restore-plugin/*": ["x-pack/plugins/snapshot_restore/*"], + "@kbn/solution-nav-es": ["packages/solution-nav/es"], + "@kbn/solution-nav-es/*": ["packages/solution-nav/es/*"], + "@kbn/solution-nav-oblt": ["packages/solution-nav/oblt"], + "@kbn/solution-nav-oblt/*": ["packages/solution-nav/oblt/*"], "@kbn/some-dev-log": ["packages/kbn-some-dev-log"], "@kbn/some-dev-log/*": ["packages/kbn-some-dev-log/*"], "@kbn/sort-package-json": ["packages/kbn-sort-package-json"], diff --git a/x-pack/examples/lens_config_builder_example/.eslintrc.json b/x-pack/examples/lens_config_builder_example/.eslintrc.json new file mode 100644 index 0000000000000..2aab6c2d9093b --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/consistent-type-definitions": 0 + } +} diff --git a/x-pack/examples/lens_config_builder_example/README.md b/x-pack/examples/lens_config_builder_example/README.md new file mode 100644 index 0000000000000..53ae99b6af3a9 --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/README.md @@ -0,0 +1,7 @@ +# Lens Config Builder examples + +To run this example plugin, use the command `yarn start --run-examples`. + +This example shows how to embed Lens into other applications. Using the `EmbeddableComponent` of the `lens` start plugin, +you can pass in a valid Lens configuration which will get rendered the same way Lens dashboard panels work. Updating the +configuration will reload the embedded visualization. diff --git a/x-pack/examples/lens_config_builder_example/kibana.jsonc b/x-pack/examples/lens_config_builder_example/kibana.jsonc new file mode 100644 index 0000000000000..f87da4cdf0a42 --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/kibana.jsonc @@ -0,0 +1,19 @@ +{ + "type": "plugin", + "id": "@kbn/lens-config-builder-example-plugin", + "owner": "@elastic/kibana-visualizations", + "plugin": { + "id": "lensConfigBuilderExample", + "server": false, + "browser": true, + "configPath": [ + "lens_config_builder_example" + ], + "requiredPlugins": [ + "lens", + "data", + "embeddable", + "developerExamples" + ] + } +} diff --git a/x-pack/examples/lens_config_builder_example/public/app.tsx b/x-pack/examples/lens_config_builder_example/public/app.tsx new file mode 100644 index 0000000000000..360831f2a9b4e --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/public/app.tsx @@ -0,0 +1,163 @@ +/* + * 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 useAsync from 'react-use/lib/useAsync'; +import { + EuiPage, + EuiPageBody, + EuiPageSection, + EuiPageHeader, + EuiSpacer, + EuiTextArea, + EuiFlexItem, + EuiButton, + EuiFlexGroup, +} from '@elastic/eui'; + +import type { CoreStart } from '@kbn/core/public'; +import type { LensEmbeddableInput, FormulaPublicApi } from '@kbn/lens-plugin/public'; + +import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; +import { LensConfig, LensConfigBuilder } from '@kbn/lens-embeddable-utils/config_builder'; +import { DataViewsContract } from '@kbn/data-views-plugin/public'; +import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { StartDependencies } from './plugin'; + +export const App = (props: { + core: CoreStart; + plugins: StartDependencies; + dataViews: DataViewsContract; + formula: FormulaPublicApi; +}) => { + const [error, setError] = useState(null); + const [isSaveModalVisible, setIsSaveModalVisible] = useState(false); + const [time, setTime] = useState({ + from: 'now-5d', + to: 'now', + }); + const [searchSession, setSearchSession] = useState(() => + props.plugins.data.search.session.start() + ); + + const [lensConfig, setLensConfig] = useState({ + chartType: 'metric', + title: 'Total Sales', + dataset: { + esql: 'from kibana_sample_data_logs | stats totalBytes = sum(bytes)', + }, + value: 'totalBytes', + label: 'Total Bytes Value', + }); + const [lensConfigString, setLensConfigString] = useState(JSON.stringify(lensConfig)); + + const LensComponent = props.plugins.lens.EmbeddableComponent; + const LensSaveModalComponent = props.plugins.lens.SaveModalComponent; + + const attributes = useAsync(async () => { + const configBuilder = new LensConfigBuilder(props.formula, props.dataViews); + return (await configBuilder.build(lensConfig, { + embeddable: false, + })) as TypedLensByValueInput['attributes']; + }, [lensConfig]); + + if (!attributes.value && !attributes.error && !error) return null; + + return ( + + + + +

+ This app embeds a Lens visualization by specifying the configuration. Data fetching and + rendering is completely managed by Lens itself. +

+ + { + setLensConfigString(e.target.value); + }} + /> + + + { + try { + const newConfig = JSON.parse(lensConfigString); + setLensConfig(newConfig); + setSearchSession(props.plugins.data.search.session.start()); + setError(null); + } catch (e) { + setError(e.message); + } + }} + > + Refresh + + + + + {error &&
{error}
} + {attributes.value && ( + { + setTime({ + from: new Date(range[0]).toISOString(), + to: new Date(range[1]).toISOString(), + }); + }} + onFilter={(_data) => { + // call back event for on filter event + }} + onTableRowClick={(_data) => { + // call back event for on table row click event + }} + viewMode={ViewMode.VIEW} + extraActions={[ + { + id: 'testAction', + type: 'link', + getIconType: () => 'save', + async isCompatible(context: ActionExecutionContext): Promise { + return true; + }, + execute: async (context: ActionExecutionContext) => { + alert('I am an extra action'); + return; + }, + getDisplayName: () => 'Extra action', + }, + ]} + /> + )} + + {attributes.error &&
{JSON.stringify(attributes.error)}
} + + {isSaveModalVisible && ( + {}} + onClose={() => setIsSaveModalVisible(false)} + /> + )} + + + + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/post_knowledge_base.ts b/x-pack/examples/lens_config_builder_example/public/index.ts similarity index 53% rename from x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/post_knowledge_base.ts rename to x-pack/examples/lens_config_builder_example/public/index.ts index 60d7f1064cefd..13f2ef1317b44 100644 --- a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/post_knowledge_base.ts +++ b/x-pack/examples/lens_config_builder_example/public/index.ts @@ -5,9 +5,6 @@ * 2.0. */ -import * as t from 'io-ts'; +import { LensConfigBuilderExamplePlugin } from './plugin'; -/** Validates the URL path of a POST request to the `/knowledge_base/{resource}` endpoint */ -export const PostKnowledgeBasePathParams = t.type({ - resource: t.union([t.string, t.undefined]), -}); +export const plugin = () => new LensConfigBuilderExamplePlugin(); diff --git a/x-pack/examples/lens_config_builder_example/public/mount.tsx b/x-pack/examples/lens_config_builder_example/public/mount.tsx new file mode 100644 index 0000000000000..0570423a74555 --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/public/mount.tsx @@ -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 * as React from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; + +import type { CoreSetup, AppMountParameters } from '@kbn/core/public'; +import type { StartDependencies } from './plugin'; + +export const mount = + (coreSetup: CoreSetup) => + async ({ element }: AppMountParameters) => { + const [core, plugins] = await coreSetup.getStartServices(); + const { App } = await import('./app'); + + const dataViews = plugins.data.indexPatterns; + const { formula } = await plugins.lens.stateHelperApi(); + + const i18nCore = core.i18n; + + const reactElement = ( + + ~ + + ); + + render(reactElement, element); + return () => { + unmountComponentAtNode(element); + plugins.data.search.session.clear(); + }; + }; diff --git a/x-pack/examples/lens_config_builder_example/public/plugin.ts b/x-pack/examples/lens_config_builder_example/public/plugin.ts new file mode 100644 index 0000000000000..9087ceb44193e --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/public/plugin.ts @@ -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 { Plugin, CoreSetup } from '@kbn/core/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { LensPublicStart } from '@kbn/lens-plugin/public'; +import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; +import { mount } from './mount'; + +export interface SetupDependencies { + developerExamples: DeveloperExamplesSetup; +} + +export interface StartDependencies { + data: DataPublicPluginStart; + lens: LensPublicStart; +} + +export class LensConfigBuilderExamplePlugin + implements Plugin +{ + public setup(core: CoreSetup, { developerExamples }: SetupDependencies) { + core.application.register({ + id: 'lens_config_builder_example', + title: 'Lens Config Builder example', + visibleIn: [], + mount: mount(core), + }); + + developerExamples.register({ + appId: 'lens_config_builder_example', + title: 'Lens Config Builder', + description: 'Embed Lens visualizations into other applications using Lens Config Builder.', + links: [ + { + label: 'README', + href: 'https://github.com/elastic/kibana/tree/main/x-pack/examples/lens_config_builder_example', + iconType: 'logoGithub', + size: 's', + target: '_blank', + }, + ], + }); + } + + public start() {} + + public stop() {} +} diff --git a/x-pack/examples/lens_config_builder_example/tsconfig.json b/x-pack/examples/lens_config_builder_example/tsconfig.json new file mode 100644 index 0000000000000..c279a83e140b5 --- /dev/null +++ b/x-pack/examples/lens_config_builder_example/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": [ + "index.ts", + "public/**/*.ts", + "public/**/*.tsx", + "server/**/*.ts", + "../../../typings/**/*" + ], + "exclude": [ + "target/**/*", + ], + "kbn_references": [ + "@kbn/core", + "@kbn/data-plugin", + "@kbn/embeddable-plugin", + "@kbn/lens-plugin", + "@kbn/developer-examples-plugin", + "@kbn/data-views-plugin", + "@kbn/ui-actions-plugin", + "@kbn/lens-embeddable-utils", + ] +} diff --git a/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts b/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts index f626ebdd8c425..becee1697c0c8 100644 --- a/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts +++ b/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts @@ -91,6 +91,7 @@ export const generateEvent: GeneratorFunction = (config, schedule, index, timest '@timestamp': timestamp.toISOString(), host: { name: `host-${index}`, + mac: ['00-00-5E-00-53-23', '00-00-5E-00-53-24'], network: { name: `network-${index}`, ingress: { @@ -134,6 +135,7 @@ export const generateEvent: GeneratorFunction = (config, schedule, index, timest '@timestamp': timestamp.toISOString(), host: { name: `host-${index}`, + mac: ['00-00-5E-00-53-23', '00-00-5E-00-53-24'], network: { name: `network-${index}`, }, diff --git a/x-pack/packages/kbn-elastic-assistant-common/constants.ts b/x-pack/packages/kbn-elastic-assistant-common/constants.ts new file mode 100755 index 0000000000000..dba89d807961b --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/constants.ts @@ -0,0 +1,26 @@ +/* + * 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 ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION = '2023-10-31'; +export const ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION = '1'; + +export const ELASTIC_AI_ASSISTANT_URL = '/api/elastic_assistant'; + +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL = `${ELASTIC_AI_ASSISTANT_URL}/current_user/conversations`; +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/{id}`; +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID}/messages`; + +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/_bulk_action`; +export const ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND = `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/_find`; + +export const ELASTIC_AI_ASSISTANT_PROMPTS_URL = `${ELASTIC_AI_ASSISTANT_URL}/prompts`; +export const ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_PROMPTS_URL}/_bulk_action`; +export const ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND = `${ELASTIC_AI_ASSISTANT_PROMPTS_URL}/_find`; + +export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL = `${ELASTIC_AI_ASSISTANT_URL}/anonymization_fields`; +export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION = `${ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL}/_bulk_action`; +export const ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND = `${ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL}/_find`; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts index 410ef5fc8cc48..3aa74fe80ff0a 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { Replacement } from '../../schemas'; + export const getIsDataAnonymizable = (rawData: string | Record): boolean => typeof rawData !== 'string'; @@ -21,3 +23,31 @@ export const isAnonymized = ({ allowReplacementSet: Set; field: string; }): boolean => allowReplacementSet.has(field); + +export const replaceAnonymizedValuesWithOriginalValues = ({ + messageContent, + replacements, +}: { + messageContent: string; + replacements: Replacement[]; +}): string => + replacements != null + ? replacements.reduce((acc, replacement) => { + const value = replacement.value; + return replacement.uuid && value ? acc.replaceAll(replacement.uuid, value) : acc; + }, messageContent) + : messageContent; + +export const replaceOriginalValuesWithUuidValues = ({ + messageContent, + replacements, +}: { + messageContent: string; + replacements: Replacement[]; +}): string => + replacements != null + ? replacements.reduce((acc, replacement) => { + const value = replacement.value; + return replacement.uuid && value ? acc.replaceAll(value, replacement.uuid) : acc; + }, messageContent) + : messageContent; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx index fb8b1c5b42f6b..7c3cf5c02b02a 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx @@ -20,7 +20,7 @@ describe('transformRawData', () => { const result = transformRawData({ allow: inputRawData.allow, allowReplacement: inputRawData.allowReplacement, - currentReplacements: {}, + currentReplacements: [], getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, rawData: inputRawData.rawData, @@ -42,13 +42,13 @@ describe('transformRawData', () => { transformRawData({ allow: inputRawData.allow, allowReplacement: inputRawData.allowReplacement, - currentReplacements: {}, + currentReplacements: [], getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements, rawData: inputRawData.rawData, }); - expect(onNewReplacements).toHaveBeenCalledWith({ '1eulav': 'value1' }); + expect(onNewReplacements).toHaveBeenCalledWith([{ uuid: '1eulav', value: 'value1' }]); }); it('returns the expected mix of anonymized and non-anonymized data as a CSV string', () => { @@ -62,7 +62,7 @@ describe('transformRawData', () => { const result = transformRawData({ allow: inputRawData.allow, allowReplacement: inputRawData.allowReplacement, - currentReplacements: {}, + currentReplacements: [], getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, rawData: inputRawData.rawData, @@ -86,7 +86,7 @@ describe('transformRawData', () => { const result = transformRawData({ allow: inputRawData.allow, allowReplacement: inputRawData.allowReplacement, - currentReplacements: {}, + currentReplacements: [], getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, rawData: inputRawData.rawData, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx index f1fe5e9331344..7665225927b94 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import { Replacement } from '../../schemas'; import { getAnonymizedData } from '../get_anonymized_data'; import { getAnonymizedValues } from '../get_anonymized_values'; import { getCsvFromData } from '../get_csv_from_data'; @@ -19,7 +20,7 @@ export const transformRawData = ({ }: { allow: string[]; allowReplacement: string[]; - currentReplacements: Record | undefined; + currentReplacements: Replacement[] | undefined; getAnonymizedValue: ({ currentReplacements, rawValue, @@ -27,7 +28,7 @@ export const transformRawData = ({ currentReplacements: Record | undefined; rawValue: string; }) => string; - onNewReplacements?: (replacements: Record) => void; + onNewReplacements?: (replacements: Replacement[]) => void; rawData: string | Record; }): string => { if (typeof rawData === 'string') { @@ -37,14 +38,22 @@ export const transformRawData = ({ const anonymizedData = getAnonymizedData({ allow, allowReplacement, - currentReplacements, + currentReplacements: currentReplacements?.reduce((acc: Record, r) => { + acc[r.uuid] = r.value; + return acc; + }, {}), rawData, getAnonymizedValue, getAnonymizedValues, }); if (onNewReplacements != null) { - onNewReplacements(anonymizedData.replacements); + onNewReplacements( + Object.keys(anonymizedData.replacements).map((key) => ({ + uuid: key, + value: anonymizedData.replacements[key], + })) + ); } return getCsvFromData(anonymizedData.anonymizedData); 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 new file mode 100644 index 0000000000000..d8af61a2e2d9c --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts @@ -0,0 +1,68 @@ +/* + * 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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Execute Connector API endpoint + * version: 1 + */ + +import { UUID, Replacement } from '../conversations/common_attributes.gen'; + +export type ExecuteConnectorRequestParams = z.infer; +export const ExecuteConnectorRequestParams = z.object({ + /** + * The connector's `id` value. + */ + connectorId: z.string(), +}); +export type ExecuteConnectorRequestParamsInput = z.input; + +export type ExecuteConnectorRequestBody = z.infer; +export const ExecuteConnectorRequestBody = z.object({ + conversationId: UUID.optional(), + message: z.string().optional(), + model: z.string().optional(), + subAction: z.enum(['invokeAI', 'invokeStream']), + alertsIndexPattern: z.string().optional(), + allow: z.array(z.string()).optional(), + allowReplacement: z.array(z.string()).optional(), + isEnabledKnowledgeBase: z.boolean().optional(), + isEnabledRAGAlerts: z.boolean().optional(), + replacements: z.array(Replacement), + size: z.number().optional(), + llmType: z.enum(['bedrock', 'openai']), +}); +export type ExecuteConnectorRequestBodyInput = z.input; + +export type ExecuteConnectorResponse = z.infer; +export const ExecuteConnectorResponse = z.object({ + data: z.string().optional(), + connector_id: z.string().optional(), + replacements: z.array(Replacement).optional(), + status: z.string().optional(), + /** + * Trace Data + */ + trace_data: z + .object({ + /** + * Could be any string, not necessarily a UUID + */ + transactionId: z.string().optional(), + /** + * Could be any string, not necessarily a UUID + */ + traceId: z.string().optional(), + }) + .optional(), +}); 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 new file mode 100644 index 0000000000000..936d28ce62589 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml @@ -0,0 +1,110 @@ +openapi: 3.0.0 +info: + title: Execute Connector API endpoint + version: '1' +paths: + /internal/elastic_assistant/actions/connector/{connectorId}/_execute: + post: + operationId: ExecuteConnector + x-codegen-enabled: true + description: Execute Elastic Assistant connector by id + summary: Execute Elastic Assistant connector + tags: + - Connector API + parameters: + - name: connectorId + in: path + required: true + description: The connector's `id` value. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - params + - llmType + - replacements + - subAction + properties: + conversationId: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + message: + type: string + model: + type: string + subAction: + type: string + enum: + - invokeAI + - invokeStream + alertsIndexPattern: + type: string + allow: + type: array + items: + type: string + allowReplacement: + type: array + items: + type: string + isEnabledKnowledgeBase: + type: boolean + isEnabledRAGAlerts: + type: boolean + replacements: + type: array + items: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacement' + size: + type: number + llmType: + type: string + enum: + - bedrock + - openai + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + data: + type: string + connector_id: + type: string + replacements: + type: array + items: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacement' + status: + type: string + trace_data: + type: object + description: Trace Data + properties: + transactionId: + type: string + description: Could be any string, not necessarily a UUID + traceId: + type: string + description: Could be any string, not necessarily a UUID + '400': + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts new file mode 100644 index 0000000000000..f9f7900f62f24 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts @@ -0,0 +1,127 @@ +/* + * 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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Bulk Actions API endpoint + * version: 2023-10-31 + */ + +import { UUID, NonEmptyString, User } from '../conversations/common_attributes.gen'; + +export type BulkActionSkipReason = z.infer; +export const BulkActionSkipReason = z.literal('ANONYMIZATION_FIELD_NOT_MODIFIED'); + +export type BulkActionSkipResult = z.infer; +export const BulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: BulkActionSkipReason, +}); + +export type AnonymizationFieldDetailsInError = z.infer; +export const AnonymizationFieldDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type NormalizedAnonymizationFieldError = z.infer; +export const NormalizedAnonymizationFieldError = z.object({ + message: z.string(), + status_code: z.number().int(), + err_code: z.string().optional(), + anonymization_fields: z.array(AnonymizationFieldDetailsInError), +}); + +export type AnonymizationFieldResponse = z.infer; +export const AnonymizationFieldResponse = z.object({ + id: UUID, + timestamp: NonEmptyString.optional(), + field: z.string(), + defaultAllow: z.boolean().optional(), + defaultAllowReplacement: z.boolean().optional(), + updatedAt: z.string().optional(), + updatedBy: z.string().optional(), + createdAt: z.string().optional(), + createdBy: z.string().optional(), + users: z.array(User).optional(), + /** + * Kibana space + */ + namespace: z.string().optional(), +}); + +export type BulkCrudActionResults = z.infer; +export const BulkCrudActionResults = z.object({ + updated: z.array(AnonymizationFieldResponse), + created: z.array(AnonymizationFieldResponse), + deleted: z.array(z.string()), + skipped: z.array(BulkActionSkipResult), +}); + +export type BulkCrudActionSummary = z.infer; +export const BulkCrudActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type BulkCrudActionResponse = z.infer; +export const BulkCrudActionResponse = z.object({ + success: z.boolean().optional(), + status_code: z.number().int().optional(), + message: z.string().optional(), + anonymization_fields_count: z.number().int().optional(), + attributes: z.object({ + results: BulkCrudActionResults, + summary: BulkCrudActionSummary, + errors: z.array(NormalizedAnonymizationFieldError).optional(), + }), +}); + +export type BulkActionBase = z.infer; +export const BulkActionBase = z.object({ + /** + * Query to filter anonymization fields + */ + query: z.string().optional(), + /** + * Array of anonymization fields IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type AnonymizationFieldCreateProps = z.infer; +export const AnonymizationFieldCreateProps = z.object({ + field: z.string(), + defaultAllow: z.boolean().optional(), + defaultAllowReplacement: z.boolean().optional(), +}); + +export type AnonymizationFieldUpdateProps = z.infer; +export const AnonymizationFieldUpdateProps = z.object({ + id: z.string(), + defaultAllow: z.boolean().optional(), + defaultAllowReplacement: z.boolean().optional(), +}); + +export type PerformBulkActionRequestBody = z.infer; +export const PerformBulkActionRequestBody = z.object({ + delete: BulkActionBase.optional(), + create: z.array(AnonymizationFieldCreateProps).optional(), + update: z.array(AnonymizationFieldUpdateProps).optional(), +}); +export type PerformBulkActionRequestBodyInput = z.input; + +export type PerformBulkActionResponse = z.infer; +export const PerformBulkActionResponse = BulkCrudActionResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml new file mode 100644 index 0000000000000..5df94fb538ace --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml @@ -0,0 +1,239 @@ +openapi: 3.0.0 +info: + title: Bulk Actions API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/anonymization_fields/_bulk_action: + post: + operationId: PerformBulkAction + x-codegen-enabled: true + summary: Applies a bulk action to multiple anonymization fields + description: The bulk action is applied to all anonymization fields that match the filter or to the list of anonymization fields by their IDs. + tags: + - Bulk API + requestBody: + content: + application/json: + schema: + type: object + properties: + delete: + $ref: '#/components/schemas/BulkActionBase' + create: + type: array + items: + $ref: '#/components/schemas/AnonymizationFieldCreateProps' + update: + type: array + items: + $ref: '#/components/schemas/AnonymizationFieldUpdateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCrudActionResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + BulkActionSkipReason: + type: string + enum: + - ANONYMIZATION_FIELD_NOT_MODIFIED + + BulkActionSkipResult: + type: object + properties: + id: + type: string + name: + type: string + skip_reason: + $ref: '#/components/schemas/BulkActionSkipReason' + required: + - id + - skip_reason + + AnonymizationFieldDetailsInError: + type: object + properties: + id: + type: string + name: + type: string + required: + - id + + NormalizedAnonymizationFieldError: + type: object + properties: + message: + type: string + status_code: + type: integer + err_code: + type: string + anonymization_fields: + type: array + items: + $ref: '#/components/schemas/AnonymizationFieldDetailsInError' + required: + - message + - status_code + - anonymization_fields + + AnonymizationFieldResponse: + type: object + required: + - id + - field + properties: + id: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + 'timestamp': + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/NonEmptyString' + field: + type: string + defaultAllow: + type: boolean + defaultAllowReplacement: + type: boolean + updatedAt: + type: string + updatedBy: + type: string + createdAt: + type: string + createdBy: + type: string + users: + type: array + items: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/User' + namespace: + type: string + description: Kibana space + + BulkCrudActionResults: + type: object + properties: + updated: + type: array + items: + $ref: '#/components/schemas/AnonymizationFieldResponse' + created: + type: array + items: + $ref: '#/components/schemas/AnonymizationFieldResponse' + deleted: + type: array + items: + type: string + skipped: + type: array + items: + $ref: '#/components/schemas/BulkActionSkipResult' + required: + - updated + - created + - deleted + - skipped + + BulkCrudActionSummary: + type: object + properties: + failed: + type: integer + skipped: + type: integer + succeeded: + type: integer + total: + type: integer + required: + - failed + - skipped + - succeeded + - total + + BulkCrudActionResponse: + type: object + properties: + success: + type: boolean + status_code: + type: integer + message: + type: string + anonymization_fields_count: + type: integer + attributes: + type: object + properties: + results: + $ref: '#/components/schemas/BulkCrudActionResults' + summary: + $ref: '#/components/schemas/BulkCrudActionSummary' + errors: + type: array + items: + $ref: '#/components/schemas/NormalizedAnonymizationFieldError' + required: + - results + - summary + required: + - attributes + + + BulkActionBase: + x-inline: true + type: object + properties: + query: + type: string + description: Query to filter anonymization fields + ids: + type: array + description: Array of anonymization fields IDs + minItems: 1 + items: + type: string + + AnonymizationFieldCreateProps: + type: object + required: + - field + properties: + field: + type: string + defaultAllow: + type: boolean + defaultAllowReplacement: + type: boolean + + AnonymizationFieldUpdateProps: + type: object + required: + - id + properties: + id: + type: string + defaultAllow: + type: boolean + defaultAllowReplacement: + type: boolean + \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts new file mode 100644 index 0000000000000..58a1395c54a03 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts @@ -0,0 +1,73 @@ +/* + * 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 { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Find AnonymizationFields API endpoint + * version: 2023-10-31 + */ + +import { AnonymizationFieldResponse } from './bulk_crud_anonymization_fields_route.gen'; + +export type FindAnonymizationFieldsSortField = z.infer; +export const FindAnonymizationFieldsSortField = z.enum([ + 'created_at', + 'is_default', + 'title', + 'updated_at', +]); +export type FindAnonymizationFieldsSortFieldEnum = typeof FindAnonymizationFieldsSortField.enum; +export const FindAnonymizationFieldsSortFieldEnum = FindAnonymizationFieldsSortField.enum; + +export type SortOrder = z.infer; +export const SortOrder = z.enum(['asc', 'desc']); +export type SortOrderEnum = typeof SortOrder.enum; +export const SortOrderEnum = SortOrder.enum; + +export type FindAnonymizationFieldsRequestQuery = z.infer< + typeof FindAnonymizationFieldsRequestQuery +>; +export const FindAnonymizationFieldsRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindAnonymizationFieldsSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * AnonymizationFields per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindAnonymizationFieldsRequestQueryInput = z.input< + typeof FindAnonymizationFieldsRequestQuery +>; + +export type FindAnonymizationFieldsResponse = z.infer; +export const FindAnonymizationFieldsResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(AnonymizationFieldResponse), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml new file mode 100644 index 0000000000000..3782fb2e4876a --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml @@ -0,0 +1,108 @@ +openapi: 3.0.0 +info: + title: Find AnonymizationFields API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/anonymization_fields/_find: + get: + operationId: FindAnonymizationFields + x-codegen-enabled: true + description: Finds anonymization fields that match the given query. + summary: Finds anonymization fields that match the given query. + tags: + - AnonymizationFields API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindAnonymizationFieldsSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: AnonymizationFields per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + 200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: './bulk_crud_anonymization_fields_route.schema.yaml#/components/schemas/AnonymizationFieldResponse' + required: + - page + - perPage + - total + - data + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + FindAnonymizationFieldsSortField: + type: string + enum: + - 'created_at' + - 'is_default' + - 'title' + - 'updated_at' + + SortOrder: + type: string + enum: + - 'asc' + - 'desc' diff --git a/x-pack/plugins/elastic_assistant/server/schemas/common.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common.ts similarity index 100% rename from x-pack/plugins/elastic_assistant/server/schemas/common.ts rename to x-pack/packages/kbn-elastic-assistant-common/impl/schemas/common.ts diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts new file mode 100644 index 0000000000000..bb401150bbee0 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts @@ -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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Bulk Actions API endpoint + * version: 2023-10-31 + */ + +import { + ConversationCreateProps, + ConversationUpdateProps, + ConversationResponse, +} from './common_attributes.gen'; + +export type BulkActionSkipReason = z.infer; +export const BulkActionSkipReason = z.literal('CONVERSATION_NOT_MODIFIED'); + +export type BulkActionSkipResult = z.infer; +export const BulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: BulkActionSkipReason, +}); + +export type ConversationDetailsInError = z.infer; +export const ConversationDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type NormalizedConversationError = z.infer; +export const NormalizedConversationError = z.object({ + message: z.string(), + status_code: z.number().int(), + err_code: z.string().optional(), + conversations: z.array(ConversationDetailsInError), +}); + +export type BulkCrudActionResults = z.infer; +export const BulkCrudActionResults = z.object({ + updated: z.array(ConversationResponse), + created: z.array(ConversationResponse), + deleted: z.array(z.string()), + skipped: z.array(BulkActionSkipResult), +}); + +export type BulkCrudActionSummary = z.infer; +export const BulkCrudActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type BulkCrudActionResponse = z.infer; +export const BulkCrudActionResponse = z.object({ + success: z.boolean().optional(), + status_code: z.number().int().optional(), + message: z.string().optional(), + conversations_count: z.number().int().optional(), + attributes: z.object({ + results: BulkCrudActionResults, + summary: BulkCrudActionSummary, + errors: z.array(NormalizedConversationError).optional(), + }), +}); + +export type BulkActionBase = z.infer; +export const BulkActionBase = z.object({ + /** + * Query to filter conversations + */ + query: z.string().optional(), + /** + * Array of conversation IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type PerformBulkActionRequestBody = z.infer; +export const PerformBulkActionRequestBody = z.object({ + delete: BulkActionBase.optional(), + create: z.array(ConversationCreateProps).optional(), + update: z.array(ConversationUpdateProps).optional(), +}); +export type PerformBulkActionRequestBodyInput = z.input; + +export type PerformBulkActionResponse = z.infer; +export const PerformBulkActionResponse = BulkCrudActionResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml new file mode 100644 index 0000000000000..790f4e5e85d5e --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.schema.yaml @@ -0,0 +1,183 @@ +openapi: 3.0.0 +info: + title: Bulk Actions API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/conversations/_bulk_action: + post: + operationId: PerformBulkAction + x-codegen-enabled: true + summary: Applies a bulk action to multiple conversations + description: The bulk action is applied to all conversations that match the filter or to the list of conversations by their IDs. + tags: + - Bulk API + requestBody: + content: + application/json: + schema: + type: object + properties: + delete: + $ref: '#/components/schemas/BulkActionBase' + create: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationCreateProps' + update: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationUpdateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCrudActionResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + BulkActionSkipReason: + type: string + enum: + - CONVERSATION_NOT_MODIFIED + + BulkActionSkipResult: + type: object + properties: + id: + type: string + name: + type: string + skip_reason: + $ref: '#/components/schemas/BulkActionSkipReason' + required: + - id + - skip_reason + + ConversationDetailsInError: + type: object + properties: + id: + type: string + name: + type: string + required: + - id + + NormalizedConversationError: + type: object + properties: + message: + type: string + status_code: + type: integer + err_code: + type: string + conversations: + type: array + items: + $ref: '#/components/schemas/ConversationDetailsInError' + required: + - message + - status_code + - conversations + + BulkCrudActionResults: + type: object + properties: + updated: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + created: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + deleted: + type: array + items: + type: string + skipped: + type: array + items: + $ref: '#/components/schemas/BulkActionSkipResult' + required: + - updated + - created + - deleted + - skipped + + BulkCrudActionSummary: + type: object + properties: + failed: + type: integer + skipped: + type: integer + succeeded: + type: integer + total: + type: integer + required: + - failed + - skipped + - succeeded + - total + + BulkCrudActionResponse: + type: object + properties: + success: + type: boolean + status_code: + type: integer + message: + type: string + conversations_count: + type: integer + attributes: + type: object + properties: + results: + $ref: '#/components/schemas/BulkCrudActionResults' + summary: + $ref: '#/components/schemas/BulkCrudActionSummary' + errors: + type: array + items: + $ref: '#/components/schemas/NormalizedConversationError' + required: + - results + - summary + required: + - attributes + + + BulkActionBase: + x-inline: true + type: object + properties: + query: + type: string + description: Query to filter conversations + ids: + type: array + description: Array of conversation IDs + minItems: 1 + items: + type: string + \ No newline at end of file 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 new file mode 100644 index 0000000000000..b95d0f8918705 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts @@ -0,0 +1,304 @@ +/* + * 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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Common Conversation Attributes + * version: not applicable + */ + +/** + * A string that is not empty and does not contain only whitespace + */ +export type NonEmptyString = z.infer; +export const NonEmptyString = z + .string() + .min(1) + .regex(/^(?! *$).+$/); + +/** + * A universally unique identifier + */ +export type UUID = z.infer; +export const UUID = z.string().uuid(); + +/** + * Could be any string, not necessarily a UUID + */ +export type User = z.infer; +export const User = z.object({ + /** + * User id. + */ + id: z.string().optional(), + /** + * User name. + */ + name: z.string().optional(), +}); + +/** + * trace Data + */ +export type TraceData = z.infer; +export const TraceData = z.object({ + /** + * Could be any string, not necessarily a UUID + */ + transactionId: z.string().optional(), + /** + * Could be any string, not necessarily a UUID + */ + traceId: z.string().optional(), +}); + +/** + * Replacements object used to anonymize/deanomymize messsages + */ +export type Replacement = z.infer; +export const Replacement = z.object({ + /** + * Actual value was anonymized. + */ + value: z.string(), + uuid: UUID, +}); + +export type Reader = z.infer; +export const Reader = z.object({}).catchall(z.unknown()); + +/** + * Provider + */ +export type Provider = z.infer; +export const Provider = z.enum(['OpenAI', 'Azure OpenAI']); +export type ProviderEnum = typeof Provider.enum; +export const ProviderEnum = Provider.enum; + +/** + * Message role. + */ +export type MessageRole = z.infer; +export const MessageRole = z.enum(['system', 'user', 'assistant']); +export type MessageRoleEnum = typeof MessageRole.enum; +export const MessageRoleEnum = MessageRole.enum; + +/** + * The conversation category. + */ +export type ConversationCategory = z.infer; +export const ConversationCategory = z.enum(['assistant', 'insights']); +export type ConversationCategoryEnum = typeof ConversationCategory.enum; +export const ConversationCategoryEnum = ConversationCategory.enum; + +/** + * The conversation confidence. + */ +export type ConversationConfidence = z.infer; +export const ConversationConfidence = z.enum(['low', 'medium', 'high']); +export type ConversationConfidenceEnum = typeof ConversationConfidence.enum; +export const ConversationConfidenceEnum = ConversationConfidence.enum; + +/** + * AI assistant conversation message. + */ +export type Message = z.infer; +export const Message = z.object({ + /** + * Message content. + */ + content: z.string(), + /** + * Message content. + */ + reader: Reader.optional(), + /** + * Message role. + */ + role: MessageRole, + /** + * The timestamp message was sent or received. + */ + timestamp: NonEmptyString, + /** + * Is error message. + */ + isError: z.boolean().optional(), + /** + * trace Data + */ + traceData: TraceData.optional(), +}); + +export type ApiConfig = z.infer; +export const ApiConfig = z.object({ + /** + * connector Id + */ + connectorId: z.string(), + /** + * connector Type Title + */ + connectorTypeTitle: z.string(), + /** + * defaultSystemPromptId + */ + defaultSystemPromptId: z.string().optional(), + /** + * Provider + */ + provider: Provider.optional(), + /** + * model + */ + model: z.string().optional(), +}); + +export type ConversationSummary = z.infer; +export const ConversationSummary = z.object({ + /** + * Summary text of the conversation over time. + */ + content: z.string().optional(), + /** + * The timestamp summary was updated. + */ + timestamp: NonEmptyString.optional(), + /** + * Define if summary is marked as publicly available. + */ + public: z.boolean().optional(), + /** + * How confident you are about this being a correct and useful learning. + */ + confidence: ConversationConfidence.optional(), +}); + +export type ErrorSchema = z.infer; +export const ErrorSchema = z + .object({ + id: UUID.optional(), + error: z.object({ + status_code: z.number().int().min(400), + message: z.string(), + }), + }) + .strict(); + +export type ConversationResponse = z.infer; +export const ConversationResponse = z.object({ + id: z.union([UUID, NonEmptyString]), + /** + * The conversation title. + */ + title: z.string(), + /** + * The conversation category. + */ + category: ConversationCategory, + summary: ConversationSummary.optional(), + timestamp: NonEmptyString.optional(), + /** + * The last time conversation was updated. + */ + updatedAt: z.string().optional(), + /** + * The last time conversation was updated. + */ + createdAt: z.string(), + replacements: z.array(Replacement).optional(), + users: z.array(User), + /** + * The conversation messages. + */ + messages: z.array(Message).optional(), + /** + * LLM API configuration. + */ + apiConfig: ApiConfig.optional(), + /** + * Is default conversation. + */ + isDefault: z.boolean().optional(), + /** + * excludeFromLastConversationStorage. + */ + excludeFromLastConversationStorage: z.boolean().optional(), + /** + * Kibana space + */ + namespace: z.string(), +}); + +export type ConversationUpdateProps = z.infer; +export const ConversationUpdateProps = z.object({ + id: z.union([UUID, NonEmptyString]), + /** + * The conversation title. + */ + title: z.string().optional(), + /** + * The conversation category. + */ + category: ConversationCategory.optional(), + /** + * The conversation messages. + */ + messages: z.array(Message).optional(), + /** + * LLM API configuration. + */ + apiConfig: ApiConfig.optional(), + summary: ConversationSummary.optional(), + /** + * excludeFromLastConversationStorage. + */ + excludeFromLastConversationStorage: z.boolean().optional(), + replacements: z.array(Replacement).optional(), +}); + +export type ConversationCreateProps = z.infer; +export const ConversationCreateProps = z.object({ + /** + * The conversation title. + */ + title: z.string(), + /** + * The conversation category. + */ + category: ConversationCategory.optional(), + /** + * The conversation messages. + */ + messages: z.array(Message).optional(), + /** + * LLM API configuration. + */ + apiConfig: ApiConfig.optional(), + /** + * Is default conversation. + */ + isDefault: z.boolean().optional(), + /** + * excludeFromLastConversationStorage. + */ + excludeFromLastConversationStorage: z.boolean().optional(), + replacements: z.array(Replacement).optional(), +}); + +export type ConversationMessageCreateProps = z.infer; +export const ConversationMessageCreateProps = z.object({ + /** + * The conversation messages. + */ + messages: z.array(Message), +}); 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 new file mode 100644 index 0000000000000..1359543f2e588 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml @@ -0,0 +1,303 @@ +openapi: 3.0.0 +info: + title: Common Conversation Attributes + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + NonEmptyString: + type: string + pattern: ^(?! *$).+$ + minLength: 1 + description: A string that is not empty and does not contain only whitespace + + UUID: + type: string + format: uuid + description: A universally unique identifier + + User: + type: object + description: Could be any string, not necessarily a UUID + properties: + id: + type: string + description: User id. + name: + type: string + description: User name. + + TraceData: + type: object + description: trace Data + properties: + transactionId: + type: string + description: Could be any string, not necessarily a UUID + traceId: + type: string + description: Could be any string, not necessarily a UUID + + Replacement: + type: object + required: + - 'value' + - 'uuid' + description: Replacements object used to anonymize/deanomymize messsages + properties: + value: + type: string + description: Actual value was anonymized. + uuid: + $ref: '#/components/schemas/UUID' + + Reader: + type: object + additionalProperties: true + + Provider: + type: string + description: Provider + enum: + - OpenAI + - Azure OpenAI + + MessageRole: + type: string + description: Message role. + enum: + - system + - user + - assistant + + ConversationCategory: + type: string + description: The conversation category. + enum: + - assistant + - insights + + ConversationConfidence: + type: string + description: The conversation confidence. + enum: + - low + - medium + - high + + Message: + type: object + description: AI assistant conversation message. + required: + - 'timestamp' + - 'content' + - 'role' + properties: + content: + type: string + description: Message content. + reader: + $ref: '#/components/schemas/Reader' + description: Message content. + role: + $ref: '#/components/schemas/MessageRole' + description: Message role. + timestamp: + $ref: '#/components/schemas/NonEmptyString' + description: The timestamp message was sent or received. + isError: + type: boolean + description: Is error message. + traceData: + $ref: '#/components/schemas/TraceData' + description: trace Data + + ApiConfig: + type: object + required: + - connectorId + - connectorTypeTitle + properties: + connectorId: + type: string + description: connector Id + connectorTypeTitle: + type: string + description: connector Type Title + defaultSystemPromptId: + type: string + description: defaultSystemPromptId + provider: + $ref: '#/components/schemas/Provider' + description: Provider + model: + type: string + description: model + + ConversationSummary: + type: object + properties: + content: + type: string + description: Summary text of the conversation over time. + timestamp: + $ref: '#/components/schemas/NonEmptyString' + description: The timestamp summary was updated. + public: + type: boolean + description: Define if summary is marked as publicly available. + confidence: + $ref: '#/components/schemas/ConversationConfidence' + description: How confident you are about this being a correct and useful learning. + + ErrorSchema: + type: object + required: + - error + additionalProperties: false + properties: + id: + $ref: '#/components/schemas/UUID' + error: + type: object + required: + - status_code + - message + properties: + status_code: + type: integer + minimum: 400 + message: + type: string + + ConversationResponse: + type: object + required: + - id + - title + - createdAt + - users + - namespace + - category + properties: + id: + oneOf: + - $ref: '#/components/schemas/UUID' + - $ref: '#/components/schemas/NonEmptyString' + title: + type: string + description: The conversation title. + category: + $ref: '#/components/schemas/ConversationCategory' + description: The conversation category. + summary: + $ref: '#/components/schemas/ConversationSummary' + 'timestamp': + $ref: '#/components/schemas/NonEmptyString' + updatedAt: + description: The last time conversation was updated. + type: string + createdAt: + description: The last time conversation was updated. + type: string + replacements: + type: array + items: + $ref: '#/components/schemas/Replacement' + users: + type: array + items: + $ref: '#/components/schemas/User' + messages: + type: array + items: + $ref: '#/components/schemas/Message' + description: The conversation messages. + apiConfig: + $ref: '#/components/schemas/ApiConfig' + description: LLM API configuration. + isDefault: + description: Is default conversation. + type: boolean + excludeFromLastConversationStorage: + description: excludeFromLastConversationStorage. + type: boolean + namespace: + type: string + description: Kibana space + + ConversationUpdateProps: + type: object + required: + - id + properties: + id: + oneOf: + - $ref: '#/components/schemas/UUID' + - $ref: '#/components/schemas/NonEmptyString' + title: + type: string + description: The conversation title. + category: + $ref: '#/components/schemas/ConversationCategory' + description: The conversation category. + messages: + type: array + items: + $ref: '#/components/schemas/Message' + description: The conversation messages. + apiConfig: + $ref: '#/components/schemas/ApiConfig' + description: LLM API configuration. + summary: + $ref: '#/components/schemas/ConversationSummary' + excludeFromLastConversationStorage: + description: excludeFromLastConversationStorage. + type: boolean + replacements: + type: array + items: + $ref: '#/components/schemas/Replacement' + + ConversationCreateProps: + type: object + required: + - title + properties: + title: + type: string + description: The conversation title. + category: + $ref: '#/components/schemas/ConversationCategory' + description: The conversation category. + messages: + type: array + items: + $ref: '#/components/schemas/Message' + description: The conversation messages. + apiConfig: + $ref: '#/components/schemas/ApiConfig' + description: LLM API configuration. + isDefault: + description: Is default conversation. + type: boolean + excludeFromLastConversationStorage: + description: excludeFromLastConversationStorage. + type: boolean + replacements: + type: array + items: + $ref: '#/components/schemas/Replacement' + + ConversationMessageCreateProps: + type: object + required: + - messages + properties: + messages: + type: array + items: + $ref: '#/components/schemas/Message' + description: The conversation messages. + diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts new file mode 100644 index 0000000000000..ed5f1b8f057c6 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts @@ -0,0 +1,96 @@ +/* + * 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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Create Conversation API endpoint + * version: 2023-10-31 + */ + +import { + ConversationCreateProps, + ConversationResponse, + UUID, + ConversationUpdateProps, + ConversationMessageCreateProps, +} from './common_attributes.gen'; + +export type AppendConversationMessageRequestParams = z.infer< + typeof AppendConversationMessageRequestParams +>; +export const AppendConversationMessageRequestParams = z.object({ + /** + * The conversation's `id` value. + */ + id: UUID, +}); +export type AppendConversationMessageRequestParamsInput = z.input< + typeof AppendConversationMessageRequestParams +>; + +export type AppendConversationMessageRequestBody = z.infer< + typeof AppendConversationMessageRequestBody +>; +export const AppendConversationMessageRequestBody = ConversationMessageCreateProps; +export type AppendConversationMessageRequestBodyInput = z.input< + typeof AppendConversationMessageRequestBody +>; + +export type AppendConversationMessageResponse = z.infer; +export const AppendConversationMessageResponse = ConversationResponse; + +export type CreateConversationRequestBody = z.infer; +export const CreateConversationRequestBody = ConversationCreateProps; +export type CreateConversationRequestBodyInput = z.input; + +export type CreateConversationResponse = z.infer; +export const CreateConversationResponse = ConversationResponse; + +export type DeleteConversationRequestParams = z.infer; +export const DeleteConversationRequestParams = z.object({ + /** + * The conversation's `id` value. + */ + id: UUID, +}); +export type DeleteConversationRequestParamsInput = z.input; + +export type DeleteConversationResponse = z.infer; +export const DeleteConversationResponse = ConversationResponse; + +export type ReadConversationRequestParams = z.infer; +export const ReadConversationRequestParams = z.object({ + /** + * The conversation's `id` value. + */ + id: UUID, +}); +export type ReadConversationRequestParamsInput = z.input; + +export type ReadConversationResponse = z.infer; +export const ReadConversationResponse = ConversationResponse; + +export type UpdateConversationRequestParams = z.infer; +export const UpdateConversationRequestParams = z.object({ + /** + * The conversation's `id` value. + */ + id: UUID, +}); +export type UpdateConversationRequestParamsInput = z.input; + +export type UpdateConversationRequestBody = z.infer; +export const UpdateConversationRequestBody = ConversationUpdateProps; +export type UpdateConversationRequestBodyInput = z.input; + +export type UpdateConversationResponse = z.infer; +export const UpdateConversationResponse = ConversationResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml new file mode 100644 index 0000000000000..a7f08659e76e3 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.schema.yaml @@ -0,0 +1,191 @@ +openapi: 3.0.0 +info: + title: Create Conversation API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/conversations: + post: + operationId: CreateConversation + x-codegen-enabled: true + description: Create a conversation + summary: Create a conversation + tags: + - Conversation API + requestBody: + required: true + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationCreateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + + /api/elastic_assistant/conversations/{id}: + get: + operationId: ReadConversation + x-codegen-enabled: true + description: Read a single conversation + summary: Read a single conversation + tags: + - Conversations API + parameters: + - name: id + in: path + required: true + description: The conversation's `id` value. + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + put: + operationId: UpdateConversation + x-codegen-enabled: true + description: Update a single conversation + summary: Update a conversation + tags: + - Conversation API + parameters: + - name: id + in: path + required: true + description: The conversation's `id` value. + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + requestBody: + required: true + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationUpdateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + delete: + operationId: DeleteConversation + x-codegen-enabled: true + description: Deletes a single conversation using the `id` field. + summary: Deletes a single conversation using the `id` field. + tags: + - Conversation API + parameters: + - name: id + in: path + required: true + description: The conversation's `id` value. + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + + /api/elastic_assistant/conversations/{id}/messages: + post: + operationId: AppendConversationMessage + x-codegen-enabled: true + description: Append a message to the conversation + summary: Append a message to the conversation + tags: + - Conversation API + parameters: + - name: id + in: path + required: true + description: The conversation's `id` value. + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/UUID' + requestBody: + required: true + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationMessageCreateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts new file mode 100644 index 0000000000000..16743f77b3efd --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts @@ -0,0 +1,108 @@ +/* + * 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 { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Find Conversations API endpoint + * version: 2023-10-31 + */ + +import { ConversationResponse } from './common_attributes.gen'; + +export type FindConversationsSortField = z.infer; +export const FindConversationsSortField = z.enum([ + 'created_at', + 'is_default', + 'title', + 'updated_at', +]); +export type FindConversationsSortFieldEnum = typeof FindConversationsSortField.enum; +export const FindConversationsSortFieldEnum = FindConversationsSortField.enum; + +export type SortOrder = z.infer; +export const SortOrder = z.enum(['asc', 'desc']); +export type SortOrderEnum = typeof SortOrder.enum; +export const SortOrderEnum = SortOrder.enum; + +export type FindConversationsRequestQuery = z.infer; +export const FindConversationsRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindConversationsSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * Conversations per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindConversationsRequestQueryInput = z.input; + +export type FindConversationsResponse = z.infer; +export const FindConversationsResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(ConversationResponse), +}); +export type FindCurrentUserConversationsRequestQuery = z.infer< + typeof FindCurrentUserConversationsRequestQuery +>; +export const FindCurrentUserConversationsRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindConversationsSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * Conversations per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindCurrentUserConversationsRequestQueryInput = z.input< + typeof FindCurrentUserConversationsRequestQuery +>; + +export type FindCurrentUserConversationsResponse = z.infer< + typeof FindCurrentUserConversationsResponse +>; +export const FindCurrentUserConversationsResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(ConversationResponse), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml new file mode 100644 index 0000000000000..b44cebd1d3ec2 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.schema.yaml @@ -0,0 +1,196 @@ +openapi: 3.0.0 +info: + title: Find Conversations API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/conversations/_find: + get: + operationId: FindConversations + x-codegen-enabled: true + description: Finds conversations that match the given query. + summary: Finds conversations that match the given query. + tags: + - Conversations API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindConversationsSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: Conversations per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + 200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + required: + - page + - perPage + - total + - data + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + + /api/elastic_assistant/conversations/current_user/_find: + get: + operationId: FindCurrentUserConversations + x-codegen-enabled: true + description: Finds current user conversations that match the given query. + summary: Finds current user conversations that match the given query. + tags: + - Conversations API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindConversationsSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: Conversations per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + 200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: './common_attributes.schema.yaml#/components/schemas/ConversationResponse' + required: + - page + - perPage + - total + - data + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + FindConversationsSortField: + type: string + enum: + - 'created_at' + - 'is_default' + - 'title' + - 'updated_at' + + SortOrder: + type: string + enum: + - 'asc' + - 'desc' diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts index 4257cb9bae149..2a77b795de95f 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts @@ -24,3 +24,15 @@ export * from './evaluation/get_evaluate_route.gen'; // Capabilities Schemas export * from './capabilities/get_capabilities_route.gen'; + +// Conversations Schemas +export * from './conversations/bulk_crud_conversations_route.gen'; +export * from './conversations/common_attributes.gen'; +export * from './conversations/crud_conversation_route.gen'; +export * from './conversations/find_conversations_route.gen'; + +// Actions Connector Schemas +export * from './actions_connector/post_actions_connector_execute_route.gen'; + +// KB Schemas +export * from './knowledge_base/crud_kb_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts new file mode 100644 index 0000000000000..634cd8cb6e78b --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen.ts @@ -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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: KnowledgeBase API endpoints + * version: 2023-10-31 + */ + +/** + * AI assistant KnowledgeBase. + */ +export type KnowledgeBaseResponse = z.infer; +export const KnowledgeBaseResponse = z.object({ + /** + * Identify the success of the method execution. + */ + success: z.boolean().optional(), +}); + +export type CreateKnowledgeBaseRequestParams = z.infer; +export const CreateKnowledgeBaseRequestParams = z.object({ + /** + * The KnowledgeBase `resource` value. + */ + resource: z.string().optional(), +}); +export type CreateKnowledgeBaseRequestParamsInput = z.input< + typeof CreateKnowledgeBaseRequestParams +>; + +export type CreateKnowledgeBaseResponse = z.infer; +export const CreateKnowledgeBaseResponse = KnowledgeBaseResponse; + +export type DeleteKnowledgeBaseRequestParams = z.infer; +export const DeleteKnowledgeBaseRequestParams = z.object({ + /** + * The KnowledgeBase `resource` value. + */ + resource: z.string().optional(), +}); +export type DeleteKnowledgeBaseRequestParamsInput = z.input< + typeof DeleteKnowledgeBaseRequestParams +>; + +export type DeleteKnowledgeBaseResponse = z.infer; +export const DeleteKnowledgeBaseResponse = KnowledgeBaseResponse; + +export type ReadKnowledgeBaseRequestParams = z.infer; +export const ReadKnowledgeBaseRequestParams = z.object({ + /** + * The KnowledgeBase `resource` value. + */ + resource: z.string().optional(), +}); +export type ReadKnowledgeBaseRequestParamsInput = z.input; + +export type ReadKnowledgeBaseResponse = z.infer; +export const ReadKnowledgeBaseResponse = z.object({ + elser_exists: z.boolean().optional(), + index_exists: z.boolean().optional(), + pipeline_exists: z.boolean().optional(), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml new file mode 100644 index 0000000000000..650a7e141ce39 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.schema.yaml @@ -0,0 +1,122 @@ +openapi: 3.0.0 +info: + title: KnowledgeBase API endpoints + version: '2023-10-31' +paths: + /internal/elastic_assistant/knowledge_base/{resource}: + post: + operationId: CreateKnowledgeBase + x-codegen-enabled: true + summary: Create a KnowledgeBase + description: Create a KnowledgeBase + tags: + - KnowledgeBase API + parameters: + - name: resource + in: path + description: The KnowledgeBase `resource` value. + schema: + type: string + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/KnowledgeBaseResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + get: + operationId: ReadKnowledgeBase + x-codegen-enabled: true + description: Read a single KB + summary: Read a KnowledgeBase + tags: + - KnowledgeBase API + parameters: + - name: resource + in: path + description: The KnowledgeBase `resource` value. + schema: + type: string + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + elser_exists: + type: boolean + index_exists: + type: boolean + pipeline_exists: + type: boolean + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + delete: + operationId: DeleteKnowledgeBase + x-codegen-enabled: true + description: Deletes KnowledgeBase with the `resource` field. + summary: Deletes a KnowledgeBase + tags: + - KnowledgeBase API + parameters: + - name: resource + in: path + description: The KnowledgeBase `resource` value. + schema: + type: string + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/KnowledgeBaseResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + KnowledgeBaseResponse: + type: object + description: AI assistant KnowledgeBase. + properties: + success: + type: boolean + description: Identify the success of the method execution. diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts new file mode 100644 index 0000000000000..ce54c6a41fecc --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts @@ -0,0 +1,135 @@ +/* + * 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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Bulk Actions API endpoint + * version: 2023-10-31 + */ + +import { UUID, NonEmptyString, User } from '../conversations/common_attributes.gen'; + +export type BulkActionSkipReason = z.infer; +export const BulkActionSkipReason = z.literal('PROMPT_FIELD_NOT_MODIFIED'); + +export type BulkActionSkipResult = z.infer; +export const BulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: BulkActionSkipReason, +}); + +export type PromptDetailsInError = z.infer; +export const PromptDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type NormalizedPromptError = z.infer; +export const NormalizedPromptError = z.object({ + message: z.string(), + status_code: z.number().int(), + err_code: z.string().optional(), + prompts: z.array(PromptDetailsInError), +}); + +export type PromptResponse = z.infer; +export const PromptResponse = z.object({ + id: UUID, + timestamp: NonEmptyString.optional(), + name: z.string(), + promptType: z.string(), + content: z.string(), + isNewConversationDefault: z.boolean().optional(), + isDefault: z.boolean().optional(), + isShared: z.boolean().optional(), + updatedAt: z.string().optional(), + updatedBy: z.string().optional(), + createdAt: z.string().optional(), + createdBy: z.string().optional(), + users: z.array(User).optional(), + /** + * Kibana space + */ + namespace: z.string().optional(), +}); + +export type BulkCrudActionResults = z.infer; +export const BulkCrudActionResults = z.object({ + updated: z.array(PromptResponse), + created: z.array(PromptResponse), + deleted: z.array(z.string()), + skipped: z.array(BulkActionSkipResult), +}); + +export type BulkCrudActionSummary = z.infer; +export const BulkCrudActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type BulkCrudActionResponse = z.infer; +export const BulkCrudActionResponse = z.object({ + success: z.boolean().optional(), + status_code: z.number().int().optional(), + message: z.string().optional(), + prompts_count: z.number().int().optional(), + attributes: z.object({ + results: BulkCrudActionResults, + summary: BulkCrudActionSummary, + errors: z.array(NormalizedPromptError).optional(), + }), +}); + +export type BulkActionBase = z.infer; +export const BulkActionBase = z.object({ + /** + * Query to filter promps + */ + query: z.string().optional(), + /** + * Array of prompts IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type PromptCreateProps = z.infer; +export const PromptCreateProps = z.object({ + name: z.string(), + promptType: z.string(), + content: z.string(), + isNewConversationDefault: z.boolean().optional(), + isDefault: z.boolean().optional(), + isShared: z.boolean().optional(), +}); + +export type PromptUpdateProps = z.infer; +export const PromptUpdateProps = z.object({ + id: z.string(), + content: z.string().optional(), + isNewConversationDefault: z.boolean().optional(), + isDefault: z.boolean().optional(), + isShared: z.boolean().optional(), +}); + +export type PerformBulkActionRequestBody = z.infer; +export const PerformBulkActionRequestBody = z.object({ + delete: BulkActionBase.optional(), + create: z.array(PromptCreateProps).optional(), + update: z.array(PromptUpdateProps).optional(), +}); +export type PerformBulkActionRequestBodyInput = z.input; + +export type PerformBulkActionResponse = z.infer; +export const PerformBulkActionResponse = BulkCrudActionResponse; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml new file mode 100644 index 0000000000000..2f6a419d9bf2c --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml @@ -0,0 +1,259 @@ +openapi: 3.0.0 +info: + title: Bulk Actions API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/prompts/_bulk_action: + post: + operationId: PerformBulkAction + x-codegen-enabled: true + summary: Applies a bulk action to multiple prompts + description: The bulk action is applied to all prompts that match the filter or to the list of prompts by their IDs. + tags: + - Bulk API + requestBody: + content: + application/json: + schema: + type: object + properties: + delete: + $ref: '#/components/schemas/BulkActionBase' + create: + type: array + items: + $ref: '#/components/schemas/PromptCreateProps' + update: + type: array + items: + $ref: '#/components/schemas/PromptUpdateProps' + responses: + 200: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCrudActionResponse' + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + BulkActionSkipReason: + type: string + enum: + - PROMPT_FIELD_NOT_MODIFIED + + BulkActionSkipResult: + type: object + properties: + id: + type: string + name: + type: string + skip_reason: + $ref: '#/components/schemas/BulkActionSkipReason' + required: + - id + - skip_reason + + PromptDetailsInError: + type: object + properties: + id: + type: string + name: + type: string + required: + - id + + NormalizedPromptError: + type: object + properties: + message: + type: string + status_code: + type: integer + err_code: + type: string + prompts: + type: array + items: + $ref: '#/components/schemas/PromptDetailsInError' + required: + - message + - status_code + - prompts + + PromptResponse: + type: object + required: + - id + - name + - promptType + - content + properties: + id: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/UUID' + 'timestamp': + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/NonEmptyString' + name: + type: string + promptType: + type: string + content: + type: string + isNewConversationDefault: + type: boolean + isDefault: + type: boolean + isShared: + type: boolean + updatedAt: + type: string + updatedBy: + type: string + createdAt: + type: string + createdBy: + type: string + users: + type: array + items: + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/User' + namespace: + type: string + description: Kibana space + + BulkCrudActionResults: + type: object + properties: + updated: + type: array + items: + $ref: '#/components/schemas/PromptResponse' + created: + type: array + items: + $ref: '#/components/schemas/PromptResponse' + deleted: + type: array + items: + type: string + skipped: + type: array + items: + $ref: '#/components/schemas/BulkActionSkipResult' + required: + - updated + - created + - deleted + - skipped + + BulkCrudActionSummary: + type: object + properties: + failed: + type: integer + skipped: + type: integer + succeeded: + type: integer + total: + type: integer + required: + - failed + - skipped + - succeeded + - total + + BulkCrudActionResponse: + type: object + properties: + success: + type: boolean + status_code: + type: integer + message: + type: string + prompts_count: + type: integer + attributes: + type: object + properties: + results: + $ref: '#/components/schemas/BulkCrudActionResults' + summary: + $ref: '#/components/schemas/BulkCrudActionSummary' + errors: + type: array + items: + $ref: '#/components/schemas/NormalizedPromptError' + required: + - results + - summary + required: + - attributes + + + BulkActionBase: + x-inline: true + type: object + properties: + query: + type: string + description: Query to filter promps + ids: + type: array + description: Array of prompts IDs + minItems: 1 + items: + type: string + + PromptCreateProps: + type: object + required: + - name + - content + - promptType + properties: + name: + type: string + promptType: + type: string + content: + type: string + isNewConversationDefault: + type: boolean + isDefault: + type: boolean + isShared: + type: boolean + + PromptUpdateProps: + type: object + required: + - id + properties: + id: + type: string + content: + type: string + isNewConversationDefault: + type: boolean + isDefault: + type: boolean + isShared: + type: boolean + \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts new file mode 100644 index 0000000000000..7400b11f25c7a --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts @@ -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 { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Find Prompts API endpoint + * version: 2023-10-31 + */ + +import { PromptResponse } from './bulk_crud_prompts_route.gen'; + +export type FindPromptsSortField = z.infer; +export const FindPromptsSortField = z.enum(['created_at', 'is_default', 'name', 'updated_at']); +export type FindPromptsSortFieldEnum = typeof FindPromptsSortField.enum; +export const FindPromptsSortFieldEnum = FindPromptsSortField.enum; + +export type SortOrder = z.infer; +export const SortOrder = z.enum(['asc', 'desc']); +export type SortOrderEnum = typeof SortOrder.enum; +export const SortOrderEnum = SortOrder.enum; + +export type FindPromptsRequestQuery = z.infer; +export const FindPromptsRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindPromptsSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * Prompts per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindPromptsRequestQueryInput = z.input; + +export type FindPromptsResponse = z.infer; +export const FindPromptsResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(PromptResponse), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml new file mode 100644 index 0000000000000..b5d3b25ca2018 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.schema.yaml @@ -0,0 +1,108 @@ +openapi: 3.0.0 +info: + title: Find Prompts API endpoint + version: '2023-10-31' +paths: + /api/elastic_assistant/prompts/_find: + get: + operationId: FindPrompts + x-codegen-enabled: true + description: Finds prompts that match the given query. + summary: Finds prompts that match the given query. + tags: + - Prompts API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindPromptsSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: Prompts per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + 200: + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: './bulk_crud_prompts_route.schema.yaml#/components/schemas/PromptResponse' + required: + - page + - perPage + - total + - data + 400: + description: Generic Error + content: + application/json: + schema: + type: object + properties: + statusCode: + type: number + error: + type: string + message: + type: string + +components: + schemas: + FindPromptsSortField: + type: string + enum: + - 'created_at' + - 'is_default' + - 'name' + - 'updated_at' + + SortOrder: + type: string + enum: + - 'asc' + - 'desc' diff --git a/x-pack/packages/kbn-elastic-assistant-common/index.ts b/x-pack/packages/kbn-elastic-assistant-common/index.ts index e285be395c71c..db5648151ce41 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/index.ts @@ -21,3 +21,9 @@ export { } from './impl/data_anonymization/helpers'; export { transformRawData } from './impl/data_anonymization/transform_raw_data'; +export { + replaceAnonymizedValuesWithOriginalValues, + replaceOriginalValuesWithUuidValues, +} from './impl/data_anonymization/helpers'; + +export * from './constants'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json b/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json index 94b099694eaf4..d4d082d9c13e5 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json +++ b/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json @@ -16,5 +16,8 @@ "target/**/*" ], "kbn_references": [ + "@kbn/zod-helpers", + "@kbn/securitysolution-io-ts-utils", + "@kbn/core", ] } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx new file mode 100644 index 0000000000000..0edb5e0f4a158 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.test.tsx @@ -0,0 +1,83 @@ +/* + * 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 { + DeleteConversationParams, + GetConversationByIdParams, + deleteConversation, + getConversationById, +} from './conversations'; +import { HttpSetupMock } from '@kbn/core-http-browser-mocks'; +import { coreMock } from '@kbn/core/public/mocks'; + +let http: HttpSetupMock = coreMock.createSetup().http; + +const toasts = { + addError: jest.fn(), +}; + +describe('conversations api', () => { + beforeEach(() => { + jest.clearAllMocks(); + http = coreMock.createSetup().http; + }); + + it('should call api to delete conversation', async () => { + await act(async () => { + const deleteProps = { http, toasts, id: 'test' } as unknown as DeleteConversationParams; + + const { waitForNextUpdate } = renderHook(() => deleteConversation(deleteProps)); + await waitForNextUpdate(); + + expect(deleteProps.http.fetch).toHaveBeenCalledWith( + '/api/elastic_assistant/current_user/conversations/test', + { + method: 'DELETE', + signal: undefined, + version: '2023-10-31', + } + ); + expect(toasts.addError).not.toHaveBeenCalled(); + }); + }); + + it('should display error toast when delete api throws error', async () => { + http.fetch.mockRejectedValue(new Error('this is an error')); + const deleteProps = { http, toasts, id: 'test' } as unknown as DeleteConversationParams; + + await expect(deleteConversation(deleteProps)).rejects.toThrowError('this is an error'); + expect(toasts.addError).toHaveBeenCalled(); + }); + + it('should call api to get conversation', async () => { + await act(async () => { + const getProps = { http, toasts, id: 'test' } as unknown as GetConversationByIdParams; + const { waitForNextUpdate } = renderHook(() => getConversationById(getProps)); + await waitForNextUpdate(); + + expect(getProps.http.fetch).toHaveBeenCalledWith( + '/api/elastic_assistant/current_user/conversations/test', + { + method: 'GET', + signal: undefined, + version: '2023-10-31', + } + ); + expect(toasts.addError).not.toHaveBeenCalled(); + }); + }); + + it('should display error toast when get api throws error', async () => { + http.fetch.mockRejectedValue(new Error('this is an error')); + const getProps = { http, toasts, id: 'test' } as unknown as GetConversationByIdParams; + + await expect(getConversationById(getProps)).rejects.toThrowError('this is an error'); + expect(toasts.addError).toHaveBeenCalled(); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts new file mode 100644 index 0000000000000..54883e6aa8aef --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts @@ -0,0 +1,215 @@ +/* + * 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 { HttpSetup, IToasts } from '@kbn/core/public'; +import { i18n } from '@kbn/i18n'; +import { + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ApiConfig, + Replacement, +} from '@kbn/elastic-assistant-common'; +import { Conversation, Message } from '../../../assistant_context/types'; + +export interface GetConversationByIdParams { + http: HttpSetup; + id: string; + toasts?: IToasts; + signal?: AbortSignal | undefined; +} + +/** + * API call for getting conversation by id. + * + * @param {Object} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {string} options.id - Conversation id. + * @param {IToasts} [options.toasts] - IToasts + * @param {AbortSignal} [options.signal] - AbortSignal + * + * @returns {Promise} + */ +export const getConversationById = async ({ + http, + id, + signal, + toasts, +}: GetConversationByIdParams): Promise => { + try { + const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { + method: 'GET', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + signal, + }); + + return response as Conversation; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.conversations.getConversationError', { + defaultMessage: 'Error fetching conversation by id {id}', + values: { id }, + }), + }); + throw error; + } +}; + +export interface PostConversationParams { + http: HttpSetup; + conversation: Conversation; + toasts?: IToasts; + signal?: AbortSignal | undefined; +} + +/** + * API call for setting up the Conversation. + * + * @param {Object} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {Conversation} [options.conversation] - Conversation to be added + * @param {AbortSignal} [options.signal] - AbortSignal + * @param {IToasts} [options.toasts] - IToasts + * + * @returns {Promise} + */ +export const createConversation = async ({ + http, + conversation, + signal, + toasts, +}: PostConversationParams): Promise => { + try { + const response = await http.post(ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, { + body: JSON.stringify(conversation), + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + signal, + }); + + return response as Conversation; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.conversations.createConversationError', { + defaultMessage: 'Error creating conversation with title {title}', + values: { title: conversation.title }, + }), + }); + throw error; + } +}; + +export interface DeleteConversationParams { + http: HttpSetup; + id: string; + toasts?: IToasts; + signal?: AbortSignal | undefined; +} + +/** + * API call for deleting the Conversation. Provide a id to delete that specific resource. + * + * @param {Object} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {string} [options.title] - Conversation title to be deleted + * @param {AbortSignal} [options.signal] - AbortSignal + * @param {IToasts} [options.toasts] - IToasts + * + * @returns {Promise} + */ +export const deleteConversation = async ({ + http, + id, + signal, + toasts, +}: DeleteConversationParams): Promise => { + try { + const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { + method: 'DELETE', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + signal, + }); + + return response as boolean; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.conversations.deleteConversationError', { + defaultMessage: 'Error deleting conversation by id {id}', + values: { id }, + }), + }); + throw error; + } +}; + +export interface PutConversationMessageParams { + http: HttpSetup; + toasts?: IToasts; + conversationId: string; + title?: string; + messages?: Message[]; + apiConfig?: ApiConfig; + replacements?: Replacement[]; + excludeFromLastConversationStorage?: boolean; + signal?: AbortSignal | undefined; +} + +/** + * API call for updating conversation. + * + * @param {PutConversationMessageParams} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {string} [options.title] - Conversation title + * @param {boolean} [options.excludeFromLastConversationStorage] - Conversation excludeFromLastConversationStorage + * @param {ApiConfig} [options.apiConfig] - Conversation apiConfig + * @param {Message[]} [options.messages] - Conversation messages + * @param {IToasts} [options.toasts] - IToasts + * @param {AbortSignal} [options.signal] - AbortSignal + * + * @returns {Promise} + */ +export const updateConversation = async ({ + http, + toasts, + title, + conversationId, + messages, + apiConfig, + replacements, + excludeFromLastConversationStorage, + signal, +}: PutConversationMessageParams): Promise => { + try { + const response = await http.fetch( + `${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${conversationId}`, + { + method: 'PUT', + body: JSON.stringify({ + id: conversationId, + title, + messages, + replacements, + apiConfig, + excludeFromLastConversationStorage, + }), + headers: { + 'Content-Type': 'application/json', + }, + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + signal, + } + ); + + return response as Conversation; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.conversations.updateConversationError', { + defaultMessage: 'Error updating conversation by id {conversationId}', + values: { conversationId }, + }), + }); + throw error; + } +}; diff --git a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/delete_knowledge_base.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx similarity index 52% rename from x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/delete_knowledge_base.ts rename to x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx index b891e18ed8f50..606574b12233b 100644 --- a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/delete_knowledge_base.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx @@ -5,9 +5,6 @@ * 2.0. */ -import * as t from 'io-ts'; - -/** Validates the URL path of a DELETE request to the `/knowledge_base/{resource}` endpoint */ -export const DeleteKnowledgeBasePathParams = t.type({ - resource: t.union([t.string, t.undefined]), -}); +export * from './conversations'; +export * from './use_bulk_actions_conversations'; +export * from './use_fetch_current_user_conversations'; 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 new file mode 100644 index 0000000000000..011788adf083f --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts @@ -0,0 +1,164 @@ +/* + * 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 { bulkChangeConversations } from './use_bulk_actions_conversations'; +import { + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, +} from '@kbn/elastic-assistant-common'; +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; +import { IToasts } from '@kbn/core-notifications-browser'; + +const conversation1 = { + id: 'conversation1', + title: 'Conversation 1', + apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + replacements: [], + category: 'default', + messages: [ + { + id: 'message1', + role: 'user' as const, + content: 'Hello', + timestamp: '2024-02-14T19:58:30.299Z', + }, + { + id: 'message2', + role: 'user' as const, + content: 'How are you?', + timestamp: '2024-02-14T19:58:30.299Z', + }, + ], +}; +const conversation2 = { + ...conversation1, + id: 'conversation2', + title: 'Conversation 2', +}; +const toasts = { + addError: jest.fn(), +}; +describe('bulkChangeConversations', () => { + let httpMock: ReturnType; + + beforeEach(() => { + httpMock = httpServiceMock.createSetupContract(); + + jest.clearAllMocks(); + }); + it('should send a POST request with the correct parameters and receive a successful response', async () => { + const conversationsActions = { + create: {}, + update: {}, + delete: { ids: [] }, + }; + + await bulkChangeConversations(httpMock, conversationsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + { + method: 'POST', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + body: JSON.stringify({ + update: [], + create: [], + delete: { ids: [] }, + }), + } + ); + }); + + it('should transform the conversations dictionary to an array of conversations to create', async () => { + const conversationsActions = { + create: { + conversation1, + conversation2, + }, + update: {}, + delete: { ids: [] }, + }; + + await bulkChangeConversations(httpMock, conversationsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + { + method: 'POST', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + body: JSON.stringify({ + update: [], + create: [conversation1, conversation2], + delete: { ids: [] }, + }), + } + ); + }); + + it('should transform the conversations dictionary to an array of conversations to update', async () => { + const conversationsActions = { + update: { + conversation1, + conversation2, + }, + delete: { ids: [] }, + }; + + await bulkChangeConversations(httpMock, conversationsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + { + method: 'POST', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + body: JSON.stringify({ + update: [conversation1, conversation2], + delete: { ids: [] }, + }), + } + ); + }); + + it('should throw an error with the correct message when receiving an unsuccessful response', async () => { + httpMock.fetch.mockResolvedValue({ + success: false, + attributes: { + errors: [ + { + statusCode: 400, + message: 'Error updating conversations', + conversations: [{ id: conversation1.id, name: conversation1.title }], + }, + ], + }, + }); + const conversationsActions = { + create: {}, + update: {}, + delete: { ids: [] }, + }; + await bulkChangeConversations(httpMock, conversationsActions, toasts as unknown as IToasts); + expect(toasts.addError.mock.calls[0][0]).toEqual( + new Error('Error message: Error updating conversations for conversation Conversation 1') + ); + }); + + it('should handle cases where result.attributes.errors is undefined', async () => { + httpMock.fetch.mockResolvedValue({ + success: false, + attributes: {}, + }); + const conversationsActions = { + create: {}, + update: {}, + delete: { ids: [] }, + }; + + await bulkChangeConversations(httpMock, conversationsActions, toasts as unknown as IToasts); + expect(toasts.addError.mock.calls[0][0]).toEqual(new Error('')); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts new file mode 100644 index 0000000000000..a0ae2475233ac --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts @@ -0,0 +1,146 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { HttpSetup, IToasts } from '@kbn/core/public'; +import { + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ApiConfig, +} from '@kbn/elastic-assistant-common'; +import { Conversation, Message } from '../../../assistant_context/types'; + +export interface BulkActionSummary { + failed: number; + skipped: number; + succeeded: number; + total: number; +} + +export interface BulkActionResult { + updated: Conversation[]; + created: Conversation[]; + deleted: Conversation[]; + skipped: Conversation[]; +} + +export interface BulkActionAggregatedError { + message: string; + status_code: number; + err_code?: string; + conversations: Array<{ id: string; name?: string }>; +} + +export interface BulkActionAttributes { + summary: BulkActionSummary; + results: BulkActionResult; + errors?: BulkActionAggregatedError[]; +} + +export interface BulkActionResponse { + success?: boolean; + conversations_count?: number; + message?: string; + statusCode?: number; + attributes: BulkActionAttributes; +} + +export interface ConversationUpdateParams { + id?: string; + title?: string; + messages?: Message[]; + apiConfig?: ApiConfig; +} + +export interface ConversationsBulkActions { + update?: Record; + create?: Record; + delete?: { + ids: string[]; + }; +} + +const transformCreateActions = ( + createActions: Record, + conversationIdsToDelete?: string[] +) => + Object.keys(createActions).reduce((conversationsToCreate: Conversation[], conversationId) => { + if (createActions && !conversationIdsToDelete?.includes(conversationId)) { + conversationsToCreate.push(createActions[conversationId]); + } + return conversationsToCreate; + }, []); + +const transformUpdateActions = ( + updateActions: Record, + conversationIdsToDelete?: string[] +) => + Object.keys(updateActions).reduce( + (conversationsToUpdate: ConversationUpdateParams[], conversationId) => { + if (updateActions && !conversationIdsToDelete?.includes(conversationId)) { + conversationsToUpdate.push({ + id: conversationId, + ...updateActions[conversationId], + }); + } + return conversationsToUpdate; + }, + [] + ); + +export const bulkChangeConversations = async ( + http: HttpSetup, + conversationsActions: ConversationsBulkActions, + toasts?: IToasts +) => { + // transform conversations disctionary to array of Conversations to create + // filter marked as deleted + const conversationsToCreate = conversationsActions.create + ? transformCreateActions(conversationsActions.create, conversationsActions.delete?.ids) + : undefined; + + // transform conversations disctionary to array of Conversations to update + // filter marked as deleted + const conversationsToUpdate = conversationsActions.update + ? transformUpdateActions(conversationsActions.update, conversationsActions.delete?.ids) + : undefined; + + try { + const result = await http.fetch( + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + { + method: 'POST', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + body: JSON.stringify({ + update: conversationsToUpdate, + create: conversationsToCreate, + delete: conversationsActions.delete, + }), + } + ); + + if (!result.success) { + const serverError = result.attributes.errors + ?.map( + (e) => + `${e.status_code ? `Error code: ${e.status_code}. ` : ''}Error message: ${ + e.message + } for conversation ${e.conversations.map((c) => c.name).join(',')}` + ) + .join(',\n'); + throw new Error(serverError); + } + return result; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.conversations.bulkActionsConversationsError', { + defaultMessage: 'Error updating conversations {error}', + values: { error }, + }), + }); + } +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx new file mode 100644 index 0000000000000..b890fe57247fe --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx @@ -0,0 +1,62 @@ +/* + * 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 { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import type { ReactNode } from 'react'; +import React from 'react'; +import { + UseFetchCurrentUserConversationsParams, + useFetchCurrentUserConversations, +} from './use_fetch_current_user_conversations'; + +const statusResponse = { assistantModelEvaluation: true, assistantStreamingEnabled: false }; + +const http = { + fetch: jest.fn().mockResolvedValue(statusResponse), +}; +const onFetch = jest.fn(); + +const defaultProps = { http, onFetch } as unknown as UseFetchCurrentUserConversationsParams; + +const createWrapper = () => { + const queryClient = new QueryClient(); + // eslint-disable-next-line react/display-name + return ({ children }: { children: ReactNode }) => ( + {children} + ); +}; + +describe('useFetchCurrentUserConversations', () => { + it(`should make http request to fetch conversations`, async () => { + renderHook(() => useFetchCurrentUserConversations(defaultProps), { + wrapper: createWrapper(), + }); + + await act(async () => { + const { waitForNextUpdate } = renderHook(() => + useFetchCurrentUserConversations(defaultProps) + ); + await waitForNextUpdate(); + expect(defaultProps.http.fetch).toHaveBeenCalledWith( + '/api/elastic_assistant/current_user/conversations/_find', + { + method: 'GET', + query: { + page: 1, + perPage: 100, + }, + version: '2023-10-31', + signal: undefined, + } + ); + + expect(onFetch).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts new file mode 100644 index 0000000000000..5a1478e6725b3 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts @@ -0,0 +1,68 @@ +/* + * 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 { HttpSetup } from '@kbn/core/public'; +import { useQuery } from '@tanstack/react-query'; +import { + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, +} from '@kbn/elastic-assistant-common'; +import { Conversation } from '../../../assistant_context/types'; + +export interface FetchConversationsResponse { + page: number; + perPage: number; + total: number; + data: Conversation[]; +} + +export interface UseFetchCurrentUserConversationsParams { + http: HttpSetup; + onFetch: (result: FetchConversationsResponse) => Record; + signal?: AbortSignal | undefined; +} + +/** + * API call for fetching assistant conversations for the current user + * + * @param {Object} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {Function} [options.onFetch] - transformation function for conversations fetch result + * @param {AbortSignal} [options.signal] - AbortSignal + * + * @returns {useQuery} hook for getting the status of the conversations + */ +export const useFetchCurrentUserConversations = ({ + http, + onFetch, + signal, +}: UseFetchCurrentUserConversationsParams) => { + const query = { + page: 1, + perPage: 100, + }; + + const cachingKeys = [ + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + query.page, + query.perPage, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ]; + + return useQuery([cachingKeys, query], async () => { + const res = await http.fetch( + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + { + method: 'GET', + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + query, + signal, + } + ); + return onFetch(res); + }); +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx similarity index 80% rename from x-pack/packages/kbn-elastic-assistant/impl/assistant/api.test.tsx rename to x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx index 26a37e12c4e53..585dc12e8e7c7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx @@ -14,9 +14,9 @@ import { FetchConnectorExecuteAction, getKnowledgeBaseStatus, postKnowledgeBase, -} from './api'; -import type { Conversation, Message } from '../assistant_context/types'; -import { API_ERROR } from './translations'; +} from '.'; +import type { Conversation } from '../../assistant_context/types'; +import { API_ERROR } from '../translations'; jest.mock('@kbn/core-http-browser'); @@ -26,21 +26,20 @@ const mockHttp = { const apiConfig: Conversation['apiConfig'] = { connectorId: 'foo', + connectorTypeTitle: 'OpenAI', model: 'gpt-4', provider: OpenAiProviderType.OpenAi, }; -const messages: Message[] = [ - { content: 'This is a test', role: 'user', timestamp: new Date().toLocaleString() }, -]; const fetchConnectorArgs: FetchConnectorExecuteAction = { isEnabledRAGAlerts: false, apiConfig, isEnabledKnowledgeBase: true, assistantStreamingEnabled: true, http: mockHttp, - messages, - onNewReplacements: jest.fn(), + message: 'This is a test', + conversationId: 'test', + replacements: [], }; describe('API tests', () => { beforeEach(() => { @@ -54,10 +53,11 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"params":{"subActionParams":{"model":"gpt-4","messages":[{"role":"user","content":"This is a test"}],"n":1,"stop":null,"temperature":0.2},"subAction":"invokeAI"},"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":false}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":false,"llmType":"openai"}', headers: { 'Content-Type': 'application/json' }, method: 'POST', signal: undefined, + version: '1', } ); }); @@ -73,11 +73,12 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"params":{"subActionParams":{"model":"gpt-4","messages":[{"role":"user","content":"This is a test"}],"n":1,"stop":null,"temperature":0.2},"subAction":"invokeStream"},"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeStream","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false,"llmType":"openai"}', method: 'POST', asResponse: true, rawResponse: true, signal: undefined, + version: '1', } ); }); @@ -89,7 +90,7 @@ describe('API tests', () => { alertsIndexPattern: '.alerts-security.alerts-default', allow: ['a', 'b', 'c'], allowReplacement: ['b', 'c'], - replacements: { auuid: 'real.hostname' }, + replacements: [{ uuid: 'auuid', value: 'real.hostname' }], size: 30, }; @@ -98,12 +99,13 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"params":{"subActionParams":{"model":"gpt-4","messages":[{"role":"user","content":"This is a test"}],"n":1,"stop":null,"temperature":0.2},"subAction":"invokeAI"},"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":true,"alertsIndexPattern":".alerts-security.alerts-default","allow":["a","b","c"],"allowReplacement":["b","c"],"replacements":{"auuid":"real.hostname"},"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,"llmType":"openai","alertsIndexPattern":".alerts-security.alerts-default","allow":["a","b","c"],"allowReplacement":["b","c"],"size":30}', headers: { 'Content-Type': 'application/json', }, method: 'POST', signal: undefined, + version: '1', } ); }); @@ -120,12 +122,13 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"params":{"subActionParams":{"model":"gpt-4","messages":[{"role":"user","content":"This is a test"}],"n":1,"stop":null,"temperature":0.2},"subAction":"invokeAI"},"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false,"llmType":"openai"}', method: 'POST', headers: { 'Content-Type': 'application/json', }, signal: undefined, + version: '1', } ); }); @@ -142,12 +145,13 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"params":{"subActionParams":{"model":"gpt-4","messages":[{"role":"user","content":"This is a test"}],"n":1,"stop":null,"temperature":0.2},"subAction":"invokeAI"},"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":true}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":true,"llmType":"openai"}', method: 'POST', headers: { 'Content-Type': 'application/json', }, signal: undefined, + version: '1', } ); }); @@ -224,23 +228,6 @@ describe('API tests', () => { expect(result).toEqual({ response: API_ERROR, isStream: false, isError: true }); }); - it('returns the value of the action_input property when isEnabledKnowledgeBase is true, and `content` has properly prefixed and suffixed JSON with the action_input property', async () => { - const response = '```json\n{"action_input": "value from action_input"}\n```'; - - (mockHttp.fetch as jest.Mock).mockResolvedValue({ - status: 'ok', - data: response, - }); - - const result = await fetchConnectorExecuteAction(fetchConnectorArgs); - - expect(result).toEqual({ - response: 'value from action_input', - isStream: false, - isError: false, - }); - }); - it('returns the original content when isEnabledKnowledgeBase is true, and `content` has properly formatted JSON WITHOUT the action_input property', async () => { const response = '```json\n{"some_key": "some value"}\n```'; @@ -281,6 +268,7 @@ describe('API tests', () => { { method: 'GET', signal: undefined, + version: '1', } ); }); @@ -305,6 +293,7 @@ describe('API tests', () => { { method: 'POST', signal: undefined, + version: '1', } ); }); @@ -327,6 +316,7 @@ describe('API tests', () => { { method: 'DELETE', signal: undefined, + version: '1', } ); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx similarity index 80% rename from x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx rename to x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx index c18193c7fa0a6..bfd567d2f99ca 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx @@ -5,30 +5,25 @@ * 2.0. */ -import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/public/common'; - -import { HttpSetup, IHttpFetchError } from '@kbn/core-http-browser'; -import type { Conversation, Message } from '../assistant_context/types'; -import { API_ERROR } from './translations'; -import { MODEL_GPT_3_5_TURBO } from '../connectorland/models/model_selector/model_selector'; -import { - getFormattedMessageContent, - getOptionalRequestParams, - hasParsableResponse, -} from './helpers'; +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'; +export * from './conversations'; export interface FetchConnectorExecuteAction { + conversationId: string; isEnabledRAGAlerts: boolean; alertsIndexPattern?: string; allow?: string[]; allowReplacement?: string[]; isEnabledKnowledgeBase: boolean; assistantStreamingEnabled: boolean; - apiConfig: Conversation['apiConfig']; + apiConfig: ApiConfig; http: HttpSetup; - messages: Message[]; - onNewReplacements: (newReplacements: Record) => void; - replacements?: Record; + message?: string; + replacements: Replacement[]; signal?: AbortSignal | undefined; size?: number; } @@ -44,6 +39,7 @@ export interface FetchConnectorExecuteResponse { } export const fetchConnectorExecuteAction = async ({ + conversationId, isEnabledRAGAlerts, alertsIndexPattern, allow, @@ -51,32 +47,13 @@ export const fetchConnectorExecuteAction = async ({ isEnabledKnowledgeBase, assistantStreamingEnabled, http, - messages, - onNewReplacements, + message, replacements, apiConfig, signal, size, }: FetchConnectorExecuteAction): Promise => { - const outboundMessages = messages.map((msg) => ({ - role: msg.role, - content: msg.content, - })); - - const body = - apiConfig?.provider === OpenAiProviderType.OpenAi - ? { - model: apiConfig.model ?? MODEL_GPT_3_5_TURBO, - messages: outboundMessages, - n: 1, - stop: null, - temperature: 0.2, - } - : { - // Azure OpenAI and Bedrock invokeAI both expect this body format - messages: outboundMessages, - }; - + 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 @@ -87,29 +64,21 @@ export const fetchConnectorExecuteAction = async ({ alertsIndexPattern, allow, allowReplacement, - replacements, size, }); - const requestBody = isStream - ? { - params: { - subActionParams: body, - subAction: 'invokeStream', - }, - isEnabledKnowledgeBase, - isEnabledRAGAlerts, - ...optionalRequestParams, - } - : { - params: { - subActionParams: body, - subAction: 'invokeAI', - }, - isEnabledKnowledgeBase, - isEnabledRAGAlerts, - ...optionalRequestParams, - }; + const requestBody = { + // only used for openai, azure and bedrock ignore field + model: apiConfig?.model, + message, + subAction: isStream ? 'invokeStream' : 'invokeAI', + conversationId, + replacements, + isEnabledKnowledgeBase, + isEnabledRAGAlerts, + llmType, + ...optionalRequestParams, + }; try { if (isStream) { @@ -121,6 +90,7 @@ export const fetchConnectorExecuteAction = async ({ signal, asResponse: isStream, rawResponse: isStream, + version: '1', } ); @@ -147,7 +117,7 @@ export const fetchConnectorExecuteAction = async ({ connector_id: string; status: string; data: string; - replacements?: Record; + replacements?: Replacement[]; service_message?: string; trace_data?: { transaction_id: string; @@ -158,6 +128,7 @@ export const fetchConnectorExecuteAction = async ({ body: JSON.stringify(requestBody), headers: { 'Content-Type': 'application/json' }, signal, + version: '1', }); if (response.status !== 'ok' || !response.data) { @@ -184,15 +155,8 @@ export const fetchConnectorExecuteAction = async ({ } : undefined; - onNewReplacements(response.replacements ?? {}); - return { - response: hasParsableResponse({ - isEnabledRAGAlerts, - isEnabledKnowledgeBase, - }) - ? getFormattedMessageContent(response.data) - : response.data, + response: response.data, isError: false, isStream: false, traceData, @@ -251,6 +215,7 @@ export const getKnowledgeBaseStatus = async ({ const response = await http.fetch(path, { method: 'GET', signal, + version: '1', }); return response as GetKnowledgeBaseStatusResponse; @@ -289,6 +254,7 @@ export const postKnowledgeBase = async ({ const response = await http.fetch(path, { method: 'POST', signal, + version: '1', }); return response as PostKnowledgeBaseResponse; @@ -327,6 +293,7 @@ export const deleteKnowledgeBase = async ({ const response = await http.fetch(path, { method: 'DELETE', signal, + version: '1', }); return response as DeleteKnowledgeBaseResponse; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx index a4c0e2fe20719..036320378f84f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx @@ -6,13 +6,21 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; +import { act, fireEvent, render } from '@testing-library/react'; import { AssistantHeader } from '.'; import { TestProviders } from '../../mock/test_providers/test_providers'; -import { alertConvo, emptyWelcomeConvo } from '../../mock/conversation'; +import { alertConvo, emptyWelcomeConvo, welcomeConvo } from '../../mock/conversation'; +import { useLoadConnectors } from '../../connectorland/use_load_connectors'; +import { mockConnectors } from '../../mock/connectors'; +const onConversationSelected = jest.fn(); +const setCurrentConversation = jest.fn(); +const mockConversations = { + [alertConvo.title]: alertConvo, + [welcomeConvo.title]: welcomeConvo, +}; const testProps = { - currentConversation: emptyWelcomeConvo, + currentConversation: welcomeConvo, title: 'Test Title', docLinks: { ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', @@ -20,15 +28,45 @@ const testProps = { }, isDisabled: false, isSettingsModalVisible: false, - onConversationSelected: jest.fn(), + onConversationSelected, onToggleShowAnonymizedValues: jest.fn(), selectedConversationId: emptyWelcomeConvo.id, setIsSettingsModalVisible: jest.fn(), - setSelectedConversationId: jest.fn(), + setCurrentConversation, + onConversationDeleted: jest.fn(), showAnonymizedValues: false, + conversations: mockConversations, + refetchConversationsState: jest.fn(), }; +jest.mock('../../connectorland/use_load_connectors', () => ({ + useLoadConnectors: jest.fn(() => { + return { + data: [], + error: null, + isSuccess: true, + }; + }), +})); + +(useLoadConnectors as jest.Mock).mockReturnValue({ + data: mockConnectors, + error: null, + isSuccess: true, +}); +const mockSetApiConfig = alertConvo; +jest.mock('../use_conversation', () => ({ + useConversation: jest.fn(() => { + return { + setApiConfig: jest.fn().mockReturnValue(mockSetApiConfig), + }; + }), +})); + describe('AssistantHeader', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); it('showAnonymizedValues is not checked when currentConversation.replacements is null', () => { const { getByText, getByTestId } = render(, { wrapper: TestProviders, @@ -41,7 +79,7 @@ describe('AssistantHeader', () => { const { getByText, getByTestId } = render( , { wrapper: TestProviders, @@ -53,11 +91,7 @@ describe('AssistantHeader', () => { it('showAnonymizedValues is not checked when currentConversation.replacements has values and showAnonymizedValues is false', () => { const { getByTestId } = render( - , + , { wrapper: TestProviders, } @@ -67,16 +101,28 @@ describe('AssistantHeader', () => { it('showAnonymizedValues is checked when currentConversation.replacements has values and showAnonymizedValues is true', () => { const { getByTestId } = render( - , + , { wrapper: TestProviders, } ); expect(getByTestId('showAnonymizedValues')).toHaveAttribute('aria-checked', 'true'); }); + + it('Conversation is updated when connector change occurs', async () => { + const { getByTestId } = render(, { + wrapper: TestProviders, + }); + fireEvent.click(getByTestId('connectorSelectorPlaceholderButton')); + fireEvent.click(getByTestId('connector-selector')); + + await act(async () => { + fireEvent.click(getByTestId('connectorId')); + }); + expect(setCurrentConversation).toHaveBeenCalledWith(alertConvo); + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: alertConvo.id, + cTitle: alertConvo.title, + }); + }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx index e4c4454859d34..8dc9aa56990c7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useMemo } from 'react'; +import React, { useCallback, useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, @@ -17,7 +17,7 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; import { DocLinksStart } from '@kbn/core-doc-links-browser'; -import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/common/openai/constants'; +import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantTitle } from '../assistant_title'; import { ConversationSelector } from '../conversations/conversation_selector'; @@ -26,19 +26,20 @@ import * as i18n from '../translations'; interface OwnProps { currentConversation: Conversation; - defaultConnectorId?: string; - defaultProvider?: OpenAiProviderType; + defaultConnector?: AIConnector; docLinks: Omit; isDisabled: boolean; isSettingsModalVisible: boolean; - onConversationSelected: (cId: string) => void; + onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; + onConversationDeleted: (conversationId: string) => void; onToggleShowAnonymizedValues: (e: EuiSwitchEvent) => void; - selectedConversationId: string; setIsSettingsModalVisible: React.Dispatch>; - setSelectedConversationId: React.Dispatch>; + setCurrentConversation: React.Dispatch>; shouldDisableKeyboardShortcut?: () => boolean; showAnonymizedValues: boolean; title: string | JSX.Element; + conversations: Record; + refetchConversationsState: () => Promise; } type Props = OwnProps; @@ -49,19 +50,20 @@ type Props = OwnProps; */ export const AssistantHeader: React.FC = ({ currentConversation, - defaultConnectorId, - defaultProvider, + defaultConnector, docLinks, isDisabled, isSettingsModalVisible, onConversationSelected, + onConversationDeleted, onToggleShowAnonymizedValues, - selectedConversationId, setIsSettingsModalVisible, - setSelectedConversationId, shouldDisableKeyboardShortcut, showAnonymizedValues, title, + setCurrentConversation, + conversations, + refetchConversationsState, }) => { const showAnonymizedValuesChecked = useMemo( () => @@ -70,6 +72,16 @@ export const AssistantHeader: React.FC = ({ showAnonymizedValues, [currentConversation.replacements, showAnonymizedValues] ); + const onConversationChange = useCallback( + (updatedConversation) => { + setCurrentConversation(updatedConversation); + onConversationSelected({ + cId: updatedConversation.id, + cTitle: updatedConversation.title, + }); + }, + [onConversationSelected, setCurrentConversation] + ); return ( <> = ({ isDisabled={isDisabled} docLinks={docLinks} selectedConversation={currentConversation} + onChange={onConversationChange} title={title} /> @@ -95,12 +108,13 @@ export const AssistantHeader: React.FC = ({ `} > <> @@ -125,13 +139,14 @@ export const AssistantHeader: React.FC = ({ diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx index e866cad765456..5f02af5d3175d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx @@ -29,11 +29,12 @@ const StyledEuiModal = styled(EuiModal)` */ export const AssistantOverlay = React.memo(() => { const [isModalVisible, setIsModalVisible] = useState(false); - const [conversationId, setConversationId] = useState( + const [conversationTitle, setConversationTitle] = useState( WELCOME_CONVERSATION_TITLE ); const [promptContextId, setPromptContextId] = useState(); - const { assistantTelemetry, setShowAssistantOverlay, getConversationId } = useAssistantContext(); + const { assistantTelemetry, setShowAssistantOverlay, getLastConversationTitle } = + useAssistantContext(); // Bind `showAssistantOverlay` in SecurityAssistantContext to this modal instance const showOverlay = useCallback( @@ -41,20 +42,20 @@ export const AssistantOverlay = React.memo(() => { ({ showOverlay: so, promptContextId: pid, - conversationId: cid, + conversationTitle: cTitle, }: ShowAssistantOverlayProps) => { - const newConversationId = getConversationId(cid); + const newConversationTitle = getLastConversationTitle(cTitle); if (so) assistantTelemetry?.reportAssistantInvoked({ - conversationId: newConversationId, + conversationId: newConversationTitle, invokedBy: 'click', }); setIsModalVisible(so); setPromptContextId(pid); - setConversationId(newConversationId); + setConversationTitle(newConversationTitle); }, - [assistantTelemetry, getConversationId] + [assistantTelemetry, getLastConversationTitle] ); useEffect(() => { setShowAssistantOverlay(showOverlay); @@ -64,15 +65,15 @@ export const AssistantOverlay = React.memo(() => { const handleShortcutPress = useCallback(() => { // Try to restore the last conversation on shortcut pressed if (!isModalVisible) { - setConversationId(getConversationId()); + setConversationTitle(getLastConversationTitle()); assistantTelemetry?.reportAssistantInvoked({ invokedBy: 'shortcut', - conversationId: getConversationId(), + conversationId: getLastConversationTitle(), }); } setIsModalVisible(!isModalVisible); - }, [assistantTelemetry, isModalVisible, getConversationId]); + }, [isModalVisible, getLastConversationTitle, assistantTelemetry]); // Register keyboard listener to show the modal when cmd + ; is pressed const onKeyDown = useCallback( @@ -90,8 +91,8 @@ export const AssistantOverlay = React.memo(() => { const cleanupAndCloseModal = useCallback(() => { setIsModalVisible(false); setPromptContextId(undefined); - setConversationId(conversationId); - }, [conversationId]); + setConversationTitle(conversationTitle); + }, [conversationTitle]); const handleCloseModal = useCallback(() => { cleanupAndCloseModal(); @@ -101,7 +102,7 @@ export const AssistantOverlay = React.memo(() => { <> {isModalVisible && ( - + )} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx index bdc9f71e42fc5..fa5f4347d5069 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx @@ -14,6 +14,7 @@ const testProps = { title: 'Test Title', docLinks: { ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: '7.15' }, selectedConversation: undefined, + onChange: jest.fn(), }; describe('AssistantTitle', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx index b3dcd0ae08429..d4dee2453fd0e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx @@ -32,7 +32,8 @@ export const AssistantTitle: React.FC<{ title: string | JSX.Element; docLinks: Omit; selectedConversation: Conversation | undefined; -}> = ({ isDisabled = false, title, docLinks, selectedConversation }) => { + onChange: (updatedConversation: Conversation) => void; +}> = ({ isDisabled = false, title, docLinks, selectedConversation, onChange }) => { const selectedConnectorId = selectedConversation?.apiConfig?.connectorId; const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = docLinks; @@ -112,6 +113,7 @@ export const AssistantTitle: React.FC<{ isDisabled={isDisabled || selectedConversation === undefined} selectedConnectorId={selectedConnectorId} selectedConversation={selectedConversation} + onConnectorSelected={onChange} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx index da03b876813bc..75672e8d7375d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx @@ -6,7 +6,7 @@ */ import { HttpSetup } from '@kbn/core-http-browser'; -import { useSendMessages } from '../use_send_messages'; +import { useSendMessage } from '../use_send_message'; import { useConversation } from '../use_conversation'; import { emptyWelcomeConvo, welcomeConvo } from '../../mock/conversation'; import { defaultSystemPrompt, mockSystemPrompt } from '../../mock/system_prompt'; @@ -14,24 +14,26 @@ import { useChatSend, UseChatSendProps } from './use_chat_send'; import { renderHook } from '@testing-library/react-hooks'; import { waitFor } from '@testing-library/react'; import { TestProviders } from '../../mock/test_providers/test_providers'; +import { useAssistantContext } from '../../..'; -jest.mock('../use_send_messages'); +jest.mock('../use_send_message'); jest.mock('../use_conversation'); +jest.mock('../../..'); const setEditingSystemPromptId = jest.fn(); const setPromptTextPreview = jest.fn(); const setSelectedPromptContexts = jest.fn(); const setUserPrompt = jest.fn(); -const sendMessages = jest.fn(); -const appendMessage = jest.fn(); +const sendMessage = jest.fn(); const removeLastMessage = jest.fn(); -const appendReplacements = jest.fn(); const clearConversation = jest.fn(); +const refresh = jest.fn(); +const setCurrentConversation = jest.fn(); export const testProps: UseChatSendProps = { selectedPromptContexts: {}, allSystemPrompts: [defaultSystemPrompt, mockSystemPrompt], - currentConversation: emptyWelcomeConvo, + currentConversation: { ...emptyWelcomeConvo, id: 'an-id' }, http: { basePath: { basePath: '/mfg', @@ -45,23 +47,30 @@ export const testProps: UseChatSendProps = { setPromptTextPreview, setSelectedPromptContexts, setUserPrompt, + refresh, + setCurrentConversation, }; const robotMessage = { response: 'Response message from the robot', isError: false }; +const reportAssistantMessageSent = jest.fn(); describe('use chat send', () => { beforeEach(() => { jest.clearAllMocks(); - (useSendMessages as jest.Mock).mockReturnValue({ + (useSendMessage as jest.Mock).mockReturnValue({ isLoading: false, - sendMessages: sendMessages.mockReturnValue(robotMessage), + sendMessage: sendMessage.mockReturnValue(robotMessage), }); (useConversation as jest.Mock).mockReturnValue({ - appendMessage, - appendReplacements, removeLastMessage, clearConversation, }); + (useAssistantContext as jest.Mock).mockReturnValue({ + assistantTelemetry: { + reportAssistantMessageSent, + }, + knowledgeBase: { isEnabledKnowledgeBase: false, isEnabledRAGAlerts: false }, + }); }); - it('handleOnChatCleared clears the conversation', () => { + it('handleOnChatCleared clears the conversation', async () => { const { result } = renderHook(() => useChatSend(testProps), { wrapper: TestProviders, }); @@ -70,7 +79,10 @@ describe('use chat send', () => { expect(setPromptTextPreview).toHaveBeenCalledWith(''); expect(setUserPrompt).toHaveBeenCalledWith(''); expect(setSelectedPromptContexts).toHaveBeenCalledWith({}); - expect(clearConversation).toHaveBeenCalledWith(testProps.currentConversation.id); + await waitFor(() => { + expect(clearConversation).toHaveBeenCalledWith(testProps.currentConversation.id); + expect(refresh).toHaveBeenCalled(); + }); expect(setEditingSystemPromptId).toHaveBeenCalledWith(defaultSystemPrompt.id); }); it('handlePromptChange updates prompt successfully', () => { @@ -90,21 +102,18 @@ describe('use chat send', () => { expect(setUserPrompt).toHaveBeenCalledWith(''); await waitFor(() => { - expect(sendMessages).toHaveBeenCalled(); - const appendMessageSend = appendMessage.mock.calls[0][0]; - const appendMessageResponse = appendMessage.mock.calls[1][0]; - expect(appendMessageSend.message.content).toEqual( + expect(sendMessage).toHaveBeenCalled(); + const appendMessageSend = sendMessage.mock.calls[0][0].message; + expect(appendMessageSend).toEqual( `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\n${promptText}` ); - expect(appendMessageSend.message.role).toEqual('user'); - expect(appendMessageResponse.message.content).toEqual(robotMessage.response); - expect(appendMessageResponse.message.role).toEqual('assistant'); }); }); it('handleButtonSendMessage sends message with only provided prompt text and context already exists in convo history', async () => { const promptText = 'prompt text'; const { result } = renderHook( - () => useChatSend({ ...testProps, currentConversation: welcomeConvo }), + () => + useChatSend({ ...testProps, currentConversation: { ...welcomeConvo, id: 'welcome-id' } }), { wrapper: TestProviders, } @@ -114,24 +123,50 @@ describe('use chat send', () => { expect(setUserPrompt).toHaveBeenCalledWith(''); await waitFor(() => { - expect(sendMessages).toHaveBeenCalled(); - expect(appendMessage.mock.calls[0][0].message.content).toEqual(`\n\n${promptText}`); + expect(sendMessage).toHaveBeenCalled(); + const messages = setCurrentConversation.mock.calls[0][0].messages; + expect(messages[messages.length - 1].content).toEqual(`\n\n${promptText}`); }); }); it('handleRegenerateResponse removes the last message of the conversation, resends the convo to GenAI, and appends the message received', async () => { const { result } = renderHook( - () => useChatSend({ ...testProps, currentConversation: welcomeConvo }), + () => + useChatSend({ ...testProps, currentConversation: { ...welcomeConvo, id: 'welcome-id' } }), { wrapper: TestProviders, } ); result.current.handleRegenerateResponse(); - expect(removeLastMessage).toHaveBeenCalledWith('Welcome'); + expect(removeLastMessage).toHaveBeenCalledWith('welcome-id'); + + await waitFor(() => { + expect(sendMessage).toHaveBeenCalled(); + const messages = setCurrentConversation.mock.calls[1][0].messages; + expect(messages[messages.length - 1].content).toEqual(robotMessage.response); + }); + }); + it('sends telemetry events for both user and assistant', async () => { + const promptText = 'prompt text'; + const { result } = renderHook(() => useChatSend(testProps), { + wrapper: TestProviders, + }); + result.current.handleButtonSendMessage(promptText); + expect(setUserPrompt).toHaveBeenCalledWith(''); await waitFor(() => { - expect(sendMessages).toHaveBeenCalled(); - expect(appendMessage.mock.calls[0][0].message.content).toEqual(robotMessage.response); + expect(reportAssistantMessageSent).toHaveBeenNthCalledWith(1, { + conversationId: testProps.currentConversation.title, + role: 'user', + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: false, + }); + expect(reportAssistantMessageSent).toHaveBeenNthCalledWith(2, { + conversationId: testProps.currentConversation.title, + role: 'assistant', + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: false, + }); }); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx index 2c35ae9c495e4..e3bea5754ca7b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx @@ -7,11 +7,12 @@ import React, { useCallback } from 'react'; import { HttpSetup } from '@kbn/core-http-browser'; +import { i18n } from '@kbn/i18n'; import { SelectedPromptContext } from '../prompt_context/types'; -import { useSendMessages } from '../use_send_messages'; +import { useSendMessage } from '../use_send_message'; import { useConversation } from '../use_conversation'; import { getCombinedMessage } from '../prompt/helpers'; -import { Conversation, Message, Prompt } from '../../..'; +import { Conversation, Message, Prompt, useAssistantContext } from '../../..'; import { getMessageFromRawResponse } from '../helpers'; import { getDefaultSystemPrompt } from '../use_conversation/helpers'; @@ -27,6 +28,8 @@ export interface UseChatSendProps { React.SetStateAction> >; setUserPrompt: React.Dispatch>; + refresh: () => Promise; + setCurrentConversation: React.Dispatch>; } export interface UseChatSend { @@ -53,10 +56,17 @@ export const useChatSend = ({ setPromptTextPreview, setSelectedPromptContexts, setUserPrompt, + refresh, + setCurrentConversation, }: UseChatSendProps): UseChatSend => { - const { isLoading, sendMessages } = useSendMessages(); - const { appendMessage, appendReplacements, clearConversation, removeLastMessage } = - useConversation(); + const { + assistantTelemetry, + knowledgeBase: { isEnabledKnowledgeBase, isEnabledRAGAlerts }, + toasts, + } = useAssistantContext(); + + const { isLoading, sendMessage } = useSendMessage(); + const { clearConversation, removeLastMessage } = useConversation(); const handlePromptChange = (prompt: string) => { setPromptTextPreview(prompt); @@ -66,88 +76,121 @@ export const useChatSend = ({ // Handles sending latest user prompt to API const handleSendMessage = useCallback( async (promptText: string) => { - const onNewReplacements = (newReplacements: Record) => - appendReplacements({ - conversationId: currentConversation.id, - replacements: newReplacements, - }); - + if (!currentConversation.apiConfig) { + toasts?.addError( + new Error('The conversation needs a connector configured in order to send a message.'), + { + title: i18n.translate('xpack.elasticAssistant.knowledgeBase.setupError', { + defaultMessage: 'Error setting up Knowledge Base', + }), + } + ); + return; + } const systemPrompt = allSystemPrompts.find((prompt) => prompt.id === editingSystemPromptId); - const message = await getCombinedMessage({ + const userMessage = getCombinedMessage({ isNewChat: currentConversation.messages.length === 0, currentReplacements: currentConversation.replacements, - onNewReplacements, promptText, selectedPromptContexts, selectedSystemPrompt: systemPrompt, }); - const updatedMessages = appendMessage({ - conversationId: currentConversation.id, - message, + const replacements = userMessage.replacements ?? currentConversation.replacements; + const updatedMessages = [...currentConversation.messages, userMessage].map((m) => ({ + ...m, + content: m.content ?? '', + })); + setCurrentConversation({ + ...currentConversation, + replacements, + messages: updatedMessages, }); // Reset prompt context selection and preview before sending: setSelectedPromptContexts({}); setPromptTextPreview(''); - const rawResponse = await sendMessages({ + const rawResponse = await sendMessage({ apiConfig: currentConversation.apiConfig, http, - messages: updatedMessages, - onNewReplacements, - replacements: currentConversation.replacements ?? {}, + message: userMessage.content ?? '', + conversationId: currentConversation.id, + replacements, + }); + + assistantTelemetry?.reportAssistantMessageSent({ + conversationId: currentConversation.title, + role: userMessage.role, + isEnabledKnowledgeBase, + isEnabledRAGAlerts, }); const responseMessage: Message = getMessageFromRawResponse(rawResponse); - appendMessage({ conversationId: currentConversation.id, message: responseMessage }); + + setCurrentConversation({ + ...currentConversation, + replacements, + messages: [...updatedMessages, responseMessage], + }); + assistantTelemetry?.reportAssistantMessageSent({ + conversationId: currentConversation.title, + role: responseMessage.role, + isEnabledKnowledgeBase, + isEnabledRAGAlerts, + }); }, [ allSystemPrompts, - appendMessage, - appendReplacements, - currentConversation.apiConfig, - currentConversation.id, - currentConversation.messages.length, - currentConversation.replacements, + assistantTelemetry, + currentConversation, editingSystemPromptId, http, + isEnabledKnowledgeBase, + isEnabledRAGAlerts, selectedPromptContexts, - sendMessages, + sendMessage, + setCurrentConversation, setPromptTextPreview, setSelectedPromptContexts, + toasts, ] ); const handleRegenerateResponse = useCallback(async () => { - const onNewReplacements = (newReplacements: Record) => - appendReplacements({ - conversationId: currentConversation.id, - replacements: newReplacements, - }); - - const updatedMessages = removeLastMessage(currentConversation.id); + if (!currentConversation.apiConfig) { + toasts?.addError( + new Error('The conversation needs a connector configured in order to send a message.'), + { + title: i18n.translate('xpack.elasticAssistant.knowledgeBase.setupError', { + defaultMessage: 'Error setting up Knowledge Base', + }), + } + ); + return; + } + // remove last message from the local state immediately + setCurrentConversation({ + ...currentConversation, + messages: currentConversation.messages.slice(0, -1), + }); + const updatedMessages = (await removeLastMessage(currentConversation.id)) ?? []; - const rawResponse = await sendMessages({ + const rawResponse = await sendMessage({ apiConfig: currentConversation.apiConfig, http, - messages: updatedMessages, - onNewReplacements, - replacements: currentConversation.replacements ?? {}, + // do not send any new messages, the previous conversation is already stored + conversationId: currentConversation.id, + replacements: [], }); + const responseMessage: Message = getMessageFromRawResponse(rawResponse); - appendMessage({ conversationId: currentConversation.id, message: responseMessage }); - }, [ - appendMessage, - appendReplacements, - currentConversation.apiConfig, - currentConversation.id, - currentConversation.replacements, - http, - removeLastMessage, - sendMessages, - ]); + setCurrentConversation({ + ...currentConversation, + messages: [...updatedMessages, responseMessage], + }); + }, [currentConversation, http, removeLastMessage, sendMessage, setCurrentConversation, toasts]); const handleButtonSendMessage = useCallback( (message: string) => { @@ -157,7 +200,7 @@ export const useChatSend = ({ [handleSendMessage, setUserPrompt] ); - const handleOnChatCleared = useCallback(() => { + const handleOnChatCleared = useCallback(async () => { const defaultSystemPromptId = getDefaultSystemPrompt({ allSystemPrompts, conversation: currentConversation, @@ -166,12 +209,15 @@ export const useChatSend = ({ setPromptTextPreview(''); setUserPrompt(''); setSelectedPromptContexts({}); - clearConversation(currentConversation.id); + await clearConversation(currentConversation.id); + await refresh(); + setEditingSystemPromptId(defaultSystemPromptId); }, [ allSystemPrompts, clearConversation, currentConversation, + refresh, setEditingSystemPromptId, setPromptTextPreview, setSelectedPromptContexts, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx index 4ab45c10b021a..9399153a0583c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx @@ -25,17 +25,31 @@ const mockConversation = { setConversation, }; +const mockConversations = { + [alertConvo.title]: alertConvo, + [welcomeConvo.title]: welcomeConvo, +}; + +const mockConversationsWithCustom = { + [alertConvo.title]: alertConvo, + [welcomeConvo.title]: welcomeConvo, + [customConvo.title]: customConvo, +}; + jest.mock('../../use_conversation', () => ({ useConversation: () => mockConversation, })); const onConversationSelected = jest.fn(); +const onConversationDeleted = jest.fn(); const defaultProps = { isDisabled: false, onConversationSelected, - selectedConversationId: 'Welcome', + selectedConversationTitle: 'Welcome', defaultConnectorId: '123', defaultProvider: OpenAiProviderType.OpenAi, + conversations: mockConversations, + onConversationDeleted, }; describe('Conversation selector', () => { beforeAll(() => { @@ -46,47 +60,29 @@ describe('Conversation selector', () => { }); it('renders with correct selected conversation', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - }), - }} - > + ); expect(getByTestId('conversation-selector')).toBeInTheDocument(); - expect(getByTestId('comboBoxSearchInput')).toHaveValue(welcomeConvo.id); + expect(getByTestId('comboBoxSearchInput')).toHaveValue(welcomeConvo.title); }); it('On change, selects new item', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - }), - }} - > + ); fireEvent.click(getByTestId('comboBoxSearchInput')); - fireEvent.click(getByTestId(`convo-option-${alertConvo.id}`)); - expect(onConversationSelected).toHaveBeenCalledWith(alertConvo.id); + fireEvent.click(getByTestId(`convo-option-${alertConvo.title}`)); + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: '', + cTitle: alertConvo.title, + }); }); it('On clear input, clears selected options', () => { const { getByPlaceholderText, queryByPlaceholderText, getByTestId, queryByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - }), - }} - > + ); @@ -99,15 +95,8 @@ describe('Conversation selector', () => { it('We can add a custom option', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - }), - }} - > - + + ); const customOption = 'Custom option'; @@ -117,102 +106,75 @@ describe('Conversation selector', () => { code: 'Enter', charCode: 13, }); - expect(setConversation).toHaveBeenCalledWith({ - conversation: { - id: customOption, - messages: [], - apiConfig: { - connectorId: '123', - defaultSystemPromptId: undefined, - provider: 'OpenAI', - }, - }, + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: '', + cTitle: customOption, }); }); it('Only custom options can be deleted', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); fireEvent.click(getByTestId('comboBoxSearchInput')); expect( - within(getByTestId(`convo-option-${customConvo.id}`)).getByTestId('delete-option') + within(getByTestId(`convo-option-${customConvo.title}`)).getByTestId('delete-option') ).toBeInTheDocument(); expect( - within(getByTestId(`convo-option-${alertConvo.id}`)).queryByTestId('delete-option') + within(getByTestId(`convo-option-${alertConvo.title}`)).queryByTestId('delete-option') ).not.toBeInTheDocument(); }); it('Custom options can be deleted', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); fireEvent.click(getByTestId('comboBoxSearchInput')); fireEvent.click( - within(getByTestId(`convo-option-${customConvo.id}`)).getByTestId('delete-option') + within(getByTestId(`convo-option-${customConvo.title}`)).getByTestId('delete-option') ); jest.runAllTimers(); expect(onConversationSelected).not.toHaveBeenCalled(); - expect(deleteConversation).toHaveBeenCalledWith(customConvo.id); + expect(onConversationDeleted).toHaveBeenCalledWith(customConvo.title); }); it('Previous conversation is set to active when selected conversation is deleted', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); fireEvent.click(getByTestId('comboBoxSearchInput')); fireEvent.click( - within(getByTestId(`convo-option-${customConvo.id}`)).getByTestId('delete-option') + within(getByTestId(`convo-option-${customConvo.title}`)).getByTestId('delete-option') ); - expect(onConversationSelected).toHaveBeenCalledWith(welcomeConvo.id); + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: '', + cTitle: welcomeConvo.title, + }); }); it('Left arrow selects first conversation', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); @@ -222,21 +184,16 @@ describe('Conversation selector', () => { code: 'ArrowLeft', charCode: 27, }); - expect(onConversationSelected).toHaveBeenCalledWith(alertConvo.id); + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: '', + cTitle: alertConvo.title, + }); }); it('Right arrow selects last conversation', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); @@ -246,21 +203,16 @@ describe('Conversation selector', () => { code: 'ArrowRight', charCode: 26, }); - expect(onConversationSelected).toHaveBeenCalledWith(customConvo.id); + expect(onConversationSelected).toHaveBeenCalledWith({ + cId: '', + cTitle: customConvo.title, + }); }); it('Right arrow does nothing when ctrlKey is false', () => { const { getByTestId } = render( - ({ - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, - }), - }} - > - + + ); @@ -275,14 +227,13 @@ describe('Conversation selector', () => { it('Right arrow does nothing when conversation lenth is 1', () => { const { getByTestId } = render( - ({ - [welcomeConvo.id]: welcomeConvo, - }), - }} - > - + + ); 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 a671ad73acabe..7a7316c3e6678 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 @@ -19,7 +19,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import useEvent from 'react-use/lib/useEvent'; import { css } from '@emotion/react'; -import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/common/openai/constants'; +import { AIConnector } from '../../../connectorland/connector_selector'; import { Conversation } from '../../../..'; import { useAssistantContext } from '../../../assistant_context'; import * as i18n from './translations'; @@ -30,58 +30,68 @@ import { SystemPromptSelectorOption } from '../../prompt_editor/system_prompt/sy const isMac = navigator.platform.toLowerCase().indexOf('mac') >= 0; interface Props { - defaultConnectorId?: string; - defaultProvider?: OpenAiProviderType; - selectedConversationId: string | undefined; - onConversationSelected: (conversationId: string) => void; + defaultConnector?: AIConnector; + selectedConversationTitle: string | undefined; + onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; + onConversationDeleted: (conversationId: string) => void; shouldDisableKeyboardShortcut?: () => boolean; isDisabled?: boolean; + conversations: Record; } -const getPreviousConversationId = (conversationIds: string[], selectedConversationId: string) => { - return conversationIds.indexOf(selectedConversationId) === 0 - ? conversationIds[conversationIds.length - 1] - : conversationIds[conversationIds.indexOf(selectedConversationId) - 1]; +const getPreviousConversationTitle = ( + conversationTitles: string[], + selectedConversationTitle: string +) => { + return conversationTitles.indexOf(selectedConversationTitle) === 0 + ? conversationTitles[conversationTitles.length - 1] + : conversationTitles[conversationTitles.indexOf(selectedConversationTitle) - 1]; }; -const getNextConversationId = (conversationIds: string[], selectedConversationId: string) => { - return conversationIds.indexOf(selectedConversationId) + 1 >= conversationIds.length - ? conversationIds[0] - : conversationIds[conversationIds.indexOf(selectedConversationId) + 1]; +const getNextConversationTitle = ( + conversationTitles: string[], + selectedConversationTitle: string +) => { + return conversationTitles.indexOf(selectedConversationTitle) + 1 >= conversationTitles.length + ? conversationTitles[0] + : conversationTitles[conversationTitles.indexOf(selectedConversationTitle) + 1]; }; +const getConvoId = (cId: string, cTitle: string): string => (cId === cTitle ? '' : cId); + export type ConversationSelectorOption = EuiComboBoxOptionOption<{ isDefault: boolean; }>; export const ConversationSelector: React.FC = React.memo( ({ - selectedConversationId = DEFAULT_CONVERSATION_TITLE, - defaultConnectorId, - defaultProvider, + selectedConversationTitle = DEFAULT_CONVERSATION_TITLE, + defaultConnector, onConversationSelected, + onConversationDeleted, shouldDisableKeyboardShortcut = () => false, isDisabled = false, + conversations, }) => { - const { allSystemPrompts, conversations } = useAssistantContext(); - - const { deleteConversation, setConversation } = useConversation(); + const { allSystemPrompts } = useAssistantContext(); - const conversationIds = useMemo(() => Object.keys(conversations), [conversations]); + const { createConversation } = useConversation(); + const conversationTitles = useMemo(() => Object.keys(conversations), [conversations]); const conversationOptions = useMemo(() => { return Object.values(conversations).map((conversation) => ({ value: { isDefault: conversation.isDefault ?? false }, - label: conversation.id, + id: conversation.id !== '' ? conversation.id : conversation.title, + label: conversation.title, })); }, [conversations]); const [selectedOptions, setSelectedOptions] = useState(() => { - return conversationOptions.filter((c) => c.label === selectedConversationId) ?? []; + return conversationOptions.filter((c) => c.label === selectedConversationTitle) ?? []; }); // Callback for when user types to create a new system prompt const onCreateOption = useCallback( - (searchValue, flattenedOptions = []) => { + async (searchValue, flattenedOptions = []) => { if (!searchValue || !searchValue.trim().toLowerCase()) { return; } @@ -96,66 +106,96 @@ export const ConversationSelector: React.FC = React.memo( option.label.trim().toLowerCase() === normalizedSearchValue ) !== -1; + let createdConversation; if (!optionExists) { const newConversation: Conversation = { - id: searchValue, + id: '', + title: searchValue, + category: 'assistant', messages: [], - apiConfig: { - connectorId: defaultConnectorId, - provider: defaultProvider, - defaultSystemPromptId: defaultSystemPrompt?.id, - }, + replacements: [], + ...(defaultConnector + ? { + apiConfig: { + connectorId: defaultConnector.id, + connectorTypeTitle: defaultConnector.connectorTypeTitle, + provider: defaultConnector.apiProvider, + defaultSystemPromptId: defaultSystemPrompt?.id, + }, + } + : {}), }; - setConversation({ conversation: newConversation }); + createdConversation = await createConversation(newConversation); } - onConversationSelected(searchValue); + + onConversationSelected( + createdConversation + ? { cId: '', cTitle: createdConversation.title } + : { cId: '', cTitle: DEFAULT_CONVERSATION_TITLE } + ); }, - [ - allSystemPrompts, - defaultConnectorId, - defaultProvider, - setConversation, - onConversationSelected, - ] + [allSystemPrompts, onConversationSelected, defaultConnector, createConversation] ); // Callback for when user deletes a conversation const onDelete = useCallback( - (cId: string) => { - if (selectedConversationId === cId) { - onConversationSelected(getPreviousConversationId(conversationIds, cId)); + (deletedTitle: string) => { + onConversationDeleted(deletedTitle); + if (selectedConversationTitle === deletedTitle) { + const prevConversationTitle = getPreviousConversationTitle( + conversationTitles, + selectedConversationTitle + ); + + onConversationSelected({ + cId: getConvoId(conversations[prevConversationTitle].id, prevConversationTitle), + cTitle: prevConversationTitle, + }); } - setTimeout(() => { - deleteConversation(cId); - }, 0); }, - [conversationIds, deleteConversation, selectedConversationId, onConversationSelected] + [ + selectedConversationTitle, + onConversationDeleted, + onConversationSelected, + conversationTitles, + conversations, + ] ); const onChange = useCallback( - (newOptions: ConversationSelectorOption[]) => { - if (newOptions.length === 0) { + async (newOptions: ConversationSelectorOption[]) => { + if (newOptions.length === 0 || !newOptions?.[0].id) { setSelectedOptions([]); - } else if (conversationOptions.findIndex((o) => o.label === newOptions?.[0].label) !== -1) { - onConversationSelected(newOptions?.[0].label); + } else if (conversationOptions.findIndex((o) => o.id === newOptions?.[0].id) !== -1) { + const { id, label } = newOptions?.[0]; + + await onConversationSelected({ cId: getConvoId(id, label), cTitle: label }); } }, [conversationOptions, onConversationSelected] ); const onLeftArrowClick = useCallback(() => { - const prevId = getPreviousConversationId(conversationIds, selectedConversationId); - onConversationSelected(prevId); - }, [conversationIds, selectedConversationId, onConversationSelected]); + const prevTitle = getPreviousConversationTitle(conversationTitles, selectedConversationTitle); + + onConversationSelected({ + cId: getConvoId(conversations[prevTitle].id, prevTitle), + cTitle: prevTitle, + }); + }, [conversationTitles, selectedConversationTitle, onConversationSelected, conversations]); const onRightArrowClick = useCallback(() => { - const nextId = getNextConversationId(conversationIds, selectedConversationId); - onConversationSelected(nextId); - }, [conversationIds, selectedConversationId, onConversationSelected]); + const nextTitle = getNextConversationTitle(conversationTitles, selectedConversationTitle); + + onConversationSelected({ + cId: getConvoId(conversations[nextTitle].id, nextTitle), + cTitle: nextTitle, + }); + }, [conversationTitles, selectedConversationTitle, onConversationSelected, conversations]); // Register keyboard listener for quick conversation switching const onKeyDown = useCallback( (event: KeyboardEvent) => { - if (isDisabled || conversationIds.length <= 1) { + if (isDisabled || conversationTitles.length <= 1) { return; } @@ -177,7 +217,7 @@ export const ConversationSelector: React.FC = React.memo( } }, [ - conversationIds.length, + conversationTitles.length, isDisabled, onLeftArrowClick, onRightArrowClick, @@ -187,8 +227,8 @@ export const ConversationSelector: React.FC = React.memo( useEvent('keydown', onKeyDown); useEffect(() => { - setSelectedOptions(conversationOptions.filter((c) => c.label === selectedConversationId)); - }, [conversationOptions, selectedConversationId]); + setSelectedOptions(conversationOptions.filter((c) => c.label === selectedConversationTitle)); + }, [conversationOptions, selectedConversationTitle]); const renderOption: ( option: ConversationSelectorOption, @@ -196,6 +236,7 @@ export const ConversationSelector: React.FC = React.memo( OPTION_CONTENT_CLASSNAME: string ) => React.ReactNode = (option, searchValue, contentClassName) => { const { label, value } = option; + return ( = React.memo( color="danger" onClick={(e: React.MouseEvent) => { e.stopPropagation(); - onDelete(label); + onDelete(label ?? ''); }} data-test-subj="delete-option" css={css` @@ -264,7 +305,7 @@ export const ConversationSelector: React.FC = React.memo( options={conversationOptions} selectedOptions={selectedOptions} onChange={onChange} - onCreateOption={onCreateOption} + onCreateOption={onCreateOption as unknown as () => void} renderOption={renderOption} compressed={true} isDisabled={isDisabled} @@ -274,7 +315,7 @@ export const ConversationSelector: React.FC = React.memo( iconType="arrowLeft" aria-label={i18n.PREVIOUS_CONVERSATION_TITLE} onClick={onLeftArrowClick} - disabled={isDisabled || conversationIds.length <= 1} + disabled={isDisabled || conversationTitles.length <= 1} /> } @@ -284,7 +325,7 @@ export const ConversationSelector: React.FC = React.memo( iconType="arrowRight" aria-label={i18n.NEXT_CONVERSATION_TITLE} onClick={onRightArrowClick} - disabled={isDisabled || conversationIds.length <= 1} + disabled={isDisabled || conversationTitles.length <= 1} /> } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.test.tsx index 150784d9db4cf..e2c630bbedd14 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.test.tsx @@ -13,13 +13,13 @@ import { alertConvo, customConvo, welcomeConvo } from '../../../mock/conversatio const onConversationSelectionChange = jest.fn(); const onConversationDeleted = jest.fn(); const mockConversations = { - [alertConvo.id]: alertConvo, - [welcomeConvo.id]: welcomeConvo, - [customConvo.id]: customConvo, + [alertConvo.title]: alertConvo, + [welcomeConvo.title]: welcomeConvo, + [customConvo.title]: customConvo, }; const testProps = { conversations: mockConversations, - selectedConversationId: welcomeConvo.id, + selectedConversationTitle: welcomeConvo.title, onConversationDeleted, onConversationSelectionChange, }; @@ -30,9 +30,9 @@ describe('ConversationSelectorSettings', () => { }); it('Selects an existing conversation', () => { const { getByTestId } = render(); - expect(getByTestId('comboBoxSearchInput')).toHaveValue(welcomeConvo.id); + expect(getByTestId('comboBoxSearchInput')).toHaveValue(welcomeConvo.title); fireEvent.click(getByTestId('comboBoxToggleListButton')); - fireEvent.click(getByTestId(alertConvo.id)); + fireEvent.click(getByTestId(alertConvo.title)); expect(onConversationSelectionChange).toHaveBeenCalledWith(alertConvo); }); it('Only custom option can be deleted', () => { @@ -40,11 +40,11 @@ describe('ConversationSelectorSettings', () => { fireEvent.click(getByTestId('comboBoxToggleListButton')); // there is only one delete conversation because there is only one custom convo fireEvent.click(getByTestId('delete-conversation')); - expect(onConversationDeleted).toHaveBeenCalledWith(customConvo.id); + expect(onConversationDeleted).toHaveBeenCalledWith(customConvo.title); }); it('Selects existing conversation from the search input', () => { const { getByTestId } = render(); - fireEvent.change(getByTestId('comboBoxSearchInput'), { target: { value: alertConvo.id } }); + fireEvent.change(getByTestId('comboBoxSearchInput'), { target: { value: alertConvo.title } }); fireEvent.keyDown(getByTestId('comboBoxSearchInput'), { key: 'Enter', code: 'Enter', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx index 7e79740214a60..1060f1be75155 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx @@ -19,27 +19,34 @@ import React, { useCallback, useMemo, useState } from 'react'; import { css } from '@emotion/react'; import { Conversation } from '../../../..'; -import { UseAssistantContext } from '../../../assistant_context'; -import * as i18n from './translations'; +import * as i18n from '../conversation_selector/translations'; import { SystemPromptSelectorOption } from '../../prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector'; interface Props { - conversations: UseAssistantContext['conversations']; - onConversationDeleted: (conversationId: string) => void; + conversations: Record; + onConversationDeleted: (conversationTitle: string) => void; onConversationSelectionChange: (conversation?: Conversation | string) => void; - selectedConversationId?: string; + selectedConversationTitle: string; + shouldDisableKeyboardShortcut?: () => boolean; + isDisabled?: boolean; } -const getPreviousConversationId = (conversationIds: string[], selectedConversationId = '') => { - return conversationIds.indexOf(selectedConversationId) === 0 - ? conversationIds[conversationIds.length - 1] - : conversationIds[conversationIds.indexOf(selectedConversationId) - 1]; +const getPreviousConversationTitle = ( + conversationTitles: string[], + selectedConversationTitle: string +) => { + return conversationTitles.indexOf(selectedConversationTitle) === 0 + ? conversationTitles[conversationTitles.length - 1] + : conversationTitles[conversationTitles.indexOf(selectedConversationTitle) - 1]; }; -const getNextConversationId = (conversationIds: string[], selectedConversationId = '') => { - return conversationIds.indexOf(selectedConversationId) + 1 >= conversationIds.length - ? conversationIds[0] - : conversationIds[conversationIds.indexOf(selectedConversationId) + 1]; +const getNextConversationTitle = ( + conversationTitles: string[], + selectedConversationTitle: string +) => { + return conversationTitles.indexOf(selectedConversationTitle) + 1 >= conversationTitles.length + ? conversationTitles[0] + : conversationTitles[conversationTitles.indexOf(selectedConversationTitle) + 1]; }; export type ConversationSelectorSettingsOption = EuiComboBoxOptionOption<{ @@ -57,25 +64,28 @@ export const ConversationSelectorSettings: React.FC = React.memo( conversations, onConversationDeleted, onConversationSelectionChange, - selectedConversationId, + selectedConversationTitle, + isDisabled, + shouldDisableKeyboardShortcut = () => false, }) => { - const conversationIds = useMemo(() => Object.keys(conversations), [conversations]); + const conversationTitles = useMemo(() => Object.keys(conversations), [conversations]); const [conversationOptions, setConversationOptions] = useState< ConversationSelectorSettingsOption[] >(() => { return Object.values(conversations).map((conversation) => ({ value: { isDefault: conversation.isDefault ?? false }, - label: conversation.id, - 'data-test-subj': conversation.id, + label: conversation.title, + id: conversation.id, + 'data-test-subj': conversation.title, })); }); const selectedOptions = useMemo(() => { - return selectedConversationId - ? conversationOptions.filter((c) => c.label === selectedConversationId) ?? [] + return selectedConversationTitle + ? conversationOptions.filter((c) => c.label === selectedConversationTitle) ?? [] : []; - }, [conversationOptions, selectedConversationId]); + }, [conversationOptions, selectedConversationTitle]); const handleSelectionChange = useCallback( (conversationSelectorSettingsOption: ConversationSelectorSettingsOption[]) => { @@ -83,8 +93,10 @@ export const ConversationSelectorSettings: React.FC = React.memo( conversationSelectorSettingsOption.length === 0 ? undefined : Object.values(conversations).find( - (conversation) => conversation.id === conversationSelectorSettingsOption[0]?.label + (conversation) => + conversation.title === conversationSelectorSettingsOption[0]?.label ) ?? conversationSelectorSettingsOption[0]?.label; + onConversationSelectionChange(newConversation); }, [onConversationSelectionChange, conversations] @@ -107,6 +119,7 @@ export const ConversationSelectorSettings: React.FC = React.memo( const newOption = { value: searchValue, label: searchValue, + id: '', }; if (!optionExists) { @@ -142,21 +155,21 @@ export const ConversationSelectorSettings: React.FC = React.memo( ); const onLeftArrowClick = useCallback(() => { - const prevId = getPreviousConversationId(conversationIds, selectedConversationId); - const previousOption = conversationOptions.filter((c) => c.label === prevId); + const prevTitle = getPreviousConversationTitle(conversationTitles, selectedConversationTitle); + const previousOption = conversationOptions.filter((c) => c.label === prevTitle); handleSelectionChange(previousOption); - }, [conversationIds, conversationOptions, handleSelectionChange, selectedConversationId]); + }, [conversationTitles, selectedConversationTitle, conversationOptions, handleSelectionChange]); const onRightArrowClick = useCallback(() => { - const nextId = getNextConversationId(conversationIds, selectedConversationId); - const nextOption = conversationOptions.filter((c) => c.label === nextId); + const nextTitle = getNextConversationTitle(conversationTitles, selectedConversationTitle); + const nextOption = conversationOptions.filter((c) => c.label === nextTitle); handleSelectionChange(nextOption); - }, [conversationIds, conversationOptions, handleSelectionChange, selectedConversationId]); + }, [conversationTitles, selectedConversationTitle, conversationOptions, handleSelectionChange]); const renderOption: ( option: ConversationSelectorSettingsOption, searchValue: string, OPTION_CONTENT_CLASSNAME: string - ) => React.ReactNode = (option, searchValue, contentClassName) => { + ) => React.ReactNode = (option, searchValue) => { const { label, value } = option; return ( = React.memo( `} > = React.memo( onCreateOption={onCreateOption} renderOption={renderOption} compressed={true} + isDisabled={isDisabled} prepend={ } append={ @@ -242,7 +257,7 @@ export const ConversationSelectorSettings: React.FC = React.memo( data-test-subj="arrowRight" aria-label={i18n.NEXT_CONVERSATION_TITLE} onClick={onRightArrowClick} - disabled={conversationIds.length <= 1} + disabled={isDisabled || conversationTitles.length <= 1} /> } /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/translations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/translations.ts deleted file mode 100644 index 7ba634ded5f12..0000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/translations.ts +++ /dev/null @@ -1,57 +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 { i18n } from '@kbn/i18n'; - -export const SELECTED_CONVERSATION_LABEL = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.defaultConversationTitle', - { - defaultMessage: 'Conversations', - } -); - -export const CONVERSATION_SELECTOR_ARIA_LABEL = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.ariaLabel', - { - defaultMessage: 'Conversation selector', - } -); - -export const CONVERSATION_SELECTOR_PLACE_HOLDER = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.placeholderTitle', - { - defaultMessage: 'Select or type to create new...', - } -); - -export const CONVERSATION_SELECTOR_CUSTOM_OPTION_TEXT = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.CustomOptionTextTitle', - { - defaultMessage: 'Create new conversation:', - } -); - -export const PREVIOUS_CONVERSATION_TITLE = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.previousConversationTitle', - { - defaultMessage: 'Previous conversation', - } -); - -export const NEXT_CONVERSATION_TITLE = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.nextConversationTitle', - { - defaultMessage: 'Next conversation', - } -); - -export const DELETE_CONVERSATION = i18n.translate( - 'xpack.elasticAssistant.assistant.conversationSelectorSettings.deleteConversationTitle', - { - defaultMessage: 'Delete conversation', - } -); 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 25e2f757bea5b..fdfea79f4b073 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 @@ -15,15 +15,14 @@ import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/common/openai/c import { mockConnectors } from '../../../mock/connectors'; const mockConvos = { - [welcomeConvo.id]: welcomeConvo, - [alertConvo.id]: alertConvo, - [customConvo.id]: customConvo, + [welcomeConvo.title]: { ...welcomeConvo, id: '1234' }, + [alertConvo.title]: { ...alertConvo, id: '12345' }, + [customConvo.title]: { ...customConvo, id: '123' }, }; const onSelectedConversationChange = jest.fn(); -const setUpdatedConversationSettings = jest.fn().mockImplementation((fn) => { - return fn(mockConvos); -}); +const setConversationSettings = jest.fn(); +const setConversationsSettingsBulkActions = jest.fn(); const testProps = { allSystemPrompts: mockSystemPrompts, @@ -32,8 +31,10 @@ const testProps = { defaultProvider: OpenAiProviderType.OpenAi, http: { basePath: { get: jest.fn() } }, onSelectedConversationChange, - selectedConversation: welcomeConvo, - setUpdatedConversationSettings, + selectedConversation: mockConvos[welcomeConvo.title], + setConversationSettings, + conversationsSettingsBulkActions: {}, + setConversationsSettingsBulkActions, } as unknown as ConversationSettingsProps; jest.mock('../../../connectorland/use_load_connectors', () => ({ @@ -44,7 +45,7 @@ jest.mock('../../../connectorland/use_load_connectors', () => ({ }), })); -const mockConvo = alertConvo; +const mockConvo = mockConvos[alertConvo.title]; jest.mock('../conversation_selector_settings', () => ({ // @ts-ignore ConversationSelectorSettings: ({ onConversationDeleted, onConversationSelectionChange }) => ( @@ -59,6 +60,16 @@ jest.mock('../conversation_selector_settings', () => ({ data-test-subj="change-convo" onClick={() => onConversationSelectionChange(mockConvo)} /> +

There is a new region landmark with page level controls at the end of the document.

"`; +exports[` App renders properly 1`] = `"
markdown mock
markdown mock

Page level controls

My Canvas Workpad

There is a new region landmark with page level controls at the end of the document.

"`; diff --git a/x-pack/plugins/cases/common/ui/types.ts b/x-pack/plugins/cases/common/ui/types.ts index a6e747ac6e85b..3854c14c79de8 100644 --- a/x-pack/plugins/cases/common/ui/types.ts +++ b/x-pack/plugins/cases/common/ui/types.ts @@ -119,7 +119,7 @@ export interface ResolvedCase { export type CasesConfigurationUI = Pick< SnakeToCamelCase, - 'closureType' | 'connector' | 'mappings' | 'customFields' | 'id' | 'version' + 'closureType' | 'connector' | 'mappings' | 'customFields' | 'id' | 'version' | 'owner' >; export type CasesConfigurationUICustomField = CasesConfigurationUI['customFields'][number]; diff --git a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx index ca09d53501e5f..66b808dca5591 100644 --- a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx @@ -14,7 +14,8 @@ import { screen, waitFor } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { SeverityFilter } from './severity_filter'; -describe('Severity form field', () => { +// FLAKY: https://github.com/elastic/kibana/issues/176336 +describe.skip('Severity form field', () => { const onChange = jest.fn(); let appMockRender: AppMockRenderer; const props = { diff --git a/x-pack/plugins/cases/public/components/configure_cases/__mock__/index.tsx b/x-pack/plugins/cases/public/components/configure_cases/__mock__/index.tsx index c44e5fbc22312..e0161e437e70d 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/__mock__/index.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/__mock__/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import { mockedTestProvidersOwner } from '../../../common/mock'; import type { ActionTypeConnector } from '../../../../common/types/domain'; import { ConnectorTypes } from '../../../../common/types/domain'; import type { ActionConnector } from '../../../containers/configure/types'; @@ -17,20 +18,30 @@ export const actionTypes: ActionTypeConnector[] = actionTypesMock; export const searchURL = '?timerange=(global:(linkTo:!(),timerange:(from:1585487656371,fromStr:now-24h,kind:relative,to:1585574056371,toStr:now)),timeline:(linkTo:!(),timerange:(from:1585227005527,kind:absolute,to:1585313405527)))'; -export const useCaseConfigureResponse = { - data: { - closureType: 'close-by-user', - connector: { - fields: null, - id: 'none', - name: 'none', - type: ConnectorTypes.none, - }, - customFields: [], - mappings: [], - version: '', - id: '', +const mockConfigurationData = { + closureType: 'close-by-user', + connector: { + fields: null, + id: 'none', + name: 'none', + type: ConnectorTypes.none, }, + customFields: [], + mappings: [], + version: '', + id: '', + owner: mockedTestProvidersOwner[0], +}; + +export const useCaseConfigureResponse = { + data: mockConfigurationData, + isLoading: false, + isFetching: false, + refetch: jest.fn(), +}; + +export const useGetAllCaseConfigurationsResponse = { + data: [mockConfigurationData], isLoading: false, isFetching: false, refetch: jest.fn(), diff --git a/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx b/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx index 864ba68ff690a..8ab517c497cde 100644 --- a/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx @@ -15,6 +15,12 @@ import { FormTestComponent } from '../../common/test_utils'; import { customFieldsConfigurationMock } from '../../containers/mock'; import { CustomFields } from './custom_fields'; import * as i18n from './translations'; +import { useGetAllCaseConfigurations } from '../../containers/configure/use_get_all_case_configurations'; +import { useGetAllCaseConfigurationsResponse } from '../configure_cases/__mock__'; + +jest.mock('../../containers/configure/use_get_all_case_configurations'); + +const useGetAllCaseConfigurationsMock = useGetAllCaseConfigurations as jest.Mock; describe('CustomFields', () => { let appMockRender: AppMockRenderer; @@ -23,12 +29,21 @@ describe('CustomFields', () => { beforeEach(() => { jest.clearAllMocks(); appMockRender = createAppMockRenderer(); + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: customFieldsConfigurationMock, + }, + ], + })); }); it('renders correctly', async () => { appMockRender.render( - + ); @@ -43,9 +58,19 @@ describe('CustomFields', () => { }); it('should not show the custom fields if the configuration is empty', async () => { + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: [], + }, + ], + })); + appMockRender.render( - + ); @@ -54,11 +79,21 @@ describe('CustomFields', () => { }); it('should sort the custom fields correctly', async () => { - const reversedConfiguration = [...customFieldsConfigurationMock].reverse(); + const reversedCustomFieldsConfiguration = [...customFieldsConfigurationMock].reverse(); + + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: reversedCustomFieldsConfiguration, + }, + ], + })); appMockRender.render( - + ); @@ -79,7 +114,7 @@ describe('CustomFields', () => { appMockRender.render( - + ); diff --git a/x-pack/plugins/cases/public/components/create/custom_fields.tsx b/x-pack/plugins/cases/public/components/create/custom_fields.tsx index cfc80c125a7b9..28cebde65db27 100644 --- a/x-pack/plugins/cases/public/components/create/custom_fields.tsx +++ b/x-pack/plugins/cases/public/components/create/custom_fields.tsx @@ -9,16 +9,34 @@ import React, { useMemo } from 'react'; import { sortBy } from 'lodash'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; +import { useFormData } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import type { CasesConfigurationUI } from '../../../common/ui'; import { builderMap as customFieldsBuilderMap } from '../custom_fields/builder'; import * as i18n from './translations'; +import { useCasesContext } from '../cases_context/use_cases_context'; +import { useGetAllCaseConfigurations } from '../../containers/configure/use_get_all_case_configurations'; +import { getConfigurationByOwner } from '../../containers/configure/utils'; interface Props { isLoading: boolean; - customFieldsConfiguration: CasesConfigurationUI['customFields']; } -const CustomFieldsComponent: React.FC = ({ isLoading, customFieldsConfiguration }) => { +const CustomFieldsComponent: React.FC = ({ isLoading }) => { + const { owner } = useCasesContext(); + const [{ selectedOwner }] = useFormData<{ selectedOwner: string }>({ watch: ['selectedOwner'] }); + const { data: configurations, isLoading: isLoadingCaseConfiguration } = + useGetAllCaseConfigurations(); + + const configurationOwner: string | undefined = selectedOwner ? selectedOwner : owner[0]; + const customFieldsConfiguration = useMemo( + () => + getConfigurationByOwner({ + configurations, + owner: configurationOwner, + }).customFields ?? [], + [configurations, configurationOwner] + ); + const sortedCustomFields = useMemo( () => sortCustomFieldsByLabel(customFieldsConfiguration), [customFieldsConfiguration] @@ -33,7 +51,7 @@ const CustomFieldsComponent: React.FC = ({ isLoading, customFieldsConfigu return ( diff --git a/x-pack/plugins/cases/public/components/create/form.test.tsx b/x-pack/plugins/cases/public/components/create/form.test.tsx index 05e7788624800..65e5a378f53a8 100644 --- a/x-pack/plugins/cases/public/components/create/form.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form.test.tsx @@ -18,8 +18,8 @@ import type { FormProps } from './schema'; import { schema } from './schema'; import type { CreateCaseFormProps } from './form'; import { CreateCaseForm } from './form'; -import { useGetCaseConfiguration } from '../../containers/configure/use_get_case_configuration'; -import { useCaseConfigureResponse } from '../configure_cases/__mock__'; +import { useGetAllCaseConfigurations } from '../../containers/configure/use_get_all_case_configurations'; +import { useGetAllCaseConfigurationsResponse } from '../configure_cases/__mock__'; import { TestProviders } from '../../common/mock'; import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; @@ -27,13 +27,13 @@ import { useAvailableCasesOwners } from '../app/use_available_owners'; jest.mock('../../containers/use_get_tags'); jest.mock('../../containers/configure/use_get_supported_action_connectors'); -jest.mock('../../containers/configure/use_get_case_configuration'); +jest.mock('../../containers/configure/use_get_all_case_configurations'); jest.mock('../markdown_editor/plugins/lens/use_lens_draft_comment'); jest.mock('../app/use_available_owners'); const useGetTagsMock = useGetTags as jest.Mock; const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; -const useGetCaseConfigurationMock = useGetCaseConfiguration as jest.Mock; +const useGetAllCaseConfigurationsMock = useGetAllCaseConfigurations as jest.Mock; const useAvailableOwnersMock = useAvailableCasesOwners as jest.Mock; const initialCaseValue: FormProps = { @@ -81,7 +81,7 @@ describe('CreateCaseForm', () => { useAvailableOwnersMock.mockReturnValue(['securitySolution', 'observability']); useGetTagsMock.mockReturnValue({ data: ['test'] }); useGetConnectorsMock.mockReturnValue({ isLoading: false, data: connectorsMock }); - useGetCaseConfigurationMock.mockImplementation(() => useCaseConfigureResponse); + useGetAllCaseConfigurationsMock.mockImplementation(() => useGetAllCaseConfigurationsResponse); }); afterEach(() => { @@ -219,12 +219,14 @@ describe('CreateCaseForm', () => { }); it('should render custom fields when available', () => { - useGetCaseConfigurationMock.mockImplementation(() => ({ - ...useCaseConfigureResponse, - data: { - ...useCaseConfigureResponse.data, - customFields: customFieldsConfigurationMock, - }, + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: customFieldsConfigurationMock, + }, + ], })); const result = render( diff --git a/x-pack/plugins/cases/public/components/create/form.tsx b/x-pack/plugins/cases/public/components/create/form.tsx index fe98b7f0cf67e..984bfb669eb53 100644 --- a/x-pack/plugins/cases/public/components/create/form.tsx +++ b/x-pack/plugins/cases/public/components/create/form.tsx @@ -19,7 +19,6 @@ import { useFormContext } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_ import type { ActionConnector } from '../../../common/types/domain'; import type { CasePostRequest } from '../../../common/types/api'; -import type { CasesConfigurationUI } from '../../../common/ui'; import { Title } from './title'; import { Description, fieldName as descriptionFieldName } from './description'; import { Tags } from './tags'; @@ -66,11 +65,8 @@ const MySpinner = styled(EuiLoadingSpinner)` export interface CreateCaseFormFieldsProps { connectors: ActionConnector[]; - customFieldsConfiguration: CasesConfigurationUI['customFields']; - isLoadingCaseConfiguration: boolean; isLoadingConnectors: boolean; withSteps: boolean; - owner: string[]; draftStorageKey: string; } export interface CreateCaseFormProps extends Pick, 'withSteps'> { @@ -87,15 +83,8 @@ export interface CreateCaseFormProps extends Pick = React.memo( - ({ - connectors, - isLoadingConnectors, - withSteps, - owner, - draftStorageKey, - customFieldsConfiguration, - isLoadingCaseConfiguration, - }) => { + ({ connectors, isLoadingConnectors, withSteps, draftStorageKey }) => { + const { owner } = useCasesContext(); const { isSubmitting } = useFormContext(); const { isSyncAlertsEnabled, caseAssignmentAuthorized } = useCasesFeatures(); const availableOwners = useAvailableCasesOwners(); @@ -133,10 +122,7 @@ export const CreateCaseFormFields: React.FC = React.m - + @@ -148,8 +134,6 @@ export const CreateCaseFormFields: React.FC = React.m canShowCaseSolutionSelection, availableOwners, draftStorageKey, - customFieldsConfiguration, - isLoadingCaseConfiguration, ] ); @@ -251,11 +235,8 @@ export const CreateCaseForm: React.FC = React.memo( > diff --git a/x-pack/plugins/cases/public/components/create/form_context.test.tsx b/x-pack/plugins/cases/public/components/create/form_context.test.tsx index 7be30aea3d8ea..4c8991f0cb590 100644 --- a/x-pack/plugins/cases/public/components/create/form_context.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form_context.test.tsx @@ -15,13 +15,19 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import { usePostCase } from '../../containers/use_post_case'; import { useCreateAttachments } from '../../containers/use_create_attachments'; + import { useGetCaseConfiguration } from '../../containers/configure/use_get_case_configuration'; +import { useGetAllCaseConfigurations } from '../../containers/configure/use_get_all_case_configurations'; + import { useGetIncidentTypes } from '../connectors/resilient/use_get_incident_types'; import { useGetSeverity } from '../connectors/resilient/use_get_severity'; import { useGetIssueTypes } from '../connectors/jira/use_get_issue_types'; import { useGetChoices } from '../connectors/servicenow/use_get_choices'; import { useGetFieldsByIssueType } from '../connectors/jira/use_get_fields_by_issue_type'; -import { useCaseConfigureResponse } from '../configure_cases/__mock__'; +import { + useCaseConfigureResponse, + useGetAllCaseConfigurationsResponse, +} from '../configure_cases/__mock__'; import { sampleConnectorData, sampleData, @@ -53,6 +59,7 @@ import { ConnectorTypes, CustomFieldTypes, } from '../../../common/types/domain'; +import { useAvailableCasesOwners } from '../app/use_available_owners'; jest.mock('../../containers/use_post_case'); jest.mock('../../containers/use_create_attachments'); @@ -60,6 +67,7 @@ jest.mock('../../containers/use_post_push_to_service'); jest.mock('../../containers/use_get_tags'); jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/configure/use_get_case_configuration'); +jest.mock('../../containers/configure/use_get_all_case_configurations'); jest.mock('../connectors/resilient/use_get_incident_types'); jest.mock('../connectors/resilient/use_get_severity'); jest.mock('../connectors/jira/use_get_issue_types'); @@ -70,9 +78,11 @@ jest.mock('../../common/lib/kibana'); jest.mock('../../containers/user_profiles/api'); jest.mock('../../common/use_license'); jest.mock('../../containers/use_get_categories'); +jest.mock('../app/use_available_owners'); const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useGetCaseConfigurationMock = useGetCaseConfiguration as jest.Mock; +const useGetAllCaseConfigurationsMock = useGetAllCaseConfigurations as jest.Mock; const usePostCaseMock = usePostCase as jest.Mock; const useCreateAttachmentsMock = useCreateAttachments as jest.Mock; const usePostPushToServiceMock = usePostPushToService as jest.Mock; @@ -86,6 +96,7 @@ const pushCaseToExternalService = jest.fn(); const useKibanaMock = useKibana as jest.Mocked; const useLicenseMock = useLicense as jest.Mock; const useGetCategoriesMock = useGetCategories as jest.Mock; +const useAvailableOwnersMock = useAvailableCasesOwners as jest.Mock; const sampleId = 'case-id'; @@ -97,11 +108,8 @@ const defaultPostCase = { const defaultCreateCaseForm: CreateCaseFormFieldsProps = { isLoadingConnectors: false, - isLoadingCaseConfiguration: false, connectors: [], - customFieldsConfiguration: [], withSteps: true, - owner: ['securitySolution'], draftStorageKey: 'cases.kibana.createCase.description.markdownEditor', }; @@ -198,12 +206,14 @@ describe('Create case', () => { usePostPushToServiceMock.mockImplementation(() => defaultPostPushToService); useGetConnectorsMock.mockReturnValue(sampleConnectorData); useGetCaseConfigurationMock.mockImplementation(() => useCaseConfigureResponse); + useGetAllCaseConfigurationsMock.mockImplementation(() => useGetAllCaseConfigurationsResponse); useGetIncidentTypesMock.mockReturnValue(useGetIncidentTypesResponse); useGetSeverityMock.mockReturnValue(useGetSeverityResponse); useGetIssueTypesMock.mockReturnValue(useGetIssueTypesResponse); useGetFieldsByIssueTypeMock.mockReturnValue(useGetFieldsByIssueTypeResponse); useGetChoicesMock.mockReturnValue(useGetChoicesResponse); useGetCategoriesMock.mockReturnValue({ isLoading: false, data: categories }); + useAvailableOwnersMock.mockReturnValue(['securitySolution', 'observability', 'cases']); (useGetTags as jest.Mock).mockImplementation(() => ({ data: sampleTags, @@ -436,20 +446,22 @@ describe('Create case', () => { }); it('should submit form with custom fields', async () => { - useGetCaseConfigurationMock.mockImplementation(() => ({ - ...useCaseConfigureResponse, - data: { - ...useCaseConfigureResponse.data, - customFields: [ - ...customFieldsConfigurationMock, - { - key: 'my_custom_field_key', - type: CustomFieldTypes.TEXT, - label: 'my custom field label', - required: false, - }, - ], - }, + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: [ + ...customFieldsConfigurationMock, + { + key: 'my_custom_field_key', + type: CustomFieldTypes.TEXT, + label: 'my custom field label', + required: false, + }, + ], + }, + ], })); appMockRender.render( @@ -467,12 +479,12 @@ describe('Create case', () => { expect(await screen.findByTestId('create-case-custom-fields')).toBeInTheDocument(); - const textCustomFieldEle = await screen.findByTestId( + const textCustomField = await screen.findByTestId( `${textField.key}-${textField.type}-create-custom-field` ); - userEvent.clear(textCustomFieldEle); - userEvent.paste(textCustomFieldEle, 'My text test value 1!!'); + userEvent.clear(textCustomField); + userEvent.paste(textCustomField, 'My text test value 1'); userEvent.click( await screen.findByTestId(`${toggleField.key}-${toggleField.type}-create-custom-field`) @@ -486,9 +498,9 @@ describe('Create case', () => { request: { ...sampleDataWithoutTags, customFields: [ - { ...customFieldsMock[0], value: 'My text test value 1!!' }, - { ...customFieldsMock[1], value: false }, - { ...customFieldsMock[2] }, + customFieldsMock[0], + { ...customFieldsMock[1], value: false }, // toggled the default + customFieldsMock[2], { ...customFieldsMock[3], value: false }, { key: 'my_custom_field_key', @@ -500,6 +512,120 @@ describe('Create case', () => { }); }); + it('should change custom fields based on the selected owner', async () => { + appMockRender = createAppMockRenderer({ owner: [] }); + + const securityCustomField = { + key: 'security_custom_field', + type: CustomFieldTypes.TEXT, + label: 'security custom field', + required: false, + }; + const o11yCustomField = { + key: 'o11y_field_key', + type: CustomFieldTypes.TEXT, + label: 'observability custom field', + required: false, + }; + const stackCustomField = { + key: 'stack_field_key', + type: CustomFieldTypes.TEXT, + label: 'stack custom field', + required: false, + }; + + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + owner: 'securitySolution', + customFields: [securityCustomField], + }, + { + ...useGetAllCaseConfigurationsResponse.data[0], + owner: 'observability', + customFields: [o11yCustomField], + }, + { + ...useGetAllCaseConfigurationsResponse.data[0], + owner: 'cases', + customFields: [stackCustomField], + }, + ], + })); + + appMockRender.render( + + + + + ); + + await waitForFormToRender(screen); + await fillFormReactTestingLib({ renderer: screen }); + + const createCaseCustomFields = await screen.findByTestId('create-case-custom-fields'); + + // the default selectedOwner is securitySolution + // only the security custom field should be displayed + expect( + await within(createCaseCustomFields).findByTestId( + `${securityCustomField.key}-${securityCustomField.type}-create-custom-field` + ) + ).toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${o11yCustomField.key}-${o11yCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${stackCustomField.key}-${stackCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + + const caseOwnerSelector = await screen.findByTestId('caseOwnerSelector'); + + userEvent.click(await within(caseOwnerSelector).findByLabelText('Observability')); + + // only the o11y custom field should be displayed + expect( + await within(createCaseCustomFields).findByTestId( + `${o11yCustomField.key}-${o11yCustomField.type}-create-custom-field` + ) + ).toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${securityCustomField.key}-${securityCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${stackCustomField.key}-${stackCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + + userEvent.click(await within(caseOwnerSelector).findByLabelText('Stack')); + + // only the stack custom field should be displayed + expect( + await within(createCaseCustomFields).findByTestId( + `${stackCustomField.key}-${stackCustomField.type}-create-custom-field` + ) + ).toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${securityCustomField.key}-${securityCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + expect( + await within(createCaseCustomFields).queryByTestId( + `${o11yCustomField.key}-${o11yCustomField.type}-create-custom-field` + ) + ).not.toBeInTheDocument(); + }); + it('should select the default connector set in the configuration', async () => { useGetCaseConfigurationMock.mockImplementation(() => ({ ...useCaseConfigureResponse, @@ -514,6 +640,21 @@ describe('Create case', () => { }, })); + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data, + connector: { + id: 'servicenow-1', + name: 'SN', + type: ConnectorTypes.serviceNowITSM, + fields: null, + }, + }, + ], + })); + useGetConnectorsMock.mockReturnValue({ ...sampleConnectorData, data: connectorsMock, @@ -566,6 +707,21 @@ describe('Create case', () => { }, })); + useGetAllCaseConfigurationsMock.mockImplementation(() => ({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data, + connector: { + id: 'not-exist', + name: 'SN', + type: ConnectorTypes.serviceNowITSM, + fields: null, + }, + }, + ], + })); + useGetConnectorsMock.mockReturnValue({ ...sampleConnectorData, data: connectorsMock, diff --git a/x-pack/plugins/cases/public/components/create/form_context.tsx b/x-pack/plugins/cases/public/components/create/form_context.tsx index b48bcce96becf..04a327868418f 100644 --- a/x-pack/plugins/cases/public/components/create/form_context.tsx +++ b/x-pack/plugins/cases/public/components/create/form_context.tsx @@ -15,7 +15,7 @@ import { getNoneConnector, normalizeActionConnector } from '../configure_cases/u import { usePostCase } from '../../containers/use_post_case'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; -import type { CaseUI, CaseUICustomField } from '../../containers/types'; +import type { CasesConfigurationUI, CaseUI, CaseUICustomField } from '../../containers/types'; import type { CasePostRequest } from '../../../common/types/api'; import type { UseCreateAttachments } from '../../containers/use_create_attachments'; import { useCreateAttachments } from '../../containers/use_create_attachments'; @@ -31,7 +31,7 @@ import { useAvailableCasesOwners } from '../app/use_available_owners'; import type { CaseAttachmentsWithoutOwner } from '../../types'; import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useCreateCaseWithAttachmentsTransaction } from '../../common/apm/use_cases_transactions'; -import { useGetCaseConfiguration } from '../../containers/configure/use_get_case_configuration'; +import { useGetAllCaseConfigurations } from '../../containers/configure/use_get_all_case_configurations'; import { useApplication } from '../../common/lib/kibana/use_application'; const initialCaseValue: FormProps = { @@ -66,10 +66,7 @@ export const FormContext: React.FC = ({ }) => { const { data: connectors = [], isLoading: isLoadingConnectors } = useGetSupportedActionConnectors(); - const { - data: { customFields: customFieldsConfiguration }, - isLoading: isLoadingCaseConfiguration, - } = useGetCaseConfiguration(); + const { data: allConfigurations } = useGetAllCaseConfigurations(); const { owner } = useCasesContext(); const { appId } = useApplication(); const { isSyncAlertsEnabled } = useCasesFeatures(); @@ -98,15 +95,20 @@ export const FormContext: React.FC = ({ }; const transformCustomFieldsData = useCallback( - (customFields: Record) => { + ( + customFields: Record, + selectedCustomFieldsConfiguration: CasesConfigurationUI['customFields'] + ) => { const transformedCustomFields: CaseUI['customFields'] = []; - if (!customFields || !customFieldsConfiguration.length) { + if (!customFields || !selectedCustomFieldsConfiguration.length) { return []; } for (const [key, value] of Object.entries(customFields)) { - const configCustomField = customFieldsConfiguration.find((item) => item.key === key); + const configCustomField = selectedCustomFieldsConfiguration.find( + (item) => item.key === key + ); if (configCustomField) { transformedCustomFields.push({ key: configCustomField.key, @@ -118,7 +120,7 @@ export const FormContext: React.FC = ({ return transformedCustomFields; }, - [customFieldsConfiguration] + [] ); const submitCase = useCallback( @@ -142,7 +144,19 @@ export const FormContext: React.FC = ({ ? normalizeActionConnector(caseConnector, fields) : getNoneConnector(); - const transformedCustomFields = transformCustomFieldsData(customFields); + const configurationOwner: string | undefined = selectedOwner ? selectedOwner : owner[0]; + const selectedConfiguration = allConfigurations.find( + (element: CasesConfigurationUI) => element.owner === configurationOwner + ); + + const customFieldsConfiguration = selectedConfiguration + ? selectedConfiguration.customFields + : []; + + const transformedCustomFields = transformCustomFieldsData( + customFields, + customFieldsConfiguration ?? [] + ); const trimmedData = trimUserFormData(userFormData); @@ -184,17 +198,18 @@ export const FormContext: React.FC = ({ [ isSyncAlertsEnabled, connectors, + owner, + availableOwners, startTransaction, appId, attachments, + transformCustomFieldsData, + allConfigurations, postCase, - owner, - availableOwners, afterCaseCreated, onSuccess, createAttachments, pushCaseToExternalService, - transformCustomFieldsData, ] ); @@ -214,18 +229,10 @@ export const FormContext: React.FC = ({ React.cloneElement(child, { connectors, isLoadingConnectors, - customFieldsConfiguration, - isLoadingCaseConfiguration, }) ) : null, - [ - children, - connectors, - isLoadingConnectors, - customFieldsConfiguration, - isLoadingCaseConfiguration, - ] + [children, connectors, isLoadingConnectors] ); return (
= ({ {!customFields.length ? ( - + {i18n.NO_CUSTOM_FIELDS} diff --git a/x-pack/plugins/cases/public/components/user_actions/common.tsx b/x-pack/plugins/cases/public/components/user_actions/common.tsx index 5b61fe7066b63..0ec52b6bcf60e 100644 --- a/x-pack/plugins/cases/public/components/user_actions/common.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/common.tsx @@ -17,6 +17,7 @@ import type { UserActionBuilder, UserActionBuilderArgs } from './types'; import { UserActionCopyLink } from './copy_link'; import { UserActionMoveToReference } from './move_to_reference'; import { HoverableUserWithAvatarResolver } from '../user_profiles/hoverable_user_with_avatar_resolver'; +import { getUserActionAriaLabel } from './user_actions_aria_labels'; interface Props { userAction: SnakeToCamelCase; @@ -74,6 +75,7 @@ export const createCommonUpdateUserActionBuilder = ({ 'data-test-subj': `${userAction.type}-${userAction.action}-action-${userAction.id}`, timestamp: , timelineAvatar: icon, + timelineAvatarAriaLabel: getUserActionAriaLabel(userAction.type), actions: ( diff --git a/x-pack/plugins/cases/public/components/user_actions/translations.ts b/x-pack/plugins/cases/public/components/user_actions/translations.ts index 57ffe44d15db2..1879b0f30b8fc 100644 --- a/x-pack/plugins/cases/public/components/user_actions/translations.ts +++ b/x-pack/plugins/cases/public/components/user_actions/translations.ts @@ -109,3 +109,33 @@ export const SHOW_MORE = i18n.translate('xpack.cases.caseView.userActions.showMo export const CREATE_CASE = i18n.translate('xpack.cases.caseView.userActions.createCase', { defaultMessage: 'Created case', }); + +export const CASE_INITIATED = i18n.translate('xpack.cases.caseView.userActions.caseInitiated', { + defaultMessage: 'Case initiated', +}); + +export const CASE_DELETED = i18n.translate('xpack.cases.caseView.userActions.caseDeleted', { + defaultMessage: `Case deleted`, +}); + +export const SEVERITY = i18n.translate('xpack.cases.caseView.userActions.severity', { + defaultMessage: 'Severity', +}); + +export const TITLE = i18n.translate('xpack.cases.caseView.userActions..title', { + defaultMessage: 'Title', +}); + +export const SETTING = i18n.translate('xpack.cases.caseView.userActions..settings', { + defaultMessage: 'Settings', +}); + +export const CUSTOM_FIELDS = i18n.translate('xpack.cases.caseView.userActions.customFields', { + defaultMessage: 'Custom Fields', +}); + +export const USER_ACTION_EDITED = (type: string) => + i18n.translate('xpack.cases.caseView.userActions.edited', { + values: { type }, + defaultMessage: `Edited "{type}"`, + }); diff --git a/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.test.tsx b/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.test.tsx new file mode 100644 index 0000000000000..15653cdc31055 --- /dev/null +++ b/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.test.tsx @@ -0,0 +1,68 @@ +/* + * 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 { getUserActionAriaLabel } from './user_actions_aria_labels'; + +describe('getUserActionAriaLabel', () => { + test('should return correct label for "create_case"', () => { + expect(getUserActionAriaLabel('create_case')).toBe('Case initiated'); + }); + + test('should return correct label for "delete_case"', () => { + expect(getUserActionAriaLabel('delete_case')).toBe('Case deleted'); + }); + + test('should return correct label for "pushed"', () => { + expect(getUserActionAriaLabel('pushed')).toBe('pushed as new incident'); + }); + + test('should return correct label for "assignees"', () => { + expect(getUserActionAriaLabel('assignees')).toEqual('Edited "Assignees"'); + }); + + test('should return correct label for "comment"', () => { + expect(getUserActionAriaLabel('comment')).toBe('Edited "comment"'); + }); + + test('should return correct label for "connector"', () => { + expect(getUserActionAriaLabel('connector')).toBe( + 'Edited "External incident management system"' + ); + }); + + test('should return correct label for "description"', () => { + expect(getUserActionAriaLabel('description')).toBe('Edited "Description"'); + }); + + test('should return correct label for "tags"', () => { + expect(getUserActionAriaLabel('tags')).toBe('Edited "Tags"'); + }); + + test('should return correct label for "title"', () => { + expect(getUserActionAriaLabel('title')).toBe('Edited "Title"'); + }); + + test('should return correct label for "status"', () => { + expect(getUserActionAriaLabel('status')).toBe('Edited "Status"'); + }); + + test('should return correct label for "settings"', () => { + expect(getUserActionAriaLabel('settings')).toBe('Edited "Settings"'); + }); + + test('should return correct label for "severity"', () => { + expect(getUserActionAriaLabel('severity')).toBe('Edited "Severity"'); + }); + + test('should return correct label for "category"', () => { + expect(getUserActionAriaLabel('category')).toBe('Edited "Category"'); + }); + + test('should return correct label for "customFields"', () => { + expect(getUserActionAriaLabel('customFields')).toBe('Edited "Custom Fields"'); + }); +}); diff --git a/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.tsx b/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.tsx new file mode 100644 index 0000000000000..84a0f2b41fcdd --- /dev/null +++ b/x-pack/plugins/cases/public/components/user_actions/user_actions_aria_labels.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 type { UserActionTypes } from '../../../common/types/domain'; +import * as i18n from './translations'; + +export const getUserActionAriaLabel = (type: keyof typeof UserActionTypes) => { + const actionsMap: Record = { + assignees: i18n.ASSIGNEES, + comment: i18n.COMMENT, + connector: i18n.CONNECTORS, + description: i18n.DESCRIPTION, + pushed: i18n.PUSHED_NEW_INCIDENT, + tags: i18n.TAGS, + title: i18n.TITLE, + status: i18n.STATUS, + settings: i18n.SETTING, + severity: i18n.SEVERITY, + create_case: i18n.CASE_INITIATED, + delete_case: i18n.CASE_DELETED, + category: i18n.CATEGORY, + customFields: i18n.CUSTOM_FIELDS, + }; + + switch (type) { + case 'create_case': + case 'delete_case': + case 'pushed': + return actionsMap[type]; + default: + return i18n.USER_ACTION_EDITED(actionsMap[type]); + } +}; diff --git a/x-pack/plugins/cases/public/containers/configure/api.test.ts b/x-pack/plugins/cases/public/containers/configure/api.test.ts index 435feee55c895..8a7659c38a272 100644 --- a/x-pack/plugins/cases/public/containers/configure/api.test.ts +++ b/x-pack/plugins/cases/public/containers/configure/api.test.ts @@ -18,7 +18,6 @@ import { casesConfigurationsMock, } from './mock'; import { ConnectorTypes } from '../../../common/types/domain'; -import { SECURITY_SOLUTION_OWNER } from '../../../common/constants'; import { KibanaServices } from '../../common/lib/kibana'; import { actionTypesMock, connectorsMock } from '../../common/mock/connectors'; @@ -57,29 +56,24 @@ describe('Case Configuration API', () => { }); test('check url, method, signal', async () => { - await getCaseConfigure({ signal: abortCtrl.signal, owner: [SECURITY_SOLUTION_OWNER] }); + await getCaseConfigure({ signal: abortCtrl.signal }); expect(fetchMock).toHaveBeenCalledWith('/api/cases/configure', { method: 'GET', signal: abortCtrl.signal, - query: { - owner: [SECURITY_SOLUTION_OWNER], - }, }); }); test('happy path', async () => { const resp = await getCaseConfigure({ signal: abortCtrl.signal, - owner: [SECURITY_SOLUTION_OWNER], }); - expect(resp).toEqual(casesConfigurationsMock); + expect(resp).toEqual([casesConfigurationsMock]); }); test('return null on empty response', async () => { fetchMock.mockResolvedValue({}); const resp = await getCaseConfigure({ signal: abortCtrl.signal, - owner: [SECURITY_SOLUTION_OWNER], }); expect(resp).toBe(null); }); diff --git a/x-pack/plugins/cases/public/containers/configure/api.ts b/x-pack/plugins/cases/public/containers/configure/api.ts index 975cec77a3a1b..ae72d839d3ac5 100644 --- a/x-pack/plugins/cases/public/containers/configure/api.ts +++ b/x-pack/plugins/cases/public/containers/configure/api.ts @@ -41,23 +41,23 @@ export const getSupportedActionConnectors = async ({ export const getCaseConfigure = async ({ signal, - owner, -}: ApiProps & { owner: string[] }): Promise => { +}: ApiProps): Promise => { const response = await KibanaServices.get().http.fetch(CASE_CONFIGURE_URL, { method: 'GET', signal, - query: { ...(owner.length > 0 ? { owner } : {}) }, }); if (!isEmpty(response)) { const decodedConfigs = decodeCaseConfigurationsResponse(response); if (Array.isArray(decodedConfigs) && decodedConfigs.length > 0) { - const configuration = convertToCamelCase< - GetConfigureResponse[number], - SnakeToCamelCase - >(decodedConfigs[0]); - - return convertConfigureResponseToCasesConfigure(configuration); + return decodedConfigs.map((decodedConfig) => { + const configuration = convertToCamelCase< + GetConfigureResponse[number], + SnakeToCamelCase + >(decodedConfig); + + return convertConfigureResponseToCasesConfigure(configuration); + }); } } @@ -115,7 +115,7 @@ export const fetchActionTypes = async ({ signal }: ApiProps): Promise ): CasesConfigurationUI => { - const { id, version, mappings, customFields, closureType, connector } = configuration; + const { id, version, mappings, customFields, closureType, connector, owner } = configuration; - return { id, version, mappings, customFields, closureType, connector }; + return { id, version, mappings, customFields, closureType, connector, owner }; }; diff --git a/x-pack/plugins/cases/public/containers/configure/mock.ts b/x-pack/plugins/cases/public/containers/configure/mock.ts index 79e423e42db89..a5946ca319641 100644 --- a/x-pack/plugins/cases/public/containers/configure/mock.ts +++ b/x-pack/plugins/cases/public/containers/configure/mock.ts @@ -74,4 +74,5 @@ export const casesConfigurationsMock: CasesConfigurationUI = { mappings: [], version: 'WzHJ12', customFields: customFieldsConfigurationMock, + owner: 'securitySolution', }; diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.test.ts b/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.test.ts new file mode 100644 index 0000000000000..fdd46d640e5fc --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.test.ts @@ -0,0 +1,96 @@ +/* + * 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 { useGetAllCaseConfigurations } from './use_get_all_case_configurations'; +import * as api from './api'; +import type { AppMockRenderer } from '../../common/mock'; +import { createAppMockRenderer } from '../../common/mock'; + +jest.mock('./api'); + +describe('Use get all case configurations hook', () => { + let appMockRender: AppMockRenderer; + + beforeEach(() => { + appMockRender = createAppMockRenderer(); + jest.clearAllMocks(); + }); + + it('returns all available configurations', async () => { + const spy = jest.spyOn(api, 'getCaseConfigure'); + spy.mockResolvedValue([ + // @ts-expect-error: no need to define all properties + { id: 'my-configuration-1', owner: '1' }, + // @ts-expect-error: no need to define all properties + { id: 'my-configuration-2', owner: '2' }, + // @ts-expect-error: no need to define all properties + { id: 'my-configuration-3', owner: '3' }, + ]); + + const { result, waitForNextUpdate } = renderHook(() => useGetAllCaseConfigurations(), { + wrapper: appMockRender.AppWrapper, + }); + + await waitForNextUpdate(); + + /** + * Ensures that the initial data is returned≠ + * before fetching + */ + // @ts-expect-error: data is defined + expect(result.all[0].data).toEqual([ + { + closureType: 'close-by-user', + connector: { fields: null, id: 'none', name: 'none', type: '.none' }, + customFields: [], + id: '', + mappings: [], + version: '', + owner: '', + }, + ]); + + /** + * The response after fetching + */ + // @ts-expect-error: data is defined + expect(result.all[1].data).toEqual([ + { id: 'my-configuration-1', owner: '1' }, + { id: 'my-configuration-2', owner: '2' }, + { id: 'my-configuration-3', owner: '3' }, + ]); + }); + + it('returns the initial configuration if none is available', async () => { + const spy = jest.spyOn(api, 'getCaseConfigure'); + spy.mockResolvedValue([]); + + const { result, waitForNextUpdate } = renderHook(() => useGetAllCaseConfigurations(), { + wrapper: appMockRender.AppWrapper, + }); + + await waitForNextUpdate(); + + /** + * Ensures that the initial data is returned≠ + * before fetching + */ + // @ts-expect-error: data is defined + expect(result.all[0].data).toEqual([ + { + closureType: 'close-by-user', + connector: { fields: null, id: 'none', name: 'none', type: '.none' }, + customFields: [], + id: '', + mappings: [], + version: '', + owner: '', + }, + ]); + }); +}); diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.tsx new file mode 100644 index 0000000000000..700c1df858cd3 --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/use_get_all_case_configurations.tsx @@ -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 type { CasesConfigurationUI } from '../types'; +import { initialConfiguration } from './utils'; +import { useGetCaseConfigurationsQuery } from './use_get_case_configurations_query'; + +const transformConfiguration = (data: CasesConfigurationUI[] | null): CasesConfigurationUI[] => { + if (data) { + return data; + } + + return [initialConfiguration]; +}; + +export const useGetAllCaseConfigurations = () => + useGetCaseConfigurationsQuery({ select: transformConfiguration }); + +export type UseGetAllCaseConfigurations = ReturnType; diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx index d625e247cb572..e504bd22e9cc8 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx @@ -8,13 +8,11 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetCaseConfiguration } from './use_get_case_configuration'; import * as api from './api'; -import { waitFor } from '@testing-library/react'; -import { useToasts } from '../../common/lib/kibana'; import type { AppMockRenderer } from '../../common/mock'; -import { createAppMockRenderer } from '../../common/mock'; +import { mockedTestProvidersOwner, createAppMockRenderer } from '../../common/mock'; +import { initialConfiguration } from './utils'; jest.mock('./api'); -jest.mock('../../common/lib/kibana'); describe('Use get case configuration hook', () => { let appMockRender: AppMockRenderer; @@ -24,44 +22,59 @@ describe('Use get case configuration hook', () => { jest.clearAllMocks(); }); - it('calls the api when invoked with the correct parameters', async () => { + it('returns a configuration matching the owner', async () => { const spy = jest.spyOn(api, 'getCaseConfigure'); + const targetConfiguration = { + ...initialConfiguration, + id: 'my-new-configuration-3', + owner: mockedTestProvidersOwner[0], // used in the AppMockRenderer + }; + spy.mockResolvedValue([ + { ...initialConfiguration, id: 'my-new-configuration-1', owner: 'foo' }, + { ...initialConfiguration, id: 'my-new-configuration-2', owner: 'bar' }, + targetConfiguration, + ]); - const { waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { + const { result, waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { wrapper: appMockRender.AppWrapper, }); + await waitForNextUpdate(); - expect(spy).toHaveBeenCalledWith({ - owner: ['securitySolution'], - signal: expect.any(AbortSignal), - }); + /** + * The response after fetching + */ + expect(result.current.data).toEqual(targetConfiguration); }); - it('shows a toast error when the api return an error', async () => { - const addError = jest.fn(); - (useToasts as jest.Mock).mockReturnValue({ addError }); - - const spy = jest.spyOn(api, 'getCaseConfigure').mockRejectedValue(new Error('error')); + it('returns the initial configuration if none matches the owner', async () => { + const spy = jest.spyOn(api, 'getCaseConfigure'); + const targetConfiguration = { + ...initialConfiguration, + id: 'my-new-configuration-1', + owner: 'foo', + }; + spy.mockResolvedValue([ + targetConfiguration, + { ...initialConfiguration, id: 'my-new-configuration-2', owner: 'bar' }, + ]); - const { waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { + const { result, waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { wrapper: appMockRender.AppWrapper, }); - await waitForNextUpdate(); - await waitFor(() => { - expect(spy).toHaveBeenCalledWith({ - owner: ['securitySolution'], - signal: expect.any(AbortSignal), - }); + await waitForNextUpdate(); - expect(addError).toHaveBeenCalled(); - }); + /** + * The response after fetching + */ + expect(result.current.data).toEqual(initialConfiguration); }); - it('returns the default if the response is null', async () => { + it('returns the initial configuration if none exists', async () => { const spy = jest.spyOn(api, 'getCaseConfigure'); - spy.mockResolvedValue(null); + + spy.mockResolvedValue([]); const { result, waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { wrapper: appMockRender.AppWrapper, @@ -69,20 +82,17 @@ describe('Use get case configuration hook', () => { await waitForNextUpdate(); - expect(result.current.data).toEqual({ - closureType: 'close-by-user', - connector: { fields: null, id: 'none', name: 'none', type: '.none' }, - customFields: [], - id: '', - mappings: [], - version: '', - }); + /** + * The response after fetching + */ + expect(result.current.data).toEqual(initialConfiguration); }); - it('sets the initial data correctly', async () => { + it('returns the initial configuration if the owner is undefined', async () => { + appMockRender = createAppMockRenderer({ owner: [] }); const spy = jest.spyOn(api, 'getCaseConfigure'); - // @ts-expect-error: no need to define all properties - spy.mockResolvedValue({ id: 'my-new-configuration' }); + + spy.mockResolvedValue([]); const { result, waitForNextUpdate } = renderHook(() => useGetCaseConfiguration(), { wrapper: appMockRender.AppWrapper, @@ -90,24 +100,9 @@ describe('Use get case configuration hook', () => { await waitForNextUpdate(); - /** - * Ensures that the initial data are returned - * before fetching - */ - // @ts-expect-error: data are defined - expect(result.all[0].data).toEqual({ - closureType: 'close-by-user', - connector: { fields: null, id: 'none', name: 'none', type: '.none' }, - customFields: [], - id: '', - mappings: [], - version: '', - }); - /** * The response after fetching */ - // @ts-expect-error: data are defined - expect(result.all[1].data).toEqual({ id: 'my-new-configuration' }); + expect(result.current.data).toEqual(initialConfiguration); }); }); diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.tsx index 3a7656ca051ea..500005f291a89 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.tsx @@ -4,54 +4,18 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -import { useQuery } from '@tanstack/react-query'; -import { ConnectorTypes } from '../../../common'; -import * as i18n from './translations'; -import { getCaseConfigure } from './api'; -import type { ServerError } from '../../types'; -import { casesQueriesKeys } from '../constants'; -import type { CasesConfigurationUI } from '../types'; -import { useCasesToast } from '../../common/use_cases_toast'; import { useCasesContext } from '../../components/cases_context/use_cases_context'; - -const initialConfiguration: CasesConfigurationUI = { - closureType: 'close-by-user', - connector: { - fields: null, - id: 'none', - name: 'none', - type: ConnectorTypes.none, - }, - customFields: [], - mappings: [], - version: '', - id: '', -}; - -const transformConfiguration = (data: CasesConfigurationUI | null): CasesConfigurationUI => { - if (data) { - return data; - } - - return initialConfiguration; -}; +import type { CasesConfigurationUI } from '../types'; +import { useGetCaseConfigurationsQuery } from './use_get_case_configurations_query'; +import { getConfigurationByOwner } from './utils'; export const useGetCaseConfiguration = () => { const { owner } = useCasesContext(); - const { showErrorToast } = useCasesToast(); - return useQuery( - casesQueriesKeys.configuration({ owner }), - ({ signal }) => getCaseConfigure({ owner, signal }), - { - select: transformConfiguration, - onError: (error: ServerError) => { - showErrorToast(error, { title: i18n.ERROR_TITLE }); - }, - initialData: initialConfiguration, - } - ); + return useGetCaseConfigurationsQuery({ + select: (data: CasesConfigurationUI[] | null) => + getConfigurationByOwner({ configurations: data, owner: owner[0] }), + }); }; export type UseGetCaseConfiguration = ReturnType; diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.test.ts b/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.test.ts new file mode 100644 index 0000000000000..adc06ad840d90 --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.test.ts @@ -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 { renderHook } from '@testing-library/react-hooks'; +import { useGetCaseConfigurationsQuery } from './use_get_case_configurations_query'; +import * as api from './api'; +import { waitFor } from '@testing-library/react'; +import { useToasts } from '../../common/lib/kibana'; +import type { AppMockRenderer } from '../../common/mock'; +import { createAppMockRenderer } from '../../common/mock'; +import { initialConfiguration } from './utils'; + +jest.mock('./api'); +jest.mock('../../common/lib/kibana'); + +describe('Use get case configurations query hook', () => { + let appMockRender: AppMockRenderer; + + beforeEach(() => { + appMockRender = createAppMockRenderer(); + jest.clearAllMocks(); + }); + + it('calls the api when invoked with the correct parameters', async () => { + const spy = jest.spyOn(api, 'getCaseConfigure'); + + renderHook( + () => useGetCaseConfigurationsQuery({ select: (data) => data || initialConfiguration }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + await waitFor(() => { + expect(spy).toHaveBeenCalledWith({ + signal: expect.any(AbortSignal), + }); + }); + }); + + it('shows a toast error when the api return an error', async () => { + const addError = jest.fn(); + (useToasts as jest.Mock).mockReturnValue({ addError }); + + const spy = jest.spyOn(api, 'getCaseConfigure').mockRejectedValue(new Error('error')); + + renderHook( + () => useGetCaseConfigurationsQuery({ select: (data) => data || initialConfiguration }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + await waitFor(() => { + expect(spy).toHaveBeenCalledWith({ + signal: expect.any(AbortSignal), + }); + + expect(addError).toHaveBeenCalled(); + }); + }); + + it('calls select correctly', async () => { + const select = jest.fn(); + const spy = jest.spyOn(api, 'getCaseConfigure'); + const data = [{ ...initialConfiguration, id: 'my-new-configuration' }]; + + spy.mockResolvedValue(data); + + renderHook(() => useGetCaseConfigurationsQuery({ select }), { + wrapper: appMockRender.AppWrapper, + }); + + await waitFor(() => { + expect(select).toHaveBeenCalledWith(data); + }); + }); +}); diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.tsx new file mode 100644 index 0000000000000..54caf69d1ab0b --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configurations_query.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 { useQuery } from '@tanstack/react-query'; +import * as i18n from './translations'; +import { getCaseConfigure } from './api'; +import type { ServerError } from '../../types'; +import { casesQueriesKeys } from '../constants'; +import type { CasesConfigurationUI } from '../types'; +import { useCasesToast } from '../../common/use_cases_toast'; +import { initialConfiguration } from './utils'; + +export const useGetCaseConfigurationsQuery = ({ + select, +}: { + select: (data: CasesConfigurationUI[] | null) => T; +}) => { + const { showErrorToast } = useCasesToast(); + + return useQuery( + casesQueriesKeys.configuration({}), + ({ signal }) => getCaseConfigure({ signal }), + { + select, + onError: (error: ServerError) => { + showErrorToast(error, { title: i18n.ERROR_TITLE }); + }, + initialData: [initialConfiguration], + } + ); +}; + +export type UseGetAllCaseConfigurations = ReturnType; diff --git a/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.test.tsx b/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.test.tsx index a5eed1e41a007..509b0e72cd1fc 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.test.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.test.tsx @@ -12,7 +12,7 @@ import * as api from './api'; import { useToasts } from '../../common/lib/kibana'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; -import { ConnectorTypes, SECURITY_SOLUTION_OWNER } from '../../../common'; +import { ConnectorTypes } from '../../../common'; import { casesQueriesKeys } from '../constants'; jest.mock('./api'); @@ -130,9 +130,7 @@ describe('useCreateAttachments', () => { await waitForNextUpdate(); - expect(queryClientSpy).toHaveBeenCalledWith( - casesQueriesKeys.configuration({ owner: [SECURITY_SOLUTION_OWNER] }) - ); + expect(queryClientSpy).toHaveBeenCalledWith(casesQueriesKeys.configuration({})); }); it('shows the success toaster', async () => { diff --git a/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.tsx b/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.tsx index 65f2c63800cde..95162d23aa391 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_persist_configuration.tsx @@ -47,7 +47,7 @@ export const usePersistConfiguration = () => { { mutationKey: casesMutationsKeys.persistCaseConfiguration, onSuccess: () => { - queryClient.invalidateQueries(casesQueriesKeys.configuration({ owner })); + queryClient.invalidateQueries(casesQueriesKeys.configuration({})); showSuccessToast(i18n.SUCCESS_CONFIGURE); }, onError: (error: ServerError) => { diff --git a/x-pack/plugins/cases/public/containers/configure/utils.test.ts b/x-pack/plugins/cases/public/containers/configure/utils.test.ts new file mode 100644 index 0000000000000..c5ed1c260cc35 --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/utils.test.ts @@ -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 type { CasesConfigurationUI } from '../types'; +import { getConfigurationByOwner, initialConfiguration } from './utils'; + +describe('Utils', () => { + describe('getConfigurationByOwner', () => { + it('returns the initial configuration if there are no configurations', () => { + expect(getConfigurationByOwner({ configurations: [], owner: 'foobar' })).toBe( + initialConfiguration + ); + }); + + it('returns the initial configuration if the owner is not found', () => { + expect( + getConfigurationByOwner({ + configurations: [{ owner: 'foo' }, { owner: 'bar' }] as CasesConfigurationUI[], + owner: 'foobar', + }) + ).toBe(initialConfiguration); + }); + + it('returns the expected configuration when searching by owner', () => { + expect( + getConfigurationByOwner({ + configurations: [{ owner: 'foobar' }, { owner: 'bar' }] as CasesConfigurationUI[], + owner: 'foobar', + }) + ).toMatchInlineSnapshot(` + Object { + "owner": "foobar", + } + `); + }); + + it('returns the initial configuration if the owner is undefined', () => { + expect( + getConfigurationByOwner({ + configurations: [{ owner: 'foobar' }, { owner: 'bar' }] as CasesConfigurationUI[], + owner: undefined, + }) + ).toBe(initialConfiguration); + }); + }); +}); diff --git a/x-pack/plugins/cases/public/containers/configure/utils.ts b/x-pack/plugins/cases/public/containers/configure/utils.ts new file mode 100644 index 0000000000000..164b9c0f94945 --- /dev/null +++ b/x-pack/plugins/cases/public/containers/configure/utils.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 type { CasesConfigurationUI } from '../types'; +import { ConnectorTypes } from '../../../common'; + +export const initialConfiguration: CasesConfigurationUI = { + closureType: 'close-by-user', + connector: { + fields: null, + id: 'none', + name: 'none', + type: ConnectorTypes.none, + }, + customFields: [], + mappings: [], + version: '', + id: '', + owner: '', +}; + +export const getConfigurationByOwner = ({ + configurations, + owner, +}: { + configurations: CasesConfigurationUI[] | null; + owner: string | undefined; +}): CasesConfigurationUI => { + if (!configurations || !configurations.length || !owner) { + return initialConfiguration; + } + + // fallback to configuration 0 which was what happened before + return configurations.find((element) => element.owner === owner) ?? initialConfiguration; +}; diff --git a/x-pack/plugins/cloud/public/plugin.tsx b/x-pack/plugins/cloud/public/plugin.tsx index f0e7b8f713e80..760436bfd4f6c 100644 --- a/x-pack/plugins/cloud/public/plugin.tsx +++ b/x-pack/plugins/cloud/public/plugin.tsx @@ -22,6 +22,7 @@ export interface CloudConfigType { cname?: string; base_url?: string; profile_url?: string; + deployments_url?: string; deployment_url?: string; projects_url?: string; billing_url?: string; @@ -38,6 +39,9 @@ export interface CloudConfigType { } interface CloudUrls { + /** Link to all deployments page on cloud */ + deploymentsUrl?: string; + /** Link to the current deployment on cloud */ deploymentUrl?: string; profileUrl?: string; billingUrl?: string; @@ -122,6 +126,7 @@ export class CloudPlugin implements Plugin { }; const { + deploymentsUrl, deploymentUrl, profileUrl, billingUrl, @@ -141,6 +146,7 @@ export class CloudPlugin implements Plugin { isCloudEnabled: this.isCloudEnabled, cloudId: this.config.id, billingUrl, + deploymentsUrl, deploymentUrl, profileUrl, organizationUrl, @@ -165,6 +171,7 @@ export class CloudPlugin implements Plugin { profile_url: profileUrl, billing_url: billingUrl, organization_url: organizationUrl, + deployments_url: deploymentsUrl, deployment_url: deploymentUrl, base_url: baseUrl, performance_url: performanceUrl, @@ -172,6 +179,7 @@ export class CloudPlugin implements Plugin { projects_url: projectsUrl, } = this.config; + const fullCloudDeploymentsUrl = getFullCloudUrl(baseUrl, deploymentsUrl); const fullCloudDeploymentUrl = getFullCloudUrl(baseUrl, deploymentUrl); const fullCloudProfileUrl = getFullCloudUrl(baseUrl, profileUrl); const fullCloudBillingUrl = getFullCloudUrl(baseUrl, billingUrl); @@ -182,6 +190,7 @@ export class CloudPlugin implements Plugin { const fullCloudSnapshotsUrl = `${fullCloudDeploymentUrl}/${CLOUD_SNAPSHOTS_PATH}`; return { + deploymentsUrl: fullCloudDeploymentsUrl, deploymentUrl: fullCloudDeploymentUrl, profileUrl: fullCloudProfileUrl, billingUrl: fullCloudBillingUrl, diff --git a/x-pack/plugins/cloud/public/types.ts b/x-pack/plugins/cloud/public/types.ts index 36c2aa256e88f..a3d448668d8aa 100644 --- a/x-pack/plugins/cloud/public/types.ts +++ b/x-pack/plugins/cloud/public/types.ts @@ -20,6 +20,12 @@ export interface CloudStart { * Cloud ID. Undefined if not running on Cloud. */ cloudId?: string; + /** + * This is the path to the Cloud deployments management page. The value is already prepended with `baseUrl`. + * + * @example `{baseUrl}/deployments` + */ + deploymentsUrl?: string; /** * This is the path to the Cloud deployment management page for the deployment to which the Kibana instance belongs. The value is already prepended with `baseUrl`. * diff --git a/x-pack/plugins/cloud/server/config.ts b/x-pack/plugins/cloud/server/config.ts index cb5a1e12b09bd..39babd548d99a 100644 --- a/x-pack/plugins/cloud/server/config.ts +++ b/x-pack/plugins/cloud/server/config.ts @@ -22,6 +22,7 @@ const configSchema = schema.object({ apm: schema.maybe(apmConfigSchema), base_url: schema.maybe(schema.string()), cname: schema.maybe(schema.string()), + deployments_url: schema.string({ defaultValue: '/deployments' }), deployment_url: schema.maybe(schema.string()), id: schema.maybe(schema.string()), billing_url: schema.maybe(schema.string()), @@ -51,6 +52,7 @@ export const config: PluginConfigDescriptor = { exposeToBrowser: { base_url: true, cname: true, + deployments_url: true, deployment_url: true, id: true, billing_url: true, diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts index cd45c28f90d8a..1b856fd343d26 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts @@ -36,6 +36,7 @@ export const useCloudSecurityGrouping = ({ groupingLevel, groupingLocalStorageKey, maxGroupingLevels = DEFAULT_MAX_GROUPING_LEVELS, + groupsUnit, }: { dataView: DataView; groupingTitle: string; @@ -47,6 +48,7 @@ export const useCloudSecurityGrouping = ({ groupingLevel?: number; groupingLocalStorageKey: string; maxGroupingLevels?: number; + groupsUnit?: (n: number, parentSelectedGroup: string, hasNullGroup: boolean) => string; }) => { const getPersistedDefaultQuery = usePersistedQuery(getDefaultQuery); const { urlQuery, setUrlQuery } = useUrlQuery(getPersistedDefaultQuery); @@ -63,6 +65,7 @@ export const useCloudSecurityGrouping = ({ unit, groupPanelRenderer, groupStatsRenderer, + groupsUnit, }, defaultGroupingOptions, fields: dataView.fields, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx index 06de63c3cff0c..3604bb6693def 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx @@ -33,6 +33,7 @@ import { AzureCredentialsType } from '../../../../common/types_old'; import { SetupFormat, useAzureCredentialsForm } from './hooks'; import { getPosturePolicy, NewPackagePolicyPostureInput } from '../utils'; import { CspRadioOption, RadioGroup } from '../csp_boxed_radio_group'; +import { CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS } from '../../test_subjects'; interface AzureSetupInfoContentProps { integrationLink: string; @@ -41,7 +42,7 @@ interface AzureSetupInfoContentProps { export const AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE = 'arm_template'; export const AZURE_MANUAL_CREDENTIAL_TYPE = 'manual'; -const AzureSetupInfoContent = ({ integrationLink }: AzureSetupInfoContentProps) => { +export const AzureSetupInfoContent = ({ integrationLink }: AzureSetupInfoContentProps) => { return ( <> @@ -78,16 +79,18 @@ const getSetupFormatOptions = (): CspRadioOption[] => [ { id: AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, label: 'ARM Template', + testId: CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE, }, { id: AZURE_MANUAL_CREDENTIAL_TYPE, label: i18n.translate('xpack.csp.azureIntegration.setupFormatOptions.manual', { defaultMessage: 'Manual', }), + testId: CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL, }, ]; -interface Props { +export interface AzureCredentialsFormProps { newPolicy: NewPackagePolicy; input: Extract; updatePolicy(updatedPolicy: NewPackagePolicy): void; @@ -97,7 +100,7 @@ interface Props { disabled: boolean; } -const ARM_TEMPLATE_EXTERNAL_DOC_URL = +export const ARM_TEMPLATE_EXTERNAL_DOC_URL = 'https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/'; const ArmTemplateSetup = ({ @@ -248,7 +251,7 @@ const TemporaryManualSetup = ({ integrationLink }: { integrationLink: string }) const AZURE_MINIMUM_PACKAGE_VERSION = '1.6.0'; const AZURE_MANUAL_FIELDS_PACKAGE_VERSION = '1.7.0'; -const AzureInputVarFields = ({ +export const AzureInputVarFields = ({ fields, onChange, }: { @@ -266,6 +269,7 @@ const AzureInputVarFields = ({ fullWidth value={field.value || ''} onChange={(event) => onChange(field.id, event.target.value)} + data-test-subj={field.testSubj} /> )} {field.type === 'text' && ( @@ -274,6 +278,7 @@ const AzureInputVarFields = ({ fullWidth value={field.value || ''} onChange={(event) => onChange(field.id, event.target.value)} + data-test-subj={field.testSubj} /> )} @@ -290,7 +295,7 @@ export const AzureCredentialsForm = ({ onChange, setIsValid, disabled, -}: Props) => { +}: AzureCredentialsFormProps) => { const { group, fields, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx new file mode 100644 index 0000000000000..1d763fe8cfa57 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx @@ -0,0 +1,70 @@ +/* + * 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 { EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; + +import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants'; +import { + AzureCredentialsFormProps, + AzureSetupInfoContent, + AzureInputVarFields, + ARM_TEMPLATE_EXTERNAL_DOC_URL, +} from './azure_credentials_form'; +import { getPosturePolicy } from '../utils'; +import { + getAzureCredentialsFormOptions, + getInputVarsFields, +} from './get_azure_credentials_form_options'; + +export const AzureCredentialsFormAgentless = ({ + input, + newPolicy, + updatePolicy, +}: AzureCredentialsFormProps) => { + const integrationLink = cspIntegrationDocsNavigation.cspm.getStartedPath; + const options = getAzureCredentialsFormOptions(); + const group = options.service_principal_with_client_secret; + const fields = getInputVarsFields(input, group.fields); + + return ( + <> + + + { + updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); + }} + /> + + + + {i18n.translate('xpack.csp.azureIntegration.documentationLinkText', { + defaultMessage: 'documentation', + })} + + ), + }} + /> + + + ); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx index c4135ecaf2eb7..d9ec4c4c0b20b 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx @@ -11,8 +11,12 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiText } from '@elastic/eui'; import { AzureCredentialsType } from '../../../../common/types_old'; +import { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS } from '../../test_subjects'; -export type AzureCredentialsFields = Record; +export type AzureCredentialsFields = Record< + string, + { label: string; type?: 'password' | 'text'; testSubj?: string } +>; export interface AzureOptionValue { label: string; @@ -48,6 +52,7 @@ export const getInputVarsFields = (input: NewPackagePolicyInput, fields: AzureCr id, label: field.label, type: field.type || 'text', + testSubj: field.testSubj, value: inputVar.value, } as const; }); @@ -91,13 +96,20 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ defaultMessage: 'Service principal with Client Secret', }), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_secret': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientSecretLabel', { defaultMessage: 'Client Secret', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET, }, }, }, @@ -106,18 +118,26 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ defaultMessage: 'Service principal with Client Certificate', }), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_certificate_path': { label: i18n.translate('xpack.csp.azureIntegration.clientCertificatePathLabel', { defaultMessage: 'Client Certificate Path', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_CERTIFICATE_PATH, }, 'azure.credentials.client_certificate_password': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientCertificatePasswordLabel', { defaultMessage: 'Client Certificate Password', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_CERTIFICATE_PASSWORD, }, }, }, @@ -127,18 +147,26 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ { defaultMessage: 'Service principal with Client Username and Password' } ), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_username': { label: i18n.translate('xpack.csp.azureIntegration.clientUsernameLabel', { defaultMessage: 'Client Username', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_USERNAME, }, 'azure.credentials.client_password': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientPasswordLabel', { defaultMessage: 'Client Password', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_PASSWORD, }, }, }, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx index 49c33f343e099..56159f1d899dd 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx @@ -10,16 +10,16 @@ import semverCoerce from 'semver/functions/coerce'; import semverValid from 'semver/functions/valid'; import { css } from '@emotion/react'; import { + EuiCallOut, EuiFieldText, + EuiForm, EuiFormRow, + EuiHorizontalRule, + EuiSelect, EuiSpacer, EuiText, - EuiTitle, - EuiSelect, - EuiForm, - EuiCallOut, EuiTextArea, - EuiHorizontalRule, + EuiTitle, } from '@elastic/eui'; import type { NewPackagePolicy } from '@kbn/fleet-plugin/public'; import { NewPackagePolicyInput, PackageInfo } from '@kbn/fleet-plugin/common'; @@ -42,16 +42,11 @@ import { MIN_VERSION_GCP_CIS } from '../../../common/constants'; import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants'; import { ReadDocumentation } from '../aws_credentials_form/aws_credentials_form'; import { GCP_ORGANIZATION_ACCOUNT } from '../policy_template_form'; -import { GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ } from '../../test_subjects'; - -export const CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS = { - GOOGLE_CLOUD_SHELL_SETUP: 'google_cloud_shell_setup_test_id', - PROJECT_ID: 'project_id_test_id', - ORGANIZATION_ID: 'organization_id_test_id', - CREDENTIALS_TYPE: 'credentials_type_test_id', - CREDENTIALS_FILE: 'credentials_file_test_id', - CREDENTIALS_JSON: 'credentials_json_test_id', -}; +import { + CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS, + GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, +} from '../../test_subjects'; + type SetupFormatGCP = 'google_cloud_shell' | 'manual'; export const GCPSetupInfoContent = () => ( <> diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts index b960ac3c48e20..887c8c471d9c8 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts @@ -244,7 +244,7 @@ const getPolicyMock = ( { type: CLOUDBEAT_AZURE, policy_template: 'cspm', - enabled: false, + enabled: type === CLOUDBEAT_AZURE, streams: [ { enabled: type === CLOUDBEAT_AZURE, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx index 3c8b767d1bde7..ef680d95c7166 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx @@ -45,11 +45,14 @@ import { useParams } from 'react-router-dom'; import { createReactQueryResponse } from '../../test/fixtures/react_query'; import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api'; import { usePackagePolicyList } from '../../common/api/use_package_policy_list'; -import { CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS } from './gcp_credentials_form/gcp_credential_form'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { AWS_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, AWS_CREDENTIALS_TYPE_SELECTOR_TEST_SUBJ, + CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS, + CIS_AZURE_OPTION_TEST_SUBJ, + CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS, + CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS, CIS_GCP_OPTION_TEST_SUBJ, GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ, @@ -1533,7 +1536,7 @@ describe('', () => { expect(credentialsTypSelector).not.toBeInTheDocument(); expect(credentialsFileField).not.toBeInTheDocument(); - // select agent-based and check for cloudformation option + // select agent-based and check for Cloud Shell option userEvent.click(setupTechnologySelector); const agentBasedOption = getByRole('option', { name: /agent-based/i }); await waitForEuiPopoverOpen(); @@ -1589,24 +1592,95 @@ describe('', () => { expect(credentialsFileField).not.toBeInTheDocument(); }); - it('should not render setup technology selector for KSPM', () => { + it('should render setup technology selector for Azure for Organisation type', async () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - const newPackagePolicy = getMockPolicyEKS(); + const newPackagePolicy = getMockPolicyAzure(); - const { queryByTestId } = render( - + const { getByTestId, queryByTestId, getByRole } = render( + ); + // navigate to Azure + const azureSelectorButton = getByTestId(CIS_AZURE_OPTION_TEST_SUBJ); + userEvent.click(azureSelectorButton); + const setupTechnologySelectorAccordion = queryByTestId( SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ ); + const setupTechnologySelector = getByTestId(SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ); + const tenantIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID); + const clientIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID); + const clientSecretField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET); + const armTemplateSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE); + const manualSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); - expect(setupTechnologySelectorAccordion).not.toBeInTheDocument(); + // default state for Azure with the Org selected + expect(setupTechnologySelectorAccordion).toBeInTheDocument(); + expect(setupTechnologySelector).toBeInTheDocument(); + expect(setupTechnologySelector).toHaveTextContent(/agentless/i); + expect(tenantIdField).toBeInTheDocument(); + expect(clientIdField).toBeInTheDocument(); + expect(clientSecretField).toBeInTheDocument(); + expect(armTemplateSelector).not.toBeInTheDocument(); + expect(manualSelector).not.toBeInTheDocument(); + + // select agent-based and check for ARM template option + userEvent.click(setupTechnologySelector); + const agentBasedOption = getByRole('option', { name: /agent-based/i }); + await waitForEuiPopoverOpen(); + userEvent.click(agentBasedOption); + await waitFor(() => { + expect(getByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE)).toBeInTheDocument(); + expect(getByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL)).toBeInTheDocument(); + }); }); - it('should not render setup technology selector for CNVM', () => { + it('should render setup technology selector for Azure for Single Subscription type', async () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - const newPackagePolicy = getMockPolicyVulnMgmtAWS(); + const newPackagePolicy = getMockPolicyAzure({ + 'azure.account_type': { value: 'single-account', type: 'text' }, + }); + + const { getByTestId, queryByTestId } = render( + + ); + + // navigate to Azure + const azureSelectorButton = getByTestId(CIS_AZURE_OPTION_TEST_SUBJ); + userEvent.click(azureSelectorButton); + + const setupTechnologySelectorAccordion = queryByTestId( + SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ + ); + const setupTechnologySelector = getByTestId(SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ); + const tenantIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID); + const clientIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID); + const clientSecretField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET); + const armTemplateSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE); + const manualSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); + + // default state for Azure with the Org selected + expect(setupTechnologySelectorAccordion).toBeInTheDocument(); + expect(setupTechnologySelector).toBeInTheDocument(); + expect(setupTechnologySelector).toHaveTextContent(/agentless/i); + expect(tenantIdField).toBeInTheDocument(); + expect(clientIdField).toBeInTheDocument(); + expect(clientSecretField).toBeInTheDocument(); + expect(armTemplateSelector).not.toBeInTheDocument(); + expect(manualSelector).not.toBeInTheDocument(); + }); + + it('should not render setup technology selector for KSPM', () => { + const agentlessPolicy = getMockAgentlessAgentPolicy(); + const newPackagePolicy = getMockPolicyEKS(); const { queryByTestId } = render( @@ -1619,19 +1693,12 @@ describe('', () => { expect(setupTechnologySelectorAccordion).not.toBeInTheDocument(); }); - it('should not render setup technology selector for CSPM Azure', () => { + it('should not render setup technology selector for CNVM', () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - let newPackagePolicy = getMockPolicyAzure(); - newPackagePolicy = getPosturePolicy(newPackagePolicy, CLOUDBEAT_AZURE, { - 'azure.credentials.type': { value: 'service_principal_with_client_certificate' }, - }); + const newPackagePolicy = getMockPolicyVulnMgmtAWS(); const { queryByTestId } = render( - + ); const setupTechnologySelectorAccordion = queryByTestId( diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx index 37c0e147c79b2..fef3fd2c59a5c 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx @@ -425,18 +425,21 @@ const AzureAccountTypeSelect = ({ updatePolicy, disabled, packageInfo, + setupTechnology, }: { input: Extract; newPolicy: NewPackagePolicy; updatePolicy: (updatedPolicy: NewPackagePolicy) => void; disabled: boolean; packageInfo: PackageInfo; + setupTechnology: SetupTechnology; }) => { const isAzureOrganizationDisabled = isBelowMinVersion( packageInfo.version, AZURE_ORG_MINIMUM_PACKAGE_VERSION ); const azureAccountTypeOptions = getAzureAccountTypeOptions(isAzureOrganizationDisabled); + const isAgentless = setupTechnology === SetupTechnology.AGENTLESS; useEffect(() => { if (!getAzureAccountType(input)) { @@ -447,7 +450,9 @@ const AzureAccountTypeSelect = ({ type: 'text', }, 'azure.credentials.type': { - value: AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, + value: isAgentless + ? 'service_principal_with_client_secret' + : AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, type: 'text', }, }) @@ -743,6 +748,7 @@ export const CspPolicyTemplateForm = memo )} diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx index a7a96ba4c9174..fd816d03fb507 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx @@ -20,6 +20,7 @@ import type { PostureInput, CloudSecurityPolicyTemplate } from '../../../common/ import { getPolicyTemplateInputOptions, type NewPackagePolicyPostureInput } from './utils'; import { RadioGroup } from './csp_boxed_radio_group'; import { AzureCredentialsForm } from './azure_credentials_form/azure_credentials_form'; +import { AzureCredentialsFormAgentless } from './azure_credentials_form/azure_credentials_form_agentless'; import { AwsCredentialsForm } from './aws_credentials_form/aws_credentials_form'; import { AwsCredentialsFormAgentless } from './aws_credentials_form/aws_credentials_form_agentless'; import { EksCredentialsForm } from './eks_credentials_form'; @@ -103,6 +104,10 @@ export const PolicyTemplateVarsForm = ({ return ; case 'cloudbeat/cis_azure': + if (isAgentless) { + return ; + } + return ; default: return null; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts index 0e32964fae40f..7494a808dcdf3 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts @@ -10,7 +10,12 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { SetupTechnology } from '@kbn/fleet-plugin/public'; import { AgentPolicy, NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; -import { CLOUDBEAT_AWS, CLOUDBEAT_AZURE, CLOUDBEAT_GCP } from '../../../../common/constants'; +import { + CLOUDBEAT_AWS, + CLOUDBEAT_AZURE, + CLOUDBEAT_EKS, + CLOUDBEAT_GCP, +} from '../../../../common/constants'; import { useSetupTechnology } from './use_setup_technology'; describe('useSetupTechnology', () => { @@ -47,12 +52,22 @@ describe('useSetupTechnology', () => { expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); }); - it('sets to AGENT_BASED when agentless is available and Azure cloud', () => { + it('sets to AGENTLESS when agentless is available and Azure cloud', () => { const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_AZURE } as NewPackagePolicyInput; const { result } = renderHook(() => useSetupTechnology({ input, agentlessPolicy, isEditPage }) ); + expect(result.current.isAgentlessAvailable).toBeTruthy(); + expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); + }); + + it('sets to AGENT_BASED when agentless is available but input is not supported for agentless', () => { + const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; + const input = { type: CLOUDBEAT_EKS } as NewPackagePolicyInput; + const { result } = renderHook(() => + useSetupTechnology({ input, agentlessPolicy, isEditPage }) + ); expect(result.current.isAgentlessAvailable).toBeFalsy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENT_BASED); }); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts index bcca6cd2ed41a..1eb3334d09103 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts @@ -8,7 +8,7 @@ import { useEffect, useState } from 'react'; import { AgentPolicy, NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; import { SetupTechnology } from '@kbn/fleet-plugin/public'; -import { CLOUDBEAT_AWS, CLOUDBEAT_GCP } from '../../../../common/constants'; +import { CLOUDBEAT_AWS, CLOUDBEAT_GCP, CLOUDBEAT_AZURE } from '../../../../common/constants'; export const useSetupTechnology = ({ input, @@ -25,7 +25,8 @@ export const useSetupTechnology = ({ }) => { const isCspmAws = input.type === CLOUDBEAT_AWS; const isCspmGcp = input.type === CLOUDBEAT_GCP; - const isAgentlessSupportedForCloudProvider = isCspmAws || isCspmGcp; + const isCspmAzure = input.type === CLOUDBEAT_AZURE; + const isAgentlessSupportedForCloudProvider = isCspmAws || isCspmGcp || isCspmAzure; const isAgentlessAvailable = Boolean(isAgentlessSupportedForCloudProvider && agentlessPolicy); const agentPolicyId = agentPolicy?.id; const agentlessPolicyId = agentlessPolicy?.id; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts index b05c7fe096516..a95940b600e2c 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts @@ -14,6 +14,7 @@ import { getCspmCloudShellDefaultValue, isBelowMinVersion, getDefaultAwsCredentialsType, + getDefaultAzureCredentialsType, } from './utils'; import { getMockPolicyAWS, getMockPolicyK8s, getMockPolicyEKS } from './mocks'; @@ -350,3 +351,66 @@ describe('getDefaultAwsCredentialsType', () => { expect(result).toBe('cloud_formation'); }); }); + +describe('getDefaultAzureCredentialsType', () => { + let packageInfo: PackageInfo; + + beforeEach(() => { + packageInfo = { + policy_templates: [ + { + name: 'cspm', + inputs: [ + { + vars: [ + { + name: 'arm_template_url', + default: 'http://example.com/arm_template_url', + }, + ], + }, + ], + }, + ], + } as PackageInfo; + }); + + it('should return "service_principal_with_client_secret" for agentless', () => { + const setupTechnology = SetupTechnology.AGENTLESS; + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('service_principal_with_client_secret'); + }); + + it('shold return "arm_template" for agent-based, when arm_template is available', () => { + const setupTechnology = SetupTechnology.AGENT_BASED; + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('arm_template'); + }); + + it('should return "managed_identity" for agent-based, when arm_template is not available', () => { + const setupTechnology = SetupTechnology.AGENT_BASED; + packageInfo = { + policy_templates: [ + { + name: 'cspm', + inputs: [ + { + vars: [ + { + name: 'cloud_shell', + default: 'http://example.com/cloud_shell', + }, + ], + }, + ], + }, + ], + } as PackageInfo; + + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('managed_identity'); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts index e3b8055497e22..bd9ce3850a7b2 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts @@ -227,6 +227,23 @@ export const getDefaultAwsCredentialsType = ( return DEFAULT_MANUAL_AWS_CREDENTIALS_TYPE; }; + +export const getDefaultAzureCredentialsType = ( + packageInfo: PackageInfo, + setupTechnology?: SetupTechnology +): string => { + if (setupTechnology && setupTechnology === SetupTechnology.AGENTLESS) { + return 'service_principal_with_client_secret'; + } + + const hasArmTemplateUrl = !!getArmTemplateUrlFromCspmPackage(packageInfo); + if (hasArmTemplateUrl) { + return 'arm_template'; + } + + return 'managed_identity'; +}; + /** * Input vars that are hidden from the user */ @@ -234,7 +251,7 @@ export const getPostureInputHiddenVars = ( inputType: PostureInput, packageInfo: PackageInfo, setupTechnology: SetupTechnology -) => { +): Record | undefined => { switch (inputType) { case 'cloudbeat/cis_aws': return { @@ -243,6 +260,13 @@ export const getPostureInputHiddenVars = ( type: 'text', }, }; + case 'cloudbeat/cis_azure': + return { + 'azure.credentials.type': { + value: getDefaultAzureCredentialsType(packageInfo, setupTechnology), + type: 'text', + }, + }; case 'cloudbeat/cis_eks': return { 'aws.credentials.type': { value: DEFAULT_EKS_VARS_GROUP, type: 'text' } }; default: diff --git a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts index e5c01bfb933e3..ca6fc35c75340 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts @@ -59,6 +59,28 @@ export const GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ = { MANUAL: 'gcpManualOptionTestId', }; export const CIS_GCP_OPTION_TEST_SUBJ = 'cisGcpTestId'; +export const CIS_AZURE_OPTION_TEST_SUBJ = 'cisAzureTestId'; export const SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ = 'setup-technology-selector-accordion'; export const SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ = 'setup-technology-selector'; +export const CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS = { + TENANT_ID: 'cisAzureTenantId', + CLIENT_ID: 'cisAzureClientId', + CLIENT_SECRET: 'cisAzureClientSecret', + CLIENT_CERTIFICATE_PATH: 'cisAzureClientCertificatePath', + CLIENT_CERTIFICATE_PASSWORD: 'cisAzureClientCertificatePassword', + CLIENT_USERNAME: 'cisAzureClientUsername', + CLIENT_PASSWORD: 'cisAzureClientPassword', +}; +export const CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS = { + ARM_TEMPLATE: 'cisAzureArmTemplate', + MANUAL: 'cisAzureManual', +}; +export const CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS = { + GOOGLE_CLOUD_SHELL_SETUP: 'google_cloud_shell_setup_test_id', + PROJECT_ID: 'project_id_test_id', + ORGANIZATION_ID: 'organization_id_test_id', + CREDENTIALS_TYPE: 'credentials_type_test_id', + CREDENTIALS_FILE: 'credentials_file_test_id', + CREDENTIALS_JSON: 'credentials_json_test_id', +}; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/constants.ts b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/constants.ts index 1292da8601357..5ae8f4eb02ac2 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/constants.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/constants.ts @@ -17,6 +17,42 @@ export const FINDINGS_UNIT = (totalCount: number) => defaultMessage: `{totalCount, plural, =1 {finding} other {findings}}`, }); +export const MISCONFIGURATIONS_GROUPS_UNIT = ( + totalCount: number, + selectedGroup: string, + hasNullGroup: boolean +) => { + const groupCount = hasNullGroup ? totalCount - 1 : totalCount; + + switch (selectedGroup) { + case FINDINGS_GROUPING_OPTIONS.RESOURCE_NAME: + return i18n.translate('xpack.csp.findings.groupUnit.resource', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {resource} other {resources}}`, + }); + case FINDINGS_GROUPING_OPTIONS.RULE_NAME: + return i18n.translate('xpack.csp.findings.groupUnit.rule', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {rule} other {rules}}`, + }); + case FINDINGS_GROUPING_OPTIONS.CLOUD_ACCOUNT_NAME: + return i18n.translate('xpack.csp.findings.groupUnit.cloudAccount', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {cloud account} other {cloud accounts}}`, + }); + case FINDINGS_GROUPING_OPTIONS.ORCHESTRATOR_CLUSTER_NAME: + return i18n.translate('xpack.csp.findings.groupUnit.kubernetes', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {kubernetes cluster} other {kubernetes clusters}}`, + }); + default: + return i18n.translate('xpack.csp.findings.groupUnit', { + values: { groupCount: totalCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {group} other {groups}}`, + }); + } +}; + export const NULL_GROUPING_UNIT = i18n.translate('xpack.csp.findings.grouping.nullGroupUnit', { defaultMessage: 'findings', }); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx index 81df07731c5dd..17b8f0ab0f54d 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx @@ -27,7 +27,13 @@ import { FindingsRootGroupingAggregation, useGroupedFindings, } from './use_grouped_findings'; -import { FINDINGS_UNIT, groupingTitle, defaultGroupingOptions, getDefaultQuery } from './constants'; +import { + FINDINGS_UNIT, + groupingTitle, + defaultGroupingOptions, + getDefaultQuery, + MISCONFIGURATIONS_GROUPS_UNIT, +} from './constants'; import { useCloudSecurityGrouping } from '../../../components/cloud_security_grouping'; import { getFilters } from '../utils/get_filters'; import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api'; @@ -161,6 +167,7 @@ export const useLatestFindingsGrouping = ({ groupStatsRenderer, groupingLocalStorageKey: LOCAL_STORAGE_FINDINGS_GROUPING_KEY, groupingLevel, + groupsUnit: MISCONFIGURATIONS_GROUPS_UNIT, }); const additionalFilters = buildEsQuery(dataView, [], groupFilters); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx index b83844416c076..76aa293c0ff44 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx @@ -33,7 +33,7 @@ import { VULNERABILITY_FIELDS, } from '../constants'; import { useCloudSecurityGrouping } from '../../../components/cloud_security_grouping'; -import { VULNERABILITIES_UNIT, groupingTitle } from '../translations'; +import { VULNERABILITIES_UNIT, groupingTitle, VULNERABILITIES_GROUPS_UNIT } from '../translations'; const getTermAggregation = (key: keyof VulnerabilitiesGroupingAggregation, field: string) => ({ [key]: { @@ -147,6 +147,7 @@ export const useLatestVulnerabilitiesGrouping = ({ groupStatsRenderer, groupingLocalStorageKey: LOCAL_STORAGE_VULNERABILITIES_GROUPING_KEY, groupingLevel, + groupsUnit: VULNERABILITIES_GROUPS_UNIT, }); const additionalFilters = buildEsQuery(dataView, [], groupFilters); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/translations.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/translations.ts index f7d88f396f5c6..148ac551337d3 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/translations.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/translations.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; +import { GROUPING_OPTIONS } from './constants'; export const FILTER_IN = i18n.translate('xpack.csp.vulnerabilities.table.filterIn', { defaultMessage: 'Filter in', @@ -29,6 +30,37 @@ export const VULNERABILITIES_UNIT = (totalCount: number) => defaultMessage: `{totalCount, plural, =1 {vulnerability} other {vulnerabilities}}`, }); +export const VULNERABILITIES_GROUPS_UNIT = ( + totalCount: number, + selectedGroup: string, + hasNullGroup: boolean +) => { + const groupCount = hasNullGroup ? totalCount - 1 : totalCount; + + switch (selectedGroup) { + case GROUPING_OPTIONS.RESOURCE_NAME: + return i18n.translate('xpack.csp.vulnerabilities.groupUnit.resource', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {resource} other {resources}}`, + }); + case GROUPING_OPTIONS.CLOUD_ACCOUNT_NAME: + return i18n.translate('xpack.csp.vulnerabilities.groupUnit.cloudAccount', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {cloud account} other {cloud accounts}}`, + }); + case GROUPING_OPTIONS.CVE: + return i18n.translate('xpack.csp.vulnerabilities.groupUnit.cve', { + values: { groupCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {CVE} other {CVEs}}`, + }); + default: + return i18n.translate('xpack.csp.vulnerabilities.groupUnit', { + values: { groupCount: totalCount }, + defaultMessage: `{groupCount} {groupCount, plural, =1 {group} other {groups}}`, + }); + } +}; + export const NULL_GROUPING_UNIT = i18n.translate( 'xpack.csp.vulnerabilities.grouping.nullGroupUnit', { diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.test.tsx index 00ca768a04848..f71c955126428 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.test.tsx @@ -118,11 +118,11 @@ describe('.execute() & getHref', () => { filters: filtersFromEvent, embeddable: { parentApi: { - localFilters: new BehaviorSubject(embeddableInput.filters ? embeddableInput.filters : []), - localQuery: new BehaviorSubject( + filters$: new BehaviorSubject(embeddableInput.filters ? embeddableInput.filters : []), + query$: new BehaviorSubject( embeddableInput.query ? embeddableInput.query : { query: 'test', language: 'kuery' } ), - localTimeRange: new BehaviorSubject( + timeRange$: new BehaviorSubject( embeddableInput.timeRange ? embeddableInput.timeRange : { from: 'now-15m', to: 'now' } ), }, diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx index 87790201b5099..0eac896c32ec8 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { extractTimeRange, isFilterPinned } from '@kbn/es-query'; -import type { HasParentApi, PublishesLocalUnifiedSearch } from '@kbn/presentation-publishing'; +import type { HasParentApi, PublishesUnifiedSearch } from '@kbn/presentation-publishing'; import type { KibanaLocation } from '@kbn/share-plugin/public'; import { cleanEmptyKeys, @@ -25,9 +25,7 @@ import { createExtract, createInject } from '../../../../common'; import { AbstractDashboardDrilldownConfig as Config } from '../abstract_dashboard_drilldown'; export type Context = ApplyGlobalFilterActionContext & { - embeddable: Partial< - PublishesLocalUnifiedSearch & HasParentApi> - >; + embeddable: Partial>>; }; export type Params = AbstractDashboardDrilldownParams; diff --git a/x-pack/plugins/data_visualizer/common/types/field_stats.ts b/x-pack/plugins/data_visualizer/common/types/field_stats.ts index ea6956479bfec..bf707775bedf4 100644 --- a/x-pack/plugins/data_visualizer/common/types/field_stats.ts +++ b/x-pack/plugins/data_visualizer/common/types/field_stats.ts @@ -93,8 +93,8 @@ export interface StringFieldStats { fieldName: string; isTopValuesSampled: boolean; topValues: Bucket[]; - topValuesSampleSize: number; - topValuesSamplerShardSize: number; + topValuesSampleSize?: number; + topValuesSamplerShardSize?: number; } export interface DateFieldStats { diff --git a/x-pack/plugins/data_visualizer/public/application/_index.scss b/x-pack/plugins/data_visualizer/public/application/_index.scss index 9d38869d6d61c..ecc7a2fce1fa6 100644 --- a/x-pack/plugins/data_visualizer/public/application/_index.scss +++ b/x-pack/plugins/data_visualizer/public/application/_index.scss @@ -1,2 +1 @@ @import 'common/components/index'; -@import 'file_data_visualizer/index'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx index d1ee934f6f566..ae9731f280388 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx @@ -55,10 +55,16 @@ export const TopValues: FC = ({ stats, fieldFormat, barColor, compressed, } = useDataVisualizerKibana(); if (stats === undefined || !stats.topValues) return null; - const { topValues, fieldName, sampleCount } = stats; + const { topValues: originalTopValues, fieldName, sampleCount } = stats; - if (topValues?.length === 0) return null; + if (originalTopValues?.length === 0) return null; const totalDocuments = stats.totalDocuments ?? sampleCount ?? 0; + + const topValues = originalTopValues.map((bucket) => ({ + ...bucket, + percent: + typeof bucket.percent === 'number' ? bucket.percent : bucket.doc_count / totalDocuments, + })); const topValuesOtherCountPercent = 1 - (topValues ? topValues.reduce((acc, bucket) => acc + bucket.percent, 0) : 0); const topValuesOtherCount = Math.floor(topValuesOtherCountPercent * (sampleCount ?? 0)); diff --git a/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx b/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx index d42a5a4d39af8..154fee5b87606 100644 --- a/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx +++ b/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx @@ -77,6 +77,7 @@ export const DataDriftDetectionAppState: FC = ( unifiedSearch, } = getPluginsStart(); const services = { + ...coreStart, data, maps, embeddable, @@ -89,7 +90,6 @@ export const DataDriftDetectionAppState: FC = ( uiActions, charts, unifiedSearch, - ...coreStart, }; const datePickerDeps = { ...pick(services, ['data', 'http', 'notifications', 'theme', 'uiSettings', 'i18n']), diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/_index.scss deleted file mode 100644 index 841415620d691..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'components/index'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/_index.scss deleted file mode 100644 index 0477913cd0beb..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/_index.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import 'edit_flyout/index'; -@import 'file_contents/index'; -@import 'import_summary/index'; -@import 'file_data_visualizer_view/index'; -@import 'results_view/index'; -@import 'about_panel/index'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_about_panel.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_about_panel.scss deleted file mode 100644 index e4decb0d45522..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_about_panel.scss +++ /dev/null @@ -1,12 +0,0 @@ -.file-datavisualizer-about-panel__icon { - width: $euiSizeXL * 3; - height: $euiSizeXL * 3; - margin-left: $euiSizeXL; - margin-right: $euiSizeL; -} - -.euiFlexItem.file-datavisualizer-about-panel__doc-icon { - margin-left: $euiSizeXL; - margin-right: $euiSizeXS; - margin-top: $euiSize; -} diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_index.scss deleted file mode 100644 index e2edab76538c1..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'about_panel' diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx index c0f56ead665b1..64f08822617f4 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx @@ -7,6 +7,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; import type { FC } from 'react'; import React from 'react'; @@ -28,6 +30,13 @@ interface Props { hasPermissionToImport: boolean; } +const aboutPanelContentStyle = css({ + '.euiFilePicker__icon': { + width: euiThemeVars.euiSizeXXL, + height: euiThemeVars.euiSizeXXL, + }, +}); + export const AboutPanel: FC = ({ onFilePickerChange, hasPermissionToImport }) => { return ( @@ -40,6 +49,7 @@ export const AboutPanel: FC = ({ onFilePickerChange, hasPermissionToImpor
= ({ onFilePickerChange, hasPermissionToImpor } )} onChange={(files) => onFilePickerChange(files)} - className="file-datavisualizer-file-picker" + css={aboutPanelContentStyle} />
@@ -59,11 +69,7 @@ export const AboutPanel: FC = ({ onFilePickerChange, hasPermissionToImpor export const LoadingPanel: FC = () => { return ( - + diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx index d15834ae11d73..cc7a66d138925 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx @@ -8,11 +8,25 @@ import { FormattedMessage } from '@kbn/i18n-react'; import type { FC } from 'react'; import React from 'react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { css } from '@emotion/react'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { useDataVisualizerKibana } from '../../../kibana_context'; +const docIconStyle = css({ + marginLeft: euiThemeVars.euiSizeL, + marginTop: euiThemeVars.euiSizeXS, +}); + +const mainIconStyle = css({ + width: '96px', + height: '96px', + marginLeft: euiThemeVars.euiSizeXL, + marginRight: euiThemeVars.euiSizeL, +}); + interface Props { hasPermissionToImport: boolean; } @@ -28,7 +42,7 @@ export const WelcomeContent: FC = ({ hasPermissionToImport }) => { return ( - + @@ -65,8 +79,8 @@ export const WelcomeContent: FC = ({ hasPermissionToImport }) => {

- - + + @@ -81,8 +95,8 @@ export const WelcomeContent: FC = ({ hasPermissionToImport }) => { - - + + @@ -97,8 +111,8 @@ export const WelcomeContent: FC = ({ hasPermissionToImport }) => { - - + + diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/_edit_flyout.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/_edit_flyout.scss deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/_index.scss deleted file mode 100644 index 28489c50f19b4..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'edit_flyout'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_contents/_file_contents.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_contents/_file_contents.scss deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_contents/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_contents/_index.scss deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_file_data_visualizer_view.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_file_data_visualizer_view.scss deleted file mode 100644 index fead6f42dbe56..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_file_data_visualizer_view.scss +++ /dev/null @@ -1,13 +0,0 @@ -.file-datavisualizer-file-picker { - max-width: inherit; - - .euiFilePicker__prompt { - background-color: $euiColorEmptyShade; - box-shadow: none; - - .euiFilePicker__icon { - width: $euiSizeXXL; - height: $euiSizeXXL; - } - } -} diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_index.scss deleted file mode 100644 index 8bbc5bd609e7c..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/file_data_visualizer_view/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'file_data_visualizer_view'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_import_summary.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_import_summary.scss deleted file mode 100644 index a2b4e36fcbe5e..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_import_summary.scss +++ /dev/null @@ -1,8 +0,0 @@ -.failure-list { - max-height: 200px; - overflow-y: auto; - - .error-message { - color: $euiColorDanger; - } -} diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_index.scss deleted file mode 100644 index 117e04733ed09..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'import_summary'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx index 0b6eb59622f06..2e29b081765cf 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx @@ -7,8 +7,10 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { Component } from 'react'; +import { euiThemeVars } from '@kbn/ui-theme'; import { EuiAccordion, EuiPagination } from '@elastic/eui'; +import { css } from '@emotion/react'; const PAGE_SIZE = 100; @@ -28,6 +30,15 @@ interface State { page: number; } +const containerStyle = css({ + maxHeight: '200px', + overflowY: 'auto', +}); + +const errorStyle = css({ + color: euiThemeVars.euiColorDanger, +}); + export class Failures extends Component { state: State = { page: 0 }; @@ -56,11 +67,11 @@ export class Failures extends Component { } paddingSize="m" > -
+
{this._renderPaginationControl()} {this.props.failedDocs.slice(startIndex, endIndex).map(({ item, reason, doc }) => (
-
+
{item}: {reason}
{JSON.stringify(doc)}
diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_index.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_index.scss deleted file mode 100644 index 31f819d4f08bd..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'results_view'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_results_view.scss b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_results_view.scss deleted file mode 100644 index 1c5ea1dd26fd7..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/_results_view.scss +++ /dev/null @@ -1,10 +0,0 @@ -.results { - .euiDescriptionList { - dd, dt { - margin-top: 5px; - } - dd:nth-child(1), dt:nth-child(1), { - margin-top: 0; - } - } -} diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/results_view.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/results_view.tsx index 91b8a388c4c32..0c55b838e37b8 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/results_view.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/results_view/results_view.tsx @@ -84,7 +84,7 @@ export const ResultsView: FC = ({ -
+
= ({ getAdditionalLinks }) => { const { data, maps, embeddable, discover, share, security, fileUpload, cloud, fieldFormats } = getPluginsStart(); const services = { + ...coreStart, data, maps, embeddable, @@ -32,7 +33,6 @@ export const FileDataVisualizer: FC = ({ getAdditionalLinks }) => { security, fileUpload, fieldFormats, - ...coreStart, }; const EmptyContext: FC = ({ children }) => <>{children}; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/esql/limit_size.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/esql/limit_size.tsx index 2e84191521bdb..0eeb1fec33147 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/esql/limit_size.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/esql/limit_size.tsx @@ -12,6 +12,7 @@ import type { ESQLDefaultLimitSizeOption } from '../../../embeddables/grid_embed const options = [ { + 'data-test-subj': 'dvESQLLimitSize-5000', value: '5000', text: i18n.translate('xpack.dataVisualizer.searchPanel.esql.limitSizeOptionLabel', { defaultMessage: '{limit} rows', @@ -19,6 +20,7 @@ const options = [ }), }, { + 'data-test-subj': 'dvESQLLimitSize-10000', value: '10000', text: i18n.translate('xpack.dataVisualizer.searchPanel.esql.limitSizeOptionLabel', { defaultMessage: '{limit} rows', @@ -26,6 +28,7 @@ const options = [ }), }, { + 'data-test-subj': 'dvESQLLimitSize-100000', value: '100000', text: i18n.translate('xpack.dataVisualizer.searchPanel.esql.limitSizeOptionLabel', { defaultMessage: '{limit} rows', @@ -33,6 +36,7 @@ const options = [ }), }, { + 'data-test-subj': 'dvESQLLimitSize-1000000', value: '1000000', text: i18n.translate('xpack.dataVisualizer.searchPanel.esql.limitSizeOptionLabel', { defaultMessage: '{limit} rows', @@ -40,6 +44,7 @@ const options = [ }), }, { + 'data-test-subj': 'dvESQLLimitSize-none', value: 'none', text: i18n.translate('xpack.dataVisualizer.searchPanel.esql.analyzeAll', { defaultMessage: 'Analyze all', @@ -62,6 +67,7 @@ export const ESQLDefaultLimitSizeSelect = ({ return ( = ({ unifiedSearch, } = getPluginsStart(); const services = { + ...coreStart, data, maps, embeddable, @@ -312,7 +313,6 @@ export const IndexDataVisualizer: FC = ({ uiActions, charts, unifiedSearch, - ...coreStart, }; const datePickerDeps: DatePickerDependencies = { ...pick(services, ['data', 'http', 'notifications', 'theme', 'uiSettings', 'i18n']), diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_keyword_fields.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_keyword_fields.ts index 0ca4e95ac69a8..9f108b50a33bb 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_keyword_fields.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_keyword_fields.ts @@ -63,19 +63,14 @@ export const getESQLKeywordFieldStats = async ({ if (isFulfilled(resp)) { const results = resp.value?.rawResponse.values as Array<[BucketCount, BucketTerm]>; if (results) { - const topValuesSampleSize = results?.reduce((acc: number, row) => acc + row[0], 0); - const terms = results.map((row) => ({ key: row[1], doc_count: row[0], - percent: row[0] / topValuesSampleSize, })); return { fieldName: field.name, topValues: terms, - topValuesSampleSize, - topValuesSamplerShardSize: topValuesSampleSize, isTopValuesSampled: false, } as StringFieldStats; } diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts index ca8684499eb3c..2f0ea4d7b3070 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts @@ -92,7 +92,7 @@ const getESQLNumericFieldStatsInChunk = async ({ const median = values[startIndex + numericAccessorMap.p50]; const percentiles = values - .slice(startIndex + numericAccessorMap.p0, startIndex + numericAccessorMap.p100) + .slice(startIndex + numericAccessorMap.p5, startIndex + numericAccessorMap.p100 + 1) .map((value: number) => ({ value })); const distribution = processDistributionData(percentiles, PERCENTILE_SPACING, min); diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts index b5f26bbb89f0b..d78e286e88d31 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts @@ -45,9 +45,9 @@ export const getESQLExampleFieldValues = async ({ if (textFieldsResp) { return textFields.map((textField, idx) => { - const examples = (textFieldsResp.rawResponse.values as unknown[][]).map( - (row) => row[idx] - ); + const examples = [ + ...new Set((textFieldsResp.rawResponse.values as unknown[][]).map((row) => row[idx])), + ]; return { fieldName: textField.name, diff --git a/x-pack/plugins/discover_enhanced/public/actions/explore_data/abstract_explore_data_action.ts b/x-pack/plugins/discover_enhanced/public/actions/explore_data/abstract_explore_data_action.ts index f0ed9de21d2dd..143e83589399a 100644 --- a/x-pack/plugins/discover_enhanced/public/actions/explore_data/abstract_explore_data_action.ts +++ b/x-pack/plugins/discover_enhanced/public/actions/explore_data/abstract_explore_data_action.ts @@ -18,7 +18,7 @@ import { apiHasType, apiIsOfType, apiPublishesDataViews, - apiPublishesPartialLocalUnifiedSearch, + apiPublishesPartialUnifiedSearch, CanAccessViewMode, EmbeddableApiContext, getInheritedViewMode, @@ -78,20 +78,17 @@ export abstract class AbstractExploreDataAction { } const parentParams: DiscoverAppLocatorParams = {}; - if ( - apiHasParentApi(embeddable) && - apiPublishesPartialLocalUnifiedSearch(embeddable.parentApi) - ) { - parentParams.filters = embeddable.parentApi.localFilters?.getValue() ?? []; - parentParams.query = embeddable.parentApi.localQuery?.getValue(); - parentParams.timeRange = embeddable.parentApi.localTimeRange?.getValue(); + if (apiHasParentApi(embeddable) && apiPublishesPartialUnifiedSearch(embeddable.parentApi)) { + parentParams.filters = embeddable.parentApi.filters$?.getValue() ?? []; + parentParams.query = embeddable.parentApi.query$?.getValue(); + parentParams.timeRange = embeddable.parentApi.timeRange$?.getValue(); } const childParams: DiscoverAppLocatorParams = {}; - if (apiPublishesPartialLocalUnifiedSearch(embeddable)) { - childParams.filters = embeddable.localFilters?.getValue() ?? []; - childParams.query = embeddable.localQuery?.getValue(); - childParams.timeRange = embeddable.localTimeRange?.getValue(); + if (apiPublishesPartialUnifiedSearch(embeddable)) { + childParams.filters = embeddable.filters$?.getValue() ?? []; + childParams.query = embeddable.query$?.getValue(); + childParams.timeRange = embeddable.timeRange$?.getValue(); } const params: DiscoverAppLocatorParams = { diff --git a/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts b/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts index 0287d1902785d..0f5a12d862d7e 100644 --- a/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts +++ b/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts @@ -77,7 +77,7 @@ const setup = ( id: 'index-ptr-foo', }, ]), - localFilters: new BehaviorSubject([]), + filters$: new BehaviorSubject([]), parentApi: { viewMode: new BehaviorSubject(ViewMode.VIEW), }, diff --git a/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts b/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts index 4b7575a0cef4f..668ec9bffbe5f 100644 --- a/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts +++ b/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts @@ -7,9 +7,9 @@ import { apiIsOfType, - apiPublishesPartialLocalUnifiedSearch, + apiPublishesPartialUnifiedSearch, HasParentApi, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, } from '@kbn/presentation-publishing'; import { KibanaLocation } from '@kbn/share-plugin/public'; import { Action } from '@kbn/ui-actions-plugin/public'; @@ -19,8 +19,8 @@ import { AbstractExploreDataAction } from './abstract_explore_data_action'; export const ACTION_EXPLORE_DATA_CHART = 'ACTION_EXPLORE_DATA_CHART'; export interface ExploreDataChartActionContext extends ApplyGlobalFilterActionContext { - embeddable: Partial & - Partial>>; + embeddable: Partial & + Partial>>; } /** @@ -43,7 +43,7 @@ export class ExploreDataChartAction if (apiIsOfType(embeddable, 'map')) { return false; // TODO: https://github.com/elastic/kibana/issues/73043 } - return apiPublishesPartialLocalUnifiedSearch(embeddable) && super.isCompatible(context); + return apiPublishesPartialUnifiedSearch(embeddable) && super.isCompatible(context); } protected readonly getLocation = async ( diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.test.ts b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.test.ts index 54cfe49532ef2..f4631ea96b937 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.test.ts +++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.test.ts @@ -58,9 +58,9 @@ const mockDataPoints = [ const mockEmbeddableApi = { parentApi: { - localFilters: new BehaviorSubject([]), - localQuery: new BehaviorSubject({ query: 'test', language: 'kuery' }), - localTimeRange: new BehaviorSubject({ from: 'now-15m', to: 'now' }), + filters$: new BehaviorSubject([]), + query$: new BehaviorSubject({ query: 'test', language: 'kuery' }), + timeRange$: new BehaviorSubject({ from: 'now-15m', to: 'now' }), }, }; @@ -292,7 +292,7 @@ describe('UrlDrilldown', () => { { id: 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' }, ]), parentApi: { - localFilters: new BehaviorSubject([ + filters$: new BehaviorSubject([ { meta: { alias: 'asdf', @@ -301,11 +301,11 @@ describe('UrlDrilldown', () => { }, }, ]), - localQuery: new BehaviorSubject({ + query$: new BehaviorSubject({ language: 'C++', query: 'std::cout << 123;', }), - localTimeRange: new BehaviorSubject({ from: 'FROM', to: 'TO' }), + timeRange$: new BehaviorSubject({ from: 'FROM', to: 'TO' }), }, panelTitle: new BehaviorSubject('The Title'), savedObjectId: new BehaviorSubject('SAVED_OBJECT_ID'), diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.test.ts b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.test.ts index 0ef3933abdf53..ba55c25a3a10e 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.test.ts +++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.test.ts @@ -19,7 +19,7 @@ describe('getContextScopeValues()', () => { test('returns values when provided', () => { const embeddableApi = { parentApi: { - localFilters: new BehaviorSubject([ + filters$: new BehaviorSubject([ { meta: { alias: 'asdf', @@ -28,11 +28,11 @@ describe('getContextScopeValues()', () => { }, }, ]), - localQuery: new BehaviorSubject({ + query$: new BehaviorSubject({ language: 'C++', query: 'std::cout << 123;', }), - localTimeRange: new BehaviorSubject({ from: 'FROM', to: 'TO' }), + timeRange$: new BehaviorSubject({ from: 'FROM', to: 'TO' }), }, panelTitle: new BehaviorSubject('title1'), savedObjectId: new BehaviorSubject('1234'), diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts index d50df1f79f281..85921bd992a4c 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts +++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts @@ -15,7 +15,7 @@ import type { HasUniqueId, PublishesPanelTitle, PublishesSavedObjectId, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, PublishesDataViews, } from '@kbn/presentation-publishing'; import { getPanelTitle } from '@kbn/presentation-publishing'; @@ -68,9 +68,9 @@ export const getContextScopeValues = (context: Partial): C HasUniqueId & PublishesPanelTitle & PublishesSavedObjectId & - PublishesLocalUnifiedSearch & + PublishesUnifiedSearch & PublishesDataViews & - HasParentApi> + HasParentApi> >; const dataViewIds = api.dataViews?.value ? (api.dataViews?.value.map((dataView) => dataView.id).filter(Boolean) as string[]) @@ -81,9 +81,9 @@ export const getContextScopeValues = (context: Partial): C id: api.uuid, title: getPanelTitle(api), savedObjectId: api.savedObjectId?.value, - query: api.parentApi?.localQuery?.value, - timeRange: api.localTimeRange?.value ?? api.parentApi?.localTimeRange?.value, - filters: api.parentApi?.localFilters?.value, + query: api.parentApi?.query$?.value, + timeRange: api.timeRange$?.value ?? api.parentApi?.timeRange$?.value, + filters: api.parentApi?.filters$?.value, indexPatternIds: dataViewIds.length > 1 ? dataViewIds : undefined, indexPatternId: dataViewIds.length === 1 ? dataViewIds[0] : undefined, }), diff --git a/x-pack/plugins/elastic_assistant/common/constants.ts b/x-pack/plugins/elastic_assistant/common/constants.ts index 5634b0b1881bd..0a1481e381abe 100755 --- a/x-pack/plugins/elastic_assistant/common/constants.ts +++ b/x-pack/plugins/elastic_assistant/common/constants.ts @@ -18,5 +18,14 @@ export const KNOWLEDGE_BASE = `${BASE_PATH}/knowledge_base/{resource?}`; // Model Evaluation export const EVALUATE = `${BASE_PATH}/evaluate`; +export const MAX_CONVERSATIONS_TO_UPDATE_IN_PARALLEL = 50; +export const CONVERSATIONS_TABLE_MAX_PAGE_SIZE = 100; + +export const MAX_ANONYMIZATION_FIELDS_TO_UPDATE_IN_PARALLEL = 50; +export const ANONYMIZATION_FIELDS_TABLE_MAX_PAGE_SIZE = 100; + +export const MAX_PROMPTS_TO_UPDATE_IN_PARALLEL = 50; +export const PROMPTS_TABLE_MAX_PAGE_SIZE = 100; + // Capabilities export const CAPABILITIES = `${BASE_PATH}/capabilities`; diff --git a/x-pack/plugins/elastic_assistant/kibana.jsonc b/x-pack/plugins/elastic_assistant/kibana.jsonc index 3d2dcb903d8eb..f148bbb4ad072 100644 --- a/x-pack/plugins/elastic_assistant/kibana.jsonc +++ b/x-pack/plugins/elastic_assistant/kibana.jsonc @@ -10,7 +10,10 @@ "requiredPlugins": [ "actions", "data", - "ml" + "ml", + "taskManager", + "spaces", + "security" ] } } diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts new file mode 100644 index 0000000000000..7a36f48d69e8c --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts @@ -0,0 +1,114 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import { SearchEsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; +import { + AnonymizationFieldCreateProps, + AnonymizationFieldResponse, + AnonymizationFieldUpdateProps, + PerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; + +export const getAnonymizationFieldsSearchEsMock = () => { + const searchResponse: estypes.SearchResponse = { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: { + value: 1, + relation: 'eq', + }, + max_score: 0, + hits: [ + { + _index: 'foo', + _id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + _source: { + '@timestamp': '2019-12-13T16:40:33.400Z', + created_at: '2019-12-13T16:40:33.400Z', + updated_at: '2019-12-13T16:40:33.400Z', + namespace: 'default', + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + field: 'testField', + default_allow: true, + default_allow_replacement: false, + created_by: 'elastic', + users: [ + { + name: 'elastic', + }, + ], + }, + }, + ], + }, + }; + return searchResponse; +}; + +export const getCreateAnonymizationFieldSchemaMock = (): AnonymizationFieldCreateProps => ({ + field: 'testField', + defaultAllow: false, + defaultAllowReplacement: true, +}); + +export const getUpdateAnonymizationFieldSchemaMock = ( + promptId = 'prompt-1' +): AnonymizationFieldUpdateProps => ({ + defaultAllowReplacement: true, + defaultAllow: false, + id: promptId, +}); + +export const getAnonymizationFieldMock = ( + params: AnonymizationFieldCreateProps | AnonymizationFieldUpdateProps +): AnonymizationFieldResponse => ({ + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + field: 'testField', + defaultAllow: false, + ...params, + createdAt: '2019-12-13T16:40:33.400Z', + updatedAt: '2019-12-13T16:40:33.400Z', + namespace: 'default', + users: [ + { + name: 'elastic', + }, + ], +}); + +export const getQueryAnonymizationFieldParams = ( + isUpdate?: boolean +): AnonymizationFieldCreateProps | AnonymizationFieldUpdateProps => { + return isUpdate + ? { + field: 'testField', + defaultAllowReplacement: true, + defaultAllow: false, + id: '1', + } + : { + field: 'test 2', + defaultAllowReplacement: true, + defaultAllow: false, + }; +}; + +export const getPerformBulkActionSchemaMock = (): PerformBulkActionRequestBody => ({ + create: [getQueryAnonymizationFieldParams(false) as AnonymizationFieldCreateProps], + delete: { + ids: ['99403909-ca9b-49ba-9d7a-7e5320e68d05'], + }, + update: [getQueryAnonymizationFieldParams(true) as AnonymizationFieldUpdateProps], +}); diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/conversations_schema.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/conversations_schema.mock.ts new file mode 100644 index 0000000000000..aa88fab105266 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/conversations_schema.mock.ts @@ -0,0 +1,208 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import { + AppendConversationMessageRequestBody, + PerformBulkActionRequestBody, + ConversationCreateProps, + ConversationResponse, + ConversationUpdateProps, +} from '@kbn/elastic-assistant-common'; +import { SearchEsConversationSchema } from '../ai_assistant_data_clients/conversations/types'; + +export const getConversationSearchEsMock = () => { + const searchResponse: estypes.SearchResponse = { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: { + value: 1, + relation: 'eq', + }, + max_score: 0, + hits: [ + { + _index: 'foo', + _id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + _source: { + category: 'assistant', + '@timestamp': '2019-12-13T16:40:33.400Z', + created_at: '2019-12-13T16:40:33.400Z', + updated_at: '2019-12-13T16:40:33.400Z', + namespace: 'default', + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + title: 'test', + exclude_from_last_conversation_storage: true, + is_default: false, + messages: [], + replacements: [], + users: [ + { + name: 'elastic', + }, + ], + }, + }, + ], + }, + }; + return searchResponse; +}; + +export const getCreateConversationSchemaMock = (): ConversationCreateProps => ({ + title: 'Welcome', + apiConfig: { + connectorId: '1', + defaultSystemPromptId: 'Default', + connectorTypeTitle: 'Test connector', + model: 'model', + }, + excludeFromLastConversationStorage: false, + isDefault: true, + messages: [ + { + content: 'test content', + role: 'user', + timestamp: '2019-12-13T16:40:33.400Z', + traceData: { + traceId: '1', + transactionId: '2', + }, + }, + ], + category: 'assistant', +}); + +export const getUpdateConversationSchemaMock = ( + conversationId = 'conversation-1' +): ConversationUpdateProps => ({ + title: 'Welcome 2', + apiConfig: { + connectorId: '2', + defaultSystemPromptId: 'Default', + connectorTypeTitle: 'Test connector', + model: 'model', + }, + excludeFromLastConversationStorage: false, + messages: [ + { + content: 'test content', + role: 'user', + timestamp: '2019-12-13T16:40:33.400Z', + traceData: { + traceId: '1', + transactionId: '2', + }, + }, + ], + id: conversationId, +}); + +export const getAppendConversationMessagesSchemaMock = + (): AppendConversationMessageRequestBody => ({ + messages: [ + { + content: 'test content', + role: 'user', + timestamp: '2019-12-13T16:40:33.400Z', + traceData: { + traceId: '1', + transactionId: '2', + }, + }, + ], + }); + +export const getConversationMock = ( + params: ConversationCreateProps | ConversationUpdateProps +): ConversationResponse => ({ + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + apiConfig: { + connectorId: '1', + defaultSystemPromptId: 'Default', + connectorTypeTitle: 'OpenAI', + }, + replacements: [], + title: 'test', + ...params, + createdAt: '2019-12-13T16:40:33.400Z', + updatedAt: '2019-12-13T16:40:33.400Z', + namespace: 'default', + category: 'assistant', + users: [ + { + name: 'elastic', + }, + ], +}); + +export const getQueryConversationParams = ( + isUpdate?: boolean +): ConversationCreateProps | ConversationUpdateProps => { + return isUpdate + ? { + title: 'Welcome 2', + apiConfig: { + connectorId: '2', + defaultSystemPromptId: 'Default', + connectorTypeTitle: 'Test connector', + model: 'model', + }, + category: 'assistant', + excludeFromLastConversationStorage: false, + messages: [ + { + content: 'test content', + role: 'user', + timestamp: '2019-12-13T16:40:33.400Z', + traceData: { + traceId: '1', + transactionId: '2', + }, + }, + ], + id: '1', + } + : { + title: 'Welcome', + category: 'assistant', + apiConfig: { + connectorId: '1', + defaultSystemPromptId: 'Default', + connectorTypeTitle: 'Test connector', + model: 'model', + }, + excludeFromLastConversationStorage: false, + isDefault: true, + messages: [ + { + content: 'test content', + role: 'user', + timestamp: '2019-12-13T16:40:33.400Z', + traceData: { + traceId: '1', + transactionId: '2', + }, + }, + ], + }; +}; + +export const getPerformBulkActionSchemaMock = (): PerformBulkActionRequestBody => ({ + create: [getQueryConversationParams(false) as ConversationCreateProps], + delete: { + ids: ['99403909-ca9b-49ba-9d7a-7e5320e68d05'], + }, + update: [getQueryConversationParams(true) as ConversationUpdateProps], +}); diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/data_clients.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/data_clients.mock.ts new file mode 100644 index 0000000000000..be69365724341 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/data_clients.mock.ts @@ -0,0 +1,51 @@ +/* + * 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 { PublicMethodsOf } from '@kbn/utility-types'; +import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; +import { AIAssistantDataClient } from '../ai_assistant_data_clients'; + +type ConversationsDataClientContract = PublicMethodsOf; +export type ConversationsDataClientMock = jest.Mocked; + +const createConversationsDataClientMock = () => { + const mocked: ConversationsDataClientMock = { + findDocuments: jest.fn(), + appendConversationMessages: jest.fn(), + createConversation: jest.fn(), + deleteConversation: jest.fn(), + getConversation: jest.fn(), + updateConversation: jest.fn(), + getReader: jest.fn(), + getWriter: jest.fn().mockResolvedValue({ bulk: jest.fn() }), + }; + return mocked; +}; + +export const conversationsDataClientMock: { + create: () => ConversationsDataClientMock; +} = { + create: createConversationsDataClientMock, +}; + +type AIAssistantDataClientContract = PublicMethodsOf; +export type AIAssistantDataClientMock = jest.Mocked; + +const createAIAssistantDataClientMock = () => { + const mocked: AIAssistantDataClientMock = { + findDocuments: jest.fn(), + getReader: jest.fn(), + getWriter: jest.fn().mockResolvedValue({ bulk: jest.fn() }), + }; + return mocked; +}; + +export const dataClientMock: { + create: () => AIAssistantDataClientMock; +} = { + create: createAIAssistantDataClientMock, +}; diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts new file mode 100644 index 0000000000000..24ca98dccdf88 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts @@ -0,0 +1,122 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import { SearchEsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; +import { + PerformBulkActionRequestBody, + PromptCreateProps, + PromptResponse, + PromptUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; + +export const getPromptsSearchEsMock = () => { + const searchResponse: estypes.SearchResponse = { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: { + value: 1, + relation: 'eq', + }, + max_score: 0, + hits: [ + { + _index: 'foo', + _id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + _source: { + '@timestamp': '2019-12-13T16:40:33.400Z', + created_at: '2019-12-13T16:40:33.400Z', + updated_at: '2019-12-13T16:40:33.400Z', + namespace: 'default', + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + content: 'test content', + name: 'test', + prompt_type: 'quickPrompt', + is_shared: false, + created_by: 'elastic', + users: [ + { + name: 'elastic', + }, + ], + }, + }, + ], + }, + }; + return searchResponse; +}; + +export const getCreatePromptSchemaMock = (): PromptCreateProps => ({ + name: 'test', + content: 'test content', + isNewConversationDefault: false, + isShared: true, + isDefault: false, + promptType: 'quickPrompt', +}); + +export const getUpdatePromptSchemaMock = (promptId = 'prompt-1'): PromptUpdateProps => ({ + content: 'test content', + isNewConversationDefault: false, + isShared: true, + isDefault: false, + id: promptId, +}); + +export const getPromptMock = (params: PromptCreateProps | PromptUpdateProps): PromptResponse => ({ + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + content: 'test content', + name: 'test', + promptType: 'quickPrompt', + isDefault: false, + ...params, + createdAt: '2019-12-13T16:40:33.400Z', + updatedAt: '2019-12-13T16:40:33.400Z', + namespace: 'default', + users: [ + { + name: 'elastic', + }, + ], +}); + +export const getQueryPromptParams = (isUpdate?: boolean): PromptCreateProps | PromptUpdateProps => { + return isUpdate + ? { + content: 'test 2', + name: 'test', + promptType: 'quickPrompt', + isDefault: false, + isNewConversationDefault: true, + isShared: true, + id: '1', + } + : { + content: 'test 2', + name: 'test', + promptType: 'quickPrompt', + isDefault: false, + isNewConversationDefault: true, + isShared: true, + }; +}; + +export const getPerformBulkActionSchemaMock = (): PerformBulkActionRequestBody => ({ + create: [getQueryPromptParams(false) as PromptCreateProps], + delete: { + ids: ['99403909-ca9b-49ba-9d7a-7e5320e68d05'], + }, + update: [getQueryPromptParams(true) as PromptUpdateProps], +}); diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts index 3551ef6b126c3..671cb1b2f0a88 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request.ts @@ -7,9 +7,33 @@ import { httpServerMock } from '@kbn/core/server/mocks'; import { CAPABILITIES, EVALUATE, KNOWLEDGE_BASE } from '../../common/constants'; import { + ConversationCreateProps, + ConversationUpdateProps, + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, PostEvaluateRequestBodyInput, PostEvaluateRequestQueryInput, } from '@kbn/elastic-assistant-common'; +import { + getAppendConversationMessagesSchemaMock, + getCreateConversationSchemaMock, + getUpdateConversationSchemaMock, +} from './conversations_schema.mock'; +import { + PromptCreateProps, + PromptUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; +import { + AnonymizationFieldCreateProps, + AnonymizationFieldUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; export const requestMock = { create: httpServerMock.createKibanaRequest, @@ -55,3 +79,111 @@ export const getPostEvaluateRequest = ({ path: EVALUATE, query, }); + +export const getCurrentUserFindRequest = () => + requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + }); + +export const getCurrentUserPromptsRequest = () => + requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + }); + +export const getCurrentUserAnonymizationFieldsRequest = () => + requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + }); + +export const getDeleteConversationRequest = (id: string = '04128c15-0d1b-4716-a4c5-46997ac7f3bd') => + requestMock.create({ + method: 'delete', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + params: { id }, + }); + +export const getCreateConversationRequest = () => + requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + body: getCreateConversationSchemaMock(), + }); + +export const getUpdateConversationRequest = (id: string = '04128c15-0d1b-4716-a4c5-46997ac7f3bd') => + requestMock.create({ + method: 'put', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + body: getUpdateConversationSchemaMock(), + params: { id }, + }); + +export const getAppendConversationMessageRequest = ( + id: string = '04128c15-0d1b-4716-a4c5-46997ac7f3bd' +) => + requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + body: getAppendConversationMessagesSchemaMock(), + params: { id }, + }); + +export const getConversationReadRequest = (id: string = '04128c15-0d1b-4716-a4c5-46997ac7f3bd') => + requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + params: { id }, + }); + +export const getConversationsBulkActionRequest = ( + create: ConversationCreateProps[] = [], + update: ConversationUpdateProps[] = [], + deleteIds: string[] = [] +) => + requestMock.create({ + method: 'patch', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + body: { + create, + update, + delete: { + ids: deleteIds, + }, + }, + }); + +export const getPromptsBulkActionRequest = ( + create: PromptCreateProps[] = [], + update: PromptUpdateProps[] = [], + deleteIds: string[] = [] +) => + requestMock.create({ + method: 'patch', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + body: { + create, + update, + delete: { + ids: deleteIds, + }, + }, + }); + +export const getAnonymizationFieldsBulkActionRequest = ( + create: AnonymizationFieldCreateProps[] = [], + update: AnonymizationFieldUpdateProps[] = [], + deleteIds: string[] = [] +) => + requestMock.create({ + method: 'patch', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + body: { + create, + update, + delete: { + ids: deleteIds, + }, + }, + }); diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts index 3273cbf50b83d..723b8c2707a95 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts @@ -14,6 +14,9 @@ import { ElasticAssistantRequestHandlerContext, } from '../types'; import { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server'; +import { conversationsDataClientMock, dataClientMock } from './data_clients.mock'; +import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; +import { AIAssistantDataClient } from '../ai_assistant_data_clients'; export const createMockClients = () => { const core = coreMock.createRequestHandlerContext(); @@ -28,6 +31,11 @@ export const createMockClients = () => { getRegisteredTools: jest.fn(), logger: loggingSystemMock.createLogger(), telemetry: coreMock.createSetup().analytics, + getAIAssistantConversationsDataClient: conversationsDataClientMock.create(), + getAIAssistantPromptsDataClient: dataClientMock.create(), + getAIAssistantAnonymizationFieldsDataClient: dataClientMock.create(), + getSpaceId: jest.fn(), + getCurrentUser: jest.fn(), }, savedObjectsClient: core.savedObjects.client, @@ -78,6 +86,28 @@ const createElasticAssistantRequestContextMock = ( getRegisteredFeatures: jest.fn(), getRegisteredTools: jest.fn(), logger: clients.elasticAssistant.logger, + + getAIAssistantConversationsDataClient: jest.fn( + () => clients.elasticAssistant.getAIAssistantConversationsDataClient + ) as unknown as jest.MockInstance< + Promise, + [], + unknown + > & + (() => Promise), + + getAIAssistantAnonymizationFieldsDataClient: jest.fn( + () => clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient + ) as unknown as jest.MockInstance, [], unknown> & + (() => Promise), + getAIAssistantPromptsDataClient: jest.fn( + () => clients.elasticAssistant.getAIAssistantPromptsDataClient + ) as unknown as jest.MockInstance, [], unknown> & + (() => Promise), + getCurrentUser: jest.fn(), + getServerBasePath: jest.fn(), + getSpaceId: jest.fn(), + core: clients.core, telemetry: clients.elasticAssistant.telemetry, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts index 8efe2407f2245..5ba6946c68688 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts @@ -6,7 +6,87 @@ */ import { httpServerMock } from '@kbn/core/server/mocks'; +import { getConversationSearchEsMock } from './conversations_schema.mock'; +import { estypes } from '@elastic/elasticsearch'; +import { SearchEsConversationSchema } from '../ai_assistant_data_clients/conversations/types'; +import { FindResponse } from '../ai_assistant_data_clients/find'; +import { ConversationResponse } from '@kbn/elastic-assistant-common'; +import { SearchEsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; +import { getPromptsSearchEsMock } from './prompts_schema.mock'; +import { SearchEsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; +import { getAnonymizationFieldsSearchEsMock } from './anonymization_fields_schema.mock'; export const responseMock = { create: httpServerMock.createResponseFactory, }; + +export const getEmptyFindResult = (): FindResponse => ({ + page: 1, + perPage: 1, + total: 0, + data: getBasicEmptySearchResponse(), +}); + +export const getFindConversationsResultWithSingleHit = + (): FindResponse => ({ + page: 1, + perPage: 1, + total: 1, + data: getConversationSearchEsMock(), + }); + +export const getFindPromptsResultWithSingleHit = (): FindResponse => ({ + page: 1, + perPage: 1, + total: 1, + data: getPromptsSearchEsMock(), +}); + +export const getFindAnonymizationFieldsResultWithSingleHit = + (): FindResponse => ({ + page: 1, + perPage: 1, + total: 1, + data: getAnonymizationFieldsSearchEsMock(), + }); + +export const getBasicEmptySearchResponse = + (): estypes.SearchResponse => ({ + took: 1, + timed_out: false, + _shards: { total: 1, successful: 1, skipped: 0, failed: 0 }, + hits: { + hits: [], + total: { relation: 'eq', value: 0 }, + max_score: 0, + }, + }); + +export const getConversationResponseMock = ( + timestamp: string = new Date().toISOString() +): ConversationResponse => ({ + id: 'test', + title: 'test', + apiConfig: { + connectorId: '1', + connectorTypeTitle: 'test-connector', + defaultSystemPromptId: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + excludeFromLastConversationStorage: false, + messages: [], + replacements: [], + createdAt: timestamp, + namespace: 'default', + isDefault: false, + updatedAt: timestamp, + timestamp, + category: 'assistant', + users: [ + { + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + name: 'elastic', + }, + ], +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts new file mode 100644 index 0000000000000..c97a20a2ad521 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts @@ -0,0 +1,71 @@ +/* + * 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 { FieldMap } from '@kbn/data-stream-adapter'; + +export const assistantAnonymizationFieldsFieldMap: FieldMap = { + '@timestamp': { + type: 'date', + array: false, + required: false, + }, + id: { + type: 'keyword', + array: false, + required: true, + }, + field: { + type: 'keyword', + array: false, + required: false, + }, + default_allow: { + type: 'boolean', + array: false, + required: false, + }, + default_allow_replacement: { + type: 'boolean', + array: false, + required: false, + }, + updated_at: { + type: 'date', + array: false, + required: false, + }, + updated_by: { + type: 'keyword', + array: false, + required: false, + }, + created_at: { + type: 'date', + array: false, + required: false, + }, + created_by: { + type: 'keyword', + array: false, + required: false, + }, + users: { + type: 'nested', + array: true, + required: false, + }, + 'users.id': { + type: 'keyword', + array: false, + required: false, + }, + 'users.name': { + type: 'keyword', + array: false, + required: false, + }, +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts new file mode 100644 index 0000000000000..f04a4fa3ade16 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts @@ -0,0 +1,112 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import { + AnonymizationFieldCreateProps, + AnonymizationFieldResponse, + AnonymizationFieldUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { + CreateAnonymizationFieldSchema, + SearchEsAnonymizationFieldsSchema, + UpdateAnonymizationFieldSchema, +} from './types'; + +export const transformESToAnonymizationFields = ( + response: estypes.SearchResponse +): AnonymizationFieldResponse[] => { + return response.hits.hits + .filter((hit) => hit._source !== undefined) + .map((hit) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const anonymizationFieldSchema = hit._source!; + const anonymizationField: AnonymizationFieldResponse = { + timestamp: anonymizationFieldSchema['@timestamp'], + createdAt: anonymizationFieldSchema.created_at, + users: + anonymizationFieldSchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + field: anonymizationFieldSchema.field, + defaultAllow: anonymizationFieldSchema.default_allow, + defaultAllowReplacement: anonymizationFieldSchema.default_allow_replacement, + updatedAt: anonymizationFieldSchema.updated_at, + namespace: anonymizationFieldSchema.namespace, + id: hit._id, + }; + + return anonymizationField; + }); +}; + +export const transformToUpdateScheme = ( + user: AuthenticatedUser, + updatedAt: string, + { defaultAllow, defaultAllowReplacement, id }: AnonymizationFieldUpdateProps +): UpdateAnonymizationFieldSchema => { + return { + id, + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + updated_at: updatedAt, + default_allow: defaultAllow, + default_allow_replacement: defaultAllowReplacement, + }; +}; + +export const transformToCreateScheme = ( + user: AuthenticatedUser, + createdAt: string, + { defaultAllow, defaultAllowReplacement, field }: AnonymizationFieldCreateProps +): CreateAnonymizationFieldSchema => { + return { + updated_at: createdAt, + field, + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + created_at: createdAt, + default_allow: defaultAllow, + default_allow_replacement: defaultAllowReplacement, + }; +}; + +export const getUpdateScript = ({ + anonymizationField, + isPatch, +}: { + anonymizationField: UpdateAnonymizationFieldSchema; + isPatch?: boolean; +}) => { + return { + source: ` + if (params.assignEmpty == true || params.containsKey('default_allow')) { + ctx._source.default_allow = params.default_allow; + } + if (params.assignEmpty == true || params.containsKey('default_allow_replacement')) { + ctx._source.default_allow_replacement = params.default_allow_replacement; + } + ctx._source.updated_at = params.updated_at; + `, + lang: 'painless', + params: { + ...anonymizationField, // when assigning undefined in painless, it will remove property and wil set it to null + // for patch we don't want to remove unspecified value in payload + assignEmpty: !(isPatch ?? true), + }, + }; +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts new file mode 100644 index 0000000000000..637c1ebdd11c2 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts @@ -0,0 +1,51 @@ +/* + * 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 interface SearchEsAnonymizationFieldsSchema { + id: string; + '@timestamp': string; + created_at: string; + created_by: string; + field: string; + default_allow_replacement?: boolean; + default_allow?: boolean; + users?: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + updated_by?: string; + namespace: string; +} + +export interface UpdateAnonymizationFieldSchema { + id: string; + '@timestamp'?: string; + default_allow_replacement?: boolean; + default_allow?: boolean; + users?: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + updated_by?: string; +} + +export interface CreateAnonymizationFieldSchema { + '@timestamp'?: string; + field: string; + default_allow_replacement?: boolean; + default_allow?: boolean; + users?: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + updated_by?: string; + created_at?: string; + created_by?: string; +} 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 new file mode 100644 index 0000000000000..227e462d7a408 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/append_conversation_messages.ts @@ -0,0 +1,109 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { ConversationResponse, Message } from '@kbn/elastic-assistant-common'; +import { getConversation } from './get_conversation'; + +export interface AppendConversationMessagesParams { + esClient: ElasticsearchClient; + logger: Logger; + conversationIndex: string; + existingConversation: ConversationResponse; + messages: Message[]; +} + +export const appendConversationMessages = async ({ + esClient, + logger, + conversationIndex, + existingConversation, + messages, +}: AppendConversationMessagesParams): Promise => { + const updatedAt = new Date().toISOString(); + + const params = transformToUpdateScheme(updatedAt, [ + ...(existingConversation.messages ?? []), + ...messages, + ]); + try { + const response = await esClient.updateByQuery({ + conflicts: 'proceed', + index: conversationIndex, + query: { + ids: { + values: [existingConversation.id ?? ''], + }, + }, + refresh: true, + script: { + lang: 'painless', + params: { + ...params, + }, + source: ` + if (params.assignEmpty == true || params.containsKey('messages')) { + def messages = []; + for (message in params.messages) { + def newMessage = [:]; + newMessage['@timestamp'] = message['@timestamp']; + newMessage.content = message.content; + newMessage.is_error = message.is_error; + newMessage.reader = message.reader; + newMessage.role = message.role; + if (message.trace_data != null) { + newMessage.trace_data = message.trace_data; + } + messages.add(newMessage); + } + ctx._source.messages = messages; + } + ctx._source.updated_at = params.updated_at; + `, + }, + }); + if (response.failures && response.failures.length > 0) { + logger.error( + `Error appending conversation messages: ${response.failures.map( + (f) => f.id + )} for conversation by ID: ${existingConversation.id}` + ); + return null; + } + + const updatedConversation = await getConversation({ + esClient, + conversationIndex, + id: existingConversation.id, + logger, + }); + return updatedConversation; + } catch (err) { + logger.error( + `Error appending conversation messages: ${err} for conversation by ID: ${existingConversation.id}` + ); + throw err; + } +}; + +export const transformToUpdateScheme = (updatedAt: string, messages: Message[]) => { + return { + updated_at: updatedAt, + messages: messages?.map((message) => ({ + '@timestamp': new Date(message.timestamp).toISOString(), + content: message.content, + is_error: message.isError, + reader: message.reader, + role: message.role, + trace_data: { + trace_id: message.traceData?.traceId, + transaction_id: message.traceData?.transactionId, + }, + })), + }; +}; 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 new file mode 100644 index 0000000000000..5d6851538be0c --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.test.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 { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { createConversation } from './create_conversation'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { estypes } from '@elastic/elasticsearch'; +import { SearchEsConversationSchema } from './types'; +import { getConversation } from './get_conversation'; +import { ConversationCreateProps, ConversationResponse } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +jest.mock('./get_conversation', () => ({ + getConversation: jest.fn(), +})); + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +export const getCreateConversationMock = (): ConversationCreateProps => ({ + title: 'test', + apiConfig: { + connectorId: '1', + connectorTypeTitle: 'test-connector', + defaultSystemPromptId: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + excludeFromLastConversationStorage: false, + isDefault: false, + messages: [], + replacements: [], + category: 'assistant', +}); + +export const getConversationResponseMock = (): ConversationResponse => ({ + id: 'test', + title: 'test', + apiConfig: { + connectorId: '1', + connectorTypeTitle: 'test-connector', + defaultSystemPromptId: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + excludeFromLastConversationStorage: false, + messages: [], + replacements: [], + createdAt: '2024-01-28T04:20:02.394Z', + namespace: 'test', + isDefault: false, + updatedAt: '2024-01-28T04:20:02.394Z', + timestamp: '2024-01-28T04:20:02.394Z', + category: 'assistant', + users: [ + { + name: 'test', + }, + ], +}); + +export const getSearchConversationMock = + (): estypes.SearchResponse => ({ + _scroll_id: '123', + _shards: { + failed: 0, + skipped: 0, + successful: 0, + total: 0, + }, + hits: { + hits: [ + { + _id: '1', + _index: '', + _score: 0, + _source: { + '@timestamp': '2020-04-20T15:25:31.830Z', + created_at: '2020-04-20T15:25:31.830Z', + title: 'title-1', + updated_at: '2020-04-20T15:25:31.830Z', + messages: [], + category: 'assistant', + id: '1', + namespace: 'default', + is_default: true, + 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', + }, + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + replacements: undefined, + }, + }, + ], + max_score: 0, + total: 1, + }, + timed_out: false, + took: 10, + }); + +describe('createConversation', () => { + let logger: ReturnType; + beforeEach(() => { + jest.clearAllMocks(); + logger = loggingSystemMock.createLogger(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + beforeAll(() => { + jest.useFakeTimers(); + const date = '2024-01-28T04:20:02.394Z'; + jest.setSystemTime(new Date(date)); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + test('it returns a conversation as expected with the id changed out for the elastic id', async () => { + const conversation = getCreateConversationMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce({ + ...getConversationResponseMock(), + id: 'elastic-id-123', + }); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.create.mockResponse( + // @ts-expect-error not full response interface + { _id: 'elastic-id-123' } + ); + const createdConversation = await createConversation({ + esClient, + conversationIndex: 'index-1', + spaceId: 'test', + user: mockUser1, + conversation, + logger, + }); + + const expected: ConversationResponse = { + ...getConversationResponseMock(), + id: 'elastic-id-123', + }; + + expect(createdConversation).toEqual(expected); + }); + + test('it returns a conversation as expected with the id changed out for the elastic id and title set', async () => { + const conversation: ConversationCreateProps = { + ...getCreateConversationMock(), + title: 'test new title', + }; + (getConversation as unknown as jest.Mock).mockResolvedValueOnce({ + ...getConversationResponseMock(), + id: 'elastic-id-123', + title: 'test new title', + }); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.create.mockResponse( + // @ts-expect-error not full response interface + { _id: 'elastic-id-123' } + ); + const createdConversation = await createConversation({ + esClient, + conversationIndex: 'index-1', + spaceId: 'test', + user: mockUser1, + conversation, + logger, + }); + + const expected: ConversationResponse = { + ...getConversationResponseMock(), + id: 'elastic-id-123', + title: 'test new title', + }; + expect(createdConversation).toEqual(expected); + }); + + test('It calls "esClient" with body, id, and conversationIndex', async () => { + const conversation = getCreateConversationMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(getConversationResponseMock()); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + await createConversation({ + esClient, + conversationIndex: 'index-1', + spaceId: 'test', + user: mockUser1, + conversation, + logger, + }); + + expect(esClient.create).toBeCalled(); + }); + + test('It returns an auto-generated id if id is sent in undefined', async () => { + const conversation = getCreateConversationMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce({ + ...getConversationResponseMock(), + id: 'elastic-id-123', + }); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.create.mockResponse( + // @ts-expect-error not full response interface + { _id: 'elastic-id-123' } + ); + const createdConversation = await createConversation({ + esClient, + conversationIndex: 'index-1', + spaceId: 'test', + user: mockUser1, + conversation, + logger, + }); + + const expected: ConversationResponse = { + ...getConversationResponseMock(), + id: 'elastic-id-123', + }; + expect(createdConversation).toEqual(expected); + }); +}); 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 new file mode 100644 index 0000000000000..6558d6c5123dc --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts @@ -0,0 +1,112 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { + ConversationCategoryEnum, + ConversationCreateProps, + ConversationResponse, +} from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { getConversation } from './get_conversation'; +import { CreateMessageSchema } from './types'; + +export interface CreateConversationParams { + esClient: ElasticsearchClient; + logger: Logger; + conversationIndex: string; + spaceId: string; + user: AuthenticatedUser; + conversation: ConversationCreateProps; +} + +export const createConversation = async ({ + esClient, + conversationIndex, + spaceId, + user, + conversation, + logger, +}: CreateConversationParams): Promise => { + const createdAt = new Date().toISOString(); + const body = transformToCreateScheme(createdAt, spaceId, user, conversation); + try { + const response = await esClient.create({ + body, + id: uuidv4(), + index: conversationIndex, + refresh: 'wait_for', + }); + + const createdConversation = await getConversation({ + esClient, + conversationIndex, + id: response._id, + logger, + user, + }); + return createdConversation; + } catch (err) { + logger.error(`Error creating conversation: ${err} with title: ${conversation.title}`); + throw err; + } +}; + +export const transformToCreateScheme = ( + createdAt: string, + spaceId: string, + user: AuthenticatedUser, + { + title, + apiConfig, + category, + excludeFromLastConversationStorage, + isDefault, + messages, + replacements, + }: ConversationCreateProps +): CreateMessageSchema => { + return { + '@timestamp': createdAt, + created_at: createdAt, + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + title, + category: category ?? ConversationCategoryEnum.assistant, + api_config: apiConfig + ? { + connector_id: apiConfig.connectorId, + connector_type_title: apiConfig.connectorTypeTitle, + default_system_prompt_id: apiConfig.defaultSystemPromptId, + model: apiConfig.model, + provider: apiConfig.provider, + } + : undefined, + exclude_from_last_conversation_storage: excludeFromLastConversationStorage, + is_default: isDefault, + messages: messages?.map((message) => ({ + '@timestamp': new Date(message.timestamp).toISOString(), + content: message.content, + is_error: message.isError, + reader: message.reader, + role: message.role, + trace_data: { + trace_id: message.traceData?.traceId, + transaction_id: message.traceData?.transactionId, + }, + })), + updated_at: createdAt, + replacements, + namespace: spaceId, + }; +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.test.ts new file mode 100644 index 0000000000000..b10e929f942cc --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.test.ts @@ -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 { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { DeleteConversationParams, deleteConversation } from './delete_conversation'; +import { getConversation } from './get_conversation'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { getConversationResponseMock } from '../../__mocks__/response'; + +jest.mock('./get_conversation', () => ({ + getConversation: jest.fn(), +})); + +export const getDeleteConversationOptionsMock = (): DeleteConversationParams => ({ + esClient: elasticsearchClientMock.createScopedClusterClient().asCurrentUser, + id: 'test', + conversationIndex: '.kibana-elastic-ai-assistant-conversations', + logger: loggingSystemMock.createLogger(), +}); + +describe('deleteConversation', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('Delete returns a null if the conversation is also null', async () => { + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(null); + const options = getDeleteConversationOptionsMock(); + const deletedConversation = await deleteConversation(options); + expect(deletedConversation).toEqual(undefined); + }); + + test('Delete returns the conversation id if a conversation is returned from getConversation', async () => { + const conversation = getConversationResponseMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(conversation); + const options = getDeleteConversationOptionsMock(); + options.esClient.deleteByQuery = jest.fn().mockResolvedValue({ deleted: 1 }); + const deletedConversations = await deleteConversation(options); + expect(deletedConversations).toEqual(1); + }); + + test('Delete does not call data client if the conversation returns null', async () => { + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(null); + const options = getDeleteConversationOptionsMock(); + await deleteConversation(options); + expect(options.esClient.delete).not.toHaveBeenCalled(); + }); + + test('throw error if no conversation was deleted', async () => { + const conversation = getConversationResponseMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(conversation); + const options = getDeleteConversationOptionsMock(); + options.esClient.deleteByQuery = jest.fn().mockResolvedValue({ deleted: 0 }); + + await expect(deleteConversation(options)).rejects.toThrow('No conversation has been deleted'); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.ts new file mode 100644 index 0000000000000..38914ce2e8db4 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/delete_conversation.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 { ElasticsearchClient, Logger } from '@kbn/core/server'; + +export interface DeleteConversationParams { + esClient: ElasticsearchClient; + conversationIndex: string; + id: string; + logger: Logger; +} +export const deleteConversation = async ({ + esClient, + conversationIndex, + id, + logger, +}: DeleteConversationParams): Promise => { + try { + const response = await esClient.deleteByQuery({ + body: { + query: { + ids: { + values: [id], + }, + }, + }, + conflicts: 'proceed', + index: conversationIndex, + refresh: true, + }); + + if (!response.deleted && response.deleted === 0) { + logger.error(`Error deleting conversation by id: ${id}`); + throw Error('No conversation has been deleted'); + } + return response.deleted; + } catch (err) { + logger.error(`Error deleting conversation: ${err} with id: ${id}`); + throw err; + } +}; 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 new file mode 100644 index 0000000000000..9c2461ac928f5 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/field_maps_configuration.ts @@ -0,0 +1,170 @@ +/* + * 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 { FieldMap } from '@kbn/data-stream-adapter'; + +export const conversationsFieldMap: FieldMap = { + '@timestamp': { + type: 'date', + array: false, + required: false, + }, + users: { + type: 'nested', + array: true, + required: false, + }, + 'users.id': { + type: 'keyword', + array: false, + required: true, + }, + 'users.name': { + type: 'keyword', + array: false, + required: false, + }, + id: { + type: 'keyword', + array: false, + required: true, + }, + title: { + type: 'keyword', + array: false, + required: true, + }, + is_default: { + type: 'boolean', + array: false, + required: false, + }, + updated_at: { + type: 'date', + array: false, + required: false, + }, + created_at: { + type: 'date', + array: false, + required: false, + }, + messages: { + type: 'nested', + array: true, + required: false, + }, + 'messages.@timestamp': { + type: 'date', + array: false, + required: true, + }, + 'messages.role': { + type: 'keyword', + array: false, + required: true, + }, + 'messages.is_error': { + type: 'boolean', + array: false, + required: false, + }, + 'messages.content': { + type: 'text', + array: false, + required: false, + }, + 'messages.reader': { + type: 'object', + array: false, + required: false, + }, + 'messages.trace_data': { + type: 'object', + array: false, + required: false, + }, + 'messages.trace_data.transaction_id': { + type: 'keyword', + array: false, + required: false, + }, + 'messages.trace_data.trace_id': { + type: 'keyword', + array: false, + required: false, + }, + replacements: { + type: 'object', + array: false, + required: false, + }, + 'replacements.value': { + type: 'keyword', + array: false, + required: false, + }, + 'replacements.uuid': { + type: 'keyword', + array: false, + required: false, + }, + summary: { + type: 'object', + array: false, + required: false, + }, + 'summary.content': { + type: 'text', + array: false, + required: false, + }, + 'summary.@timestamp': { + type: 'date', + array: false, + required: true, + }, + 'summary.public': { + type: 'boolean', + array: false, + required: false, + }, + 'summary.confidence': { + type: 'keyword', + array: false, + required: false, + }, + api_config: { + type: 'object', + array: false, + required: false, + }, + 'api_config.connector_id': { + type: 'keyword', + 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, + required: false, + }, + 'api_config.provider': { + type: 'keyword', + array: false, + required: false, + }, + 'api_config.model': { + type: 'keyword', + array: false, + required: false, + }, +} as const; 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 new file mode 100644 index 0000000000000..1ea3962c9def9 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.test.ts @@ -0,0 +1,148 @@ +/* + * 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 { Logger } from '@kbn/core/server'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { getConversation } from './get_conversation'; +import { estypes } from '@elastic/elasticsearch'; +import { SearchEsConversationSchema } from './types'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { ConversationResponse } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +export const getConversationResponseMock = (): ConversationResponse => ({ + createdAt: '2020-04-20T15:25:31.830Z', + title: 'title-1', + updatedAt: '2020-04-20T15:25:31.830Z', + messages: [], + id: '1', + namespace: 'default', + isDefault: true, + excludeFromLastConversationStorage: false, + timestamp: '2020-04-20T15:25:31.830Z', + apiConfig: { + connectorId: 'c1', + connectorTypeTitle: 'title-c-1', + defaultSystemPromptId: 'prompt-1', + model: 'test', + provider: 'Azure OpenAI', + }, + summary: { + content: 'test', + }, + category: 'assistant', + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + replacements: undefined, +}); + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +export const getSearchConversationMock = + (): estypes.SearchResponse => ({ + _scroll_id: '123', + _shards: { + failed: 0, + skipped: 0, + successful: 0, + total: 0, + }, + hits: { + hits: [ + { + _id: '1', + _index: '', + _score: 0, + _source: { + '@timestamp': '2020-04-20T15:25:31.830Z', + created_at: '2020-04-20T15:25:31.830Z', + title: 'title-1', + updated_at: '2020-04-20T15:25:31.830Z', + messages: [], + id: '1', + namespace: 'default', + is_default: true, + 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', + }, + summary: { + content: 'test', + }, + category: 'assistant', + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + replacements: undefined, + }, + }, + ], + max_score: 0, + total: 1, + }, + timed_out: false, + took: 10, + }); + +describe('getConversation', () => { + let loggerMock: Logger; + beforeEach(() => { + jest.clearAllMocks(); + loggerMock = loggingSystemMock.createLogger(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('it returns a conversation as expected if the conversation is found', async () => { + const data = getSearchConversationMock(); + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockResponse(data); + const conversation = await getConversation({ + esClient, + conversationIndex: '.kibana-elastic-ai-assistant-conversations', + id: '1', + logger: loggerMock, + user: mockUser1, + }); + const expected = getConversationResponseMock(); + expect(conversation).toEqual(expected); + }); + + test('it returns null if the search is empty', async () => { + const data = getSearchConversationMock(); + data.hits.hits = []; + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockResponse(data); + const conversation = await getConversation({ + esClient, + conversationIndex: '.kibana-elastic-ai-assistant-conversations', + id: '1', + logger: loggerMock, + user: mockUser1, + }); + expect(conversation).toEqual(null); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.ts new file mode 100644 index 0000000000000..1418c872dd3ac --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.ts @@ -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 { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { ConversationResponse } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin/common'; +import { SearchEsConversationSchema } from './types'; +import { transformESToConversations } from './transforms'; + +export interface GetConversationParams { + esClient: ElasticsearchClient; + logger: Logger; + conversationIndex: string; + id: string; + user?: AuthenticatedUser | null; +} + +export const getConversation = async ({ + esClient, + logger, + conversationIndex, + id, + user, +}: GetConversationParams): Promise => { + const filterByUser = user + ? [ + { + nested: { + path: 'users', + query: { + bool: { + must: [ + { + match: user.profile_uid + ? { 'users.id': user.profile_uid } + : { 'users.name': user.username }, + }, + ], + }, + }, + }, + }, + ] + : []; + try { + const response = await esClient.search({ + body: { + query: { + bool: { + must: [ + { + bool: { + should: [ + { + term: { + _id: id, + }, + }, + ], + }, + }, + ...filterByUser, + ], + }, + }, + }, + _source: true, + ignore_unavailable: true, + index: conversationIndex, + seq_no_primary_term: true, + }); + const conversation = transformESToConversations(response); + return conversation[0] ?? null; + } catch (err) { + logger.error(`Error fetching conversation: ${err} with id: ${id}`); + throw err; + } +}; 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 new file mode 100644 index 0000000000000..3d022c0063fa5 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/helpers.ts @@ -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 { UpdateConversationSchema } from './update_conversation'; + +export const getUpdateScript = ({ + conversation, + isPatch, +}: { + conversation: UpdateConversationSchema; + isPatch?: boolean; +}) => { + return { + source: ` + if (params.assignEmpty == true || params.containsKey('api_config')) { + if (ctx._source.api_config != null) { + 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; + } + if (params.assignEmpty == true || params.api_config.containsKey('model')) { + ctx._source.api_config.model = params.api_config.model; + } + if (params.assignEmpty == true || params.api_config.containsKey('provider')) { + ctx._source.api_config.provider = params.api_config.provider; + } + } else { + ctx._source.api_config = params.api_config; + } + } + if (params.assignEmpty == true || params.containsKey('exclude_from_last_conversation_storage')) { + ctx._source.exclude_from_last_conversation_storage = params.exclude_from_last_conversation_storage; + } + if (params.assignEmpty == true || params.containsKey('replacements')) { + ctx._source.replacements = params.replacements; + } + if (params.assignEmpty == true || params.containsKey('title')) { + ctx._source.title = params.title; + } + if (params.assignEmpty == true || params.containsKey('messages')) { + def messages = []; + for (message in params.messages) { + def newMessage = [:]; + newMessage['@timestamp'] = message['@timestamp']; + newMessage.content = message.content; + newMessage.is_error = message.is_error; + newMessage.reader = message.reader; + newMessage.role = message.role; + if (message.trace_data != null) { + newMessage.trace_data = message.trace_data; + } + messages.add(newMessage); + } + ctx._source.messages = messages; + } + ctx._source.updated_at = params.updated_at; + `, + lang: 'painless', + params: { + ...conversation, // when assigning undefined in painless, it will remove property and wil set it to null + // for patch we don't want to remove unspecified value in payload + assignEmpty: !(isPatch ?? true), + }, + }; +}; 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 new file mode 100644 index 0000000000000..ec1a36ceb3563 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts @@ -0,0 +1,210 @@ +/* + * 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 { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import type { UpdateByQueryRequest } from '@elastic/elasticsearch/lib/api/types'; +import { AIAssistantConversationsDataClient } from '.'; +import { AuthenticatedUser } from '@kbn/security-plugin/server'; +import { getUpdateConversationSchemaMock } from '../../__mocks__/conversations_schema.mock'; +import { AIAssistantDataClientParams } from '..'; + +const date = '2023-03-28T22:27:28.159Z'; +let logger: ReturnType; +const clusterClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +describe('AIAssistantConversationsDataClient', () => { + let assistantConversationsDataClientParams: AIAssistantDataClientParams; + + beforeEach(() => { + jest.clearAllMocks(); + logger = loggingSystemMock.createLogger(); + assistantConversationsDataClientParams = { + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + }; + }); + + beforeAll(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date(date)); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + test('should get by id the persistent conversation successfully', async () => { + clusterClient.search.mockReturnValue({ + // @ts-ignore + hits: { + total: { value: 1 }, + hits: [ + { + _source: { + '@timestamp': '2024-01-25T01:32:37.649Z', + updated_at: '2024-01-25T01:34:51.303Z', + 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', + messages: [ + { + '@timestamp': '1/24/2024, 5:32:19 PM', + role: 'assistant', + reader: null, + is_error: null, + content: + 'Go ahead and click the add connector button below to continue the conversation!', + }, + { + '@timestamp': '1/24/2024, 5:32:37 PM', + role: 'assistant', + reader: null, + is_error: null, + content: 'Connector setup complete!', + }, + { + '@timestamp': '1/24/2024, 5:34:50 PM', + role: 'assistant', + reader: null, + is_error: true, + content: 'An error occurred sending your message.', + }, + ], + title: 'Alert summary', + is_default: true, + users: [ + { + name: 'elastic', + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + }, + ], + }, + }, + ], + }, + }); + + const assistantConversationsDataClient = new AIAssistantConversationsDataClient( + assistantConversationsDataClientParams + ); + const result = await assistantConversationsDataClient.getConversation({ id: '1' }); + + expect(clusterClient.search).toHaveBeenCalledTimes(1); + + expect(result).toEqual({ + apiConfig: { + connectorId: 'bedbf764-b991-4115-a9fc-1cfeaef21046', + connectorTypeTitle: 'Amazon Bedrock', + defaultSystemPromptId: undefined, + model: 'anthropic.claude-v2', + provider: undefined, + }, + createdAt: '2024-01-25T01:32:37.649Z', + excludeFromLastConversationStorage: undefined, + id: undefined, + isDefault: true, + messages: [ + { + content: + 'Go ahead and click the add connector button below to continue the conversation!', + role: 'assistant', + timestamp: '1/24/2024, 5:32:19 PM', + }, + { + content: 'Connector setup complete!', + role: 'assistant', + timestamp: '1/24/2024, 5:32:37 PM', + }, + { + content: 'An error occurred sending your message.', + isError: true, + role: 'assistant', + timestamp: '1/24/2024, 5:34:50 PM', + }, + ], + namespace: 'hghjghjghghjghg33', + replacements: undefined, + timestamp: '2024-01-25T01:32:37.649Z', + title: 'Alert summary', + updatedAt: '2024-01-25T01:34:51.303Z', + users: [ + { + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + name: 'elastic', + }, + ], + }); + }); + + test('should update conversation with new messages', async () => { + const assistantConversationsDataClient = new AIAssistantConversationsDataClient( + assistantConversationsDataClientParams + ); + + await assistantConversationsDataClient.updateConversation({ + conversationUpdateProps: getUpdateConversationSchemaMock( + '04128c15-0d1b-4716-a4c5-46997ac7f3bd' + ), + }); + + const params = clusterClient.updateByQuery.mock.calls[0][0] as UpdateByQueryRequest; + + expect(params.query).toEqual({ + ids: { + values: ['04128c15-0d1b-4716-a4c5-46997ac7f3bd'], + }, + }); + + expect(params.script).toEqual({ + source: expect.anything(), + lang: 'painless', + params: { + api_config: { + connector_id: '2', + connector_type_title: 'Test connector', + default_system_prompt_id: 'Default', + model: 'model', + provider: undefined, + }, + assignEmpty: false, + exclude_from_last_conversation_storage: false, + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + messages: [ + { + '@timestamp': '2019-12-13T16:40:33.400Z', + content: 'test content', + is_error: undefined, + reader: undefined, + role: 'user', + trace_data: { + trace_id: '1', + transaction_id: '2', + }, + }, + ], + replacements: undefined, + title: 'Welcome 2', + updated_at: '2023-03-28T22:27:28.159Z', + }, + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.ts new file mode 100644 index 0000000000000..c937e86a982f6 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.ts @@ -0,0 +1,150 @@ +/* + * 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 { AuthenticatedUser } from '@kbn/security-plugin/server'; +import { + ConversationCreateProps, + ConversationResponse, + ConversationUpdateProps, + Message, +} from '@kbn/elastic-assistant-common'; +import { createConversation } from './create_conversation'; +import { updateConversation } from './update_conversation'; +import { getConversation } from './get_conversation'; +import { deleteConversation } from './delete_conversation'; +import { appendConversationMessages } from './append_conversation_messages'; +import { AIAssistantDataClient, AIAssistantDataClientParams } from '..'; +export class AIAssistantConversationsDataClient extends AIAssistantDataClient { + constructor(public readonly options: AIAssistantDataClientParams) { + super(options); + } + + /** + * Updates a conversation with the new messages. + * @param options + * @param options.id The existing conversation id. + * @param options.authenticatedUser Current authenticated user. + * @returns The conversation response + */ + public getConversation = async ({ + id, + authenticatedUser, + }: { + id: string; + authenticatedUser?: AuthenticatedUser | null; + }): Promise => { + const esClient = await this.options.elasticsearchClientPromise; + return getConversation({ + esClient, + logger: this.options.logger, + conversationIndex: this.indexTemplateAndPattern.alias, + id, + user: authenticatedUser, + }); + }; + + /** + * Updates a conversation with the new messages. + * @param options + * @param options.conversation The existing conversation to which append the new messages. + * @param options.messages Set this to true if this is a conversation that is "immutable"/"pre-packaged". + * @returns The conversation updated + */ + public appendConversationMessages = async ({ + existingConversation, + messages, + }: { + existingConversation: ConversationResponse; + messages: Message[]; + }): Promise => { + const esClient = await this.options.elasticsearchClientPromise; + return appendConversationMessages({ + esClient, + logger: this.options.logger, + conversationIndex: this.indexTemplateAndPattern.alias, + existingConversation, + messages, + }); + }; + + /** + * Creates a conversation, if given at least the "title" and "g" + * See {@link https://www.elastic.co/guide/en/security/current/} + * for more information around formats of the deserializer and serializer + * @param options + * @param options.id The id of the conversation to create or "undefined" if you want an "id" to be auto-created for you + * @param options.title A custom deserializer for the conversation. Optionally, you an define this as handle bars. See online docs for more information. + * @param options.messages Set this to true if this is a conversation that is "immutable"/"pre-packaged". + * @param options.g Determines how uploaded conversation item values are parsed. By default, conversation items are parsed using named regex groups. See online docs for more information. + * @returns The conversation created + */ + public createConversation = async ({ + conversation, + authenticatedUser, + }: { + conversation: ConversationCreateProps; + authenticatedUser: AuthenticatedUser; + }): Promise => { + const esClient = await this.options.elasticsearchClientPromise; + return createConversation({ + esClient, + logger: this.options.logger, + conversationIndex: this.indexTemplateAndPattern.alias, + spaceId: this.spaceId, + user: authenticatedUser, + conversation, + }); + }; + + /** + * Updates a conversation container's value given the id of the conversation. + * See {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html} + * for more information around optimistic concurrency control. + * @param options + * @param options.conversationUpdateProps + * @param options.conversationUpdateProps.id id of the conversation to replace the conversation container data with. + * @param options.conversationUpdateProps.title The new tilet, or "undefined" if this should not be updated. + * @param options.conversationUpdateProps.messages The new messages, or "undefined" if this should not be updated. + * @param options.conversationUpdateProps.excludeFromLastConversationStorage The new value for excludeFromLastConversationStorage, or "undefined" if this should not be updated. + * @param options.conversationUpdateProps.replacements The new value for replacements, or "undefined" if this should not be updated. + */ + public updateConversation = async ({ + conversationUpdateProps, + authenticatedUser, + isPatch, + }: { + conversationUpdateProps: ConversationUpdateProps; + authenticatedUser?: AuthenticatedUser; + isPatch?: boolean; + }): Promise => { + const esClient = await this.options.elasticsearchClientPromise; + return updateConversation({ + esClient, + logger: this.options.logger, + conversationIndex: this.indexTemplateAndPattern.alias, + conversationUpdateProps, + isPatch, + user: authenticatedUser, + }); + }; + + /** + * Given a conversation id, this will delete the conversation from the id + * @param options + * @param options.id The id of the conversation to delete + * @returns The conversation deleted if found, otherwise null + */ + public deleteConversation = async (id: string) => { + const esClient = await this.options.elasticsearchClientPromise; + return deleteConversation({ + esClient, + conversationIndex: this.indexTemplateAndPattern.alias, + id, + logger: this.options.logger, + }); + }; +} 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 new file mode 100644 index 0000000000000..b9d745dc0b625 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/transforms.ts @@ -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 { estypes } from '@elastic/elasticsearch'; +import { + ConversationResponse, + Replacement, + replaceOriginalValuesWithUuidValues, +} from '@kbn/elastic-assistant-common'; +import { SearchEsConversationSchema } from './types'; + +export const transformESToConversations = ( + response: estypes.SearchResponse +): ConversationResponse[] => { + return response.hits.hits + .filter((hit) => hit._source !== undefined) + .map((hit) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const conversationSchema = hit._source!; + const conversation: ConversationResponse = { + timestamp: conversationSchema['@timestamp'], + createdAt: conversationSchema.created_at, + users: + conversationSchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + title: conversationSchema.title, + category: conversationSchema.category, + summary: conversationSchema.summary, + ...(conversationSchema.api_config + ? { + 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, + }, + } + : {}), + excludeFromLastConversationStorage: + conversationSchema.exclude_from_last_conversation_storage, + isDefault: conversationSchema.is_default, + messages: + // eslint-disable-next-line @typescript-eslint/no-explicit-any + conversationSchema.messages?.map((message: Record) => ({ + timestamp: new Date(message['@timestamp']).toLocaleString(), + // always return anonymized data from the client + content: replaceOriginalValuesWithUuidValues({ + messageContent: message.content, + replacements: conversationSchema.replacements ?? [], + }), + ...(message.is_error ? { isError: message.is_error } : {}), + ...(message.reader ? { reader: message.reader } : {}), + role: message.role, + ...(message.trace_data + ? { + traceData: { + traceId: message.trace_data?.trace_id, + transactionId: message.trace_data?.transaction_id, + }, + } + : {}), + })) ?? [], + updatedAt: conversationSchema.updated_at, + replacements: conversationSchema.replacements as Replacement[], + namespace: conversationSchema.namespace, + id: hit._id, + }; + + return conversation; + }); +}; 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 new file mode 100644 index 0000000000000..9eb4633c366ec --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/types.ts @@ -0,0 +1,91 @@ +/* + * 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 { + ConversationCategory, + ConversationConfidence, + MessageRole, + Provider, + Reader, + Replacement, +} from '@kbn/elastic-assistant-common'; + +export interface SearchEsConversationSchema { + id: string; + '@timestamp': string; + created_at: string; + title: string; + summary?: { + content?: string; + timestamp?: string; + public?: boolean; + confidence?: ConversationConfidence; + }; + category: ConversationCategory; + messages?: Array<{ + '@timestamp': string; + content: string; + reader?: Reader; + role: MessageRole; + is_error?: boolean; + trace_data?: { + transaction_id?: string; + trace_id?: string; + }; + }>; + api_config?: { + connector_id: string; + connector_type_title: string; + default_system_prompt_id?: string; + provider?: Provider; + model?: string; + }; + is_default?: boolean; + exclude_from_last_conversation_storage?: boolean; + replacements?: Replacement[]; + users?: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + namespace: string; +} + +export interface CreateMessageSchema { + '@timestamp'?: string; + created_at: string; + title: string; + id?: string | undefined; + category: ConversationCategory; + messages?: Array<{ + '@timestamp': string; + content: string; + reader?: Reader; + role: MessageRole; + is_error?: boolean; + trace_data?: { + transaction_id?: string; + trace_id?: string; + }; + }>; + api_config?: { + connector_id?: string; + connector_type_title?: string; + default_system_prompt_id?: string; + provider?: Provider; + model?: string; + }; + is_default?: boolean; + exclude_from_last_conversation_storage?: boolean; + replacements?: Replacement[]; + users: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + namespace: 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 new file mode 100644 index 0000000000000..3b1983d5f77e8 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.test.ts @@ -0,0 +1,115 @@ +/* + * 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 { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { loggerMock } from '@kbn/logging-mocks'; +import { 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'; + +export const getUpdateConversationOptionsMock = (): ConversationUpdateProps => ({ + id: 'test', + title: 'test', + apiConfig: { + connectorId: '1', + connectorTypeTitle: 'test-connector', + defaultSystemPromptId: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + excludeFromLastConversationStorage: false, + messages: [], + replacements: [], +}); + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +export const getConversationResponseMock = (): ConversationResponse => ({ + id: 'test', + title: 'test', + apiConfig: { + connectorId: '1', + connectorTypeTitle: 'test-connector', + defaultSystemPromptId: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + category: 'assistant', + excludeFromLastConversationStorage: false, + messages: [], + replacements: [], + createdAt: '2020-04-20T15:25:31.830Z', + namespace: 'default', + isDefault: false, + updatedAt: '2020-04-20T15:25:31.830Z', + timestamp: '2020-04-20T15:25:31.830Z', + users: [ + { + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + name: 'elastic', + }, + ], +}); + +jest.mock('./get_conversation', () => ({ + getConversation: jest.fn(), +})); + +describe('updateConversation', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('it returns a conversation with serializer and deserializer', async () => { + const conversation: ConversationUpdateProps = getUpdateConversationOptionsMock(); + const existingConversation = getConversationResponseMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(existingConversation); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.updateByQuery.mockResolvedValue({ updated: 1 }); + + const updatedList = await updateConversation({ + esClient, + logger: loggerMock.create(), + conversationIndex: 'index-1', + conversationUpdateProps: conversation, + user: mockUser1, + }); + const expected: ConversationResponse = { + ...getConversationResponseMock(), + id: conversation.id, + title: 'test', + }; + expect(updatedList).toEqual(expected); + }); + + test('it returns null when there is not a conversation to update', async () => { + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(null); + const conversation = getUpdateConversationOptionsMock(); + + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const updatedList = await updateConversation({ + esClient, + logger: loggerMock.create(), + conversationIndex: 'index-1', + conversationUpdateProps: conversation, + user: mockUser1, + }); + expect(updatedList).toEqual(null); + }); +}); 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 new file mode 100644 index 0000000000000..933a8c08a51fe --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.ts @@ -0,0 +1,140 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { + ConversationResponse, + Replacement, + Reader, + ConversationUpdateProps, + Provider, + MessageRole, + ConversationSummary, + UUID, +} from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin/common'; +import { getConversation } from './get_conversation'; +import { getUpdateScript } from './helpers'; + +export interface UpdateConversationSchema { + id: UUID; + '@timestamp'?: string; + title?: string; + messages?: Array<{ + '@timestamp': string; + content: string; + reader?: Reader; + role: MessageRole; + is_error?: boolean; + trace_data?: { + transaction_id?: string; + trace_id?: string; + }; + }>; + api_config?: { + connector_id?: string; + connector_type_title?: string; + default_system_prompt_id?: string; + provider?: Provider; + model?: string; + }; + summary?: ConversationSummary; + exclude_from_last_conversation_storage?: boolean; + replacements?: Replacement[]; + updated_at?: string; +} + +export interface UpdateConversationParams { + esClient: ElasticsearchClient; + logger: Logger; + user?: AuthenticatedUser; + conversationIndex: string; + conversationUpdateProps: ConversationUpdateProps; + isPatch?: boolean; +} + +export const updateConversation = async ({ + esClient, + logger, + conversationIndex, + conversationUpdateProps, + isPatch, + user, +}: UpdateConversationParams): Promise => { + const updatedAt = new Date().toISOString(); + const params = transformToUpdateScheme(updatedAt, conversationUpdateProps); + try { + const response = await esClient.updateByQuery({ + conflicts: 'proceed', + index: conversationIndex, + query: { + ids: { + values: [params.id], + }, + }, + refresh: true, + script: getUpdateScript({ conversation: params, isPatch }), + }); + + if (response.failures && response.failures.length > 0) { + logger.warn( + `Error updating conversation: ${response.failures.map((f) => f.id)} by ID: ${params.id}` + ); + return null; + } + + const updatedConversation = await getConversation({ + esClient, + conversationIndex, + id: params.id, + logger, + user, + }); + return updatedConversation; + } catch (err) { + logger.warn(`Error updating conversation: ${err} by ID: ${params.id}`); + throw err; + } +}; + +export const transformToUpdateScheme = ( + updatedAt: string, + { + title, + apiConfig, + excludeFromLastConversationStorage, + messages, + replacements, + id, + }: ConversationUpdateProps +): UpdateConversationSchema => { + return { + id, + updated_at: updatedAt, + title, + api_config: { + connector_id: apiConfig?.connectorId, + connector_type_title: apiConfig?.connectorTypeTitle, + default_system_prompt_id: apiConfig?.defaultSystemPromptId, + model: apiConfig?.model, + provider: apiConfig?.provider, + }, + exclude_from_last_conversation_storage: excludeFromLastConversationStorage, + replacements, + messages: messages?.map((message) => ({ + '@timestamp': new Date(message.timestamp).toISOString(), + content: message.content, + is_error: message.isError, + reader: message.reader, + role: message.role, + trace_data: { + trace_id: message.traceData?.traceId, + transaction_id: message.traceData?.transactionId, + }, + })), + }; +}; 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 new file mode 100644 index 0000000000000..a16cf81fb8de3 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.test.ts @@ -0,0 +1,213 @@ +/* + * 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 { Logger } from '@kbn/core/server'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { estypes } from '@elastic/elasticsearch'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { ConversationResponse } from '@kbn/elastic-assistant-common'; +import { findDocuments } from './find'; +import { SearchEsConversationSchema } from './conversations/types'; + +export const findDocumentsResponseMock = (): ConversationResponse => ({ + createdAt: '2020-04-20T15:25:31.830Z', + title: 'title-1', + updatedAt: '2020-04-20T15:25:31.830Z', + messages: [], + id: '1', + namespace: 'default', + isDefault: true, + excludeFromLastConversationStorage: false, + timestamp: '2020-04-20T15:25:31.830Z', + apiConfig: { + connectorId: 'c1', + connectorTypeTitle: 'title-c-1', + defaultSystemPromptId: 'prompt-1', + model: 'test', + provider: 'Azure OpenAI', + }, + summary: { + content: 'test', + }, + category: 'assistant', + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + replacements: undefined, +}); + +export const getSearchConversationMock = + (): estypes.SearchResponse => ({ + _scroll_id: '123', + _shards: { + failed: 0, + skipped: 0, + successful: 0, + total: 0, + }, + hits: { + hits: [ + { + _id: '1', + _index: '', + _score: 0, + _source: { + '@timestamp': '2020-04-20T15:25:31.830Z', + created_at: '2020-04-20T15:25:31.830Z', + title: 'title-1', + updated_at: '2020-04-20T15:25:31.830Z', + messages: [], + id: '1', + namespace: 'default', + is_default: true, + 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', + }, + summary: { + content: 'test', + }, + category: 'assistant', + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + replacements: undefined, + }, + }, + ], + max_score: 0, + total: 1, + }, + timed_out: false, + took: 10, + }); + +describe('findDocuments', () => { + let loggerMock: Logger; + beforeEach(() => { + jest.clearAllMocks(); + loggerMock = loggingSystemMock.createLogger(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('it returns a conversation as expected if the conversation is found', async () => { + const data = getSearchConversationMock(); + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockResponse(data); + const conversation = await findDocuments({ + esClient, + index: '.kibana-elastic-ai-assistant-conversations', + page: 1, + perPage: 10, + logger: loggerMock, + }); + expect(conversation).toEqual({ + data: { + _scroll_id: '123', + _shards: { + failed: 0, + skipped: 0, + successful: 0, + total: 0, + }, + hits: { + hits: [ + { + _id: '1', + _index: '', + _score: 0, + _source: { + '@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', + }, + category: 'assistant', + created_at: '2020-04-20T15:25:31.830Z', + exclude_from_last_conversation_storage: false, + id: '1', + is_default: true, + messages: [], + namespace: 'default', + replacements: undefined, + summary: { + content: 'test', + }, + title: 'title-1', + updated_at: '2020-04-20T15:25:31.830Z', + users: [ + { + id: '1111', + name: 'elastic', + }, + ], + }, + }, + ], + max_score: 0, + total: 1, + }, + timed_out: false, + took: 10, + }, + page: 1, + perPage: 10, + total: 1, + }); + }); + + test('it returns empty data array if the search is empty', async () => { + const data = getSearchConversationMock(); + data.hits.hits = []; + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockResponse(data); + const conversations = await findDocuments({ + esClient, + index: '.kibana-elastic-ai-assistant-conversations', + page: 1, + perPage: 10, + logger: loggerMock, + }); + expect(conversations.data).toEqual({ + _scroll_id: '123', + _shards: { failed: 0, skipped: 0, successful: 0, total: 0 }, + hits: { hits: [], max_score: 0, total: 1 }, + timed_out: false, + took: 10, + }); + }); + + test('throw error if ES client get fails', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + esClient.search.mockRejectedValueOnce(new Error('Request has been aborted by the user')); + await expect( + findDocuments({ + esClient, + index: '.kibana-elastic-ai-assistant-conversations', + page: 1, + perPage: 10, + logger: loggerMock, + }) + ).rejects.toThrow('Request has been aborted by the user'); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.ts new file mode 100644 index 0000000000000..3fe1c36832235 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.ts @@ -0,0 +1,105 @@ +/* + * 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 { MappingRuntimeFields, Sort } from '@elastic/elasticsearch/lib/api/types'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { estypes } from '@elastic/elasticsearch'; +import { EsQueryConfig, Query, buildEsQuery } from '@kbn/es-query'; + +interface FindOptions { + filter?: string; + fields?: string[]; + perPage: number; + page: number; + sortField?: string; + sortOrder?: estypes.SortOrder; + esClient: ElasticsearchClient; + index: string; + runtimeMappings?: MappingRuntimeFields | undefined; + logger: Logger; +} + +export interface FindResponse { + data: estypes.SearchResponse>; + page: number; + perPage: number; + total: number; +} + +export const findDocuments = async ({ + esClient, + filter, + page, + perPage, + sortField, + index, + fields, + sortOrder, + logger, +}: FindOptions): Promise> => { + const query = getQueryFilter({ filter }); + let sort: Sort | undefined; + const ascOrDesc = sortOrder ?? ('asc' as const); + if (sortField != null) { + sort = [{ [sortField]: ascOrDesc }]; + } else { + sort = { + updated_at: { + order: 'desc', + }, + }; + } + try { + const response = await esClient.search({ + body: { + query, + track_total_hits: true, + sort, + }, + _source: true, + from: (page - 1) * perPage, + ignore_unavailable: true, + index, + seq_no_primary_term: true, + size: perPage, + }); + return { + data: response, + page, + perPage, + total: + (typeof response.hits.total === 'number' + ? response.hits.total // This format is to be removed in 8.0 + : response.hits.total?.value) ?? 0, + }; + } catch (err) { + logger.error(`Error fetching documents: ${err}`); + throw err; + } +}; + +export interface GetQueryFilterOptions { + filter?: string; +} + +export const getQueryFilter = ({ filter }: GetQueryFilterOptions) => { + const kqlQuery: Query | Query[] = filter + ? { + language: 'kuery', + query: filter, + } + : []; + const config: EsQueryConfig = { + allowLeadingWildcards: true, + dateFormatTZ: 'Zulu', + ignoreFilterIfFieldNotInIndex: false, + queryStringOptions: { analyze_wildcard: true }, + }; + + return buildEsQuery(undefined, kqlQuery, [], config); +}; 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 new file mode 100644 index 0000000000000..e375b10425123 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.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 { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { AIAssistantDataClient, AIAssistantDataClientParams } from '.'; +import { AuthenticatedUser } from '@kbn/security-plugin/server'; + +const date = '2023-03-28T22:27:28.159Z'; +let logger: ReturnType; +const clusterClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +describe('AIAssistantDataClient', () => { + let assistantDataClientParams: AIAssistantDataClientParams; + + beforeEach(() => { + jest.clearAllMocks(); + logger = loggingSystemMock.createLogger(); + assistantDataClientParams = { + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + }; + }); + + beforeAll(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date(date)); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + describe('getWriter', () => { + it('should return a writer object', async () => { + const assistantConversationsDataClient = new AIAssistantDataClient(assistantDataClientParams); + const writer = await assistantConversationsDataClient.getWriter(); + expect(writer).toBeDefined(); + expect(typeof writer?.bulk).toBe('function'); + }); + + it('should cache and return the same writer for the same namespace', async () => { + const assistantConversationsDataClient = new AIAssistantDataClient({ + ...assistantDataClientParams, + spaceId: 'default', + }); + const writer1 = await assistantConversationsDataClient.getWriter(); + const writer2 = await assistantConversationsDataClient.getWriter(); + + const assistantConversationsDataClient2 = new AIAssistantDataClient({ + ...assistantDataClientParams, + spaceId: 'space-1', + }); + const writer3 = await assistantConversationsDataClient2.getWriter(); + + expect(writer1).toEqual(writer2); + expect(writer2).not.toEqual(writer3); + }); + }); + + describe('getReader', () => { + it('should return a reader object', async () => { + const assistantConversationsDataClient = new AIAssistantDataClient(assistantDataClientParams); + const reader = await assistantConversationsDataClient.getReader(); + expect(reader).toBeDefined(); + expect(typeof reader?.search).toBe('function'); + }); + + it('should perform search on the same as reader namespace', async () => { + const assistantConversationsDataClient = new AIAssistantDataClient({ + ...assistantDataClientParams, + spaceId: 'default', + }); + const reader = await assistantConversationsDataClient.getReader(); + const query = { query: { bool: { filter: { range: { '@timestamp': { gte: 0 } } } } } }; + await reader.search({ + body: query, + }); + + expect(clusterClient.search).toHaveBeenCalledWith({ + body: query, + ignore_unavailable: true, + index: '.kibana-elastic-ai-assistant-conversations-default', + seq_no_primary_term: true, + }); + }); + + it('should throw proper error message when search is failed', async () => { + const assistantConversationsDataClient = new AIAssistantDataClient({ + ...assistantDataClientParams, + spaceId: 'default', + }); + clusterClient.search.mockRejectedValueOnce(new Error('something went wrong!')); + + const reader = await assistantConversationsDataClient.getReader(); + const query = { query: { bool: { filter: { range: { '@timestamp': { gte: 0 } } } } } }; + + await expect( + reader.search({ + body: query, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"something went wrong!"`); + + expect(logger.error).toHaveBeenCalledWith( + `Error performing search in AIAssistantDataClient - something went wrong!` + ); + }); + }); + + test('should find the conversations successfully defined by search criterias', async () => { + clusterClient.search.mockReturnValue({ + // @ts-ignore + hits: { + total: { value: 1 }, + hits: [ + { + _source: { + '@timestamp': '2024-01-25T01:32:37.649Z', + updated_at: '2024-01-25T01:34:51.303Z', + 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', + messages: [ + { + '@timestamp': '1/24/2024, 5:32:19 PM', + role: 'assistant', + reader: null, + is_error: null, + content: + 'Go ahead and click the add connector button below to continue the conversation!', + }, + { + '@timestamp': '1/24/2024, 5:32:37 PM', + role: 'assistant', + reader: null, + is_error: null, + content: 'Connector setup complete!', + }, + { + '@timestamp': '1/24/2024, 5:34:50 PM', + role: 'assistant', + reader: null, + is_error: true, + content: 'An error occurred sending your message.', + }, + ], + title: 'Alert summary', + is_default: true, + users: [ + { + name: 'elastic', + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + }, + ], + }, + }, + ], + }, + }); + + const assistantConversationsDataClient = new AIAssistantDataClient(assistantDataClientParams); + const result = await assistantConversationsDataClient.findDocuments({ + page: 1, + perPage: 10, + filter: '', + }); + + expect(clusterClient.search).toHaveBeenCalledTimes(1); + + expect(result).toEqual({ + data: { + hits: { + hits: [ + { + _source: { + '@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', + is_default: true, + messages: [ + { + '@timestamp': '1/24/2024, 5:32:19 PM', + content: + 'Go ahead and click the add connector button below to continue the conversation!', + is_error: null, + reader: null, + role: 'assistant', + }, + { + '@timestamp': '1/24/2024, 5:32:37 PM', + content: 'Connector setup complete!', + is_error: null, + reader: null, + role: 'assistant', + }, + { + '@timestamp': '1/24/2024, 5:34:50 PM', + content: 'An error occurred sending your message.', + is_error: true, + reader: null, + role: 'assistant', + }, + ], + namespace: 'hghjghjghghjghg33', + title: 'Alert summary', + updated_at: '2024-01-25T01:34:51.303Z', + users: [ + { + id: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + name: 'elastic', + }, + ], + }, + }, + ], + total: { + value: 1, + }, + }, + }, + page: 1, + perPage: 10, + total: 1, + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts new file mode 100644 index 0000000000000..75f2b166f1468 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.ts @@ -0,0 +1,124 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; +import { AuthenticatedUser } from '@kbn/security-plugin/server'; +import { estypes } from '@elastic/elasticsearch'; +import { IIndexPatternString } from '../types'; +import { getIndexTemplateAndPattern } from '../lib/data_stream/helpers'; +import { DocumentsDataWriter } from '../lib/data_stream/documents_data_writer'; +import { FindResponse, findDocuments } from './find'; + +export interface AIAssistantDataClientParams { + elasticsearchClientPromise: Promise; + kibanaVersion: string; + spaceId: string; + logger: Logger; + indexPatternsResorceName: string; + currentUser: AuthenticatedUser | null; +} + +export class AIAssistantDataClient { + /** Kibana space id the document index are part of */ + public readonly spaceId: string; + + /** User creating, modifying, deleting, or updating a document */ + private readonly currentUser: AuthenticatedUser | null; + + private writerCache: Map = new Map(); + + public indexTemplateAndPattern: IIndexPatternString; + + constructor(public readonly options: AIAssistantDataClientParams) { + this.indexTemplateAndPattern = getIndexTemplateAndPattern( + this.options.indexPatternsResorceName, + this.options.spaceId ?? DEFAULT_NAMESPACE_STRING + ); + this.currentUser = this.options.currentUser; + this.spaceId = this.options.spaceId; + } + + public getWriter = async (): Promise => { + const spaceId = this.spaceId; + if (this.writerCache.get(spaceId)) { + return this.writerCache.get(spaceId) as DocumentsDataWriter; + } + await this.initializeWriter(spaceId, this.indexTemplateAndPattern.alias); + return this.writerCache.get(spaceId) as DocumentsDataWriter; + }; + + private async initializeWriter(spaceId: string, index: string): Promise { + const esClient = await this.options.elasticsearchClientPromise; + const writer = new DocumentsDataWriter({ + esClient, + spaceId, + index, + logger: this.options.logger, + user: { id: this.currentUser?.profile_uid, name: this.currentUser?.username }, + }); + + this.writerCache.set(spaceId, writer); + return writer; + } + + public getReader = async () => { + const indexPatterns = this.indexTemplateAndPattern.alias; + + return { + search: async >( + request: TSearchRequest + ): Promise> => { + try { + const esClient = await this.options.elasticsearchClientPromise; + return (await esClient.search({ + ...request, + index: indexPatterns, + ignore_unavailable: true, + seq_no_primary_term: true, + })) as unknown as ESSearchResponse; + } catch (err) { + this.options.logger.error( + `Error performing search in AIAssistantDataClient - ${err.message}` + ); + throw err; + } + }, + }; + }; + + public findDocuments = async ({ + perPage, + page, + sortField, + sortOrder, + filter, + fields, + }: { + perPage: number; + page: number; + sortField?: string; + sortOrder?: string; + filter?: string; + fields?: string[]; + }): Promise>> => { + const esClient = await this.options.elasticsearchClientPromise; + return findDocuments({ + esClient, + fields, + page, + perPage, + filter, + sortField, + index: this.indexTemplateAndPattern.alias, + sortOrder: sortOrder as estypes.SortOrder, + logger: this.options.logger, + }); + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/field_maps_configuration.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/field_maps_configuration.ts new file mode 100644 index 0000000000000..50df573d01872 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/field_maps_configuration.ts @@ -0,0 +1,86 @@ +/* + * 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 { FieldMap } from '@kbn/data-stream-adapter'; + +export const assistantPromptsFieldMap: FieldMap = { + '@timestamp': { + type: 'date', + array: false, + required: false, + }, + id: { + type: 'keyword', + array: false, + required: true, + }, + is_default: { + type: 'boolean', + array: false, + required: false, + }, + is_shared: { + type: 'boolean', + array: false, + required: false, + }, + is_new_conversation_default: { + type: 'boolean', + array: false, + required: false, + }, + name: { + type: 'keyword', + array: false, + required: true, + }, + prompt_type: { + type: 'keyword', + array: false, + required: true, + }, + content: { + type: 'keyword', + array: false, + required: true, + }, + updated_at: { + type: 'date', + array: false, + required: false, + }, + updated_by: { + type: 'keyword', + array: false, + required: false, + }, + created_at: { + type: 'date', + array: false, + required: false, + }, + created_by: { + type: 'keyword', + array: false, + required: false, + }, + users: { + type: 'nested', + array: true, + required: false, + }, + 'users.id': { + type: 'keyword', + array: false, + required: false, + }, + 'users.name': { + type: 'keyword', + array: false, + required: false, + }, +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts new file mode 100644 index 0000000000000..04db04a00b257 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts @@ -0,0 +1,119 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import { + PromptCreateProps, + PromptResponse, + PromptUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { CreatePromptSchema, SearchEsPromptsSchema, UpdatePromptSchema } from './types'; + +export const transformESToPrompts = ( + response: estypes.SearchResponse +): PromptResponse[] => { + return response.hits.hits + .filter((hit) => hit._source !== undefined) + .map((hit) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const promptSchema = hit._source!; + const prompt: PromptResponse = { + timestamp: promptSchema['@timestamp'], + createdAt: promptSchema.created_at, + users: + promptSchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + content: promptSchema.content, + isDefault: promptSchema.is_default, + isNewConversationDefault: promptSchema.is_new_conversation_default, + updatedAt: promptSchema.updated_at, + namespace: promptSchema.namespace, + id: hit._id, + name: promptSchema.name, + promptType: promptSchema.prompt_type, + isShared: promptSchema.is_shared, + createdBy: promptSchema.created_by, + updatedBy: promptSchema.updated_by, + }; + + return prompt; + }); +}; + +export const transformToUpdateScheme = ( + user: AuthenticatedUser, + updatedAt: string, + { content, isNewConversationDefault, isShared, id }: PromptUpdateProps +): UpdatePromptSchema => { + return { + id, + updated_at: updatedAt, + content: content ?? '', + is_new_conversation_default: isNewConversationDefault, + is_shared: isShared, + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + }; +}; + +export const transformToCreateScheme = ( + user: AuthenticatedUser, + updatedAt: string, + { content, isDefault, isNewConversationDefault, isShared, name, promptType }: PromptCreateProps +): CreatePromptSchema => { + return { + updated_at: updatedAt, + content: content ?? '', + is_new_conversation_default: isNewConversationDefault, + is_shared: isShared, + name, + is_default: isDefault, + prompt_type: promptType, + users: [ + { + id: user.profile_uid, + name: user.username, + }, + ], + }; +}; + +export const getUpdateScript = ({ + prompt, + isPatch, +}: { + prompt: UpdatePromptSchema; + isPatch?: boolean; +}) => { + return { + source: ` + if (params.assignEmpty == true || params.containsKey('content')) { + ctx._source.content = params.content; + } + if (params.assignEmpty == true || params.containsKey('is_new_conversation_default')) { + ctx._source.is_new_conversation_default = params.is_new_conversation_default; + } + if (params.assignEmpty == true || params.containsKey('is_shared')) { + ctx._source.is_shared = params.is_shared; + } + ctx._source.updated_at = params.updated_at; + `, + lang: 'painless', + params: { + ...prompt, // when assigning undefined in painless, it will remove property and wil set it to null + // for patch we don't want to remove unspecified value in payload + assignEmpty: !(isPatch ?? true), + }, + }; +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts new file mode 100644 index 0000000000000..73e03494cfd2c --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts @@ -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. + */ + +export interface SearchEsPromptsSchema { + id: string; + '@timestamp': string; + created_at: string; + created_by: string; + content: string; + is_default?: boolean; + is_shared?: boolean; + is_new_conversation_default?: boolean; + name: string; + prompt_type: string; + users?: Array<{ + id?: string; + name?: string; + }>; + updated_at?: string; + updated_by?: string; + namespace: string; +} + +export interface UpdatePromptSchema { + id: string; + '@timestamp'?: string; + is_shared?: boolean; + is_new_conversation_default?: boolean; + content?: string; + updated_at?: string; + updated_by?: string; + prompt_type?: string; + users?: Array<{ + id?: string; + name?: string; + }>; +} + +export interface CreatePromptSchema { + '@timestamp'?: string; + is_shared?: boolean; + is_new_conversation_default?: boolean; + is_default?: boolean; + name: string; + prompt_type: string; + content: string; + updated_at?: string; + updated_by?: string; + users?: Array<{ + id?: string; + name?: string; + }>; +} diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.test.ts new file mode 100644 index 0000000000000..481211309123e --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.test.ts @@ -0,0 +1,267 @@ +/* + * 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 { range } from 'lodash'; +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; +import { + createResourceInstallationHelper, + errorResult, + InitializationPromise, + ResourceInstallationHelper, + successResult, + calculateDelay, + getShouldRetry, +} from './create_resource_installation_helper'; + +const RETRY_UNTIL_DEFAULT_COUNT = 20; +const RETRY_UNTIL_DEFAULT_WAIT = 100; // milliseconds +type RetryableFunction = () => Promise; + +export const retryUntil = async ( + label: string, + fn: RetryableFunction, + count: number = RETRY_UNTIL_DEFAULT_COUNT, + wait: number = RETRY_UNTIL_DEFAULT_WAIT +): Promise => { + await delay(wait); + while (count > 0) { + // eslint-disable-next-line no-param-reassign + count--; + + if (await fn()) return true; + + // eslint-disable-next-line no-console + console.log(`attempt failed waiting for "${label}", attempts left: ${count}`); + + if (count === 0) return false; + await delay(wait); + } + + return false; +}; + +const delay = async (millis: number) => new Promise((resolve) => setTimeout(resolve, millis)); + +const logger: ReturnType = + loggingSystemMock.createLogger(); + +const getCommonInitPromise = async ( + resolution: boolean, + timeoutMs: number = 1, + customLogString: string = '' +): Promise => { + if (timeoutMs < 0) { + throw new Error('fail'); + } + // delay resolution of promise by timeout value + await new Promise((r) => setTimeout(r, timeoutMs)); + const customLog = customLogString && customLogString.length > 0 ? ` - ${customLogString}` : ''; + logger.info(`commonInitPromise resolved${customLog}`); + return Promise.resolve(resolution ? successResult() : errorResult(`error initializing`)); +}; + +const getContextInitialized = async ( + helper: ResourceInstallationHelper, + context: string = 'test1', + namespace: string = DEFAULT_NAMESPACE_STRING +) => { + const { result } = await helper.getInitializedResources(namespace); + return result; +}; + +describe('createResourceInstallationHelper', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + test(`should wait for commonInitFunction to resolve before calling initFns for registered contexts`, async () => { + const helper = createResourceInstallationHelper( + logger, + getCommonInitPromise(true, 100), + (namespace: string) => { + return Promise.resolve(); + } + ); + + // Add two namespaces that need to be initialized + helper.add('test1'); + helper.add('test2'); + + await retryUntil('init fns run', async () => logger.info.mock.calls.length === 3); + + expect(logger.info).toHaveBeenNthCalledWith(1, `commonInitPromise resolved`); + expect(await helper.getInitializedResources('test1')).toEqual({ + result: true, + }); + expect(await helper.getInitializedResources('test2')).toEqual({ + result: true, + }); + }); + + test(`should log and return false if common init function returns false`, async () => { + const helper = createResourceInstallationHelper( + logger, + getCommonInitPromise(false, 100), + (namespace: string) => { + return Promise.resolve(); + } + ); + + helper.add('test1'); + + await retryUntil('common init fns run', async () => logger.info.mock.calls.length === 1); + + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test1` + ); + expect(await helper.getInitializedResources('test1')).toEqual({ + result: false, + error: `error initializing`, + }); + }); + + test(`should log and return false if common init function throws error`, async () => { + const helper = createResourceInstallationHelper( + logger, + getCommonInitPromise(true, -1), + (namespace: string) => { + return Promise.resolve(); + } + ); + + helper.add('test1'); + + await retryUntil( + 'common init fns run', + async () => (await getContextInitialized(helper)) === false + ); + + expect(logger.error).toHaveBeenCalledWith(`Error initializing resources test1 - fail`); + expect(await helper.getInitializedResources('test1')).toEqual({ + result: false, + error: `fail`, + }); + }); + + test(`should retry using new common init function if specified`, async () => { + const helper = createResourceInstallationHelper( + logger, + getCommonInitPromise(false, 100), + (namespace: string) => { + return Promise.resolve(); + } + ); + + helper.add(); + + await retryUntil('common init fns run', async () => logger.info.mock.calls.length === 1); + + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for default` + ); + expect(await helper.getInitializedResources(DEFAULT_NAMESPACE_STRING)).toEqual({ + result: false, + error: `error initializing`, + }); + + helper.retry(undefined, getCommonInitPromise(true, 100, 'after retry')); + + await retryUntil('common init fns run', async () => logger.info.mock.calls.length === 2); + expect(logger.info).toHaveBeenCalledWith(`commonInitPromise resolved - after retry`); + expect(await helper.getInitializedResources(DEFAULT_NAMESPACE_STRING)).toEqual({ + result: true, + }); + }); + + test(`should throttle retry`, async () => { + const initFnErrorOnce = jest + .fn() + .mockImplementationOnce(() => { + throw new Error('first error'); + }) + .mockImplementationOnce(() => { + throw new Error('second error'); + }) + .mockImplementation((namespace: string, timeoutMs?: number) => { + logger.info(`${namespace} successfully retried`); + }); + + const helper = createResourceInstallationHelper( + logger, + getCommonInitPromise(true, 100), + initFnErrorOnce + ); + + helper.add(); + + await retryUntil( + 'context init fns run', + async () => (await getContextInitialized(helper)) === false + ); + + expect(logger.error).toHaveBeenCalledWith(`Error initializing resources default - first error`); + expect(await helper.getInitializedResources(DEFAULT_NAMESPACE_STRING)).toEqual({ + result: false, + error: `first error`, + }); + + logger.info.mockClear(); + logger.error.mockClear(); + + helper.retry(undefined); + await new Promise((r) => setTimeout(r, 10)); + helper.retry(undefined); + + await retryUntil('init fns retried', async () => { + return logger.error.mock.calls.length === 1; + }); + + expect(logger.error).toHaveBeenCalledWith( + `Error initializing resources default - second error` + ); + + // the second retry is throttled so this is never called + expect(logger.info).not.toHaveBeenCalledWith('test1_default successfully retried'); + expect(await helper.getInitializedResources(DEFAULT_NAMESPACE_STRING)).toEqual({ + result: false, + error: 'second error', + }); + }); +}); + +describe('calculateDelay', () => { + test('should return 30 seconds if attempts = 1', () => { + expect(calculateDelay(1)).toEqual(30000); + }); + + test('should return multiple of 5 minutes if attempts > 1', () => { + range(2, 20).forEach((attempt: number) => { + expect(calculateDelay(attempt)).toEqual(Math.pow(2, attempt - 2) * 120000); + }); + }); +}); + +describe('getShouldRetry', () => { + test('should return true if current time is past the previous retry time + the retry delay', () => { + const now = new Date(); + const retry = { + time: new Date(now.setMinutes(now.getMinutes() - 1)).toISOString(), + attempts: 1, + }; + expect(getShouldRetry(retry)).toEqual(true); + }); + + test('should return false if current time is not past the previous retry time + the retry delay', () => { + const now = new Date(); + const retry = { + time: new Date(now.setMinutes(now.getMinutes() - 1)).toISOString(), + attempts: 2, + }; + expect(getShouldRetry(retry)).toEqual(false); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.ts new file mode 100644 index 0000000000000..39e0e69a8fc49 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/create_resource_installation_helper.ts @@ -0,0 +1,139 @@ +/* + * 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 { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { Logger } from '@kbn/core/server'; + +export interface InitializationPromise { + result: boolean; + error?: string; +} + +// get multiples of 2 min +const DEFAULT_RETRY_BACKOFF_PER_ATTEMPT = 2 * 60 * 1000; +interface Retry { + time: string; // last time retry was requested + attempts: number; // number of retry attemps +} +export interface ResourceInstallationHelper { + add: (namespace?: string, timeoutMs?: number) => void; + retry: ( + namespace?: string, + initPromise?: Promise, + timeoutMs?: number + ) => void; + getInitializedResources: (namespace: string) => Promise; +} + +/** + * Helper function that queues up resources to initialize until we are + * ready to begin initialization. Once we're ready, we start taking from + * the queue and kicking off initialization. + * + * If a resource is added after we begin initialization, we push it onto + * the queue and the running loop will handle it + * + * If a resource is added to the queue when the processing loop is not + * running, kick off the processing loop + */ +export function createResourceInstallationHelper( + logger: Logger, + commonResourcesInitPromise: Promise, + installFn: (namespace: string, timeoutMs?: number) => Promise +): ResourceInstallationHelper { + let commonInitPromise: Promise = commonResourcesInitPromise; + const initializedResources: Map> = new Map(); + const lastRetry: Map = new Map(); + + const waitUntilResourcesInstalled = async ( + namespace: string = DEFAULT_NAMESPACE_STRING, + timeoutMs?: number + ): Promise => { + try { + const { result: commonInitResult, error: commonInitError } = await commonInitPromise; + if (commonInitResult) { + await installFn(namespace, timeoutMs); + return successResult(); + } else { + logger.warn( + `Common resources were not initialized, cannot initialize resources for ${namespace}` + ); + return errorResult(commonInitError); + } + } catch (err) { + logger.error(`Error initializing resources ${namespace} - ${err.message}`); + return errorResult(err.message); + } + }; + + return { + add: (namespace: string = DEFAULT_NAMESPACE_STRING, timeoutMs?: number) => { + initializedResources.set( + `${namespace}`, + + // Return a promise than can be checked when needed + waitUntilResourcesInstalled(namespace, timeoutMs) + ); + }, + retry: ( + namespace: string = DEFAULT_NAMESPACE_STRING, + initPromise?: Promise, + timeoutMs?: number + ) => { + const key = namespace; + // Use the new common initialization promise if specified + if (initPromise) { + commonInitPromise = initPromise; + } + + // Check the last retry time to see if we want to throttle this attempt + const retryInfo = lastRetry.get(key); + const shouldRetry = retryInfo ? getShouldRetry(retryInfo) : true; + + if (shouldRetry) { + logger.info(`Retrying resource initialization for "${namespace}"`); + // Update the last retry information + lastRetry.set(key, { + time: new Date().toISOString(), + attempts: (retryInfo?.attempts ?? 0) + 1, + }); + + initializedResources.set( + key, + // Return a promise than can be checked when needed + waitUntilResourcesInstalled(namespace, timeoutMs) + ); + } + }, + getInitializedResources: async (namespace: string): Promise => { + const key = namespace; + return ( + initializedResources.has(key) + ? initializedResources.get(key) + : errorResult(`Unrecognized spaceId ${key}`) + ) as InitializationPromise; + }, + }; +} + +export const successResult = () => ({ result: true }); +export const errorResult = (error?: string) => ({ result: false, error }); + +export const getShouldRetry = ({ time, attempts }: Retry) => { + const now = new Date().valueOf(); + const nextRetryDate = new Date(time).valueOf() + calculateDelay(attempts); + return now > nextRetryDate; +}; + +export const calculateDelay = (attempts: number) => { + if (attempts === 1) { + return 30 * 1000; // 30s + } else { + // 2, 4, 6, 8, etc minutes + return DEFAULT_RETRY_BACKOFF_PER_ATTEMPT * Math.pow(2, attempts - 2); + } +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts new file mode 100644 index 0000000000000..7553b27064ab9 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts @@ -0,0 +1,806 @@ +/* + * 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 { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { IndicesGetDataStreamResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { ReplaySubject, Subject } from 'rxjs'; +import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; +import { AuthenticatedUser } from '@kbn/security-plugin/server'; +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { conversationsDataClientMock } from '../__mocks__/data_clients.mock'; +import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; +import { AIAssistantService } from '.'; +import { retryUntil } from './create_resource_installation_helper.test'; + +jest.mock('../ai_assistant_data_clients/conversations', () => ({ + AIAssistantConversationsDataClient: jest.fn(), +})); + +let logger: ReturnType; +const clusterClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + +const SimulateTemplateResponse = { + template: { + aliases: { + alias_name_1: { + is_hidden: true, + }, + alias_name_2: { + is_hidden: true, + }, + }, + mappings: { enabled: false }, + settings: {}, + }, +}; + +const GetAliasResponse = { + '.kibana-elastic-ai-assistant-conversations-default-000001': { + aliases: { + alias_1: { + is_hidden: true, + }, + alias_2: { + is_hidden: true, + }, + }, + }, +}; + +const GetDataStreamResponse: IndicesGetDataStreamResponse = { + data_streams: [ + { + name: 'ignored', + generation: 1, + timestamp_field: { name: 'ignored' }, + hidden: true, + indices: [ + { + index_name: 'ignored', + index_uuid: 'ignored', + managed_by: 'Data stream lifecycle', + prefer_ilm: false, + }, + ], + status: 'green', + template: 'ignored', + next_generation_managed_by: 'Data stream lifecycle', + prefer_ilm: false, + }, + ], +}; + +const getSpaceResourcesInitialized = async ( + assistantService: AIAssistantService, + namespace: string = DEFAULT_NAMESPACE_STRING +) => { + const { result } = await assistantService.getSpaceResourcesInitializationPromise(namespace); + return result; +}; + +const conversationsDataClient = conversationsDataClientMock.create(); + +const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, +} as AuthenticatedUser; + +describe('AI Assistant Service', () => { + let pluginStop$: Subject; + + beforeEach(() => { + jest.resetAllMocks(); + logger = loggingSystemMock.createLogger(); + pluginStop$ = new ReplaySubject(1); + jest.spyOn(global.Math, 'random').mockReturnValue(0.01); + clusterClient.indices.simulateTemplate.mockImplementation(async () => SimulateTemplateResponse); + clusterClient.indices.simulateIndexTemplate.mockImplementation( + async () => SimulateTemplateResponse + ); + clusterClient.indices.getAlias.mockImplementation(async () => GetAliasResponse); + clusterClient.indices.getDataStream.mockImplementation(async () => GetDataStreamResponse); + }); + + afterEach(() => { + pluginStop$.next(); + pluginStop$.complete(); + }); + + describe('AIAssistantService()', () => { + test('should correctly initialize common resources', async () => { + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => (await assistantService.isInitialized()) === true + ); + + expect(assistantService.isInitialized()).toEqual(true); + expect(clusterClient.cluster.putComponentTemplate).toHaveBeenCalledTimes(3); + + const componentTemplate = clusterClient.cluster.putComponentTemplate.mock.calls[0][0]; + expect(componentTemplate.name).toEqual( + '.kibana-elastic-ai-assistant-component-template-conversations' + ); + }); + + test('should log error and set initialized to false if creating/updating common component template throws error', async () => { + clusterClient.cluster.putComponentTemplate.mockRejectedValueOnce(new Error('fail')); + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); + + expect(assistantService.isInitialized()).toEqual(false); + expect(logger.error).toHaveBeenCalledWith( + `Error installing component template .kibana-elastic-ai-assistant-component-template-conversations - fail` + ); + }); + }); + + describe('createAIAssistantConversationsDataClient()', () => { + let assistantService: AIAssistantService; + beforeEach(() => { + (AIAssistantConversationsDataClient as jest.Mock).mockImplementation( + () => conversationsDataClient + ); + }); + + test('should create new AIAssistantConversationsDataClient', async () => { + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + + expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + }); + }); + + test('should retry initializing common resources if common resource initialization failed', async () => { + clusterClient.cluster.putComponentTemplate.mockRejectedValueOnce(new Error('fail')); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); + + expect(assistantService.isInitialized()).toEqual(false); + + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.getAlias).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + const result = await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + + expect(clusterClient.indices.putIndexTemplate).toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).toHaveBeenCalled(); + + expect(clusterClient.indices.createDataStream).not.toHaveBeenCalled(); + expect(clusterClient.indices.getDataStream).toHaveBeenCalled(); + + expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + }); + + expect(result).not.toBe(null); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith( + `Installing component template .kibana-elastic-ai-assistant-component-template-conversations` + ); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying resource initialization for "default"`); + }); + + test('should not retry initializing common resources if common resource initialization is in progress', async () => { + // this is the initial call that fails + clusterClient.cluster.putComponentTemplate.mockRejectedValueOnce(new Error('fail')); + + // this is the retry call that we'll artificially inflate the duration of + clusterClient.cluster.putComponentTemplate.mockImplementationOnce(async () => { + await new Promise((r) => setTimeout(r, 1000)); + return { acknowledged: true }; + }); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); + + expect(assistantService.isInitialized()).toEqual(false); + + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + // call createAIAssistantConversationsDataClient at the same time which will trigger the retries + const result = await Promise.all([ + assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }), + assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }), + ]); + + expect(clusterClient.indices.putIndexTemplate).toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).toHaveBeenCalled(); + + expect(clusterClient.indices.createDataStream).not.toHaveBeenCalled(); + expect(clusterClient.indices.getDataStream).toHaveBeenCalled(); + + expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + logger, + }); + + expect(result[0]).not.toBe(null); + expect(result[1]).not.toBe(null); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith( + `Installing component template .kibana-elastic-ai-assistant-component-template-conversations` + ); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying resource initialization for "default"`); + expect(logger.info).toHaveBeenCalledWith( + `Resource installation for "default" succeeded after retry` + ); + expect(logger.info).toHaveBeenCalledWith( + `Skipped retrying common resource initialization because it is already being retried.` + ); + }); + + test('should retry initializing space specific resources if space specific resource initialization failed', async () => { + clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + const result = await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + + expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + logger, + }); + + expect(result).not.toBe(null); + + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying resource initialization for "default"`); + expect(logger.info).toHaveBeenCalledWith( + `Resource installation for "default" succeeded after retry` + ); + }); + + test('should not retry initializing context specific resources if context specific resource initialization is in progress', async () => { + // this is the initial call that fails + clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + + clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + + // this is the retry call that we'll artificially inflate the duration of + clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => { + await new Promise((r) => setTimeout(r, 1000)); + return SimulateTemplateResponse; + }); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + const createAIAssistantDatastreamClientWithDelay = async (delayMs: number | null) => { + if (delayMs) { + await new Promise((r) => setTimeout(r, delayMs)); + } + + return assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + }; + + const result = await Promise.all([ + createAIAssistantDatastreamClientWithDelay(null), + createAIAssistantDatastreamClientWithDelay(1), + ]); + + expect(AIAssistantConversationsDataClient).toHaveBeenCalledTimes(2); + expect(AIAssistantConversationsDataClient).toHaveBeenCalledWith({ + elasticsearchClientPromise: Promise.resolve(clusterClient), + spaceId: 'default', + indexPatternsResorceName: '.kibana-elastic-ai-assistant-conversations', + currentUser: mockUser1, + kibanaVersion: '8.8.0', + logger, + }); + + expect(result[0]).not.toBe(null); + expect(result[1]).not.toBe(null); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + + // Should only log the retry once because the second call should + // leverage the outcome of the first retry + expect( + logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (calls: any[]) => calls[0] === `Retrying resource initialization for "default"` + ).length + ).toEqual(1); + expect( + logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (calls: any[]) => calls[0] === `Resource installation for "default" succeeded after retry` + ).length + ).toEqual(1); + }); + + test('should throttle retries of initializing context specific resources', async () => { + // this is the initial call that fails + clusterClient.indices.simulateTemplate.mockImplementation(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + + clusterClient.indices.simulateIndexTemplate.mockImplementation(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + const createAIAssistantDatastreamClientWithDelay = async (delayMs: number | null) => { + if (delayMs) { + await new Promise((r) => setTimeout(r, delayMs)); + } + + return assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + }; + + await Promise.all([ + createAIAssistantDatastreamClientWithDelay(null), + createAIAssistantDatastreamClientWithDelay(1), + createAIAssistantDatastreamClientWithDelay(2), + ]); + + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + + // Should only log the retry once because the second and third retries should be throttled + expect( + logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (calls: any[]) => calls[0] === `Retrying resource initialization for "default"` + ).length + ).toEqual(1); + }); + + test('should return null if retrying common resources initialization fails again', async () => { + let failCount = 0; + clusterClient.cluster.putComponentTemplate.mockImplementation(() => { + throw new Error(`fail ${++failCount}`); + }); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil('error log called', async () => logger.error.mock.calls.length > 0, 1); + + expect(assistantService.isInitialized()).toEqual(false); + + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.getAlias).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + const result = await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'test', + currentUser: mockUser1, + }); + + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.getAlias).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + expect(result).toBe(null); + expect(AIAssistantConversationsDataClient).not.toHaveBeenCalled(); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith( + `Installing component template .kibana-elastic-ai-assistant-component-template-conversations` + ); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying resource initialization for "test"`); + + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `There was an error in the framework installing spaceId-level resources and creating concrete indices for spaceId "test" - Retry failed with errors: Failure during installation of create or update .kibana-elastic-ai-assistant-component-template-conversations component template. fail 1` + ); + }); + + test('should return null if retrying common resources initialization fails again with same error', async () => { + clusterClient.cluster.putComponentTemplate.mockRejectedValue(new Error('fail')); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil('error log called', async () => logger.error.mock.calls.length > 0); + + expect(assistantService.isInitialized()).toEqual(false); + + // Installing component template failed so no calls to install context-specific resources + // should be made + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.getAlias).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + const result = await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'test', + currentUser: mockUser1, + }); + + expect(clusterClient.indices.putIndexTemplate).not.toHaveBeenCalled(); + expect(clusterClient.indices.getAlias).not.toHaveBeenCalled(); + expect(clusterClient.indices.putSettings).not.toHaveBeenCalled(); + expect(clusterClient.indices.create).not.toHaveBeenCalled(); + + expect(result).toBe(null); + expect(AIAssistantConversationsDataClient).not.toHaveBeenCalled(); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith( + `Installing component template .kibana-elastic-ai-assistant-component-template-conversations` + ); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith(`Retrying resource initialization for "test"`); + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `There was an error in the framework installing spaceId-level resources and creating concrete indices for spaceId "test" - Retry failed with errors: Failure during installation of create or update .kibana-elastic-ai-assistant-component-template-conversations component template. fail` + ); + }); + + test('should return null if retrying space specific initialization fails again', async () => { + clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({ + ...SimulateTemplateResponse, + template: { + ...SimulateTemplateResponse.template, + mappings: {}, + }, + })); + clusterClient.indices.putIndexTemplate.mockRejectedValue(new Error('fail index template')); + + assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + const result = await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'test', + currentUser: mockUser1, + }); + + expect(AIAssistantConversationsDataClient).not.toHaveBeenCalled(); + expect(result).toBe(null); + expect(logger.info).toHaveBeenCalledWith(`Retrying common resource initialization`); + expect(logger.info).toHaveBeenCalledWith( + `Installing component template .kibana-elastic-ai-assistant-component-template-conversations` + ); + + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `Common resources were not initialized, cannot initialize resources for test` + ); + expect(logger.warn).toHaveBeenCalledWith( + `There was an error in the framework installing spaceId-level resources and creating concrete indices for spaceId \"test\" - Retry failed with errors: Failure during installation of create or update .kibana-elastic-ai-assistant-index-template-conversations index template. No mappings would be generated for .kibana-elastic-ai-assistant-index-template-conversations, possibly due to failed/misconfigured bootstrapping` + ); + }); + }); + + describe('retries', () => { + test('should retry adding component template for transient ES errors', async () => { + clusterClient.cluster.putComponentTemplate + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) + .mockResolvedValue({ acknowledged: true }); + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + expect(clusterClient.cluster.putComponentTemplate).toHaveBeenCalledTimes(5); + }); + + test('should retry updating index template for transient ES errors', async () => { + clusterClient.indices.putIndexTemplate + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) + .mockResolvedValue({ acknowledged: true }); + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + expect(assistantService.isInitialized()).toEqual(true); + + await retryUntil( + 'space resources initialized', + async () => (await getSpaceResourcesInitialized(assistantService)) === true + ); + + expect(clusterClient.indices.putIndexTemplate).toHaveBeenCalledTimes(5); + }); + + test('should retry updating index settings for existing indices for transient ES errors', async () => { + clusterClient.indices.putSettings + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) + .mockResolvedValue({ acknowledged: true }); + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + await retryUntil( + 'space resources initialized', + async () => (await getSpaceResourcesInitialized(assistantService)) === true + ); + + expect(clusterClient.indices.putSettings).toHaveBeenCalledTimes(5); + }); + + test('should retry updating index mappings for existing indices for transient ES errors', async () => { + clusterClient.indices.putMapping + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) + .mockResolvedValue({ acknowledged: true }); + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + await retryUntil( + 'space resources initialized', + async () => (await getSpaceResourcesInitialized(assistantService)) === true + ); + + expect(clusterClient.indices.putMapping).toHaveBeenCalledTimes(5); + }); + + test('should retry creating concrete index for transient ES errors', async () => { + clusterClient.indices.getDataStream.mockImplementation(async () => ({ + data_streams: [], + })); + clusterClient.indices.createDataStream + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) + .mockResolvedValue({ acknowledged: true }); + + const assistantService = new AIAssistantService({ + logger, + elasticsearchClientPromise: Promise.resolve(clusterClient), + pluginStop$, + kibanaVersion: '8.8.0', + taskManager: taskManagerMock.createSetup(), + }); + + await retryUntil( + 'AI Assistant service initialized', + async () => assistantService.isInitialized() === true + ); + + await assistantService.createAIAssistantConversationsDataClient({ + logger, + spaceId: 'default', + currentUser: mockUser1, + }); + + await retryUntil( + 'space resources initialized', + async () => (await getSpaceResourcesInitialized(assistantService)) === true + ); + + expect(clusterClient.indices.createDataStream).toHaveBeenCalledTimes(5); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts new file mode 100644 index 0000000000000..e7f78b732cac2 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts @@ -0,0 +1,329 @@ +/* + * 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 { DataStreamSpacesAdapter, FieldMap } from '@kbn/data-stream-adapter'; +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import type { Logger, ElasticsearchClient } from '@kbn/core/server'; +import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import { AuthenticatedUser } from '@kbn/security-plugin/server'; +import { Subject } from 'rxjs'; +import { AssistantResourceNames } from '../types'; +import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; +import { + InitializationPromise, + ResourceInstallationHelper, + createResourceInstallationHelper, + errorResult, + successResult, +} from './create_resource_installation_helper'; +import { conversationsFieldMap } from '../ai_assistant_data_clients/conversations/field_maps_configuration'; +import { assistantPromptsFieldMap } from '../ai_assistant_data_clients/prompts/field_maps_configuration'; +import { assistantAnonymizationFieldsFieldMap } from '../ai_assistant_data_clients/anonymization_fields/field_maps_configuration'; +import { AIAssistantDataClient } from '../ai_assistant_data_clients'; + +const TOTAL_FIELDS_LIMIT = 2500; + +function getResourceName(resource: string) { + return `.kibana-elastic-ai-assistant-${resource}`; +} + +interface AIAssistantServiceOpts { + logger: Logger; + kibanaVersion: string; + elasticsearchClientPromise: Promise; + taskManager: TaskManagerSetupContract; + pluginStop$: Subject; +} + +export interface CreateAIAssistantClientParams { + logger: Logger; + spaceId: string; + currentUser: AuthenticatedUser | null; +} + +export type CreateDataStream = (params: { + resource: 'conversations' | 'prompts' | 'anonymizationFields'; + fieldMap: FieldMap; + kibanaVersion: string; + spaceId?: string; +}) => DataStreamSpacesAdapter; + +export class AIAssistantService { + private initialized: boolean; + private isInitializing: boolean = false; + private conversationsDataStream: DataStreamSpacesAdapter; + private promptsDataStream: DataStreamSpacesAdapter; + private anonymizationFieldsDataStream: DataStreamSpacesAdapter; + private resourceInitializationHelper: ResourceInstallationHelper; + private initPromise: Promise; + + constructor(private readonly options: AIAssistantServiceOpts) { + this.initialized = false; + this.conversationsDataStream = this.createDataStream({ + resource: 'conversations', + kibanaVersion: options.kibanaVersion, + fieldMap: conversationsFieldMap, + }); + this.promptsDataStream = this.createDataStream({ + resource: 'prompts', + kibanaVersion: options.kibanaVersion, + fieldMap: assistantPromptsFieldMap, + }); + this.anonymizationFieldsDataStream = this.createDataStream({ + resource: 'anonymizationFields', + kibanaVersion: options.kibanaVersion, + fieldMap: assistantAnonymizationFieldsFieldMap, + }); + + this.initPromise = this.initializeResources(); + + this.resourceInitializationHelper = createResourceInstallationHelper( + this.options.logger, + this.initPromise, + this.installAndUpdateSpaceLevelResources.bind(this) + ); + } + + public isInitialized() { + return this.initialized; + } + + private createDataStream: CreateDataStream = ({ resource, kibanaVersion, fieldMap }) => { + const newDataStream = new DataStreamSpacesAdapter(this.resourceNames.aliases[resource], { + kibanaVersion, + totalFieldsLimit: TOTAL_FIELDS_LIMIT, + }); + + newDataStream.setComponentTemplate({ + name: this.resourceNames.componentTemplate[resource], + fieldMap, + }); + + newDataStream.setIndexTemplate({ + name: this.resourceNames.indexTemplate[resource], + componentTemplateRefs: [this.resourceNames.componentTemplate[resource]], + }); + + return newDataStream; + }; + + private async initializeResources(): Promise { + this.isInitializing = true; + try { + this.options.logger.debug(`Initializing resources for AIAssistantService`); + const esClient = await this.options.elasticsearchClientPromise; + + await this.conversationsDataStream.install({ + esClient, + logger: this.options.logger, + pluginStop$: this.options.pluginStop$, + }); + + await this.promptsDataStream.install({ + esClient, + logger: this.options.logger, + pluginStop$: this.options.pluginStop$, + }); + + await this.anonymizationFieldsDataStream.install({ + esClient, + logger: this.options.logger, + pluginStop$: this.options.pluginStop$, + }); + } catch (error) { + this.options.logger.error(`Error initializing AI assistant resources: ${error.message}`); + this.initialized = false; + this.isInitializing = false; + return errorResult(error.message); + } + this.initialized = true; + this.isInitializing = false; + return successResult(); + } + + private readonly resourceNames: AssistantResourceNames = { + componentTemplate: { + conversations: getResourceName('component-template-conversations'), + prompts: getResourceName('component-template-prompts'), + anonymizationFields: getResourceName('component-template-anonymization-fields'), + kb: getResourceName('component-template-kb'), + }, + aliases: { + conversations: getResourceName('conversations'), + prompts: getResourceName('prompts'), + anonymizationFields: getResourceName('anonymization-fields'), + kb: getResourceName('kb'), + }, + indexPatterns: { + conversations: getResourceName('conversations*'), + prompts: getResourceName('prompts*'), + anonymizationFields: getResourceName('anonymization-fields*'), + kb: getResourceName('kb*'), + }, + indexTemplate: { + conversations: getResourceName('index-template-conversations'), + prompts: getResourceName('index-template-prompts'), + anonymizationFields: getResourceName('index-template-anonymization-fields'), + kb: getResourceName('index-template-kb'), + }, + pipelines: { + kb: getResourceName('kb-ingest-pipeline'), + }, + }; + + private async checkResourcesInstallation(opts: CreateAIAssistantClientParams) { + // Check if resources installation has succeeded + const { result: initialized, error } = await this.getSpaceResourcesInitializationPromise( + opts.spaceId + ); + + // If space evel resources initialization failed, retry + if (!initialized && error) { + let initRetryPromise: Promise | undefined; + + // If !this.initialized, we know that resource initialization failed + // and we need to retry this before retrying the spaceId specific resources + if (!this.initialized) { + if (!this.isInitializing) { + this.options.logger.info(`Retrying common resource initialization`); + initRetryPromise = this.initializeResources(); + } else { + this.options.logger.info( + `Skipped retrying common resource initialization because it is already being retried.` + ); + } + } + + this.resourceInitializationHelper.retry(opts.spaceId, initRetryPromise); + + const retryResult = await this.resourceInitializationHelper.getInitializedResources( + opts.spaceId ?? DEFAULT_NAMESPACE_STRING + ); + + if (!retryResult.result) { + const errorLogPrefix = `There was an error in the framework installing spaceId-level resources and creating concrete indices for spaceId "${opts.spaceId}" - `; + // Retry also failed + this.options.logger.warn( + retryResult.error && error + ? `${errorLogPrefix}Retry failed with errors: ${error}` + : `${errorLogPrefix}Original error: ${error}; Error after retry: ${retryResult.error}` + ); + return null; + } else { + this.options.logger.info( + `Resource installation for "${opts.spaceId}" succeeded after retry` + ); + } + } + } + + public async createAIAssistantConversationsDataClient( + opts: CreateAIAssistantClientParams + ): Promise { + const res = await this.checkResourcesInstallation(opts); + + if (res === null) { + return null; + } + + return new AIAssistantConversationsDataClient({ + logger: this.options.logger, + elasticsearchClientPromise: this.options.elasticsearchClientPromise, + spaceId: opts.spaceId, + kibanaVersion: this.options.kibanaVersion, + indexPatternsResorceName: this.resourceNames.aliases.conversations, + currentUser: opts.currentUser, + }); + } + + public async createAIAssistantPromptsDataClient( + opts: CreateAIAssistantClientParams + ): Promise { + const res = await this.checkResourcesInstallation(opts); + + if (res === null) { + return null; + } + + return new AIAssistantDataClient({ + logger: this.options.logger, + elasticsearchClientPromise: this.options.elasticsearchClientPromise, + spaceId: opts.spaceId, + kibanaVersion: this.options.kibanaVersion, + indexPatternsResorceName: this.resourceNames.aliases.prompts, + currentUser: opts.currentUser, + }); + } + + public async createAIAssistantAnonymizationFieldsDataClient( + opts: CreateAIAssistantClientParams + ): Promise { + const res = await this.checkResourcesInstallation(opts); + + if (res === null) { + return null; + } + + return new AIAssistantDataClient({ + logger: this.options.logger, + elasticsearchClientPromise: this.options.elasticsearchClientPromise, + spaceId: opts.spaceId, + kibanaVersion: this.options.kibanaVersion, + indexPatternsResorceName: this.resourceNames.aliases.anonymizationFields, + currentUser: opts.currentUser, + }); + } + + public async getSpaceResourcesInitializationPromise( + spaceId: string | undefined = DEFAULT_NAMESPACE_STRING + ): Promise { + const result = await this.resourceInitializationHelper.getInitializedResources(spaceId); + // If the spaceId is unrecognized and spaceId is not the default, we + // need to kick off resource installation and return the promise + if ( + result.error && + result.error.includes(`Unrecognized spaceId`) && + spaceId !== DEFAULT_NAMESPACE_STRING + ) { + this.resourceInitializationHelper.add(spaceId); + return this.resourceInitializationHelper.getInitializedResources(spaceId); + } + return result; + } + + private async installAndUpdateSpaceLevelResources( + spaceId: string | undefined = DEFAULT_NAMESPACE_STRING + ) { + try { + this.options.logger.debug(`Initializing spaceId level resources for AIAssistantService`); + let conversationsIndexName = await this.conversationsDataStream.getInstalledSpaceName( + spaceId + ); + if (!conversationsIndexName) { + conversationsIndexName = await this.conversationsDataStream.installSpace(spaceId); + } + + let promptsIndexName = await this.promptsDataStream.getInstalledSpaceName(spaceId); + if (!promptsIndexName) { + promptsIndexName = await this.promptsDataStream.installSpace(spaceId); + } + + let anonymizationFieldsIndexName = + await this.anonymizationFieldsDataStream.getInstalledSpaceName(spaceId); + if (!anonymizationFieldsIndexName) { + anonymizationFieldsIndexName = await this.anonymizationFieldsDataStream.installSpace( + spaceId + ); + } + } catch (error) { + this.options.logger.error( + `Error initializing AI assistant namespace level resources: ${error.message}` + ); + throw error; + } + } +} diff --git a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.test.ts b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.test.ts new file mode 100644 index 0000000000000..ed6edae590c99 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.test.ts @@ -0,0 +1,202 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { loggingSystemMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import { + getCreateConversationSchemaMock, + getUpdateConversationSchemaMock, +} from '../../__mocks__/conversations_schema.mock'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { DocumentsDataWriter } from './documents_data_writer'; + +describe('DocumentsDataWriter', () => { + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + describe('#bulk', () => { + let writer: DocumentsDataWriter; + let esClientMock: ElasticsearchClient; + let loggerMock: Logger; + + beforeEach(() => { + esClientMock = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; + loggerMock = loggingSystemMock.createLogger(); + writer = new DocumentsDataWriter({ + esClient: esClientMock, + logger: loggerMock, + index: 'documents-default', + spaceId: 'default', + user: { name: 'test' }, + }); + }); + + it('converts a list of documents to an appropriate list of operations', async () => { + await writer.bulk({ + documentsToCreate: [getCreateConversationSchemaMock(), getCreateConversationSchemaMock()], + documentsToUpdate: [], + documentsToDelete: [], + authenticatedUser: mockUser1, + getUpdateScript: jest.fn(), + }); + + const { docs_created: docsCreated } = (esClientMock.bulk as jest.Mock).mock.lastCall; + + expect(docsCreated).toMatchInlineSnapshot(`undefined`); + }); + + it('converts a list of mixed documents operations to an appropriate list of operations', async () => { + (esClientMock.search as jest.Mock).mockResolvedValue({ + hits: { hits: [] }, + }); + await writer.bulk({ + documentsToCreate: [getCreateConversationSchemaMock()], + documentsToUpdate: [getUpdateConversationSchemaMock()], + documentsToDelete: ['1'], + authenticatedUser: mockUser1, + getUpdateScript: jest.fn(), + }); + + const { + docs_created: docsCreated, + docs_deleted: docsDeleted, + docs_updated: docsUpdated, + } = (esClientMock.bulk as jest.Mock).mock.lastCall; + + expect(docsCreated).toMatchInlineSnapshot(`undefined`); + + expect(docsUpdated).toMatchInlineSnapshot(`undefined`); + + expect(docsDeleted).toMatchInlineSnapshot(`undefined`); + }); + + it('returns an error if something went wrong', async () => { + (esClientMock.search as jest.Mock).mockResolvedValue({ + hits: { hits: [] }, + }); + (esClientMock.bulk as jest.Mock).mockRejectedValue(new Error('something went wrong')); + + const { errors } = await writer.bulk({ + documentsToCreate: [], + documentsToUpdate: [], + documentsToDelete: ['1'], + getUpdateScript: jest.fn(), + }); + + expect(errors).toEqual([ + { + document: { + id: '', + }, + message: 'something went wrong', + }, + ]); + }); + + it('returns the time it took to write the documents', async () => { + (esClientMock.search as jest.Mock).mockResolvedValue({ + hits: { hits: [] }, + }); + (esClientMock.bulk as jest.Mock).mockResolvedValue({ + took: 123, + items: [], + }); + + const { took } = await writer.bulk({ + documentsToCreate: [], + documentsToUpdate: [], + documentsToDelete: ['1'], + getUpdateScript: jest.fn(), + }); + + expect(took).toEqual(123); + }); + + it('returns the array of docs deleted', async () => { + (esClientMock.search as jest.Mock).mockResolvedValue({ + hits: { hits: [] }, + }); + (esClientMock.bulk as jest.Mock).mockResolvedValue({ + items: [{ delete: { status: 201 } }, { delete: { status: 200 } }], + }); + + const { docs_deleted: docsDeleted } = await writer.bulk({ + documentsToCreate: [], + documentsToUpdate: [], + documentsToDelete: ['1', '2'], + getUpdateScript: jest.fn(), + }); + + expect(docsDeleted.length).toEqual(2); + }); + + describe('when some documents failed to be written', () => { + beforeEach(() => { + (esClientMock.search as jest.Mock).mockResolvedValue({ + hits: { hits: [] }, + }); + (esClientMock.bulk as jest.Mock).mockResolvedValue({ + errors: true, + items: [ + { create: { status: 201 } }, + { create: { status: 500, error: { reason: 'something went wrong' } } }, + ], + }); + }); + + it('returns the number of docs written', async () => { + const { docs_created: docsCreated } = await writer.bulk({ + documentsToCreate: [getCreateConversationSchemaMock()], + documentsToUpdate: [], + documentsToDelete: [], + authenticatedUser: mockUser1, + getUpdateScript: jest.fn(), + }); + + expect(docsCreated.length).toEqual(1); + }); + + it('returns the errors', async () => { + const { errors } = await writer.bulk({ + documentsToCreate: [], + documentsToUpdate: [], + documentsToDelete: ['1'], + getUpdateScript: jest.fn(), + }); + + expect(errors).toEqual([ + { + document: { + id: undefined, + }, + message: 'something went wrong', + status: 500, + }, + ]); + }); + }); + + describe('when there are no documents to update', () => { + it('returns an appropriate response', async () => { + const response = await writer.bulk({ + getUpdateScript: jest.fn(), + }); + expect(response).toEqual({ + errors: [], + docs_created: [], + docs_deleted: [], + docs_updated: [], + took: 0, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts new file mode 100644 index 0000000000000..b0488fe73a0be --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts @@ -0,0 +1,310 @@ +/* + * 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 type { + BulkOperationContainer, + BulkOperationType, + BulkResponseItem, + Script, +} from '@elastic/elasticsearch/lib/api/types'; +import type { Logger, ElasticsearchClient } from '@kbn/core/server'; +import { UUID } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +export interface BulkOperationError { + message: string; + status?: number; + document: { + id: string; + }; +} + +interface WriterBulkResponse { + errors: BulkOperationError[]; + docs_created: string[]; + docs_deleted: string[]; + docs_updated: string[]; + took: number; +} + +interface BulkParams { + documentsToCreate?: TCreateParams[]; + documentsToUpdate?: TUpdateParams[]; + documentsToDelete?: string[]; + getUpdateScript: (document: TUpdateParams, updatedAt: string) => Script; + authenticatedUser?: AuthenticatedUser; +} + +export interface DocumentsDataWriter { + bulk: ( + params: BulkParams + ) => Promise; +} + +interface DocumentsDataWriterOptions { + esClient: ElasticsearchClient; + index: string; + spaceId: string; + user: { id?: UUID; name?: string }; + logger: Logger; +} + +export class DocumentsDataWriter implements DocumentsDataWriter { + constructor(private readonly options: DocumentsDataWriterOptions) {} + + public bulk = async ( + params: BulkParams + ) => { + try { + if ( + !params.documentsToCreate?.length && + !params.documentsToUpdate?.length && + !params.documentsToDelete?.length + ) { + return { errors: [], docs_created: [], docs_deleted: [], docs_updated: [], took: 0 }; + } + + const { errors, items, took } = await this.options.esClient.bulk({ + refresh: 'wait_for', + body: await this.buildBulkOperations(params), + }); + + return { + errors: errors ? this.formatErrorsResponse(items) : [], + docs_created: items + .filter((item) => item.create?.status === 201 || item.create?.status === 200) + .map((item) => item.create?._id ?? ''), + docs_deleted: items + .filter((item) => item.delete?.status === 201 || item.delete?.status === 200) + .map((item) => item.delete?._id ?? ''), + docs_updated: items + .filter((item) => item.update?.status === 201 || item.update?.status === 200) + .map((item) => item.update?._id ?? ''), + took, + } as WriterBulkResponse; + } catch (e) { + this.options.logger.error(`Error bulk actions for documents: ${e.message}`); + return { + errors: [ + { + message: e.message, + document: { + id: '', + }, + }, + ], + docs_created: [], + docs_deleted: [], + docs_updated: [], + took: 0, + } as WriterBulkResponse; + } + }; + + private getUpdateDocumentsQuery = async ( + documentsToUpdate: TUpdateParams[], + getUpdateScript: (document: TUpdateParams, updatedAt: string) => Script, + authenticatedUser?: AuthenticatedUser + ) => { + const updatedAt = new Date().toISOString(); + const filterByUser = authenticatedUser + ? [ + { + nested: { + path: 'users', + query: { + bool: { + must: [ + { + match: authenticatedUser.profile_uid + ? { 'users.id': authenticatedUser.profile_uid } + : { 'users.name': authenticatedUser.username }, + }, + ], + }, + }, + }, + }, + ] + : []; + + const responseToUpdate = await this.options.esClient.search({ + body: { + query: { + bool: { + must: [ + { + bool: { + should: [ + { + ids: { + values: documentsToUpdate?.map((c) => c.id), + }, + }, + ], + }, + }, + ...filterByUser, + ], + }, + }, + }, + _source: false, + ignore_unavailable: true, + index: this.options.index, + seq_no_primary_term: true, + size: 1000, + }); + + const availableDocumentsToUpdate = documentsToUpdate.filter((c) => + responseToUpdate?.hits.hits.find((ac) => ac._id === c.id) + ); + + return availableDocumentsToUpdate.flatMap((document) => [ + { + update: { + _id: document.id, + _index: responseToUpdate?.hits.hits.find((c) => c._id === document.id)?._index, + }, + }, + { + script: getUpdateScript(document, updatedAt), + upsert: { counter: 1 }, + }, + ]); + }; + + private getDeletedocumentsQuery = async ( + documentsToDelete: string[], + authenticatedUser?: AuthenticatedUser + ) => { + const filterByUser = authenticatedUser + ? [ + { + nested: { + path: 'users', + query: { + bool: { + must: [ + { + match: authenticatedUser.profile_uid + ? { 'users.id': authenticatedUser.profile_uid } + : { 'users.name': authenticatedUser.username }, + }, + ], + }, + }, + }, + }, + ] + : []; + + const responseToDelete = await this.options.esClient.search({ + body: { + query: { + bool: { + must: [ + { + bool: { + should: [ + { + ids: { + values: documentsToDelete, + }, + }, + ], + }, + }, + ...filterByUser, + ], + }, + }, + }, + _source: false, + ignore_unavailable: true, + index: this.options.index, + seq_no_primary_term: true, + size: 1000, + }); + + return ( + responseToDelete?.hits.hits.map((c) => ({ + delete: { + _id: c._id, + _index: c._index, + }, + })) ?? [] + ); + }; + + private buildBulkOperations = async ( + params: BulkParams + ): Promise => { + const documentCreateBody = + params.authenticatedUser && params.documentsToCreate + ? params.documentsToCreate.flatMap((document) => [ + { create: { _index: this.options.index, _id: uuidV4() } }, + document, + ]) + : []; + + const documentDeletedBody = + params.documentsToDelete && params.documentsToDelete.length > 0 + ? await this.getDeletedocumentsQuery(params.documentsToDelete, params.authenticatedUser) + : []; + + const documentUpdatedBody = + params.documentsToUpdate && params.documentsToUpdate.length > 0 + ? await this.getUpdateDocumentsQuery( + params.documentsToUpdate, + params.getUpdateScript, + params.authenticatedUser + ) + : []; + + return [ + ...documentCreateBody, + ...documentUpdatedBody, + ...documentDeletedBody, + ] as BulkOperationContainer[]; + }; + + private formatErrorsResponse = ( + items: Array>> + ) => { + return items + .map((item) => + item.create?.error + ? { + message: item.create.error?.reason, + status: item.create.status, + document: { + id: item.create._id, + }, + } + : item.update?.error + ? { + message: item.update.error?.reason, + status: item.update.status, + document: { + id: item.update._id, + }, + } + : item.delete?.error + ? { + message: item.delete?.error?.reason, + status: item.delete?.status, + document: { + id: item.delete?._id, + }, + } + : undefined + ) + .filter((e) => e !== undefined); + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/lib/data_stream/helpers.ts b/x-pack/plugins/elastic_assistant/server/lib/data_stream/helpers.ts new file mode 100644 index 0000000000000..6f454ed3d4b56 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/lib/data_stream/helpers.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 { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { IIndexPatternString } from '../../types'; + +export const getIndexTemplateAndPattern = ( + context: string, + namespace?: string +): IIndexPatternString => { + const concreteNamespace = namespace ? namespace : DEFAULT_NAMESPACE_STRING; + const pattern = `${context}`; + const patternWithNamespace = `${pattern}-${concreteNamespace}`; + return { + pattern: `${patternWithNamespace}*`, + basePattern: `${pattern}-*`, + name: `${patternWithNamespace}-000001`, + alias: `${patternWithNamespace}`, + }; +}; 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 def4eca415d42..dedaad2331f41 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts @@ -14,13 +14,25 @@ import { executeAction, Props } from './executor'; import { PassThrough } from 'stream'; import { KibanaRequest } from '@kbn/core-http-server'; -import { RequestBody } from './langchain/types'; import { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; const request = { body: { - params: {}, + subAction: 'invokeAI', + message: 'hello', }, -} as KibanaRequest; +} as KibanaRequest; +const onLlmResponse = jest.fn(); +const connectorId = 'testConnectorId'; +const testProps: Omit = { + params: { + subAction: 'invokeAI', + subActionParams: { messages: [{ content: 'hello', role: 'user' }] }, + }, + request, + connectorId, + onLlmResponse, +}; describe('executeAction', () => { beforeEach(() => { @@ -35,16 +47,16 @@ describe('executeAction', () => { }, }), }), - }; - const connectorId = 'testConnectorId'; + } as unknown as Props['actions']; - const result = await executeAction({ actions, request, connectorId } as unknown as Props); + const result = await executeAction({ ...testProps, actions }); expect(result).toEqual({ connector_id: connectorId, data: 'Test message', status: 'ok', }); + expect(onLlmResponse).toHaveBeenCalledWith('Test message'); }); it('should execute an action and return a Readable object when the response from the actions framework is a stream', async () => { @@ -55,10 +67,9 @@ describe('executeAction', () => { data: readableStream, }), }), - }; - const connectorId = 'testConnectorId'; + } as unknown as Props['actions']; - const result = await executeAction({ actions, request, connectorId } as unknown as Props); + const result = await executeAction({ ...testProps, actions }); expect(JSON.stringify(result)).toStrictEqual( JSON.stringify(readableStream.pipe(new PassThrough())) @@ -70,12 +81,11 @@ describe('executeAction', () => { getActionsClientWithRequest: jest .fn() .mockRejectedValue(new Error('Failed to retrieve actions client')), - }; - const connectorId = 'testConnectorId'; + } as unknown as Props['actions']; - await expect( - executeAction({ actions, request, connectorId } as unknown as Props) - ).rejects.toThrowError('Failed to retrieve actions client'); + await expect(executeAction({ ...testProps, actions })).rejects.toThrowError( + 'Failed to retrieve actions client' + ); }); it('should throw an error if the actions client fails to execute the action', async () => { @@ -83,12 +93,11 @@ describe('executeAction', () => { getActionsClientWithRequest: jest.fn().mockResolvedValue({ execute: jest.fn().mockRejectedValue(new Error('Failed to execute action')), }), - }; - const connectorId = 'testConnectorId'; + } as unknown as Props['actions']; - await expect( - executeAction({ actions, request, connectorId } as unknown as Props) - ).rejects.toThrowError('Failed to execute action'); + await expect(executeAction({ ...testProps, actions })).rejects.toThrowError( + 'Failed to execute action' + ); }); it('should throw an error when the response from the actions framework is null or undefined', async () => { @@ -98,11 +107,10 @@ describe('executeAction', () => { data: null, }), }), - }; - const connectorId = 'testConnectorId'; + } as unknown as Props['actions']; try { - await executeAction({ actions, request, connectorId } as unknown as Props); + await executeAction({ ...testProps, actions }); } catch (e) { expect(e.message).toBe('Action result status is error: result is not streamable'); } @@ -118,11 +126,14 @@ describe('executeAction', () => { }), }), } as unknown as ActionsPluginStart; - const connectorId = '12345'; - await expect(executeAction({ actions, request, connectorId })).rejects.toThrowError( - 'Action result status is error: Error message - Service error message' - ); + await expect( + executeAction({ + ...testProps, + actions, + connectorId: '12345', + }) + ).rejects.toThrowError('Action result status is error: Error message - Service error message'); }); it('should throw an error if content of response data is not a string or streamable', async () => { @@ -136,10 +147,14 @@ describe('executeAction', () => { }), }), } as unknown as ActionsPluginStart; - const connectorId = '12345'; - await expect(executeAction({ actions, request, connectorId })).rejects.toThrowError( - 'Action result status is error: result is not streamable' - ); + await expect( + executeAction({ + ...testProps, + + actions, + connectorId: '12345', + }) + ).rejects.toThrowError('Action result status is error: result is not streamable'); }); }); diff --git a/x-pack/plugins/elastic_assistant/server/lib/executor.ts b/x-pack/plugins/elastic_assistant/server/lib/executor.ts index 27064f3fb1961..7d5c917e2c890 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/executor.ts @@ -6,15 +6,18 @@ */ import { get } from 'lodash/fp'; -import { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server'; import { KibanaRequest } from '@kbn/core-http-server'; +import { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server'; import { PassThrough, Readable } from 'stream'; -import { RequestBody } from './langchain/types'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; +import { handleStreamStorage } from './parse_stream'; export interface Props { + onLlmResponse?: (content: string) => Promise; actions: ActionsPluginStart; connectorId: string; - request: KibanaRequest; + params: InvokeAIActionsParams; + request: KibanaRequest; } interface StaticResponse { connector_id: string; @@ -22,16 +25,32 @@ interface StaticResponse { status: string; } +interface InvokeAIActionsParams { + subActionParams: { + messages: Array<{ role: string; content: string }>; + model?: string; + n?: number; + stop?: string | string[] | null; + temperature?: number; + }; + subAction: 'invokeAI' | 'invokeStream'; +} + +const convertToGenericType = (params: InvokeAIActionsParams): Record => + params as unknown as Record; + export const executeAction = async ({ + onLlmResponse, actions, - request, + params, connectorId, + request, }: Props): Promise => { const actionsClient = await actions.getActionsClientWithRequest(request); const actionResult = await actionsClient.execute({ actionId: connectorId, - params: request.body.params, + params: convertToGenericType(params), }); if (actionResult.status === 'error') { @@ -41,17 +60,23 @@ export const executeAction = async ({ } const content = get('data.message', actionResult); if (typeof content === 'string') { + if (onLlmResponse) { + await onLlmResponse(content); + } return { connector_id: connectorId, data: content, // the response from the actions framework status: 'ok', }; } - const readable = get('data', actionResult) as Readable; + const readable = get('data', actionResult) as Readable; if (typeof readable?.read !== 'function') { throw new Error('Action result status is error: result is not streamable'); } + // do not await, blocks stream for UI + handleStreamStorage(readable, request.body.llmType, onLlmResponse); + return readable.pipe(new PassThrough()); }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts index 59c1aeca8081f..b2f0d87fcc291 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts @@ -33,7 +33,7 @@ jest.mock('langchain/chains', () => ({ const mockCall = jest.fn(); jest.mock('langchain/agents', () => ({ initializeAgentExecutorWithOptions: jest.fn().mockImplementation(() => ({ - call: mockCall, + call: mockCall.mockReturnValueOnce({ output: mockActionResponse.message }), })), })); @@ -58,29 +58,26 @@ const mockActions: ActionsPluginStart = {} as ActionsPluginStart; const mockLogger = loggerMock.create(); const mockTelemetry = coreMock.createSetup().analytics; const esClientMock = elasticsearchServiceMock.createScopedClusterClient().asCurrentUser; - +const defaultProps = { + actions: mockActions, + isEnabledKnowledgeBase: true, + connectorId: mockConnectorId, + esClient: esClientMock, + langChainMessages, + logger: mockLogger, + onNewReplacements: jest.fn(), + request: mockRequest, + kbResource: ESQL_RESOURCE, + telemetry: mockTelemetry, + replacements: [], +}; describe('callAgentExecutor', () => { beforeEach(() => { jest.clearAllMocks(); - - ActionsClientLlm.prototype.getActionResultData = jest - .fn() - .mockReturnValueOnce(mockActionResponse); }); it('creates an instance of ActionsClientLlm with the expected context from the request', async () => { - await callAgentExecutor({ - actions: mockActions, - isEnabledKnowledgeBase: true, - connectorId: mockConnectorId, - esClient: esClientMock, - langChainMessages, - logger: mockLogger, - onNewReplacements: jest.fn(), - request: mockRequest, - kbResource: ESQL_RESOURCE, - telemetry: mockTelemetry, - }); + await callAgentExecutor(defaultProps); expect(ActionsClientLlm).toHaveBeenCalledWith({ actions: mockActions, @@ -91,18 +88,7 @@ describe('callAgentExecutor', () => { }); it('kicks off the chain with (only) the last message', async () => { - await callAgentExecutor({ - actions: mockActions, - isEnabledKnowledgeBase: true, - connectorId: mockConnectorId, - esClient: esClientMock, - langChainMessages, - logger: mockLogger, - onNewReplacements: jest.fn(), - request: mockRequest, - kbResource: ESQL_RESOURCE, - telemetry: mockTelemetry, - }); + await callAgentExecutor(defaultProps); // We don't care about the `config` argument, so we use `expect.anything()` expect(mockCall).toHaveBeenCalledWith( @@ -117,16 +103,8 @@ describe('callAgentExecutor', () => { const onlyOneMessage = [langChainMessages[0]]; await callAgentExecutor({ - actions: mockActions, - isEnabledKnowledgeBase: true, - connectorId: mockConnectorId, - esClient: esClientMock, + ...defaultProps, langChainMessages: onlyOneMessage, - logger: mockLogger, - onNewReplacements: jest.fn(), - request: mockRequest, - kbResource: ESQL_RESOURCE, - telemetry: mockTelemetry, }); // We don't care about the `config` argument, so we use `expect.anything()` @@ -139,23 +117,13 @@ describe('callAgentExecutor', () => { }); it('returns the expected response body', async () => { - const result: ResponseBody = await callAgentExecutor({ - actions: mockActions, - isEnabledKnowledgeBase: true, - connectorId: mockConnectorId, - esClient: esClientMock, - langChainMessages, - logger: mockLogger, - onNewReplacements: jest.fn(), - request: mockRequest, - kbResource: ESQL_RESOURCE, - telemetry: mockTelemetry, - }); + const result: ResponseBody = await callAgentExecutor(defaultProps); expect(result).toEqual({ connector_id: 'mock-connector-id', - data: mockActionResponse, + data: mockActionResponse.message, status: 'ok', + replacements: [], }); }); }); diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts index f44dcaae75928..44ef2f37d1fcc 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts @@ -105,7 +105,7 @@ export const callAgentExecutor = async ({ let traceData; // Wrap executor call with an APM span for instrumentation - await withAssistantSpan(DEFAULT_AGENT_EXECUTOR_ID, async (span) => { + const langChainResponse = await withAssistantSpan(DEFAULT_AGENT_EXECUTOR_ID, async (span) => { if (span?.transaction?.ids['transaction.id'] != null && span?.ids['trace.id'] != null) { traceData = { // Transactions ID since this span is the parent @@ -127,7 +127,7 @@ export const callAgentExecutor = async ({ return { connector_id: connectorId, - data: llm.getActionResultData(), // the response from the actions framework + data: langChainResponse.output, // the response from the actions framework trace_data: traceData, replacements, status: 'ok', diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts index 4a305808c835c..b5ae76d7379a0 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts @@ -96,29 +96,32 @@ export const callOpenAIFunctionsExecutor = async ({ let traceData; // Wrap executor call with an APM span for instrumentation - await withAssistantSpan(OPEN_AI_FUNCTIONS_AGENT_EXECUTOR_ID, async (span) => { - if (span?.transaction?.ids['transaction.id'] != null && span?.ids['trace.id'] != null) { - traceData = { - // Transactions ID since this span is the parent - transaction_id: span.transaction.ids['transaction.id'], - trace_id: span.ids['trace.id'], - }; - span.addLabels({ evaluationId: traceOptions?.evaluationId }); - } - - return executor.call( - { input: latestMessage[0].content }, - { - callbacks: [apmTracer, ...(traceOptions?.tracers ?? [])], - runName: OPEN_AI_FUNCTIONS_AGENT_EXECUTOR_ID, - tags: traceOptions?.tags ?? [], + const langChainResponse = await withAssistantSpan( + OPEN_AI_FUNCTIONS_AGENT_EXECUTOR_ID, + async (span) => { + if (span?.transaction?.ids['transaction.id'] != null && span?.ids['trace.id'] != null) { + traceData = { + // Transactions ID since this span is the parent + transaction_id: span.transaction.ids['transaction.id'], + trace_id: span.ids['trace.id'], + }; + span.addLabels({ evaluationId: traceOptions?.evaluationId }); } - ); - }); + + return executor.call( + { input: latestMessage[0].content }, + { + callbacks: [apmTracer, ...(traceOptions?.tracers ?? [])], + runName: OPEN_AI_FUNCTIONS_AGENT_EXECUTOR_ID, + tags: traceOptions?.tags ?? [], + } + ); + } + ); return { connector_id: connectorId, - data: llm.getActionResultData(), // the response from the actions framework + data: langChainResponse.output, // the response from the actions framework trace_data: traceData, status: 'ok', }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts index 03554911216eb..4454971e7cbe8 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts @@ -12,7 +12,8 @@ import { Logger } from '@kbn/logging'; import { KibanaRequest } from '@kbn/core-http-server'; import type { LangChainTracer } from 'langchain/callbacks'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; -import { RequestBody, ResponseBody } from '../types'; +import { ExecuteConnectorRequestBody, Replacement } from '@kbn/elastic-assistant-common'; +import { ResponseBody } from '../types'; import type { AssistantTool } from '../../../types'; export interface AgentExecutorParams { @@ -28,9 +29,9 @@ export interface AgentExecutorParams { langChainMessages: BaseMessage[]; llmType?: string; logger: Logger; - onNewReplacements?: (newReplacements: Record) => void; - replacements?: Record; - request: KibanaRequest; + onNewReplacements?: (newReplacements: Replacement[]) => void; + replacements: Replacement[]; + request: KibanaRequest; size?: number; elserId?: string; traceOptions?: TraceOptions; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts index 20066afc68947..ee0c77c3b6444 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts @@ -8,6 +8,7 @@ import { KibanaRequest } from '@kbn/core-http-server'; import type { Message } from '@kbn/elastic-assistant'; import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from 'langchain/schema'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; import { getLangChainMessage, @@ -16,7 +17,6 @@ import { requestHasRequiredAnonymizationParams, } from './helpers'; import { langChainMessages } from '../../__mocks__/lang_chain_messages'; -import { RequestBody } from './types'; describe('helpers', () => { describe('getLangChainMessage', () => { @@ -119,9 +119,9 @@ describe('helpers', () => { body: { allow: ['a', 'b', 'c'], allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -133,9 +133,9 @@ describe('helpers', () => { body: { // allow is undefined allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -147,9 +147,9 @@ describe('helpers', () => { body: { allow: [], // <-- empty allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -161,9 +161,9 @@ describe('helpers', () => { body: { allow: ['a', 9876, 'c'], // <-- non-string value allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -175,9 +175,9 @@ describe('helpers', () => { body: { allow: ['a', 'b', 'c'], allowReplacement: [], - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -189,9 +189,9 @@ describe('helpers', () => { body: { allow: ['a', 'b', 'c'], allowReplacement: ['b', 12345], // <-- non-string value - replacements: { key: 'value' }, + replacements: [{ uuid: 'key', value: 'value' }], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -203,9 +203,9 @@ describe('helpers', () => { body: { allow: ['a', 'b', 'c'], allowReplacement: ['b', 'c'], - replacements: {}, + replacements: [], }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); @@ -217,9 +217,9 @@ describe('helpers', () => { body: { allow: ['a', 'b', 'c'], allowReplacement: ['b', 'c'], - replacements: { key: 76543 }, // <-- non-string value + replacements: [{ uuid: 'key', value: 76543 }], // <-- non-string value }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const result = requestHasRequiredAnonymizationParams(request); diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts index 7850e2818e005..880aa2705a0c3 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts @@ -9,7 +9,7 @@ import { KibanaRequest } from '@kbn/core-http-server'; import type { Message } from '@kbn/elastic-assistant'; import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from 'langchain/schema'; -import { RequestBody } from './types'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; export const getLangChainMessage = ( assistantMessage: Pick @@ -36,7 +36,7 @@ export const getMessageContentAndRole = (prompt: string): Pick + request: KibanaRequest ): boolean => { const { allow, allowReplacement, replacements } = request?.body ?? {}; @@ -50,7 +50,9 @@ export const requestHasRequiredAnonymizationParams = ( const replacementsIsValid = typeof replacements === 'object' && - Object.keys(replacements).every((key) => typeof replacements[key] === 'string'); + replacements.every( + (replacement) => typeof replacement === 'object' && typeof replacement.value === 'string' + ); return allowIsValid && allowReplacementIsValid && replacementsIsValid; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts index f2cffe7c9d41b..c71a658322748 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts @@ -11,7 +11,7 @@ import { loggerMock } from '@kbn/logging-mocks'; import { ActionsClientLlm } from './actions_client_llm'; import { mockActionResponse } from '../../../__mocks__/action_result_data'; -import { RequestBody } from '../types'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; const connectorId = 'mock-connector-id'; @@ -28,34 +28,16 @@ const mockActions = { })), } as unknown as ActionsPluginStart; -const mockRequest: KibanaRequest = { +const prompt = 'Do you know my name?'; + +const mockRequest: KibanaRequest = { params: { connectorId }, body: { - params: { - subActionParams: { - messages: [ - { role: 'user', content: '\\n\\n\\n\\nWhat is my name?' }, - { - role: 'assistant', - content: - "I'm sorry, but I don't have the information about your name. You can tell me your name if you'd like, and we can continue our conversation from there.", - }, - { role: 'user', content: '\\n\\nMy name is Andrew' }, - { - role: 'assistant', - content: - "Hello, Andrew! It's nice to meet you. What would you like to talk about today?", - }, - { role: 'user', content: '\\n\\nDo you know my name?' }, - ], - }, - subAction: 'invokeAI', - }, + message: prompt, + subAction: 'invokeAI', isEnabledKnowledgeBase: true, }, -} as KibanaRequest; - -const prompt = 'Do you know my name?'; +} as KibanaRequest; describe('ActionsClientLlm', () => { beforeEach(() => { @@ -71,9 +53,9 @@ describe('ActionsClientLlm', () => { request: mockRequest, }); - await actionsClientLlm._call(prompt); // ignore the result + const result = await actionsClientLlm._call(prompt); // ignore the result - expect(actionsClientLlm.getActionResultData()).toEqual(mockActionResponse.message); + expect(result).toEqual(mockActionResponse.message); }); }); 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 ca1afdeef7368..ff7086e148b54 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 @@ -11,8 +11,8 @@ import type { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plu import { LLM } from 'langchain/llms/base'; import { get } from 'lodash/fp'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; import { getMessageContentAndRole } from '../helpers'; -import { RequestBody } from '../types'; const LLM_TYPE = 'ActionsClientLlm'; @@ -21,7 +21,7 @@ interface ActionsClientLlmParams { connectorId: string; llmType?: string; logger: Logger; - request: KibanaRequest; + request: KibanaRequest; traceId?: string; } @@ -29,8 +29,7 @@ export class ActionsClientLlm extends LLM { #actions: ActionsPluginStart; #connectorId: string; #logger: Logger; - #request: KibanaRequest; - #actionResultData: string; + #request: KibanaRequest; #traceId: string; // Local `llmType` as it can change and needs to be accessed by abstract `_llmType()` method @@ -53,11 +52,6 @@ export class ActionsClientLlm extends LLM { this.llmType = llmType ?? LLM_TYPE; this.#logger = logger; this.#request = request; - this.#actionResultData = ''; - } - - getActionResultData(): string { - return this.#actionResultData; } _llmType() { @@ -83,10 +77,13 @@ export class ActionsClientLlm extends LLM { const requestBody = { actionId: this.#connectorId, params: { - ...this.#request.body.params, // the original request body params + subAction: this.#request.body.subAction, subActionParams: { - ...this.#request.body.params.subActionParams, // the original request body params.subActionParams + model: this.#request.body.model, messages: [assistantMessage], // the assistant message + ...(this.#request.body.llmType === 'openai' + ? { n: 1, stop: null, temperature: 0.2 } + : {}), }, }, }; @@ -109,7 +106,6 @@ export class ActionsClientLlm extends LLM { `${LLM_TYPE}: content should be a string, but it had an unexpected type: ${typeof content}` ); } - this.#actionResultData = content; // save the raw response from the connector, because that's what the assistant expects return content; // per the contact of _call, return a string } diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts index 1b7a140ab2c14..beb58cb3985a5 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts @@ -5,14 +5,12 @@ * 2.0. */ -import { PostActionsConnectorExecuteBodyInputs } from '../../schemas/post_actions_connector_execute'; - -export type RequestBody = PostActionsConnectorExecuteBodyInputs; +import { Replacement } from '@kbn/elastic-assistant-common'; export interface ResponseBody { data: string; connector_id: string; - replacements?: Record; + replacements?: Replacement[]; status: string; trace_data?: { transaction_id: string; diff --git a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts index 291aa9d8c2519..db1566572584c 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts @@ -15,8 +15,8 @@ import { LangChainTracer, RunCollectorCallbackHandler } from 'langchain/callback import { Dataset } from '@kbn/elastic-assistant-common'; import { AgentExecutorEvaluatorWithMetadata } from '../langchain/executors/types'; import { callAgentWithRetry, getMessageFromLangChainResponse } from './utils'; -import { ResponseBody } from '../langchain/types'; import { isLangSmithEnabled, writeLangSmithFeedback } from '../../routes/evaluate/utils'; +import { ResponseBody } from '../langchain/types'; export interface PerformEvaluationParams { agentExecutorEvaluators: AgentExecutorEvaluatorWithMetadata[]; diff --git a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/utils.ts b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/utils.ts index fd11928c90872..b5e61b08bea78 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/utils.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/utils.ts @@ -59,35 +59,11 @@ export const getMessageFromLangChainResponse = ( response: PromiseSettledResult ): string => { if (response.status === 'fulfilled' && response.value.data != null) { - return getFormattedMessageContent(response.value.data); + return response.value.data; } return 'error'; }; -/** - * Lifted from `x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts` - * TODO: Move this to a shared location - * - * When `content` is a JSON string, prefixed with "```json\n" - * and suffixed with "\n```", this function will attempt to parse it and return - * the `action_input` property if it exists. - */ -export const getFormattedMessageContent = (content: string): string => { - const formattedContentMatch = content.match(/```json\n([\s\S]+)\n```/); - - if (formattedContentMatch) { - try { - const parsedContent = JSON.parse(formattedContentMatch[1]); - - return parsedContent.action_input ?? content; - } catch { - // we don't want to throw an error here, so we'll fall back to the original content - } - } - - return content; -}; - /** * Parse an error message coming back from the agent via the actions frameworks to determine if it is * a rate limit error and extract the retry after delay. 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 new file mode 100644 index 0000000000000..079824b11416d --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.test.ts @@ -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 { Transform } from 'stream'; +import { handleStreamStorage } from './parse_stream'; +import { EventStreamCodec } from '@smithy/eventstream-codec'; +import { fromUtf8, toUtf8 } from '@smithy/util-utf8'; + +function createStreamMock() { + const transform: Transform = new Transform({}); + + return { + write: (data: unknown) => { + transform.push(data); + }, + fail: () => { + transform.emit('error', new Error('Stream failed')); + transform.end(); + }, + transform, + complete: () => { + transform.end(); + }, + }; +} +const onMessageSent = jest.fn(); +describe('handleStreamStorage', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + let stream: ReturnType; + + const chunk = { + object: 'chat.completion.chunk', + choices: [ + { + delta: { + content: 'Single.', + }, + }, + ], + }; + + describe('OpenAI stream', () => { + beforeEach(() => { + stream = createStreamMock(); + stream.write(`data: ${JSON.stringify(chunk)}`); + }); + + it('saves the final string successful streaming event', async () => { + stream.complete(); + await handleStreamStorage(stream.transform, 'openai', onMessageSent); + expect(onMessageSent).toHaveBeenCalledWith('Single.'); + }); + it('saves the error message on a failed streaming event', async () => { + const tokenPromise = handleStreamStorage(stream.transform, 'openai', onMessageSent); + + stream.fail(); + await expect(tokenPromise).resolves.not.toThrow(); + expect(onMessageSent).toHaveBeenCalledWith( + `An error occurred while streaming the response:\n\nStream failed` + ); + }); + }); + describe('Bedrock stream', () => { + beforeEach(() => { + stream = createStreamMock(); + stream.write(encodeBedrockResponse('Simple.')); + }); + + it('saves the final string successful streaming event', async () => { + stream.complete(); + 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); + + stream.fail(); + await expect(tokenPromise).resolves.not.toThrow(); + expect(onMessageSent).toHaveBeenCalledWith( + `An error occurred while streaming the response:\n\nStream failed` + ); + }); + }); +}); + +function encodeBedrockResponse(completion: string) { + return new EventStreamCodec(toUtf8, fromUtf8).encode({ + headers: {}, + body: Uint8Array.from( + Buffer.from( + JSON.stringify({ + bytes: Buffer.from(JSON.stringify({ completion })).toString('base64'), + }) + ) + ), + }); +} diff --git a/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts new file mode 100644 index 0000000000000..fed0a1cfb37bd --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts @@ -0,0 +1,161 @@ +/* + * 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 { Readable } from 'stream'; +import { EventStreamCodec } from '@smithy/eventstream-codec'; +import { fromUtf8, toUtf8 } from '@smithy/util-utf8'; +import { finished } from 'stream/promises'; + +type StreamParser = (responseStream: Readable) => Promise; + +export const handleStreamStorage: ( + responseStream: Readable, + llmType: string, + onMessageSent?: (content: string) => void +) => Promise = async (responseStream, llmType, onMessageSent) => { + try { + const parser = llmType === 'bedrock' ? parseBedrockStream : parseOpenAIStream; + // TODO @steph add abort signal + const parsedResponse = await parser(responseStream); + if (onMessageSent) { + onMessageSent(parsedResponse); + } + } catch (e) { + if (onMessageSent) { + onMessageSent(`An error occurred while streaming the response:\n\n${e.message}`); + } + } +}; + +const parseOpenAIStream: StreamParser = async (stream) => { + let responseBody = ''; + stream.on('data', (chunk) => { + responseBody += chunk.toString(); + }); + return new Promise((resolve, reject) => { + stream.on('end', () => { + resolve(parseOpenAIResponse(responseBody)); + }); + stream.on('error', (err) => { + reject(err); + }); + }); +}; + +const parseOpenAIResponse = (responseBody: string) => + responseBody + .split('\n') + .filter((line) => { + return line.startsWith('data: ') && !line.endsWith('[DONE]'); + }) + .map((line) => { + return JSON.parse(line.replace('data: ', '')); + }) + .filter( + ( + line + ): line is { + choices: Array<{ + delta: { content?: string; function_call?: { name?: string; arguments: string } }; + }>; + } => { + return 'object' in line && line.object === 'chat.completion.chunk'; + } + ) + .reduce((prev, line) => { + const msg = line.choices[0].delta; + return prev + (msg.content || ''); + }, ''); + +const parseBedrockStream: StreamParser = async (responseStream) => { + const responseBuffer: Uint8Array[] = []; + responseStream.on('data', (chunk) => { + // special encoding for bedrock, do not attempt to convert to string + responseBuffer.push(chunk); + }); + await finished(responseStream); + + return parseBedrockBuffer(responseBuffer); +}; + +/** + * Parses a Bedrock buffer from an array of chunks. + * + * @param {Uint8Array[]} chunks - Array of Uint8Array chunks to be parsed. + * @returns {string} - Parsed string from the Bedrock buffer. + */ +const parseBedrockBuffer = (chunks: Uint8Array[]): string => { + // Initialize an empty Uint8Array to store the concatenated buffer. + let bedrockBuffer: Uint8Array = new Uint8Array(0); + + // Map through each chunk to process the Bedrock buffer. + return chunks + .map((chunk) => { + // Concatenate the current chunk to the existing buffer. + bedrockBuffer = concatChunks(bedrockBuffer, chunk); + // Get the length of the next message in the buffer. + let messageLength = getMessageLength(bedrockBuffer); + // Initialize an array to store fully formed message chunks. + const buildChunks = []; + // Process the buffer until no complete messages are left. + while (bedrockBuffer.byteLength > 0 && bedrockBuffer.byteLength >= messageLength) { + // Extract a chunk of the specified length from the buffer. + const extractedChunk = bedrockBuffer.slice(0, messageLength); + // Add the extracted chunk to the array of fully formed message chunks. + buildChunks.push(extractedChunk); + // Remove the processed chunk from the buffer. + bedrockBuffer = bedrockBuffer.slice(messageLength); + // Get the length of the next message in the updated buffer. + messageLength = getMessageLength(bedrockBuffer); + } + + const awsDecoder = new EventStreamCodec(toUtf8, fromUtf8); + + // Decode and parse each message chunk, extracting the 'completion' property. + return buildChunks + .map((bChunk) => { + const event = awsDecoder.decode(bChunk); + const body = JSON.parse( + Buffer.from(JSON.parse(new TextDecoder().decode(event.body)).bytes, 'base64').toString() + ); + return body.completion; + }) + .join(''); + }) + .join(''); +}; + +/** + * Concatenates two Uint8Array buffers. + * + * @param {Uint8Array} a - First buffer. + * @param {Uint8Array} b - Second buffer. + * @returns {Uint8Array} - Concatenated buffer. + */ +function concatChunks(a: Uint8Array, b: Uint8Array): Uint8Array { + const newBuffer = new Uint8Array(a.length + b.length); + // Copy the contents of the first buffer to the new buffer. + newBuffer.set(a); + // Copy the contents of the second buffer to the new buffer starting from the end of the first buffer. + newBuffer.set(b, a.length); + return newBuffer; +} + +/** + * Gets the length of the next message from the buffer. + * + * @param {Uint8Array} buffer - Buffer containing the message. + * @returns {number} - Length of the next message. + */ +function getMessageLength(buffer: Uint8Array): number { + // If the buffer is empty, return 0. + if (buffer.byteLength === 0) return 0; + // Create a DataView to read the Uint32 value at the beginning of the buffer. + const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength); + // Read and return the Uint32 value (message length). + return view.getUint32(0, false); +} diff --git a/x-pack/plugins/elastic_assistant/server/plugin.ts b/x-pack/plugins/elastic_assistant/server/plugin.ts index eec0a08ccb8cd..53b05857beb4b 100755 --- a/x-pack/plugins/elastic_assistant/server/plugin.ts +++ b/x-pack/plugins/elastic_assistant/server/plugin.ts @@ -5,53 +5,25 @@ * 2.0. */ -import { - PluginInitializerContext, - CoreSetup, - CoreStart, - Plugin, - Logger, - IContextProvider, - KibanaRequest, - SavedObjectsClientContract, - type AnalyticsServiceSetup, -} from '@kbn/core/server'; -import { once } from 'lodash'; +import { PluginInitializerContext, CoreStart, Plugin, Logger } from '@kbn/core/server'; import { AssistantFeatures } from '@kbn/elastic-assistant-common'; +import { ReplaySubject, type Subject } from 'rxjs'; import { events } from './lib/telemetry/event_based_telemetry'; import { AssistantTool, + ElasticAssistantPluginCoreSetupDependencies, ElasticAssistantPluginSetup, ElasticAssistantPluginSetupDependencies, ElasticAssistantPluginStart, ElasticAssistantPluginStartDependencies, ElasticAssistantRequestHandlerContext, - GetElser, - PLUGIN_ID, } from './types'; -import { - deleteKnowledgeBaseRoute, - getKnowledgeBaseStatusRoute, - postActionsConnectorExecuteRoute, - postEvaluateRoute, - postKnowledgeBaseRoute, -} from './routes'; -import { - appContextService, - GetRegisteredFeatures, - GetRegisteredTools, -} from './services/app_context'; -import { getCapabilitiesRoute } from './routes/capabilities/get_capabilities_route'; -import { getEvaluateRoute } from './routes/evaluate/get_evaluate'; - -interface CreateRouteHandlerContextParams { - core: CoreSetup; - logger: Logger; - getRegisteredFeatures: GetRegisteredFeatures; - getRegisteredTools: GetRegisteredTools; - telemetry: AnalyticsServiceSetup; -} +import { AIAssistantService } from './ai_assistant_service'; +import { RequestContextFactory } from './routes/request_context_factory'; +import { PLUGIN_ID } from '../common/constants'; +import { registerRoutes } from './routes/register_routes'; +import { appContextService } from './services/app_context'; export class ElasticAssistantPlugin implements @@ -63,71 +35,49 @@ export class ElasticAssistantPlugin > { private readonly logger: Logger; + private assistantService: AIAssistantService | undefined; + private pluginStop$: Subject; + private readonly kibanaVersion: PluginInitializerContext['env']['packageInfo']['version']; constructor(initializerContext: PluginInitializerContext) { + this.pluginStop$ = new ReplaySubject(1); this.logger = initializerContext.logger.get(); + this.kibanaVersion = initializerContext.env.packageInfo.version; } - private createRouteHandlerContext = ({ - core, - logger, - getRegisteredFeatures, - getRegisteredTools, - telemetry, - }: CreateRouteHandlerContextParams): IContextProvider< - ElasticAssistantRequestHandlerContext, - typeof PLUGIN_ID - > => { - return async function elasticAssistantRouteHandlerContext(context, request) { - const [_, pluginsStart] = await core.getStartServices(); + public setup( + core: ElasticAssistantPluginCoreSetupDependencies, + plugins: ElasticAssistantPluginSetupDependencies + ) { + this.logger.debug('elasticAssistant: Setup'); - return { - actions: pluginsStart.actions, - getRegisteredFeatures, - getRegisteredTools, - logger, - telemetry, - }; - }; - }; + this.assistantService = new AIAssistantService({ + logger: this.logger.get('service'), + taskManager: plugins.taskManager, + kibanaVersion: this.kibanaVersion, + elasticsearchClientPromise: core + .getStartServices() + .then(([{ elasticsearch }]) => elasticsearch.client.asInternalUser), + pluginStop$: this.pluginStop$, + }); + + const requestContextFactory = new RequestContextFactory({ + logger: this.logger, + core, + plugins, + kibanaVersion: this.kibanaVersion, + assistantService: this.assistantService, + }); - public setup(core: CoreSetup, plugins: ElasticAssistantPluginSetupDependencies) { - this.logger.debug('elasticAssistant: Setup'); const router = core.http.createRouter(); core.http.registerRouteHandlerContext( PLUGIN_ID, - this.createRouteHandlerContext({ - core: core as CoreSetup, - logger: this.logger, - getRegisteredFeatures: (pluginName: string) => { - return appContextService.getRegisteredFeatures(pluginName); - }, - getRegisteredTools: (pluginName: string) => { - return appContextService.getRegisteredTools(pluginName); - }, - telemetry: core.analytics, - }) + (context, request) => requestContextFactory.create(context, request) ); events.forEach((eventConfig) => core.analytics.registerEventType(eventConfig)); - const getElserId: GetElser = once( - async (request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) => { - return (await plugins.ml.trainedModelsProvider(request, savedObjectsClient).getELSER()) - .model_id; - } - ); - - // Knowledge Base - deleteKnowledgeBaseRoute(router); - getKnowledgeBaseStatusRoute(router, getElserId); - postKnowledgeBaseRoute(router, getElserId); - // Actions Connector Execute (LLM Wrapper) - postActionsConnectorExecuteRoute(router, getElserId); - // Evaluate - postEvaluateRoute(router, getElserId); - getEvaluateRoute(router); - // Capabilities - getCapabilitiesRoute(router); + // this.assistantService registerKBTask + registerRoutes(router, this.logger, plugins); return { actions: plugins.actions, getRegisteredFeatures: (pluginName: string) => { @@ -165,5 +115,7 @@ export class ElasticAssistantPlugin public stop() { appContextService.stop(); + this.pluginStop$.next(); + this.pluginStop$.complete(); } } diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts new file mode 100644 index 0000000000000..92f01334a19af --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts @@ -0,0 +1,236 @@ +/* + * 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 { loggingSystemMock } from '@kbn/core/server/mocks'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getAnonymizationFieldsBulkActionRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION } from '@kbn/elastic-assistant-common'; +import { + getEmptyFindResult, + getFindAnonymizationFieldsResultWithSingleHit, +} from '../../__mocks__/response'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { bulkActionAnonymizationFieldsRoute } from './bulk_actions_route'; +import { + getAnonymizationFieldMock, + getCreateAnonymizationFieldSchemaMock, + getPerformBulkActionSchemaMock, + getUpdateAnonymizationFieldSchemaMock, +} from '../../__mocks__/anonymization_fields_schema.mock'; + +describe('Perform bulk action route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType; + const mockAnonymizationField = getAnonymizationFieldMock(getUpdateAnonymizationFieldSchemaMock()); + const mockUser1 = { + profile_uid: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(async () => { + server = serverMock.create(); + logger = loggingSystemMock.createLogger(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindAnonymizationFieldsResultWithSingleHit()) + ); + ( + (await clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.getWriter()) + .bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockAnonymizationField, mockAnonymizationField], + docs_updated: [mockAnonymizationField, mockAnonymizationField], + docs_deleted: [], + errors: [], + }); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + bulkActionAnonymizationFieldsRoute(server.router, logger); + }); + + describe('status codes', () => { + it('returns 200 when performing bulk action with all dependencies present', async () => { + clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getAnonymizationFieldsBulkActionRequest( + [getCreateAnonymizationFieldSchemaMock()], + [getUpdateAnonymizationFieldSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + success: true, + anonymization_fields_count: 2, + attributes: { + results: someBulkActionResults(), + summary: { + failed: 0, + skipped: 0, + succeeded: 2, + total: 2, + }, + }, + }); + }); + }); + + describe('anonymization fields bulk actions failures', () => { + it('returns partial failure error if update of few anonymization fields fail', async () => { + ( + (await clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.getWriter()) + .bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockAnonymizationField, mockAnonymizationField], + docs_updated: [], + docs_deleted: [], + errors: [ + { + message: 'mocked validation message', + document: { id: 'failed-anonymization-field-id-1', name: 'Detect Root/Admin Users' }, + }, + { + message: 'mocked validation message', + document: { id: 'failed-anonymization-field-id-2', name: 'Detect Root/Admin Users' }, + }, + { + message: 'test failure', + document: { id: 'failed-anonymization-field-id-3', name: 'Detect Root/Admin Users' }, + }, + ], + total: 5, + }); + clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getAnonymizationFieldsBulkActionRequest( + [getCreateAnonymizationFieldSchemaMock()], + [getUpdateAnonymizationFieldSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + attributes: { + summary: { + failed: 3, + succeeded: 2, + skipped: 0, + total: 5, + }, + errors: [ + { + message: 'mocked validation message', + anonymization_fields: [ + { + id: 'failed-anonymization-field-id-1', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'mocked validation message', + anonymization_fields: [ + { + id: 'failed-anonymization-field-id-2', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'test failure', + anonymization_fields: [ + { + id: 'failed-anonymization-field-id-3', + name: '', + }, + ], + status_code: 500, + }, + ], + results: someBulkActionResults(), + }, + message: 'Bulk edit partially failed', + }); + }); + }); + + describe('request validation', () => { + it('rejects payloads with no ids in delete operation', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + body: { ...getPerformBulkActionSchemaMock(), delete: { ids: [] } }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + 'delete.ids: Array must contain at least 1 element(s)' + ); + }); + + it('accepts payloads with only delete action', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('accepts payloads with all operations', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('rejects payload if there is more than 100 deletes in payload', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + body: { + ...getPerformBulkActionSchemaMock(), + delete: { ids: Array.from({ length: 101 }).map(() => 'fake-id') }, + }, + }); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(400); + expect(response.body.message).toEqual('More than 100 ids sent for bulk edit action.'); + }); + }); +}); + +function someBulkActionResults() { + return { + created: expect.any(Array), + deleted: expect.any(Array), + updated: expect.any(Array), + skipped: expect.any(Array), + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts new file mode 100644 index 0000000000000..371a537b22ebf --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts @@ -0,0 +1,238 @@ +/* + * 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 moment from 'moment'; +import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; + +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, +} from '@kbn/elastic-assistant-common'; + +import { + AnonymizationFieldResponse, + BulkActionSkipResult, + BulkCrudActionResponse, + BulkCrudActionResults, + BulkCrudActionSummary, + PerformBulkActionRequestBody, + PerformBulkActionResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ANONYMIZATION_FIELDS_TABLE_MAX_PAGE_SIZE } from '../../../common/constants'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { + getUpdateScript, + transformESToAnonymizationFields, + transformToCreateScheme, + transformToUpdateScheme, +} from '../../ai_assistant_data_clients/anonymization_fields/helpers'; +import { + SearchEsAnonymizationFieldsSchema, + UpdateAnonymizationFieldSchema, +} from '../../ai_assistant_data_clients/anonymization_fields/types'; + +export interface BulkOperationError { + message: string; + status?: number; + document: { + id: string; + }; +} + +export type BulkActionError = BulkOperationError | unknown; + +const buildBulkResponse = ( + response: KibanaResponseFactory, + { + errors = [], + updated = [], + created = [], + deleted = [], + skipped = [], + }: { + errors?: BulkOperationError[]; + updated?: AnonymizationFieldResponse[]; + created?: AnonymizationFieldResponse[]; + deleted?: string[]; + skipped?: BulkActionSkipResult[]; + } +): IKibanaResponse => { + const numSucceeded = updated.length + created.length + deleted.length; + const numSkipped = skipped.length; + const numFailed = errors.length; + + const summary: BulkCrudActionSummary = { + failed: numFailed, + succeeded: numSucceeded, + skipped: numSkipped, + total: numSucceeded + numFailed + numSkipped, + }; + + const results: BulkCrudActionResults = { + updated, + created, + deleted, + skipped, + }; + + if (numFailed > 0) { + return response.custom({ + headers: { 'content-type': 'application/json' }, + body: { + message: summary.succeeded > 0 ? 'Bulk edit partially failed' : 'Bulk edit failed', + attributes: { + errors: errors.map((e: BulkOperationError) => ({ + status_code: e.status ?? 500, + anonymization_fields: [{ id: e.document.id, name: '' }], + message: e.message, + })), + results, + summary, + }, + }, + statusCode: 500, + }); + } + + const responseBody: BulkCrudActionResponse = { + success: true, + anonymization_fields_count: summary.total, + attributes: { results, summary }, + }; + + return response.ok({ body: responseBody }); +}; + +export const bulkActionAnonymizationFieldsRoute = ( + router: ElasticAssistantPluginRouter, + logger: Logger +) => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + options: { + tags: ['access:elasticAssistant'], + timeout: { + idleSocket: moment.duration(15, 'minutes').asMilliseconds(), + }, + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(PerformBulkActionRequestBody), + }, + }, + }, + async (context, request, response): Promise> => { + const { body } = request; + const assistantResponse = buildResponse(response); + + const operationsCount = + (body?.update ? body.update?.length : 0) + + (body?.create ? body.create?.length : 0) + + (body?.delete ? body.delete?.ids?.length ?? 0 : 0); + if (operationsCount > ANONYMIZATION_FIELDS_TABLE_MAX_PAGE_SIZE) { + return assistantResponse.error({ + body: `More than ${ANONYMIZATION_FIELDS_TABLE_MAX_PAGE_SIZE} ids sent for bulk edit action.`, + statusCode: 400, + }); + } + + const abortController = new AbortController(); + + // subscribing to completed$, because it handles both cases when request was completed and aborted. + // when route is finished by timeout, aborted$ is not getting fired + request.events.completed$.subscribe(() => abortController.abort()); + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + const dataClient = + await ctx.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient(); + + if (body.create && body.create.length > 0) { + const result = await dataClient?.findDocuments({ + perPage: 100, + page: 1, + filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND (${body.create + .map((c) => `field:${c.field}`) + .join(' OR ')})`, + fields: ['field'], + }); + if (result?.data != null && result.total > 0) { + return assistantResponse.error({ + statusCode: 409, + body: `anonymization for field: "${result.data.hits.hits + .map((c) => c._id) + .join(',')}" already exists`, + }); + } + } + + const writer = await dataClient?.getWriter(); + const changedAt = new Date().toISOString(); + const { + errors, + docs_created: docsCreated, + docs_updated: docsUpdated, + docs_deleted: docsDeleted, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + } = await writer!.bulk({ + documentsToCreate: body.create?.map((f) => + transformToCreateScheme(authenticatedUser, changedAt, f) + ), + documentsToDelete: body.delete?.ids, + documentsToUpdate: body.update?.map((f) => + transformToUpdateScheme(authenticatedUser, changedAt, f) + ), + getUpdateScript: (document: UpdateAnonymizationFieldSchema) => + getUpdateScript({ anonymizationField: document, isPatch: true }), + authenticatedUser, + }); + + const created = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsCreated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + const updated = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsUpdated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + + return buildBulkResponse(response, { + updated: updated?.data ? transformESToAnonymizationFields(updated.data) : [], + created: created?.data ? transformESToAnonymizationFields(created.data) : [], + deleted: docsDeleted ?? [], + errors, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts new file mode 100644 index 0000000000000..e0b3cfc815902 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts @@ -0,0 +1,113 @@ +/* + * 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 { getCurrentUserAnonymizationFieldsRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND } from '@kbn/elastic-assistant-common'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getFindAnonymizationFieldsResultWithSingleHit } from '../../__mocks__/response'; +import { findAnonymizationFieldsRoute } from './find_route'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; + +describe('Find user anonymization fields route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType; + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindAnonymizationFieldsResultWithSingleHit()) + ); + clients.elasticAssistant.getCurrentUser.mockResolvedValue({ + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + }); + logger = loggingSystemMock.createLogger(); + + findAnonymizationFieldsRoute(server.router, logger); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getCurrentUserAnonymizationFieldsRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockRejectedValueOnce( + new Error('Test error') + ); + const response = await server.inject( + getCurrentUserAnonymizationFieldsRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('allows optional query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'created_at', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + test('disallows invalid sort fields', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'name', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.badRequest).toHaveBeenCalledWith( + `sort_field: Invalid enum value. Expected 'created_at' | 'is_default' | 'title' | 'updated_at', received 'name'` + ); + }); + + test('ignores unknown query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + query: { + invalid_value: 'test 1', + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts new file mode 100644 index 0000000000000..e081dbbf7616d --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts @@ -0,0 +1,91 @@ +/* + * 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 { IKibanaResponse, Logger } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; + +import { + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, +} from '@kbn/elastic-assistant-common'; + +import { + FindAnonymizationFieldsRequestQuery, + FindAnonymizationFieldsResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { SearchEsAnonymizationFieldsSchema } from '../../ai_assistant_data_clients/anonymization_fields/types'; +import { transformESToAnonymizationFields } from '../../ai_assistant_data_clients/anonymization_fields/helpers'; + +export const findAnonymizationFieldsRoute = ( + router: ElasticAssistantPluginRouter, + logger: Logger +) => { + router.versioned + .get({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + query: buildRouteValidationWithZod(FindAnonymizationFieldsRequestQuery), + }, + }, + }, + async ( + context, + request, + response + ): Promise> => { + const assistantResponse = buildResponse(response); + + try { + const { query } = request; + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = + await ctx.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient(); + + const result = await dataClient?.findDocuments({ + perPage: query.per_page, + page: query.page, + sortField: query.sort_field, + sortOrder: query.sort_order, + filter: query.filter, + fields: query.fields, + }); + + if (result) { + return response.ok({ + body: { + perPage: result.perPage, + page: result.page, + total: result.total, + data: transformESToAnonymizationFields(result.data), + }, + }); + } + return response.ok({ + body: { perPage: query.per_page, page: query.page, data: [], total: 0 }, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts b/x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts index 7c470cdfc2d94..1cd52553b5e47 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/capabilities/get_capabilities_route.ts @@ -13,12 +13,12 @@ import { GetCapabilitiesResponse, INTERNAL_API_ACCESS, } from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { CAPABILITIES } from '../../../common/constants'; import { ElasticAssistantRequestHandlerContext } from '../../types'; import { buildResponse } from '../../lib/build_response'; import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; -import { buildRouteValidationWithZod } from '../../schemas/common'; /** * Get the assistant capabilities for the requesting plugin diff --git a/x-pack/plugins/elastic_assistant/server/routes/custom_http_request_error.ts b/x-pack/plugins/elastic_assistant/server/routes/custom_http_request_error.ts new file mode 100644 index 0000000000000..4b3ba1519e62c --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/custom_http_request_error.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. + */ + +export class CustomHttpRequestError extends Error { + constructor(message: string, public readonly statusCode: number = 500, meta?: unknown) { + super(message); + // For debugging - capture name of subclasses + this.name = this.constructor.name; + this.message = message; + } +} diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/get_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/get_evaluate.ts index bc9922ef5f35a..a5196559a2dda 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/get_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/get_evaluate.ts @@ -13,11 +13,11 @@ import { INTERNAL_API_ACCESS, GetEvaluateResponse, } from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantRequestHandlerContext } from '../../types'; import { EVALUATE } from '../../../common/constants'; import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; -import { buildRouteValidationWithZod } from '../../schemas/common'; import { AGENT_EXECUTOR_MAP } from '../../lib/langchain/executors'; export const getEvaluateRoute = (router: IRouter) => { 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 33d19d6fb61e0..c0157d03a5abc 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 @@ -15,7 +15,9 @@ import { PostEvaluateBody, PostEvaluateRequestQuery, PostEvaluateResponse, + ExecuteConnectorRequestBody, } from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ESQL_RESOURCE } from '../knowledge_base/constants'; import { buildResponse } from '../../lib/build_response'; import { ElasticAssistantRequestHandlerContext, GetElser } from '../../types'; @@ -28,9 +30,12 @@ import { setupEvaluationIndex, } from '../../lib/model_evaluator/output_index/utils'; import { fetchLangSmithDataset, getConnectorName, getLangSmithTracer, getLlmType } from './utils'; -import { RequestBody } from '../../lib/langchain/types'; import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; -import { buildRouteValidationWithZod } from '../../schemas/common'; + +/** + * To support additional Agent Executors from the UI, add them to this map + * and reference your specific AgentExecutor function + */ import { AGENT_EXECUTOR_MAP } from '../../lib/langchain/executors'; const DEFAULT_SIZE = 20; @@ -43,6 +48,7 @@ export const postEvaluateRoute = ( .post({ access: INTERNAL_API_ACCESS, path: EVALUATE, + options: { tags: ['access:elasticAssistant'], }, @@ -136,22 +142,19 @@ export const postEvaluateRoute = ( // Skeleton request from route to pass to the agents // params will be passed to the actions executor - const skeletonRequest: KibanaRequest = { + const skeletonRequest: KibanaRequest = { ...request, body: { alertsIndexPattern: '', allow: [], allowReplacement: [], - params: { - subAction: 'invokeAI', - subActionParams: { - messages: [], - }, - }, - replacements: {}, + subAction: 'invokeAI', + replacements: [], size: DEFAULT_SIZE, isEnabledKnowledgeBase: true, isEnabledRAGAlerts: true, + conversationId: '', + llmType: 'openai', }, }; @@ -193,6 +196,7 @@ export const postEvaluateRoute = ( ], tracers: getLangSmithTracer(detailedRunName, exampleId, logger), }, + replacements: [], }), metadata: { connectorName, diff --git a/x-pack/plugins/elastic_assistant/server/routes/helpers.test.ts b/x-pack/plugins/elastic_assistant/server/routes/helpers.test.ts index 384e1f8865736..2ac00be311b9b 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/helpers.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/helpers.test.ts @@ -6,9 +6,9 @@ */ import type { KibanaRequest } from '@kbn/core-http-server'; -import type { RequestBody } from '../lib/langchain/types'; import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from './helpers'; +import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; describe('getPluginNameFromRequest', () => { const contextRequestHeaderEncoded = encodeURIComponent( @@ -25,7 +25,7 @@ describe('getPluginNameFromRequest', () => { headers: { 'x-kbn-context': contextRequestHeaderEncoded, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; beforeEach(() => { jest.clearAllMocks(); @@ -44,7 +44,7 @@ describe('getPluginNameFromRequest', () => { headers: { 'x-kbn-context': undefined, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const pluginName = getPluginNameFromRequest({ request: invalidRequest, defaultPluginName: DEFAULT_PLUGIN_NAME, @@ -57,7 +57,7 @@ describe('getPluginNameFromRequest', () => { headers: { 'x-kbn-context': 'asdfku', }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const pluginName = getPluginNameFromRequest({ request: invalidRequest, defaultPluginName: DEFAULT_PLUGIN_NAME, diff --git a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts index a418827c4829d..95afcd4b4569b 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts @@ -7,6 +7,7 @@ import { KibanaRequest } from '@kbn/core-http-server'; import { Logger } from '@kbn/core/server'; +import { Message, TraceData } from '@kbn/elastic-assistant-common'; interface GetPluginNameFromRequestParams { request: KibanaRequest; @@ -50,3 +51,31 @@ export const getPluginNameFromRequest = ({ } return defaultPluginName; }; + +export const getMessageFromRawResponse = ({ + rawContent, + isError, + traceData, +}: { + rawContent?: string; + traceData?: TraceData; + isError?: boolean; +}): Message => { + const dateTimeString = new Date().toISOString(); + if (rawContent) { + return { + role: 'assistant', + content: rawContent, + timestamp: dateTimeString, + isError, + traceData, + }; + } else { + return { + role: 'assistant', + content: 'Error: Response from LLM API is empty or undefined.', + timestamp: dateTimeString, + isError: true, + }; + } +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts index 235ea4eda4c0d..6886b56f7ef32 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/delete_knowledge_base.ts @@ -5,17 +5,20 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import { IRouter, KibanaRequest } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; -import type { DeleteKnowledgeBaseResponse } from '@kbn/elastic-assistant'; +import { ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION } from '@kbn/elastic-assistant-common'; +import { + DeleteKnowledgeBaseRequestParams, + DeleteKnowledgeBaseResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/knowledge_base/crud_kb_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { buildResponse } from '../../lib/build_response'; -import { buildRouteValidation } from '../../schemas/common'; import { ElasticAssistantRequestHandlerContext } from '../../types'; import { KNOWLEDGE_BASE } from '../../../common/constants'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; -import { DeleteKnowledgeBasePathParams } from '../../schemas/knowledge_base/delete_knowledge_base'; /** * Delete Knowledge Base index, pipeline, and resources (collection of documents) @@ -24,63 +27,72 @@ import { DeleteKnowledgeBasePathParams } from '../../schemas/knowledge_base/dele export const deleteKnowledgeBaseRoute = ( router: IRouter ) => { - router.delete( - { + router.versioned + .delete({ + access: 'internal', path: KNOWLEDGE_BASE, - validate: { - params: buildRouteValidation(DeleteKnowledgeBasePathParams), - }, options: { // Note: Relying on current user privileges to scope an esClient. // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges tags: [], }, - }, - async (context, request, response) => { - const resp = buildResponse(response); - const assistantContext = await context.elasticAssistant; - const logger = assistantContext.logger; - const telemetry = assistantContext.telemetry; + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + validate: { + request: { + params: buildRouteValidationWithZod(DeleteKnowledgeBaseRequestParams), + }, + }, + }, + async (context, request: KibanaRequest, response) => { + const resp = buildResponse(response); + const assistantContext = await context.elasticAssistant; + const logger = assistantContext.logger; + const telemetry = assistantContext.telemetry; - try { - const kbResource = - request.params.resource != null ? decodeURIComponent(request.params.resource) : undefined; + try { + const kbResource = + request.params.resource != null + ? decodeURIComponent(request.params.resource) + : undefined; - // Get a scoped esClient for deleting the Knowledge Base index, pipeline, and documents - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - const esStore = new ElasticsearchStore( - esClient, - KNOWLEDGE_BASE_INDEX_PATTERN, - logger, - telemetry - ); + // Get a scoped esClient for deleting the Knowledge Base index, pipeline, and documents + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + const esStore = new ElasticsearchStore( + esClient, + KNOWLEDGE_BASE_INDEX_PATTERN, + logger, + telemetry + ); - if (kbResource === ESQL_RESOURCE) { - // For now, tearing down the Knowledge Base is fine, but will want to support removing specific assets based - // on resource name or document query - // Implement deleteDocuments(query: string) in ElasticsearchStore - // const success = await esStore.deleteDocuments(); - // return const body: DeleteKnowledgeBaseResponse = { success }; - } + if (kbResource === ESQL_RESOURCE) { + // For now, tearing down the Knowledge Base is fine, but will want to support removing specific assets based + // on resource name or document query + // Implement deleteDocuments(query: string) in ElasticsearchStore + // const success = await esStore.deleteDocuments(); + // return const body: DeleteKnowledgeBaseResponse = { success }; + } - // Delete index and pipeline - const indexDeleted = await esStore.deleteIndex(); - const pipelineDeleted = await esStore.deletePipeline(); + // Delete index and pipeline + const indexDeleted = await esStore.deleteIndex(); + const pipelineDeleted = await esStore.deletePipeline(); - const body: DeleteKnowledgeBaseResponse = { - success: indexDeleted && pipelineDeleted, - }; + const body: DeleteKnowledgeBaseResponse = { + success: indexDeleted && pipelineDeleted, + }; - return response.ok({ body }); - } catch (err) { - logger.error(err); - const error = transformError(err); + return response.ok({ body }); + } catch (err) { + logger.error(err); + const error = transformError(err); - return resp.error({ - body: error.message, - statusCode: error.statusCode, - }); + return resp.error({ + body: error.message, + statusCode: error.statusCode, + }); + } } - } - ); + ); }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.test.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.test.ts index 7c4a9058e7df7..292f68555ad23 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { KibanaRequest } from '@kbn/core/server'; import { getKbResource } from './get_kb_resource'; describe('getKbResource', () => { @@ -15,7 +16,13 @@ describe('getKbResource', () => { }); it('returns undefined when params is undefined', () => { - const request = { params: undefined }; + const request = { params: undefined } as unknown as KibanaRequest< + { resource?: string | undefined }, + unknown, + unknown, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any + >; const result = getKbResource(request); @@ -23,7 +30,13 @@ describe('getKbResource', () => { }); it('returns undefined when resource is undefined', () => { - const request = { params: { resource: undefined } }; + const request = { params: { resource: undefined } } as unknown as KibanaRequest< + { resource?: string | undefined }, + unknown, + unknown, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any + >; const result = getKbResource(request); @@ -31,7 +44,13 @@ describe('getKbResource', () => { }); it('returns the decoded resource', () => { - const request = { params: { resource: 'esql%20query' } }; + const request = { params: { resource: 'esql%20query' } } as unknown as KibanaRequest< + { resource?: string | undefined }, + unknown, + unknown, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any + >; const result = getKbResource(request); diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.ts index a238a8f55d615..9dc0edf8e482d 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_kb_resource.ts @@ -5,14 +5,8 @@ * 2.0. */ -/** - * A knowledge base REST request - */ -interface KbRequest { - params?: { - resource?: string; - }; -} +import { KibanaRequest } from '@kbn/core/server'; +import { CreateKnowledgeBaseRequestParams } from '@kbn/elastic-assistant-common'; /** * Returns the optional resource, e.g. `esql` from the request params, or undefined if it doesn't exist @@ -21,7 +15,9 @@ interface KbRequest { * * @returns Returns the optional resource, e.g. `esql` from the request params, or undefined if it doesn't exist */ -export const getKbResource = (request: KbRequest | undefined): string | undefined => { +export const getKbResource = ( + request: KibanaRequest | undefined +): string | undefined => { if (request?.params?.resource != null) { return decodeURIComponent(request.params.resource); } else { diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts index c61887a436267..c7d83e8c24401 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/get_knowledge_base_status.ts @@ -5,16 +5,19 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; -import type { GetKnowledgeBaseStatusResponse } from '@kbn/elastic-assistant'; +import { + ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + ReadKnowledgeBaseRequestParams, + ReadKnowledgeBaseResponse, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { KibanaRequest } from '@kbn/core/server'; import { getKbResource } from './get_kb_resource'; import { buildResponse } from '../../lib/build_response'; -import { buildRouteValidation } from '../../schemas/common'; -import { ElasticAssistantRequestHandlerContext, GetElser } from '../../types'; +import { ElasticAssistantPluginRouter, GetElser } from '../../types'; import { KNOWLEDGE_BASE } from '../../../common/constants'; -import { GetKnowledgeBaseStatusPathParams } from '../../schemas/knowledge_base/get_knowledge_base_status'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_DOCS_LOADED_QUERY, ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; @@ -25,67 +28,74 @@ import { ESQL_DOCS_LOADED_QUERY, ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } f * @param getElser Function to get the default Elser ID */ export const getKnowledgeBaseStatusRoute = ( - router: IRouter, + router: ElasticAssistantPluginRouter, getElser: GetElser ) => { - router.get( - { + router.versioned + .get({ + access: 'internal', path: KNOWLEDGE_BASE, - validate: { - params: buildRouteValidation(GetKnowledgeBaseStatusPathParams), - }, options: { // Note: Relying on current user privileges to scope an esClient. // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges tags: [], }, - }, - async (context, request, response) => { - const resp = buildResponse(response); - const assistantContext = await context.elasticAssistant; - const logger = assistantContext.logger; - const telemetry = assistantContext.telemetry; + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + validate: { + request: { + params: buildRouteValidationWithZod(ReadKnowledgeBaseRequestParams), + }, + }, + }, + async (context, request: KibanaRequest, response) => { + const resp = buildResponse(response); + const assistantContext = await context.elasticAssistant; + const logger = assistantContext.logger; + const telemetry = assistantContext.telemetry; - try { - // Get a scoped esClient for finding the status of the Knowledge Base index, pipeline, and documents - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - const elserId = await getElser(request, (await context.core).savedObjects.getClient()); - const kbResource = getKbResource(request); - const esStore = new ElasticsearchStore( - esClient, - KNOWLEDGE_BASE_INDEX_PATTERN, - logger, - telemetry, - elserId, - kbResource - ); + try { + // Get a scoped esClient for finding the status of the Knowledge Base index, pipeline, and documents + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + const kbResource = getKbResource(request); + const esStore = new ElasticsearchStore( + esClient, + KNOWLEDGE_BASE_INDEX_PATTERN, + logger, + telemetry, + elserId, + kbResource + ); - const indexExists = await esStore.indexExists(); - const pipelineExists = await esStore.pipelineExists(); - const modelExists = await esStore.isModelInstalled(elserId); + const indexExists = await esStore.indexExists(); + const pipelineExists = await esStore.pipelineExists(); + const modelExists = await esStore.isModelInstalled(elserId); - const body: GetKnowledgeBaseStatusResponse = { - elser_exists: modelExists, - index_exists: indexExists, - pipeline_exists: pipelineExists, - }; + const body: ReadKnowledgeBaseResponse = { + elser_exists: modelExists, + index_exists: indexExists, + pipeline_exists: pipelineExists, + }; - if (kbResource === ESQL_RESOURCE) { - const esqlExists = - indexExists && (await esStore.similaritySearch(ESQL_DOCS_LOADED_QUERY)).length > 0; - return response.ok({ body: { ...body, esql_exists: esqlExists } }); - } + if (kbResource === ESQL_RESOURCE) { + const esqlExists = + indexExists && (await esStore.similaritySearch(ESQL_DOCS_LOADED_QUERY)).length > 0; + return response.ok({ body: { ...body, esql_exists: esqlExists } }); + } - return response.ok({ body }); - } catch (err) { - logger.error(err); - const error = transformError(err); + return response.ok({ body }); + } catch (err) { + logger.error(err); + const error = transformError(err); - return resp.error({ - body: error.message, - statusCode: error.statusCode, - }); + return resp.error({ + body: error.message, + statusCode: error.statusCode, + }); + } } - } - ); + ); }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts index 56812ee8d0305..17c2011fbc0f5 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/post_knowledge_base.ts @@ -5,17 +5,21 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + CreateKnowledgeBaseRequestParams, + CreateKnowledgeBaseResponse, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { IKibanaResponse, KibanaRequest } from '@kbn/core/server'; import { buildResponse } from '../../lib/build_response'; -import { buildRouteValidation } from '../../schemas/common'; -import { ElasticAssistantRequestHandlerContext, GetElser } from '../../types'; +import { ElasticAssistantPluginRouter, GetElser } from '../../types'; import { KNOWLEDGE_BASE } from '../../../common/constants'; import { ElasticsearchStore } from '../../lib/langchain/elasticsearch_store/elasticsearch_store'; import { ESQL_DOCS_LOADED_QUERY, ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './constants'; import { getKbResource } from './get_kb_resource'; -import { PostKnowledgeBasePathParams } from '../../schemas/knowledge_base/post_knowledge_base'; import { loadESQL } from '../../lib/langchain/content_loaders/esql_loader'; /** @@ -23,81 +27,92 @@ import { loadESQL } from '../../lib/langchain/content_loaders/esql_loader'; * @param router */ export const postKnowledgeBaseRoute = ( - router: IRouter, + router: ElasticAssistantPluginRouter, getElser: GetElser ) => { - router.post( - { + router.versioned + .post({ + access: 'internal', path: KNOWLEDGE_BASE, - validate: { - params: buildRouteValidation(PostKnowledgeBasePathParams), - }, options: { // Note: Relying on current user privileges to scope an esClient. // Add `access:kbnElasticAssistant` to limit API access to only users with assistant privileges tags: [], }, - }, - async (context, request, response) => { - const resp = buildResponse(response); - const assistantContext = await context.elasticAssistant; - const logger = assistantContext.logger; - const telemetry = assistantContext.telemetry; + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + validate: { + request: { + params: buildRouteValidationWithZod(CreateKnowledgeBaseRequestParams), + }, + }, + }, + async ( + context, + request: KibanaRequest, + response + ): Promise> => { + const resp = buildResponse(response); + const assistantContext = await context.elasticAssistant; + const logger = assistantContext.logger; + const telemetry = assistantContext.telemetry; - try { - const core = await context.core; - // Get a scoped esClient for creating the Knowledge Base index, pipeline, and documents - const esClient = core.elasticsearch.client.asCurrentUser; - const elserId = await getElser(request, core.savedObjects.getClient()); - const kbResource = getKbResource(request); - const esStore = new ElasticsearchStore( - esClient, - KNOWLEDGE_BASE_INDEX_PATTERN, - logger, - telemetry, - elserId, - kbResource - ); + try { + const core = await context.core; + // Get a scoped esClient for creating the Knowledge Base index, pipeline, and documents + const esClient = core.elasticsearch.client.asCurrentUser; + const elserId = await getElser(request, core.savedObjects.getClient()); + const kbResource = getKbResource(request); + const esStore = new ElasticsearchStore( + esClient, + KNOWLEDGE_BASE_INDEX_PATTERN, + logger, + telemetry, + elserId, + kbResource + ); - // Pre-check on index/pipeline - let indexExists = await esStore.indexExists(); - let pipelineExists = await esStore.pipelineExists(); + // Pre-check on index/pipeline + let indexExists = await esStore.indexExists(); + let pipelineExists = await esStore.pipelineExists(); - // Load if not exists - if (!pipelineExists) { - pipelineExists = await esStore.createPipeline(); - } - if (!indexExists) { - indexExists = await esStore.createIndex(); - } + // Load if not exists + if (!pipelineExists) { + pipelineExists = await esStore.createPipeline(); + } + if (!indexExists) { + indexExists = await esStore.createIndex(); + } - // If specific resource is requested, load it - if (kbResource === ESQL_RESOURCE) { - const esqlExists = (await esStore.similaritySearch(ESQL_DOCS_LOADED_QUERY)).length > 0; - if (!esqlExists) { - const loadedKnowledgeBase = await loadESQL(esStore, logger); - return response.custom({ body: { success: loadedKnowledgeBase }, statusCode: 201 }); - } else { - return response.ok({ body: { success: true } }); + // If specific resource is requested, load it + if (kbResource === ESQL_RESOURCE) { + const esqlExists = (await esStore.similaritySearch(ESQL_DOCS_LOADED_QUERY)).length > 0; + if (!esqlExists) { + const loadedKnowledgeBase = await loadESQL(esStore, logger); + return response.custom({ body: { success: loadedKnowledgeBase }, statusCode: 201 }); + } else { + return response.ok({ body: { success: true } }); + } } - } - const wasSuccessful = indexExists && pipelineExists; + const wasSuccessful = indexExists && pipelineExists; - if (wasSuccessful) { - return response.ok({ body: { success: true } }); - } else { - return response.custom({ body: { success: false }, statusCode: 500 }); - } - } catch (err) { - logger.log(err); - const error = transformError(err); + if (wasSuccessful) { + return response.ok({ body: { success: true } }); + } else { + return response.custom({ body: { success: false }, statusCode: 500 }); + } + } catch (err) { + logger.log(err); + const error = transformError(err); - return resp.error({ - body: error.message, - statusCode: error.statusCode, - }); + return resp.error({ + body: error.message, + statusCode: error.statusCode, + }); + } } - } - ); + ); }; 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 05a303db3c67e..098c25c9c881b 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 @@ -19,6 +19,7 @@ import { INVOKE_ASSISTANT_ERROR_EVENT, INVOKE_ASSISTANT_SUCCESS_EVENT, } from '../lib/telemetry/event_based_telemetry'; +import { getConversationResponseMock } from '../ai_assistant_data_clients/conversations/update_conversation.test'; jest.mock('../lib/build_response', () => ({ buildResponse: jest.fn().mockImplementation((x) => x), @@ -62,7 +63,7 @@ jest.mock('../lib/langchain/execute_custom_llm_chain', () => ({ } ), })); - +const existingConversation = getConversationResponseMock(); const reportEvent = jest.fn(); const mockContext = { elasticAssistant: { @@ -70,6 +71,24 @@ const mockContext = { getRegisteredTools: jest.fn(() => []), logger: loggingSystemMock.createLogger(), telemetry: { ...coreMock.createSetup().analytics, reportEvent }, + getCurrentUser: () => ({ + username: 'user', + email: 'email', + fullName: 'full name', + roles: ['user-role'], + enabled: true, + authentication_realm: { name: 'native1', type: 'native' }, + lookup_realm: { name: 'native1', type: 'native' }, + authentication_provider: { type: 'basic', name: 'basic1' }, + authentication_type: 'realm', + elastic_cloud_user: false, + metadata: { _reserved: false }, + }), + getAIAssistantConversationsDataClient: jest.fn().mockResolvedValue({ + getConversation: jest.fn().mockResolvedValue(existingConversation), + updateConversation: jest.fn().mockResolvedValue(existingConversation), + appendConversationMessages: jest.fn().mockResolvedValue(existingConversation), + }), }, core: { elasticsearch: { @@ -121,27 +140,33 @@ describe('postActionsConnectorExecuteRoute', () => { it('returns the expected response when isEnabledKnowledgeBase=false', async () => { const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - const result = await handler( - mockContext, - { - ...mockRequest, - body: { - ...mockRequest.body, - isEnabledKnowledgeBase: false, - }, - }, - mockResponse - ); - - expect(result).toEqual({ - body: { - connector_id: 'mock-connector-id', - data: mockActionResponse, - status: 'ok', - }, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + const result = await handler( + mockContext, + { + ...mockRequest, + body: { + ...mockRequest.body, + isEnabledKnowledgeBase: false, + }, + }, + mockResponse + ); + + expect(result).toEqual({ + body: { + connector_id: 'mock-connector-id', + data: mockActionResponse, + status: 'ok', + }, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -152,18 +177,23 @@ describe('postActionsConnectorExecuteRoute', () => { it('returns the expected response when isEnabledKnowledgeBase=true', async () => { const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - const result = await handler(mockContext, mockRequest, mockResponse); - - expect(result).toEqual({ - body: { - connector_id: 'mock-connector-id', - data: mockActionResponse, - replacements: {}, - status: 'ok', - }, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + const result = await handler(mockContext, mockRequest, mockResponse); + + expect(result).toEqual({ + body: { + connector_id: 'mock-connector-id', + data: mockActionResponse, + status: 'ok', + }, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -179,14 +209,20 @@ describe('postActionsConnectorExecuteRoute', () => { }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - const result = await handler(mockContext, requestWithBadConnectorId, mockResponse); - - expect(result).toEqual({ - body: 'simulated error', - statusCode: 500, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + const result = await handler(mockContext, requestWithBadConnectorId, mockResponse); + + expect(result).toEqual({ + body: 'simulated error', + statusCode: 500, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -197,14 +233,20 @@ describe('postActionsConnectorExecuteRoute', () => { it('reports success events to telemetry - kb on, RAG alerts off', async () => { const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, mockRequest, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { - isEnabledKnowledgeBase: true, - isEnabledRAGAlerts: false, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, mockRequest, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { + isEnabledKnowledgeBase: true, + isEnabledRAGAlerts: false, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -220,20 +262,26 @@ describe('postActionsConnectorExecuteRoute', () => { ...mockRequest.body, allow: ['@timestamp'], allowReplacement: ['host.name'], - replacements: {}, + replacements: [], isEnabledRAGAlerts: true, }, }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, ragRequest, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { - isEnabledKnowledgeBase: true, - isEnabledRAGAlerts: true, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, ragRequest, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { + isEnabledKnowledgeBase: true, + isEnabledRAGAlerts: true, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -250,20 +298,26 @@ describe('postActionsConnectorExecuteRoute', () => { isEnabledKnowledgeBase: false, allow: ['@timestamp'], allowReplacement: ['host.name'], - replacements: {}, + replacements: [], isEnabledRAGAlerts: true, }, }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, req, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { - isEnabledKnowledgeBase: false, - isEnabledRAGAlerts: true, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, req, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: true, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -282,14 +336,20 @@ describe('postActionsConnectorExecuteRoute', () => { }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, req, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { - isEnabledKnowledgeBase: false, - isEnabledRAGAlerts: false, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, req, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: false, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -305,15 +365,21 @@ describe('postActionsConnectorExecuteRoute', () => { }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, requestWithBadConnectorId, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { - errorMessage: 'simulated error', - isEnabledKnowledgeBase: true, - isEnabledRAGAlerts: false, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, requestWithBadConnectorId, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { + errorMessage: 'simulated error', + isEnabledKnowledgeBase: true, + isEnabledRAGAlerts: false, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -333,15 +399,21 @@ describe('postActionsConnectorExecuteRoute', () => { }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, badRequest, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { - errorMessage: 'simulated error', - isEnabledKnowledgeBase: true, - isEnabledRAGAlerts: true, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, badRequest, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { + errorMessage: 'simulated error', + isEnabledKnowledgeBase: true, + isEnabledRAGAlerts: true, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -359,21 +431,27 @@ describe('postActionsConnectorExecuteRoute', () => { isEnabledKnowledgeBase: false, allow: ['@timestamp'], allowReplacement: ['host.name'], - replacements: {}, + replacements: [], isEnabledRAGAlerts: true, }, }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, badRequest, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { - errorMessage: 'simulated error', - isEnabledKnowledgeBase: false, - isEnabledRAGAlerts: true, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, badRequest, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { + errorMessage: 'simulated error', + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: true, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( @@ -393,15 +471,21 @@ describe('postActionsConnectorExecuteRoute', () => { }; const mockRouter = { - post: jest.fn().mockImplementation(async (_, handler) => { - await handler(mockContext, badRequest, mockResponse); - - expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { - errorMessage: 'simulated error', - isEnabledKnowledgeBase: false, - isEnabledRAGAlerts: false, - }); - }), + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, badRequest, mockResponse); + + expect(reportEvent).toHaveBeenCalledWith(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { + errorMessage: 'simulated error', + isEnabledKnowledgeBase: false, + isEnabledRAGAlerts: false, + }); + }), + }; + }), + }, }; await postActionsConnectorExecuteRoute( 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 533b4ddca4a48..ee75fd92b6063 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 @@ -8,139 +8,301 @@ import { IRouter, Logger } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; +import { schema } from '@kbn/config-schema'; +import { + ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + ExecuteConnectorRequestBody, + Message, + Replacement, + replaceAnonymizedValuesWithOriginalValues, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { INVOKE_ASSISTANT_ERROR_EVENT, INVOKE_ASSISTANT_SUCCESS_EVENT, } from '../lib/telemetry/event_based_telemetry'; import { executeAction } from '../lib/executor'; import { POST_ACTIONS_CONNECTOR_EXECUTE } from '../../common/constants'; -import { - getLangChainMessages, - requestHasRequiredAnonymizationParams, -} from '../lib/langchain/helpers'; +import { getLangChainMessages } from '../lib/langchain/helpers'; import { buildResponse } from '../lib/build_response'; -import { buildRouteValidation } from '../schemas/common'; -import { - PostActionsConnectorExecuteBody, - PostActionsConnectorExecutePathParams, -} from '../schemas/post_actions_connector_execute'; import { ElasticAssistantRequestHandlerContext, GetElser } from '../types'; import { ESQL_RESOURCE } from './knowledge_base/constants'; import { callAgentExecutor } from '../lib/langchain/execute_custom_llm_chain'; -import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from './helpers'; +import { + DEFAULT_PLUGIN_NAME, + getMessageFromRawResponse, + getPluginNameFromRequest, +} from './helpers'; export const postActionsConnectorExecuteRoute = ( router: IRouter, getElser: GetElser ) => { - router.post( - { + router.versioned + .post({ + access: 'internal', path: POST_ACTIONS_CONNECTOR_EXECUTE, - validate: { - body: buildRouteValidation(PostActionsConnectorExecuteBody), - params: buildRouteValidation(PostActionsConnectorExecutePathParams), + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(ExecuteConnectorRequestBody), + params: schema.object({ + connectorId: schema.string(), + }), + }, + }, }, - }, - async (context, request, response) => { - const resp = buildResponse(response); - const assistantContext = await context.elasticAssistant; - const logger: Logger = assistantContext.logger; - const telemetry = assistantContext.telemetry; - - try { - const connectorId = decodeURIComponent(request.params.connectorId); - - // get the actions plugin start contract from the request context: - const actions = (await context.elasticAssistant).actions; - - // if not langchain, call execute action directly and return the response: - if ( - !request.body.isEnabledKnowledgeBase && - !requestHasRequiredAnonymizationParams(request) - ) { - logger.debug('Executing via actions framework directly'); - const result = await executeAction({ actions, request, connectorId }); + async (context, request, response) => { + const resp = buildResponse(response); + const assistantContext = await context.elasticAssistant; + const logger: Logger = assistantContext.logger; + const telemetry = assistantContext.telemetry; + + try { + const authenticatedUser = assistantContext.getCurrentUser(); + if (authenticatedUser == null) { + return response.unauthorized({ + body: `Authenticated user not found`, + }); + } + const dataClient = await assistantContext.getAIAssistantConversationsDataClient(); + + let latestReplacements: Replacement[] = request.body.replacements; + const onNewReplacements = (newReplacements: Replacement[]) => { + const latestReplacementsDict = latestReplacements.reduce( + (acc: Record, r) => { + acc[r.value] = r.uuid; + return acc; + }, + {} + ); + const newReplacementsDict = newReplacements.reduce((acc: Record, r) => { + acc[r.value] = r.uuid; + return acc; + }, {}); + + const updatedReplacements = { ...latestReplacementsDict, ...newReplacementsDict }; + latestReplacements = Object.keys(updatedReplacements).map((key) => ({ + value: key, + uuid: updatedReplacements[key], + })); + }; + + let onLlmResponse; + let prevMessages; + let newMessage: Pick | undefined; + const conversationId = request.body.conversationId; + + // if message is undefined, it means the user is regenerating a message from the stored conversation + if (request.body.message) { + newMessage = { + content: request.body.message, + role: 'user', + }; + } + + if (conversationId) { + const conversation = await dataClient?.getConversation({ + id: conversationId, + authenticatedUser, + }); + if (conversation == null) { + return response.notFound({ + body: `conversation id: "${conversationId}" not found`, + }); + } + + // messages are anonymized by dataClient + prevMessages = conversation?.messages?.map((c) => ({ + role: c.role, + content: c.content, + })); + + if (request.body.message) { + const res = await dataClient?.appendConversationMessages({ + existingConversation: conversation, + messages: [ + { + ...{ + content: replaceAnonymizedValuesWithOriginalValues({ + messageContent: request.body.message, + replacements: request.body.replacements, + }), + role: 'user', + }, + timestamp: new Date().toISOString(), + }, + ], + }); + + if (res == null) { + return response.badRequest({ + body: `conversation id: "${conversationId}" not updated`, + }); + } + } + const updatedConversation = await dataClient?.getConversation({ + id: conversationId, + authenticatedUser, + }); + + if (updatedConversation == null) { + return response.notFound({ + body: `conversation id: "${conversationId}" not found`, + }); + } + + onLlmResponse = async ( + content: string, + traceData: Message['traceData'] = {} + ): Promise => { + if (updatedConversation) { + await dataClient?.appendConversationMessages({ + existingConversation: updatedConversation, + messages: [ + getMessageFromRawResponse({ + rawContent: replaceAnonymizedValuesWithOriginalValues({ + messageContent: content, + replacements: latestReplacements, + }), + traceData, + }), + ], + }); + } + if (latestReplacements.length > 0) { + await dataClient?.updateConversation({ + conversationUpdateProps: { + id: conversationId, + replacements: latestReplacements, + }, + }); + } + }; + } + + const connectorId = decodeURIComponent(request.params.connectorId); + + // get the actions plugin start contract from the request context: + const actions = (await context.elasticAssistant).actions; + + // if not langchain, call execute action directly and return the response: + if (!request.body.isEnabledKnowledgeBase && !request.body.isEnabledRAGAlerts) { + logger.debug('Executing via actions framework directly'); + + const result = await executeAction({ + onLlmResponse, + actions, + request, + connectorId, + params: { + subAction: request.body.subAction, + subActionParams: { + model: request.body.model, + messages: [...(prevMessages ?? []), ...(newMessage ? [newMessage] : [])], + ...(request.body.llmType === 'openai' + ? { n: 1, stop: null, temperature: 0.2 } + : {}), + }, + }, + }); + + telemetry.reportEvent(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { + isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, + isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, + }); + return response.ok({ + body: result, + }); + } + + // TODO: Add `traceId` to actions request when calling via langchain + logger.debug( + `Executing via langchain, isEnabledKnowledgeBase: ${request.body.isEnabledKnowledgeBase}, isEnabledRAGAlerts: ${request.body.isEnabledRAGAlerts}` + ); + + // Fetch any tools registered by the request's originating plugin + const pluginName = getPluginNameFromRequest({ + request, + defaultPluginName: DEFAULT_PLUGIN_NAME, + logger, + }); + const assistantTools = (await context.elasticAssistant).getRegisteredTools(pluginName); + + // get a scoped esClient for assistant memory + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + + // convert the assistant messages to LangChain messages: + const langChainMessages = getLangChainMessages( + ([...(prevMessages ?? []), ...(newMessage ? [newMessage] : [])] ?? + []) as unknown as Array> + ); + + const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + + const langChainResponseBody = await callAgentExecutor({ + alertsIndexPattern: request.body.alertsIndexPattern, + allow: request.body.allow, + allowReplacement: request.body.allowReplacement, + actions, + isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase ?? false, + assistantTools, + connectorId, + elserId, + esClient, + kbResource: ESQL_RESOURCE, + langChainMessages, + logger, + onNewReplacements, + request, + replacements: request.body.replacements, + size: request.body.size, + telemetry, + }); + telemetry.reportEvent(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, }); + + if (conversationId) { + // if conversationId is defined, onLlmResponse will be too. the ? is to satisfy TS + await onLlmResponse?.( + langChainResponseBody.data, + langChainResponseBody.trace_data + ? { + traceId: langChainResponseBody.trace_data.trace_id, + transactionId: langChainResponseBody.trace_data.transaction_id, + } + : {} + ); + } return response.ok({ - body: result, + body: { + ...langChainResponseBody, + replacements: latestReplacements, + }, + }); + } catch (err) { + logger.error(err); + const error = transformError(err); + telemetry.reportEvent(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { + isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, + isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, + errorMessage: error.message, }); - } - // TODO: Add `traceId` to actions request when calling via langchain - logger.debug( - `Executing via langchain, isEnabledKnowledgeBase: ${request.body.isEnabledKnowledgeBase}, isEnabledRAGAlerts: ${request.body.isEnabledRAGAlerts}` - ); - - // Fetch any tools registered by the request's originating plugin - const pluginName = getPluginNameFromRequest({ - request, - defaultPluginName: DEFAULT_PLUGIN_NAME, - logger, - }); - const assistantTools = (await context.elasticAssistant).getRegisteredTools(pluginName); - - // get a scoped esClient for assistant memory - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - - // convert the assistant messages to LangChain messages: - const langChainMessages = getLangChainMessages( - request.body.params.subActionParams.messages - ); - - const elserId = await getElser(request, (await context.core).savedObjects.getClient()); - - let latestReplacements = { ...request.body.replacements }; - const onNewReplacements = (newReplacements: Record) => { - latestReplacements = { ...latestReplacements, ...newReplacements }; - }; - - const langChainResponseBody = await callAgentExecutor({ - alertsIndexPattern: request.body.alertsIndexPattern, - allow: request.body.allow, - allowReplacement: request.body.allowReplacement, - actions, - isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, - assistantTools, - connectorId, - elserId, - esClient, - kbResource: ESQL_RESOURCE, - langChainMessages, - logger, - onNewReplacements, - request, - replacements: request.body.replacements, - size: request.body.size, - telemetry, - }); - - telemetry.reportEvent(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { - isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, - isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, - }); - return response.ok({ - body: { - ...langChainResponseBody, - replacements: latestReplacements, - }, - }); - } catch (err) { - logger.error(err); - const error = transformError(err); - telemetry.reportEvent(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { - isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, - isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, - errorMessage: error.message, - }); - - return resp.error({ - body: error.message, - statusCode: error.statusCode, - }); + return resp.error({ + body: error.message, + statusCode: error.statusCode, + }); + } } - } - ); + ); }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts new file mode 100644 index 0000000000000..659219d4ae648 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts @@ -0,0 +1,232 @@ +/* + * 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 { loggingSystemMock } from '@kbn/core/server/mocks'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getPromptsBulkActionRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION } from '@kbn/elastic-assistant-common'; +import { getEmptyFindResult, getFindPromptsResultWithSingleHit } from '../../__mocks__/response'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import { bulkPromptsRoute } from './bulk_actions_route'; +import { + getCreatePromptSchemaMock, + getPerformBulkActionSchemaMock, + getPromptMock, + getUpdatePromptSchemaMock, +} from '../../__mocks__/prompts_schema.mock'; + +describe('Perform bulk action route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType; + const mockPrompt = getPromptMock(getUpdatePromptSchemaMock()); + const mockUser1 = { + profile_uid: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(async () => { + server = serverMock.create(); + logger = loggingSystemMock.createLogger(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindPromptsResultWithSingleHit()) + ); + ( + (await clients.elasticAssistant.getAIAssistantPromptsDataClient.getWriter()).bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockPrompt, mockPrompt], + docs_updated: [mockPrompt, mockPrompt], + docs_deleted: [], + errors: [], + }); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + bulkPromptsRoute(server.router, logger); + }); + + describe('status codes', () => { + it('returns 200 when performing bulk action with all dependencies present', async () => { + clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getPromptsBulkActionRequest( + [getCreatePromptSchemaMock()], + [getUpdatePromptSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + success: true, + prompts_count: 2, + attributes: { + results: someBulkActionResults(), + summary: { + failed: 0, + skipped: 0, + succeeded: 2, + total: 2, + }, + }, + }); + }); + }); + + describe('prompts bulk actions failures', () => { + it('returns partial failure error if update of few prompts fail', async () => { + ( + (await clients.elasticAssistant.getAIAssistantPromptsDataClient.getWriter()) + .bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockPrompt, mockPrompt], + docs_updated: [], + docs_deleted: [], + errors: [ + { + message: 'mocked validation message', + document: { id: 'failed-prompt-id-1', name: 'Detect Root/Admin Users' }, + }, + { + message: 'mocked validation message', + document: { id: 'failed-prompt-id-2', name: 'Detect Root/Admin Users' }, + }, + { + message: 'test failure', + document: { id: 'failed-prompt-id-3', name: 'Detect Root/Admin Users' }, + }, + ], + total: 5, + }); + clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getPromptsBulkActionRequest( + [getCreatePromptSchemaMock()], + [getUpdatePromptSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + attributes: { + summary: { + failed: 3, + succeeded: 2, + skipped: 0, + total: 5, + }, + errors: [ + { + message: 'mocked validation message', + prompts: [ + { + id: 'failed-prompt-id-1', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'mocked validation message', + prompts: [ + { + id: 'failed-prompt-id-2', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'test failure', + prompts: [ + { + id: 'failed-prompt-id-3', + name: '', + }, + ], + status_code: 500, + }, + ], + results: someBulkActionResults(), + }, + message: 'Bulk edit partially failed', + }); + }); + }); + + describe('request validation', () => { + it('rejects payloads with no ids in delete operation', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + body: { ...getPerformBulkActionSchemaMock(), delete: { ids: [] } }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + 'delete.ids: Array must contain at least 1 element(s)' + ); + }); + + it('accepts payloads with only delete action', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('accepts payloads with all operations', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('rejects payload if there is more than 100 deletes in payload', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + body: { + ...getPerformBulkActionSchemaMock(), + delete: { ids: Array.from({ length: 101 }).map(() => 'fake-id') }, + }, + }); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(400); + expect(response.body.message).toEqual('More than 100 ids sent for bulk edit action.'); + }); + }); +}); + +function someBulkActionResults() { + return { + created: expect.any(Array), + deleted: expect.any(Array), + updated: expect.any(Array), + skipped: expect.any(Array), + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts new file mode 100644 index 0000000000000..8f502fa599839 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts @@ -0,0 +1,234 @@ +/* + * 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 moment from 'moment'; +import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; + +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, +} from '@kbn/elastic-assistant-common'; + +import { + PromptResponse, + BulkActionSkipResult, + BulkCrudActionResponse, + BulkCrudActionResults, + BulkCrudActionSummary, + PerformBulkActionRequestBody, + PerformBulkActionResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { PROMPTS_TABLE_MAX_PAGE_SIZE } from '../../../common/constants'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { + getUpdateScript, + transformToCreateScheme, + transformToUpdateScheme, + transformESToPrompts, +} from '../../ai_assistant_data_clients/prompts/helpers'; +import { + SearchEsPromptsSchema, + UpdatePromptSchema, +} from '../../ai_assistant_data_clients/prompts/types'; + +export interface BulkOperationError { + message: string; + status?: number; + document: { + id: string; + }; +} + +export type BulkActionError = BulkOperationError | unknown; + +const buildBulkResponse = ( + response: KibanaResponseFactory, + { + errors = [], + updated = [], + created = [], + deleted = [], + skipped = [], + }: { + errors?: BulkOperationError[]; + updated?: PromptResponse[]; + created?: PromptResponse[]; + deleted?: string[]; + skipped?: BulkActionSkipResult[]; + } +): IKibanaResponse => { + const numSucceeded = updated.length + created.length + deleted.length; + const numSkipped = skipped.length; + const numFailed = errors.length; + + const summary: BulkCrudActionSummary = { + failed: numFailed, + succeeded: numSucceeded, + skipped: numSkipped, + total: numSucceeded + numFailed + numSkipped, + }; + + const results: BulkCrudActionResults = { + updated, + created, + deleted, + skipped, + }; + + if (numFailed > 0) { + return response.custom({ + headers: { 'content-type': 'application/json' }, + body: { + message: summary.succeeded > 0 ? 'Bulk edit partially failed' : 'Bulk edit failed', + attributes: { + errors: errors.map((e: BulkOperationError) => ({ + status_code: e.status ?? 500, + prompts: [{ id: e.document.id, name: '' }], + message: e.message, + })), + results, + summary, + }, + }, + statusCode: 500, + }); + } + + const responseBody: BulkCrudActionResponse = { + success: true, + prompts_count: summary.total, + attributes: { results, summary }, + }; + + return response.ok({ body: responseBody }); +}; + +export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: Logger) => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + options: { + tags: ['access:elasticAssistant'], + timeout: { + idleSocket: moment.duration(15, 'minutes').asMilliseconds(), + }, + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(PerformBulkActionRequestBody), + }, + }, + }, + async (context, request, response): Promise> => { + const { body } = request; + const assistantResponse = buildResponse(response); + + const operationsCount = + (body?.update ? body.update?.length : 0) + + (body?.create ? body.create?.length : 0) + + (body?.delete ? body.delete?.ids?.length ?? 0 : 0); + if (operationsCount > PROMPTS_TABLE_MAX_PAGE_SIZE) { + return assistantResponse.error({ + body: `More than ${PROMPTS_TABLE_MAX_PAGE_SIZE} ids sent for bulk edit action.`, + statusCode: 400, + }); + } + + const abortController = new AbortController(); + + // subscribing to completed$, because it handles both cases when request was completed and aborted. + // when route is finished by timeout, aborted$ is not getting fired + request.events.completed$.subscribe(() => abortController.abort()); + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + const dataClient = await ctx.elasticAssistant.getAIAssistantPromptsDataClient(); + + if (body.create && body.create.length > 0) { + const result = await dataClient?.findDocuments({ + perPage: 100, + page: 1, + filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND (${body.create + .map((c) => `name:${c.name}`) + .join(' OR ')})`, + fields: ['name'], + }); + if (result?.data != null && result.total > 0) { + return assistantResponse.error({ + statusCode: 409, + body: `prompt with id: "${result.data.hits.hits + .map((c) => c._id) + .join(',')}" already exists`, + }); + } + } + + const writer = await dataClient?.getWriter(); + const changedAt = new Date().toISOString(); + const { + errors, + docs_created: docsCreated, + docs_updated: docsUpdated, + docs_deleted: docsDeleted, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + } = await writer!.bulk({ + documentsToCreate: body.create?.map((f) => + transformToCreateScheme(authenticatedUser, changedAt, f) + ), + documentsToDelete: body.delete?.ids, + documentsToUpdate: body.update?.map((f) => + transformToUpdateScheme(authenticatedUser, changedAt, f) + ), + getUpdateScript: (document: UpdatePromptSchema) => + getUpdateScript({ prompt: document, isPatch: true }), + authenticatedUser, + }); + + const created = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsCreated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + const updated = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsUpdated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + + return buildBulkResponse(response, { + updated: updated?.data ? transformESToPrompts(updated.data) : [], + created: created?.data ? transformESToPrompts(created.data) : [], + deleted: docsDeleted ?? [], + errors, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.test.ts new file mode 100644 index 0000000000000..68ce67d842a0f --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.test.ts @@ -0,0 +1,113 @@ +/* + * 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 { getCurrentUserPromptsRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND } from '@kbn/elastic-assistant-common'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getFindPromptsResultWithSingleHit } from '../../__mocks__/response'; +import { findPromptsRoute } from './find_route'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; + +describe('Find user prompts route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType; + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindPromptsResultWithSingleHit()) + ); + clients.elasticAssistant.getCurrentUser.mockResolvedValue({ + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + }); + logger = loggingSystemMock.createLogger(); + + findPromptsRoute(server.router, logger); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getCurrentUserPromptsRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockRejectedValueOnce( + new Error('Test error') + ); + const response = await server.inject( + getCurrentUserPromptsRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('allows optional query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'name', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + test('disallows invalid sort fields', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'name1', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.badRequest).toHaveBeenCalledWith( + `sort_field: Invalid enum value. Expected 'created_at' | 'is_default' | 'name' | 'updated_at', received 'name1'` + ); + }); + + test('ignores unknown query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + query: { + invalid_value: 'test 1', + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts new file mode 100644 index 0000000000000..6b8634e184f70 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts @@ -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 type { IKibanaResponse, Logger } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; + +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, +} from '@kbn/elastic-assistant-common'; +import { + FindPromptsRequestQuery, + FindPromptsResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { SearchEsPromptsSchema } from '../../ai_assistant_data_clients/prompts/types'; +import { transformESToPrompts } from '../../ai_assistant_data_clients/prompts/helpers'; + +export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: Logger) => { + router.versioned + .get({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + query: buildRouteValidationWithZod(FindPromptsRequestQuery), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + + try { + const { query } = request; + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = await ctx.elasticAssistant.getAIAssistantPromptsDataClient(); + + const result = await dataClient?.findDocuments({ + perPage: query.per_page, + page: query.page, + sortField: query.sort_field, + sortOrder: query.sort_order, + filter: query.filter, + fields: query.fields, + }); + + if (result) { + return response.ok({ + body: { + perPage: result.perPage, + page: result.page, + total: result.total, + data: transformESToPrompts(result.data), + }, + }); + } + return response.ok({ + body: { perPage: query.per_page, page: query.page, data: [], total: 0 }, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts new file mode 100644 index 0000000000000..f61eeaf13bb59 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts @@ -0,0 +1,81 @@ +/* + * 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 { KibanaRequest, Logger, SavedObjectsClientContract } from '@kbn/core/server'; + +import { once } from 'lodash/fp'; +import { + ElasticAssistantPluginRouter, + ElasticAssistantPluginSetupDependencies, + GetElser, +} from '../types'; +import { createConversationRoute } from './user_conversations/create_route'; +import { deleteConversationRoute } from './user_conversations/delete_route'; +import { readConversationRoute } from './user_conversations/read_route'; +import { updateConversationRoute } from './user_conversations/update_route'; +import { findUserConversationsRoute } from './user_conversations/find_route'; +import { bulkActionConversationsRoute } from './user_conversations/bulk_actions_route'; +import { appendConversationMessageRoute } from './user_conversations/append_conversation_messages_route'; +import { deleteKnowledgeBaseRoute } from './knowledge_base/delete_knowledge_base'; +import { getKnowledgeBaseStatusRoute } from './knowledge_base/get_knowledge_base_status'; +import { postKnowledgeBaseRoute } from './knowledge_base/post_knowledge_base'; +import { getEvaluateRoute } from './evaluate/get_evaluate'; +import { postEvaluateRoute } from './evaluate/post_evaluate'; +import { postActionsConnectorExecuteRoute } from './post_actions_connector_execute'; +import { getCapabilitiesRoute } from './capabilities/get_capabilities_route'; +import { bulkPromptsRoute } from './prompts/bulk_actions_route'; +import { findPromptsRoute } from './prompts/find_route'; +import { bulkActionAnonymizationFieldsRoute } from './anonymization_fields/bulk_actions_route'; +import { findAnonymizationFieldsRoute } from './anonymization_fields/find_route'; + +export const registerRoutes = ( + router: ElasticAssistantPluginRouter, + logger: Logger, + plugins: ElasticAssistantPluginSetupDependencies +) => { + // Capabilities + getCapabilitiesRoute(router); + + // User Conversations CRUD + createConversationRoute(router); + readConversationRoute(router); + updateConversationRoute(router); + deleteConversationRoute(router); + appendConversationMessageRoute(router); + + // User Conversations bulk CRUD + bulkActionConversationsRoute(router, logger); + + // User Conversations search + findUserConversationsRoute(router); + + // Knowledge Base + deleteKnowledgeBaseRoute(router); + const getElserId: GetElser = once( + async (request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) => { + return (await plugins.ml.trainedModelsProvider(request, savedObjectsClient).getELSER()) + .model_id; + } + ); + getKnowledgeBaseStatusRoute(router, getElserId); + postKnowledgeBaseRoute(router, getElserId); + + // Actions Connector Execute (LLM Wrapper) + postActionsConnectorExecuteRoute(router, getElserId); + + // Evaluate + getEvaluateRoute(router); + postEvaluateRoute(router, getElserId); + + // Prompts + bulkPromptsRoute(router, logger); + findPromptsRoute(router, logger); + + // Anonymization Fields + bulkActionAnonymizationFieldsRoute(router, logger); + findAnonymizationFieldsRoute(router, logger); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts new file mode 100644 index 0000000000000..82e21a8cd8690 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts @@ -0,0 +1,112 @@ +/* + * 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 { memoize } from 'lodash'; + +import type { Logger, KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; + +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { + ElasticAssistantApiRequestHandlerContext, + ElasticAssistantPluginCoreSetupDependencies, + ElasticAssistantPluginSetupDependencies, + ElasticAssistantRequestHandlerContext, +} from '../types'; +import { AIAssistantService } from '../ai_assistant_service'; +import { appContextService } from '../services/app_context'; + +export interface IRequestContextFactory { + create( + context: RequestHandlerContext, + request: KibanaRequest + ): Promise; +} + +interface ConstructorOptions { + logger: Logger; + core: ElasticAssistantPluginCoreSetupDependencies; + plugins: ElasticAssistantPluginSetupDependencies; + kibanaVersion: string; + assistantService: AIAssistantService; +} + +export class RequestContextFactory implements IRequestContextFactory { + private readonly logger: Logger; + private readonly assistantService: AIAssistantService; + + constructor(private readonly options: ConstructorOptions) { + this.logger = options.logger; + this.assistantService = options.assistantService; + } + + public async create( + context: Omit, + request: KibanaRequest + ): Promise { + const { options } = this; + const { core } = options; + + const [, startPlugins] = await core.getStartServices(); + const coreContext = await context.core; + + const getSpaceId = (): string => + startPlugins.spaces?.spacesService?.getSpaceId(request) || DEFAULT_NAMESPACE_STRING; + + const getCurrentUser = () => startPlugins.security?.authc.getCurrentUser(request); + + return { + core: coreContext, + + actions: startPlugins.actions, + + logger: this.logger, + + getServerBasePath: () => core.http.basePath.serverBasePath, + + getSpaceId, + + getCurrentUser, + + getRegisteredTools: (pluginName: string) => { + return appContextService.getRegisteredTools(pluginName); + }, + + getRegisteredFeatures: (pluginName: string) => { + return appContextService.getRegisteredFeatures(pluginName); + }, + + telemetry: core.analytics, + + getAIAssistantPromptsDataClient: memoize(() => { + const currentUser = getCurrentUser(); + return this.assistantService.createAIAssistantPromptsDataClient({ + spaceId: getSpaceId(), + logger: this.logger, + currentUser, + }); + }), + + getAIAssistantAnonymizationFieldsDataClient: memoize(() => { + const currentUser = getCurrentUser(); + return this.assistantService.createAIAssistantAnonymizationFieldsDataClient({ + spaceId: getSpaceId(), + logger: this.logger, + currentUser, + }); + }), + + getAIAssistantConversationsDataClient: memoize(async () => { + const currentUser = getCurrentUser(); + return this.assistantService.createAIAssistantConversationsDataClient({ + spaceId: getSpaceId(), + logger: this.logger, + currentUser, + }); + }), + }; + } +} diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.test.ts new file mode 100644 index 0000000000000..3fbb83534b1dd --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.test.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES } from '@kbn/elastic-assistant-common'; +import { getAppendConversationMessageRequest, requestMock } from '../../__mocks__/request'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { serverMock } from '../../__mocks__/server'; +import { + getAppendConversationMessagesSchemaMock, + getConversationMock, + getQueryConversationParams, + getUpdateConversationSchemaMock, +} from '../../__mocks__/conversations_schema.mock'; +import { appendConversationMessageRoute } from './append_conversation_messages_route'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Append conversation messages route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); + clients.elasticAssistant.getAIAssistantConversationsDataClient.appendConversationMessages.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); // successful append + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + + appendConversationMessageRoute(server.router); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getAppendConversationMessageRequest('04128c15-0d1b-4716-a4c5-46997ac7f3bd'), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('returns 404 when append to a conversation that does not exist', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + null + ); + + const response = await server.inject( + getAppendConversationMessageRequest(), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(404); + expect(response.body).toEqual({ + message: 'conversation id: "04128c15-0d1b-4716-a4c5-46997ac7f3bd" not found', + status_code: 404, + }); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getAppendConversationMessageRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('rejects payloads with no ID', async () => { + const noIdRequest = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + body: { + ...getAppendConversationMessagesSchemaMock(), + id: undefined, + }, + }); + const response = await server.validate(noIdRequest); + expect(response.badRequest).toHaveBeenCalled(); + }); + + test('allows messages only', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + body: { + ...getAppendConversationMessagesSchemaMock(), + apiConfig: { + defaultSystemPromptId: 'test', + }, + }, + params: { id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd' }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + test('disallows invalid message "role" value', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + body: { + ...getUpdateConversationSchemaMock(), + messages: [ + { + role: 'invalid', + content: 'test', + timestamp: '2019-12-13T16:40:33.400Z', + }, + ], + }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + `messages.0.role: Invalid enum value. Expected 'system' | 'user' | 'assistant', received 'invalid'` + ); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts new file mode 100644 index 0000000000000..efc98b2cbd858 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts @@ -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 type { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ConversationResponse, + AppendConversationMessageRequestBody, + AppendConversationMessageRequestParams, + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { buildResponse } from '../utils'; +import { ElasticAssistantPluginRouter } from '../../types'; + +export const appendConversationMessageRoute = (router: ElasticAssistantPluginRouter) => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(AppendConversationMessageRequestBody), + params: buildRouteValidationWithZod(AppendConversationMessageRequestParams), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + const { id } = request.params; + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + const existingConversation = await dataClient?.getConversation({ id, authenticatedUser }); + if (existingConversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" not found`, + statusCode: 404, + }); + } + + const conversation = await dataClient?.appendConversationMessages({ + existingConversation, + messages: request.body.messages, + }); + if (conversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" was not updated with appended message`, + statusCode: 400, + }); + } + return response.ok({ body: conversation }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.test.ts new file mode 100644 index 0000000000000..7572cd84a49db --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.test.ts @@ -0,0 +1,236 @@ +/* + * 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 { loggingSystemMock } from '@kbn/core/server/mocks'; +import { bulkActionConversationsRoute } from './bulk_actions_route'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getConversationsBulkActionRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION } from '@kbn/elastic-assistant-common'; +import { + getFindConversationsResultWithSingleHit, + getEmptyFindResult, +} from '../../__mocks__/response'; +import { + getConversationMock, + getCreateConversationSchemaMock, + getPerformBulkActionSchemaMock, + getUpdateConversationSchemaMock, +} from '../../__mocks__/conversations_schema.mock'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Perform bulk action route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType; + const mockConversation = getConversationMock(getUpdateConversationSchemaMock()); + const mockUser1 = { + profile_uid: 'u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0', + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(async () => { + server = serverMock.create(); + logger = loggingSystemMock.createLogger(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindConversationsResultWithSingleHit()) + ); + ( + (await clients.elasticAssistant.getAIAssistantConversationsDataClient.getWriter()) + .bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockConversation, mockConversation], + docs_updated: [mockConversation, mockConversation], + docs_deleted: [], + errors: [], + }); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + bulkActionConversationsRoute(server.router, logger); + }); + + describe('status codes', () => { + it('returns 200 when performing bulk action with all dependencies present', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getConversationsBulkActionRequest( + [getCreateConversationSchemaMock()], + [getUpdateConversationSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + success: true, + conversations_count: 2, + attributes: { + results: someBulkActionResults(), + summary: { + failed: 0, + skipped: 0, + succeeded: 2, + total: 2, + }, + }, + }); + }); + }); + + describe('conversations bulk actions failures', () => { + it('returns partial failure error if update of few conversations fail', async () => { + ( + (await clients.elasticAssistant.getAIAssistantConversationsDataClient.getWriter()) + .bulk as jest.Mock + ).mockResolvedValue({ + docs_created: [mockConversation, mockConversation], + docs_updated: [], + docs_deleted: [], + errors: [ + { + message: 'mocked validation message', + document: { id: 'failed-conversation-id-1', name: 'Detect Root/Admin Users' }, + }, + { + message: 'mocked validation message', + document: { id: 'failed-conversation-id-2', name: 'Detect Root/Admin Users' }, + }, + { + message: 'test failure', + document: { id: 'failed-conversation-id-3', name: 'Detect Root/Admin Users' }, + }, + ], + total: 5, + }); + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValueOnce( + Promise.resolve(getEmptyFindResult()) + ); + const response = await server.inject( + getConversationsBulkActionRequest( + [getCreateConversationSchemaMock()], + [getUpdateConversationSchemaMock('49403909-ca9b-49ba-9d7a-7e5320e68d04')], + ['99403909-ca9b-49ba-9d7a-7e5320e68d05'] + ), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + attributes: { + summary: { + failed: 3, + succeeded: 2, + skipped: 0, + total: 5, + }, + errors: [ + { + message: 'mocked validation message', + conversations: [ + { + id: 'failed-conversation-id-1', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'mocked validation message', + conversations: [ + { + id: 'failed-conversation-id-2', + name: '', + }, + ], + status_code: 500, + }, + { + message: 'test failure', + conversations: [ + { + id: 'failed-conversation-id-3', + name: '', + }, + ], + status_code: 500, + }, + ], + results: someBulkActionResults(), + }, + message: 'Bulk edit partially failed', + }); + }); + }); + + describe('request validation', () => { + it('rejects payloads with no ids in delete operation', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + body: { ...getPerformBulkActionSchemaMock(), delete: { ids: [] } }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + 'delete.ids: Array must contain at least 1 element(s)' + ); + }); + + it('accepts payloads with only delete action', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('accepts payloads with all operations', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + body: getPerformBulkActionSchemaMock(), + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + it('rejects payload if there is more than 100 deletes in payload', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + body: { + ...getPerformBulkActionSchemaMock(), + delete: { ids: Array.from({ length: 101 }).map(() => 'fake-id') }, + }, + }); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(400); + expect(response.body.message).toEqual('More than 100 ids sent for bulk edit action.'); + }); + }); +}); + +function someBulkActionResults() { + return { + created: expect.any(Array), + deleted: expect.any(Array), + updated: expect.any(Array), + skipped: expect.any(Array), + }; +} diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts new file mode 100644 index 0000000000000..b7cb5e5c2d046 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts @@ -0,0 +1,231 @@ +/* + * 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 moment from 'moment'; +import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; + +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + BulkActionSkipResult, + BulkCrudActionResponse, + BulkCrudActionResults, + BulkCrudActionSummary, + PerformBulkActionRequestBody, + PerformBulkActionResponse, + ConversationResponse, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { CONVERSATIONS_TABLE_MAX_PAGE_SIZE } from '../../../common/constants'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { getUpdateScript } from '../../ai_assistant_data_clients/conversations/helpers'; +import { transformToCreateScheme } from '../../ai_assistant_data_clients/conversations/create_conversation'; +import { transformESToConversations } from '../../ai_assistant_data_clients/conversations/transforms'; +import { + UpdateConversationSchema, + transformToUpdateScheme, +} from '../../ai_assistant_data_clients/conversations/update_conversation'; +import { SearchEsConversationSchema } from '../../ai_assistant_data_clients/conversations/types'; + +export interface BulkOperationError { + message: string; + status?: number; + document: { + id: string; + name?: string; + }; +} + +export type BulkActionError = BulkOperationError | unknown; + +const buildBulkResponse = ( + response: KibanaResponseFactory, + { + errors = [], + updated = [], + created = [], + deleted = [], + skipped = [], + }: { + errors?: BulkOperationError[]; + updated?: ConversationResponse[]; + created?: ConversationResponse[]; + deleted?: string[]; + skipped?: BulkActionSkipResult[]; + } +): IKibanaResponse => { + const numSucceeded = updated.length + created.length + deleted.length; + const numSkipped = skipped.length; + const numFailed = errors.length; + + const summary: BulkCrudActionSummary = { + failed: numFailed, + succeeded: numSucceeded, + skipped: numSkipped, + total: numSucceeded + numFailed + numSkipped, + }; + + const results: BulkCrudActionResults = { + updated, + created, + deleted, + skipped, + }; + + if (numFailed > 0) { + return response.custom({ + headers: { 'content-type': 'application/json' }, + body: { + message: summary.succeeded > 0 ? 'Bulk edit partially failed' : 'Bulk edit failed', + attributes: { + errors: errors.map((e: BulkOperationError) => ({ + status_code: e.status ?? 500, + conversations: [{ id: e.document.id, name: '' }], + message: e.message, + })), + results, + summary, + }, + }, + statusCode: 500, + }); + } + + const responseBody: BulkCrudActionResponse = { + success: true, + conversations_count: summary.total, + attributes: { results, summary }, + }; + + return response.ok({ body: responseBody }); +}; + +export const bulkActionConversationsRoute = ( + router: ElasticAssistantPluginRouter, + logger: Logger +) => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, + options: { + tags: ['access:elasticAssistant'], + timeout: { + idleSocket: moment.duration(15, 'minutes').asMilliseconds(), + }, + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(PerformBulkActionRequestBody), + }, + }, + }, + async (context, request, response): Promise> => { + const { body } = request; + const assistantResponse = buildResponse(response); + + const operationsCount = + (body?.update ? body.update?.length : 0) + + (body?.create ? body.create?.length : 0) + + (body?.delete ? body.delete?.ids?.length ?? 0 : 0); + if (operationsCount > CONVERSATIONS_TABLE_MAX_PAGE_SIZE) { + return assistantResponse.error({ + body: `More than ${CONVERSATIONS_TABLE_MAX_PAGE_SIZE} ids sent for bulk edit action.`, + statusCode: 400, + }); + } + + const abortController = new AbortController(); + + // subscribing to completed$, because it handles both cases when request was completed and aborted. + // when route is finished by timeout, aborted$ is not getting fired + request.events.completed$.subscribe(() => abortController.abort()); + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const spaceId = ctx.elasticAssistant.getSpaceId(); + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + if (body.create && body.create.length > 0) { + const result = await dataClient?.findDocuments({ + perPage: 100, + page: 1, + filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND (${body.create + .map((c) => `title:${c.title}`) + .join(' OR ')})`, + fields: ['title'], + }); + if (result?.data != null && result.total > 0) { + return assistantResponse.error({ + statusCode: 409, + body: `conversations titles: "${transformESToConversations(result.data) + .map((c) => c.title) + .join(',')}" already exists`, + }); + } + } + + const writer = await dataClient?.getWriter(); + const changedAt = new Date().toISOString(); + const { + errors, + docs_created: docsCreated, + docs_updated: docsUpdated, + docs_deleted: docsDeleted, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + } = await writer!.bulk({ + documentsToCreate: body.create?.map((c) => + transformToCreateScheme(changedAt, spaceId, authenticatedUser, c) + ), + documentsToDelete: body.delete?.ids, + documentsToUpdate: body.update?.map((c) => transformToUpdateScheme(changedAt, c)), + authenticatedUser, + getUpdateScript: (document: UpdateConversationSchema) => + getUpdateScript({ conversation: document, isPatch: true }), + }); + + const created = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsCreated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + const updated = await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsUpdated.map((c) => `id:${c}`).join(' OR '), + fields: ['id'], + }); + + return buildBulkResponse(response, { + updated: updated?.data ? transformESToConversations(updated?.data) : [], + created: created?.data ? transformESToConversations(created?.data) : [], + deleted: docsDeleted ?? [], + errors, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.test.ts new file mode 100644 index 0000000000000..42a7cc9cf6ef2 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.test.ts @@ -0,0 +1,163 @@ +/* + * 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 { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { serverMock } from '../../__mocks__/server'; +import { createConversationRoute } from './create_route'; +import { + getBasicEmptySearchResponse, + getEmptyFindResult, + getFindConversationsResultWithSingleHit, +} from '../../__mocks__/response'; +import { getCreateConversationRequest, requestMock } from '../../__mocks__/request'; +import { + getCreateConversationSchemaMock, + getConversationMock, + getQueryConversationParams, +} from '../../__mocks__/conversations_schema.mock'; +import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Create conversation route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getEmptyFindResult()) + ); // no current conversations + clients.elasticAssistant.getAIAssistantConversationsDataClient.createConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); // creation succeeds + + context.core.elasticsearch.client.asCurrentUser.search.mockResolvedValue( + elasticsearchClientMock.createSuccessTransportRequestPromise(getBasicEmptySearchResponse()) + ); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + createConversationRoute(server.router); + }); + + describe('status codes', () => { + test('returns 200 with a conversation created via AIAssistantConversationsDataClient', async () => { + const response = await server.inject( + getCreateConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('returns 401 Unauthorized when request context getCurrentUser is not defined', async () => { + context.elasticAssistant.getCurrentUser.mockReturnValueOnce(null); + const response = await server.inject( + getCreateConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(401); + }); + }); + + describe('unhappy paths', () => { + test('returns a duplicate error if conversation_id already exists', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindConversationsResultWithSingleHit()) + ); + const response = await server.inject( + getCreateConversationRequest(), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(409); + expect(response.body).toEqual({ + message: expect.stringContaining('already exists'), + status_code: 409, + }); + }); + + test('catches error if creation throws', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.createConversation.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getCreateConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('disallows unknown title', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + body: { + ...getCreateConversationSchemaMock(), + title: true, + }, + }); + const result = server.validate(request); + + expect(result.badRequest).toHaveBeenCalled(); + }); + }); + describe('conversation containing messages', () => { + const getMessage = (role: string = 'user') => ({ + role, + content: 'test content', + timestamp: '2019-12-13T16:40:33.400Z', + }); + const defaultMessage = getMessage(); + + test('is successful', async () => { + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + body: { + ...getCreateConversationSchemaMock(), + messages: [defaultMessage], + }, + }); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + expect(response.status).toEqual(200); + }); + + test('fails when provided with an unsupported message role', async () => { + const wrongMessage = getMessage('test_thing'); + + const request = requestMock.create({ + method: 'post', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + body: { + ...getCreateConversationSchemaMock(), + messages: [wrongMessage], + }, + }); + const result = await server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + `messages.0.role: Invalid enum value. Expected 'system' | 'user' | 'assistant', received 'test_thing'` + ); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts new file mode 100644 index 0000000000000..b63fd02cba40b --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts @@ -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 type { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + ConversationCreateProps, + ConversationResponse, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; + +export const createConversationRoute = (router: ElasticAssistantPluginRouter): void => { + router.versioned + .post({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, + + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(ConversationCreateProps), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + const result = await dataClient?.findDocuments({ + perPage: 100, + page: 1, + filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND title:${request.body.title}`, + fields: ['title'], + }); + if (result?.data != null && result.total > 0) { + return assistantResponse.error({ + statusCode: 409, + body: `conversation title: "${request.body.title}" already exists`, + }); + } + const createdConversation = await dataClient?.createConversation({ + conversation: request.body, + authenticatedUser, + }); + + if (createdConversation == null) { + return assistantResponse.error({ + body: `conversation with title: "${request.body.title}" was not created`, + statusCode: 400, + }); + } + return response.ok({ + body: ConversationResponse.parse(createdConversation), + }); + } catch (err) { + const error = transformError(err as Error); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.test.ts new file mode 100644 index 0000000000000..4204a7e51ef9d --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.test.ts @@ -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 { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID } from '@kbn/elastic-assistant-common'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { serverMock } from '../../__mocks__/server'; +import { deleteConversationRoute } from './delete_route'; +import { getDeleteConversationRequest, requestMock } from '../../__mocks__/request'; + +import { + getConversationMock, + getQueryConversationParams, +} from '../../__mocks__/conversations_schema.mock'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Delete conversation route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + deleteConversationRoute(server.router); + }); + + describe('status codes with getAIAssistantConversationsDataClient', () => { + test('returns 200 when deleting a single conversation with a valid getAIAssistantConversationsDataClient by Id', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); + const response = await server.inject( + getDeleteConversationRequest(), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(200); + }); + + test('returns 404 when deleting a single rule that does not exist with a valid actionClient and alertClient', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + null + ); + + const response = await server.inject( + getDeleteConversationRequest(), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(404); + expect(response.body).toEqual({ + message: 'conversation id: "04128c15-0d1b-4716-a4c5-46997ac7f3bd" not found', + status_code: 404, + }); + }); + + test('catches error if deletion throws error', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.deleteConversation.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getDeleteConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('rejects a request with no id', async () => { + const request = requestMock.create({ + method: 'delete', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + query: {}, + }); + const result = server.validate(request); + + expect(result.badRequest).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts new file mode 100644 index 0000000000000..a808a28fc3261 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts @@ -0,0 +1,70 @@ +/* + * 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 { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + DeleteConversationRequestParams, +} from '@kbn/elastic-assistant-common'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; + +export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => { + router.versioned + .delete({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + params: buildRouteValidationWithZod(DeleteConversationRequestParams), + }, + }, + }, + async (context, request, response) => { + const assistantResponse = buildResponse(response); + try { + const { id } = request.params; + + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + const existingConversation = await dataClient?.getConversation({ id, authenticatedUser }); + if (existingConversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" not found`, + statusCode: 404, + }); + } + await dataClient?.deleteConversation(id); + + return response.ok({ body: {} }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.test.ts new file mode 100644 index 0000000000000..63141fe5475a6 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.test.ts @@ -0,0 +1,112 @@ +/* + * 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 { getCurrentUserFindRequest, requestMock } from '../../__mocks__/request'; +import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND } from '@kbn/elastic-assistant-common'; +import { serverMock } from '../../__mocks__/server'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { getFindConversationsResultWithSingleHit } from '../../__mocks__/response'; +import { findUserConversationsRoute } from './find_route'; + +describe('Find user conversations route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockResolvedValue( + Promise.resolve(getFindConversationsResultWithSingleHit()) + ); + clients.elasticAssistant.getCurrentUser.mockResolvedValue({ + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + }); + + findUserConversationsRoute(server.router); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getCurrentUserFindRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.findDocuments.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getCurrentUserFindRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('allows optional query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'title', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + test('disallows invalid sort fields', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + query: { + page: 2, + per_page: 20, + sort_field: 'name', + fields: ['field1', 'field2'], + }, + }); + const result = server.validate(request); + + expect(result.badRequest).toHaveBeenCalledWith( + `sort_field: Invalid enum value. Expected 'created_at' | 'is_default' | 'title' | 'updated_at', received 'name'` + ); + }); + + test('ignores unknown query params', async () => { + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + query: { + invalid_value: 'test 1', + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts new file mode 100644 index 0000000000000..306d1d90a8e5a --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts @@ -0,0 +1,83 @@ +/* + * 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 { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; + +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, +} from '@kbn/elastic-assistant-common'; +import { + FindConversationsRequestQuery, + FindConversationsResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; +import { SearchEsConversationSchema } from '../../ai_assistant_data_clients/conversations/types'; +import { transformESToConversations } from '../../ai_assistant_data_clients/conversations/transforms'; + +export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) => { + router.versioned + .get({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + query: buildRouteValidationWithZod(FindConversationsRequestQuery), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + try { + const { query } = request; + const ctx = await context.resolve(['core', 'elasticAssistant']); + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const currentUser = ctx.elasticAssistant.getCurrentUser(); + + const additionalFilter = query.filter ? ` AND ${query.filter}` : ''; + const result = await dataClient?.findDocuments({ + perPage: query.per_page, + page: query.page, + sortField: query.sort_field, + sortOrder: query.sort_order, + filter: `users:{ id: "${currentUser?.profile_uid}" }${additionalFilter}`, + fields: query.fields, + }); + + if (result) { + return response.ok({ + body: { + perPage: result.perPage, + page: result.page, + total: result.total, + data: transformESToConversations(result.data), + }, + }); + } + return response.ok({ + body: { perPage: query.per_page, page: query.page, data: [], total: 0 }, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.test.ts new file mode 100644 index 0000000000000..36dd3045b9d23 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.test.ts @@ -0,0 +1,105 @@ +/* + * 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 { requestContextMock } from '../../__mocks__/request_context'; +import { serverMock } from '../../__mocks__/server'; +import { readConversationRoute } from './read_route'; +import { getConversationReadRequest, requestMock } from '../../__mocks__/request'; +import { + getConversationMock, + getQueryConversationParams, +} from '../../__mocks__/conversations_schema.mock'; +import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID } from '@kbn/elastic-assistant-common'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Read conversation route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + const myFakeId = '99403909-ca9b-49ba-9d7a-7e5320e68d05'; + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + readConversationRoute(server.router); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getConversationReadRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('returns 200 when reading a single conversation outcome === exactMatch', async () => { + const response = await server.inject( + getConversationReadRequest(myFakeId), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getConversationReadRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + + test('returns 401 Unauthorized when request context getCurrentUser is not defined', async () => { + context.elasticAssistant.getCurrentUser.mockReturnValueOnce(null); + const response = await server.inject( + getConversationReadRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(401); + }); + }); + + describe('data validation', () => { + test('returns 404 if given a non-existent id', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + null + ); + const request = requestMock.create({ + method: 'get', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + params: { id: '99403909-ca9b-49ba-9d7a-7e5320e68d05' }, + }); + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(404); + expect(response.body).toEqual({ + message: 'conversation id: "99403909-ca9b-49ba-9d7a-7e5320e68d05" not found', + status_code: 404, + }); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts new file mode 100644 index 0000000000000..9b11827958360 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts @@ -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 type { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, +} from '@kbn/elastic-assistant-common'; +import { ConversationResponse } from '@kbn/elastic-assistant-common/impl/schemas/conversations/common_attributes.gen'; +import { ReadConversationRequestParams } from '@kbn/elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { buildResponse } from '../utils'; +import { ElasticAssistantPluginRouter } from '../../types'; + +export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { + router.versioned + .get({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + params: buildRouteValidationWithZod(ReadConversationRequestParams), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + + const { id } = request.params; + + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const conversation = await dataClient?.getConversation({ id, authenticatedUser }); + + if (conversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" not found`, + statusCode: 404, + }); + } + return response.ok({ body: conversation }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; 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 new file mode 100644 index 0000000000000..57aceaec745ec --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.test.ts @@ -0,0 +1,155 @@ +/* + * 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 { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID } from '@kbn/elastic-assistant-common'; +import { getUpdateConversationRequest, requestMock } from '../../__mocks__/request'; +import { requestContextMock } from '../../__mocks__/request_context'; +import { serverMock } from '../../__mocks__/server'; +import { + getConversationMock, + getQueryConversationParams, + getUpdateConversationSchemaMock, +} from '../../__mocks__/conversations_schema.mock'; +import { updateConversationRoute } from './update_route'; +import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; + +describe('Update conversation route', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const mockUser1 = { + username: 'my_username', + authentication_realm: { + type: 'my_realm_type', + name: 'my_realm_name', + }, + } as AuthenticatedUser; + + beforeEach(() => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); + clients.elasticAssistant.getAIAssistantConversationsDataClient.updateConversation.mockResolvedValue( + getConversationMock(getQueryConversationParams()) + ); // successful update + + context.elasticAssistant.getCurrentUser.mockReturnValue(mockUser1); + updateConversationRoute(server.router); + }); + + describe('status codes', () => { + test('returns 200', async () => { + const response = await server.inject( + getUpdateConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(200); + }); + + test('returns 404 when updating a single conversation that does not exist', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockResolvedValue( + null + ); + + const response = await server.inject( + getUpdateConversationRequest(), + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(404); + expect(response.body).toEqual({ + message: 'conversation id: "04128c15-0d1b-4716-a4c5-46997ac7f3bd" not found', + status_code: 404, + }); + }); + + test('catches error if search throws error', async () => { + clients.elasticAssistant.getAIAssistantConversationsDataClient.getConversation.mockImplementation( + async () => { + throw new Error('Test error'); + } + ); + const response = await server.inject( + getUpdateConversationRequest(), + requestContextMock.convertContext(context) + ); + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + message: 'Test error', + status_code: 500, + }); + }); + }); + + describe('request validation', () => { + test('rejects payloads with no ID', async () => { + const noIdRequest = requestMock.create({ + method: 'put', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + body: { + ...getUpdateConversationSchemaMock(), + id: undefined, + }, + }); + const response = await server.validate(noIdRequest); + expect(response.badRequest).toHaveBeenCalled(); + }); + + test('rejects isDefault update', async () => { + const request = requestMock.create({ + method: 'put', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + body: { ...getUpdateConversationSchemaMock(), isDefault: false }, + }); + const result = await server.validate(request); + + expect(result.badRequest).toHaveBeenCalled(); + }); + + test('allows title, excludeFromLastConversationStorage, apiConfig, replacements and message', async () => { + const request = requestMock.create({ + method: 'put', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + body: { + title: 'test2', + excludeFromLastConversationStorage: true, + ...getUpdateConversationSchemaMock(), + apiConfig: { + connectorId: '123', + connectorTypeTitle: 'OpenAI', + defaultSystemPromptId: 'test', + }, + }, + }); + const result = server.validate(request); + + expect(result.ok).toHaveBeenCalled(); + }); + + test('disallows invalid message "role" value', async () => { + const request = requestMock.create({ + method: 'put', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + body: { + ...getUpdateConversationSchemaMock(), + messages: [ + { + role: 'invalid', + content: 'test', + timestamp: '2019-12-13T16:40:33.400Z', + }, + ], + }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + `messages.0.role: Invalid enum value. Expected 'system' | 'user' | 'assistant', received 'invalid'` + ); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts new file mode 100644 index 0000000000000..3ed2a35d03124 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts @@ -0,0 +1,86 @@ +/* + * 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 { IKibanaResponse } from '@kbn/core/server'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import { + ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, +} from '@kbn/elastic-assistant-common'; +import { + ConversationResponse, + ConversationUpdateProps, +} from '@kbn/elastic-assistant-common/impl/schemas/conversations/common_attributes.gen'; +import { UpdateConversationRequestParams } from '@kbn/elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen'; +import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; +import { ElasticAssistantPluginRouter } from '../../types'; +import { buildResponse } from '../utils'; + +export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => { + router.versioned + .put({ + access: 'public', + path: ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, + options: { + tags: ['access:elasticAssistant'], + }, + }) + .addVersion( + { + version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + validate: { + request: { + body: buildRouteValidationWithZod(ConversationUpdateProps), + params: buildRouteValidationWithZod(UpdateConversationRequestParams), + }, + }, + }, + async (context, request, response): Promise> => { + const assistantResponse = buildResponse(response); + const { id } = request.params; + try { + const ctx = await context.resolve(['core', 'elasticAssistant']); + + const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); + const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); + if (authenticatedUser == null) { + return assistantResponse.error({ + body: `Authenticated user not found`, + statusCode: 401, + }); + } + + const existingConversation = await dataClient?.getConversation({ id, authenticatedUser }); + if (existingConversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" not found`, + statusCode: 404, + }); + } + const conversation = await dataClient?.updateConversation({ + conversationUpdateProps: request.body, + authenticatedUser, + }); + if (conversation == null) { + return assistantResponse.error({ + body: `conversation id: "${id}" was not updated`, + statusCode: 400, + }); + } + return response.ok({ + body: conversation, + }); + } catch (err) { + const error = transformError(err); + return assistantResponse.error({ + body: error.message, + statusCode: error.statusCode, + }); + } + } + ); +}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/utils.ts b/x-pack/plugins/elastic_assistant/server/routes/utils.ts new file mode 100644 index 0000000000000..0ae66de04d38b --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/routes/utils.ts @@ -0,0 +1,164 @@ +/* + * 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 { snakeCase } from 'lodash/fp'; +import { BadRequestError } from '@kbn/securitysolution-es-utils'; + +import type { + RouteValidationFunction, + KibanaResponseFactory, + CustomHttpResponseOptions, +} from '@kbn/core/server'; +import { CustomHttpRequestError } from './custom_http_request_error'; + +export interface OutputError { + message: string; + statusCode: number; +} +export interface BulkError { + // Id can be single id or stringified ids. + id?: string; + error: { + status_code: number; + message: string; + }; +} + +export const createBulkErrorObject = ({ + id, + statusCode, + message, +}: { + id?: string; + statusCode: number; + message: string; +}): BulkError => { + if (id != null) { + return { + id, + error: { + status_code: statusCode, + message, + }, + }; + } else if (id != null) { + return { + id, + error: { + status_code: statusCode, + message, + }, + }; + } else { + return { + id: '(unknown id)', + error: { + status_code: statusCode, + message, + }, + }; + } +}; + +export const transformBulkError = ( + id: string | undefined, + err: Error & { statusCode?: number } +): BulkError => { + if (err instanceof CustomHttpRequestError) { + return createBulkErrorObject({ + id, + statusCode: err.statusCode ?? 400, + message: err.message, + }); + } else if (err instanceof BadRequestError) { + return createBulkErrorObject({ + id, + statusCode: 400, + message: err.message, + }); + } else { + return createBulkErrorObject({ + id, + statusCode: err.statusCode ?? 500, + message: err.message, + }); + } +}; + +interface Schema { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + validate: (input: any) => { value: any; error?: Error }; +} + +export const buildRouteValidation = + (schema: Schema): RouteValidationFunction => + (payload: T, { ok, badRequest }) => { + const { value, error } = schema.validate(payload); + if (error) { + return badRequest(error.message); + } + return ok(value); + }; + +const statusToErrorMessage = (statusCode: number) => { + switch (statusCode) { + case 400: + return 'Bad Request'; + case 401: + return 'Unauthorized'; + case 403: + return 'Forbidden'; + case 404: + return 'Not Found'; + case 409: + return 'Conflict'; + case 500: + return 'Internal Error'; + default: + return '(unknown error)'; + } +}; + +export class CustomResponseFactory { + constructor(private response: KibanaResponseFactory) {} + + error({ statusCode, body, headers }: CustomHttpResponseOptions) { + const contentType: CustomHttpResponseOptions['headers'] = { + 'content-type': 'application/json', + }; + const defaultedHeaders: CustomHttpResponseOptions['headers'] = { + ...contentType, + ...(headers ?? {}), + }; + + return this.response.custom({ + headers: defaultedHeaders, + statusCode, + body: Buffer.from( + JSON.stringify({ + message: body ?? statusToErrorMessage(statusCode), + status_code: statusCode, + }) + ), + }); + } +} + +export const buildResponse = (response: KibanaResponseFactory) => + new CustomResponseFactory(response); + +export const convertToSnakeCase = >( + obj: T +): Partial | null => { + if (!obj) { + return null; + } + return Object.keys(obj).reduce((acc, item) => { + const newKey = snakeCase(item); + return { ...acc, [newKey]: obj[item] }; + }, {}); +}; diff --git a/x-pack/plugins/elastic_assistant/server/schemas/post_actions_connector_execute.ts b/x-pack/plugins/elastic_assistant/server/schemas/post_actions_connector_execute.ts deleted file mode 100644 index a03619e6a92f6..0000000000000 --- a/x-pack/plugins/elastic_assistant/server/schemas/post_actions_connector_execute.ts +++ /dev/null @@ -1,48 +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 * as t from 'io-ts'; - -/** Validates the URL path of a POST request to the `/actions/connector/{connector_id}/_execute` endpoint */ -export const PostActionsConnectorExecutePathParams = t.type({ - connectorId: t.string, -}); - -/** Validates the body of a POST request to the `/actions/connector/{connector_id}/_execute` endpoint */ -export const PostActionsConnectorExecuteBody = t.type({ - params: t.type({ - subActionParams: t.intersection([ - t.type({ - messages: t.array( - t.type({ - // must match ConversationRole from '@kbn/elastic-assistant - role: t.union([t.literal('system'), t.literal('user'), t.literal('assistant')]), - content: t.string, - }) - ), - }), - t.partial({ - model: t.string, - n: t.number, - stop: t.union([t.string, t.array(t.string), t.null]), - temperature: t.number, - }), - ]), - subAction: t.string, - }), - alertsIndexPattern: t.union([t.string, t.undefined]), - allow: t.union([t.array(t.string), t.undefined]), - allowReplacement: t.union([t.array(t.string), t.undefined]), - isEnabledKnowledgeBase: t.boolean, - isEnabledRAGAlerts: t.boolean, - replacements: t.union([t.record(t.string, t.string), t.undefined]), - size: t.union([t.number, t.undefined]), -}); - -export type PostActionsConnectorExecuteBodyInputs = t.TypeOf< - typeof PostActionsConnectorExecuteBody ->; diff --git a/x-pack/plugins/elastic_assistant/server/types.ts b/x-pack/plugins/elastic_assistant/server/types.ts index dafb6ad6b9bb3..917b3a06c50cb 100755 --- a/x-pack/plugins/elastic_assistant/server/types.ts +++ b/x-pack/plugins/elastic_assistant/server/types.ts @@ -10,19 +10,30 @@ import type { PluginStartContract as ActionsPluginStart, } from '@kbn/actions-plugin/server'; import type { + CoreRequestHandlerContext, + CoreSetup, AnalyticsServiceSetup, CustomRequestHandlerContext, + IRouter, KibanaRequest, Logger, SavedObjectsClientContract, } from '@kbn/core/server'; import { type MlPluginSetup } from '@kbn/ml-plugin/server'; +import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; +import { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/server'; import { Tool } from 'langchain/dist/tools/base'; import { RetrievalQAChain } from 'langchain/chains'; import { ElasticsearchClient } from '@kbn/core/server'; -import { AssistantFeatures } from '@kbn/elastic-assistant-common'; -import { RequestBody } from './lib/langchain/types'; +import { + AssistantFeatures, + ExecuteConnectorRequestBody, + Replacement, +} from '@kbn/elastic-assistant-common'; +import { AIAssistantConversationsDataClient } from './ai_assistant_data_clients/conversations'; import type { GetRegisteredFeatures, GetRegisteredTools } from './services/app_context'; +import { AIAssistantDataClient } from './ai_assistant_data_clients'; export const PLUGIN_ID = 'elasticAssistant' as const; @@ -72,19 +83,29 @@ export interface ElasticAssistantPluginStart { export interface ElasticAssistantPluginSetupDependencies { actions: ActionsPluginSetup; ml: MlPluginSetup; + taskManager: TaskManagerSetupContract; + spaces?: SpacesPluginSetup; } export interface ElasticAssistantPluginStartDependencies { actions: ActionsPluginStart; + spaces?: SpacesPluginStart; + security: SecurityPluginStart; } export interface ElasticAssistantApiRequestHandlerContext { + core: CoreRequestHandlerContext; actions: ActionsPluginStart; getRegisteredFeatures: GetRegisteredFeatures; getRegisteredTools: GetRegisteredTools; logger: Logger; + getServerBasePath: () => string; + getSpaceId: () => string; + getCurrentUser: () => AuthenticatedUser | null; + getAIAssistantConversationsDataClient: () => Promise; + getAIAssistantPromptsDataClient: () => Promise; + getAIAssistantAnonymizationFieldsDataClient: () => Promise; telemetry: AnalyticsServiceSetup; } - /** * @internal */ @@ -92,11 +113,76 @@ export type ElasticAssistantRequestHandlerContext = CustomRequestHandlerContext< elasticAssistant: ElasticAssistantApiRequestHandlerContext; }>; +export type ElasticAssistantPluginRouter = IRouter; + +export type ElasticAssistantPluginCoreSetupDependencies = CoreSetup< + ElasticAssistantPluginStartDependencies, + ElasticAssistantPluginStart +>; + export type GetElser = ( request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract ) => Promise | never; +export interface InitAssistantResult { + assistantResourcesInstalled: boolean; + assistantNamespaceResourcesInstalled: boolean; + assistantSettingsCreated: boolean; + errors: string[]; +} + +export interface AssistantResourceNames { + componentTemplate: { + conversations: string; + prompts: string; + anonymizationFields: string; + kb: string; + }; + indexTemplate: { + conversations: string; + prompts: string; + anonymizationFields: string; + kb: string; + }; + aliases: { + conversations: string; + prompts: string; + anonymizationFields: string; + kb: string; + }; + indexPatterns: { + conversations: string; + prompts: string; + anonymizationFields: string; + kb: string; + }; + pipelines: { + kb: string; + }; +} + +export interface IIndexPatternString { + pattern: string; + alias: string; + name: string; + basePattern: string; + validPrefixes?: string[]; + secondaryAlias?: string; +} + +export interface PublicAIAssistantDataClient { + getConversationsLimitValue: () => number; +} + +export interface IAIAssistantDataClient { + client(): PublicAIAssistantDataClient | null; +} + +export interface AIAssistantPrompts { + id: string; +} + /** * Interfaces for registering tools to be used by the elastic assistant */ @@ -118,8 +204,8 @@ export interface AssistantToolParams { chain: RetrievalQAChain; esClient: ElasticsearchClient; modelExists: boolean; - onNewReplacements?: (newReplacements: Record) => void; - replacements?: Record; - request: KibanaRequest; + onNewReplacements?: (newReplacements: Replacement[]) => void; + replacements?: Replacement[]; + request: KibanaRequest; size?: number; } diff --git a/x-pack/plugins/elastic_assistant/tsconfig.json b/x-pack/plugins/elastic_assistant/tsconfig.json index 2717da8d33a3a..4722dfb25de62 100644 --- a/x-pack/plugins/elastic_assistant/tsconfig.json +++ b/x-pack/plugins/elastic_assistant/tsconfig.json @@ -18,7 +18,6 @@ "@kbn/core-http-server", "@kbn/licensing-plugin", "@kbn/securitysolution-es-utils", - "@kbn/securitysolution-io-ts-utils", "@kbn/actions-plugin", "@kbn/elastic-assistant", "@kbn/logging-mocks", @@ -35,7 +34,16 @@ "@kbn/core-analytics-server", "@kbn/elastic-assistant-common", "@kbn/core-http-router-server-mocks", - "@kbn/zod-helpers", + "@kbn/data-stream-adapter", + "@kbn/core-saved-objects-utils-server", + "@kbn/core-elasticsearch-client-server-mocks", + "@kbn/task-manager-plugin", + "@kbn/security-plugin", + "@kbn/es-query", + "@kbn/es-types", + "@kbn/config-schema", + "@kbn/spaces-plugin", + "@kbn/security-plugin-types-common", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_all_indices_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_all_indices_api_logic.ts deleted file mode 100644 index 9d223ce3c04a1..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_all_indices_api_logic.ts +++ /dev/null @@ -1,31 +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 { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices'; -import { Meta } from '../../../../../common/types/pagination'; - -import { Actions, createApiLogic } from '../../../shared/api_logic/create_api_logic'; -import { HttpLogic } from '../../../shared/http'; - -export interface FetchAllIndicesResponse { - indices: ElasticsearchIndexWithIngestion[]; - meta: Meta; -} - -export const fetchAllIndices = async (): Promise => { - const { http } = HttpLogic.values; - const route = '/internal/enterprise_search/indices'; - const response = await http.get(route); - return response; -}; - -export const FetchAllIndicesAPILogic = createApiLogic( - ['content', 'fetch_all_indices_api_logic'], - fetchAllIndices -); - -export type FetchAllIndicesApiActions = Actions<{}, FetchAllIndicesResponse>; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_available_indices_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_available_indices_api_logic.ts new file mode 100644 index 0000000000000..4141216cd295c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_available_indices_api_logic.ts @@ -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 { Meta } from '../../../../../common/types/pagination'; + +import { Actions, createApiLogic } from '../../../shared/api_logic/create_api_logic'; +import { INPUT_THROTTLE_DELAY_MS } from '../../../shared/constants/timers'; +import { HttpLogic } from '../../../shared/http'; + +export interface FetchAvailabeIndicesApiParams { + searchQuery?: string; +} +export interface FetchAvailableIndicesApiResponse { + indexNames: string[]; + meta: Meta; +} + +export const fetchAvailableIndices = async ({ + searchQuery, +}: FetchAvailabeIndicesApiParams): Promise => { + const { http } = HttpLogic.values; + const route = '/internal/enterprise_search/connectors/available_indices'; + const query = { search_query: searchQuery || null }; + const response = await http.get(route, { query }); + return response; +}; + +export const FetchAvailableIndicesAPILogic = createApiLogic( + ['content', 'fetch_available_indices_api_logic'], + fetchAvailableIndices, + { + requestBreakpointMS: INPUT_THROTTLE_DELAY_MS, + } +); + +export type FetchAvailableIndicesApiActions = Actions< + FetchAvailabeIndicesApiParams, + FetchAvailableIndicesApiResponse +>; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_box.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_box.tsx index 93f14f89259b9..9e52ded0dcee5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_box.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_box.tsx @@ -17,6 +17,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiFormRow, + EuiHorizontalRule, EuiPanel, EuiSpacer, EuiText, @@ -30,10 +31,24 @@ import { Connector } from '@kbn/search-connectors'; import { Status } from '../../../../../common/types/api'; -import { FetchAllIndicesAPILogic } from '../../api/index/fetch_all_indices_api_logic'; +import { FetchAvailableIndicesAPILogic } from '../../api/index/fetch_available_indices_api_logic'; import { AttachIndexLogic } from './attach_index_logic'; +const CREATE_NEW_INDEX_GROUP_LABEL = i18n.translate( + 'xpack.enterpriseSearch.attachIndexBox.optionsGroup.createNewIndex', + { + defaultMessage: 'Create new index', + } +); + +const SELECT_EXISTING_INDEX_GROUP_LABEL = i18n.translate( + 'xpack.enterpriseSearch.attachIndexBox.optionsGroup.selectExistingIndex', + { + defaultMessage: 'Select existing index', + } +); + export interface AttachIndexBoxProps { connector: Connector; } @@ -58,10 +73,13 @@ export const AttachIndexBox: React.FC = ({ connector }) => : undefined ); const [selectedLanguage] = useState(); - const [query, setQuery] = useState(); + const [query, setQuery] = useState<{ + isFullMatch: boolean; + searchValue: string; + }>(); - const { makeRequest } = useActions(FetchAllIndicesAPILogic); - const { data, status } = useValues(FetchAllIndicesAPILogic); + const { makeRequest } = useActions(FetchAvailableIndicesAPILogic); + const { data, status } = useValues(FetchAvailableIndicesAPILogic); const isLoading = [Status.IDLE, Status.LOADING].includes(status); const onSave = () => { @@ -72,13 +90,41 @@ export const AttachIndexBox: React.FC = ({ connector }) => } }; - const options: Array> = isLoading + const options: Array> = isLoading ? [] - : data?.indices.map((index) => { + : data?.indexNames.map((name) => { return { - label: index.name, + label: name, }; }) ?? []; + + const hasMatchingOptions = + data?.indexNames.some((name) => + name.toLocaleLowerCase().includes(query?.searchValue.toLocaleLowerCase() ?? '') + ) ?? false; + const isFullMatch = + data?.indexNames.some( + (name) => name.toLocaleLowerCase() === query?.searchValue.toLocaleLowerCase() + ) ?? false; + + const shouldPrependUserInputAsOption = !!query?.searchValue && hasMatchingOptions && !isFullMatch; + + const groupedOptions: Array> = shouldPrependUserInputAsOption + ? [ + ...[ + { + label: CREATE_NEW_INDEX_GROUP_LABEL, + options: [ + { + label: query.searchValue, + }, + ], + }, + ], + ...[{ label: SELECT_EXISTING_INDEX_GROUP_LABEL, options }], + ] + : [{ label: SELECT_EXISTING_INDEX_GROUP_LABEL, options }]; + useEffect(() => { setConnector(connector); makeRequest({}); @@ -88,8 +134,9 @@ export const AttachIndexBox: React.FC = ({ connector }) => }, [connector.id]); useEffect(() => { - if (query) { - checkIndexExists({ indexName: query }); + makeRequest({ searchQuery: query?.searchValue || undefined }); + if (query?.searchValue) { + checkIndexExists({ indexName: query.searchValue }); } }, [query]); @@ -107,7 +154,7 @@ export const AttachIndexBox: React.FC = ({ connector }) => }, [hash]); const error = - !!query && indexExists[query] + !!query && indexExists[query.searchValue] ? i18n.translate( 'xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexErrorTextLabel', { @@ -167,15 +214,29 @@ export const AttachIndexBox: React.FC = ({ connector }) => } )} isLoading={isLoading} - options={options} + options={groupedOptions} + onSearchChange={(searchValue) => { + setQuery({ + isFullMatch: options.some((option) => option.label === searchValue), + searchValue, + }); + }} onChange={(selection) => { - setSelectedIndex(selection[0] || undefined); + const currentSelection = selection[0] ?? undefined; + const selectedIndexOption = currentSelection + ? { + label: currentSelection.label, + shouldCreate: + shouldPrependUserInputAsOption && + !!(currentSelection?.label === query?.searchValue), + } + : undefined; + setSelectedIndex(selectedIndexOption); }} selectedOptions={selectedIndex ? [selectedIndex] : undefined} onCreateOption={(value) => { setSelectedIndex({ label: value.trim(), shouldCreate: true }); }} - onSearchChange={(value) => setQuery(value)} singleSelection /> @@ -183,34 +244,6 @@ export const AttachIndexBox: React.FC = ({ connector }) => - {!connector.index_name && ( - - { - createIndex({ indexName: connector.name, language: null }); - }} - isLoading={isSaveLoading || isExistLoading} - disabled={indexExists[connector.name]} - > - {i18n.translate('xpack.enterpriseSearch.attachIndexBox.createSameIndexButtonLabel', { - defaultMessage: 'Create and attach an index named {indexName}', - values: { indexName: connector.name }, - })} - - {indexExists[connector.name] ? ( - - {i18n.translate('xpack.enterpriseSearch.attachIndexBox.indexNameExistsError', { - defaultMessage: 'Index with name {indexName} already exists', - values: { indexName: connector.name }, - })} - - ) : ( - <> - )} - - )} onSave()} @@ -223,6 +256,61 @@ export const AttachIndexBox: React.FC = ({ connector }) => + + {!connector.index_name && ( + <> + + + + + + +

+ {i18n.translate('xpack.enterpriseSearch.attachIndexBox.orPanelLabel', { + defaultMessage: 'OR', + })} +

+
+ + + +
+ + + + { + createIndex({ indexName: connector.name, language: null }); + setSelectedIndex({ label: connector.name }); + }} + isLoading={isSaveLoading || isExistLoading} + disabled={indexExists[connector.name]} + > + {i18n.translate( + 'xpack.enterpriseSearch.attachIndexBox.createSameIndexButtonLabel', + { + defaultMessage: 'Create and attach an index named {indexName}', + values: { indexName: connector.name }, + } + )} + + {indexExists[connector.name] ? ( + + {i18n.translate('xpack.enterpriseSearch.attachIndexBox.indexNameExistsError', { + defaultMessage: 'Index with name {indexName} already exists', + values: { indexName: connector.name }, + })} + + ) : ( + <> + )} + + + + )}
); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts index edb4f8c462afd..3f0b99a25e4cf 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts @@ -24,6 +24,8 @@ import { IndexExistsApiLogicActions, } from '../../api/index/index_exists_api_logic'; +import { ConnectorViewActions, ConnectorViewLogic } from './connector_view_logic'; + export interface AttachIndexActions { attachIndex: AttachIndexApiLogicActions['makeRequest']; attachIndexApiError: AttachIndexApiLogicActions['apiError']; @@ -35,6 +37,7 @@ export interface AttachIndexActions { createIndex: CreateApiIndexApiLogicActions['makeRequest']; createIndexApiError: CreateApiIndexApiLogicActions['apiError']; createIndexApiSuccess: CreateApiIndexApiLogicActions['apiSuccess']; + fetchConnector: ConnectorViewActions['fetchConnector']; setConnector(connector: Connector): Connector; } @@ -77,6 +80,8 @@ export const AttachIndexLogic = kea ({ + attachIndexApiSuccess: () => { + if (values.connector) { + actions.fetchConnector({ connectorId: values.connector.id }); + } + }, checkIndexExists: async ({ indexName }, breakpoint) => { await breakpoint(200); actions.callCheckIndexExists({ indexName }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/api_key_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/api_key_configuration.tsx index c36cb6f1ca50e..868bf4fe50721 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/api_key_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/api_key_configuration.tsx @@ -156,6 +156,7 @@ export const ApiKeyConfig: React.FC<{ onClick={clickGenerateApiKey} isLoading={status === Status.LOADING} isDisabled={indexName.length === 0} + data-telemetry-id="entSearch-content-connector-generateApiKeyButton" > {i18n.translate( 'xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.button.label', @@ -172,7 +173,12 @@ export const ApiKeyConfig: React.FC<{ <> - + )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx index 1540b944b2dec..218f2bcc550b4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx @@ -211,8 +211,8 @@ export const SearchIndices: React.FC = () => { search- }} /> } @@ -220,9 +220,9 @@ export const SearchIndices: React.FC = () => { diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts new file mode 100644 index 0000000000000..d5547733bcab5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts @@ -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 { IScopedClusterClient } from '@kbn/core/server'; +import { fetchConnectors } from '@kbn/search-connectors'; + +import { isNotNullish } from '../../../common/utils/is_not_nullish'; +import { fetchCrawlers } from '../crawler/fetch_crawlers'; + +import { getUnattachedIndexData } from './utils/get_index_data'; + +export const fetchUnattachedIndices = async ( + client: IScopedClusterClient, + searchQuery: string | undefined, + from: number, + size: number +): Promise<{ + indexNames: string[]; + totalResults: number; +}> => { + const { indexNames } = await getUnattachedIndexData(client, searchQuery); + const connectors = await fetchConnectors(client.asCurrentUser, indexNames); + const crawlers = await fetchCrawlers(client, indexNames); + + const connectedIndexNames = [ + ...connectors.map((con) => con.index_name).filter(isNotNullish), + ...crawlers.map((crawler) => crawler.index_name).filter(isNotNullish), + ]; + + const indexNameSlice = indexNames + .filter((indexName) => !connectedIndexNames.includes(indexName)) + .filter(isNotNullish) + .slice(from, from + size); + + if (indexNameSlice.length === 0) { + return { + indexNames: [], + totalResults: indexNames.length, + }; + } + + return { + indexNames: indexNameSlice, + totalResults: indexNames.length, + }; +}; diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/utils/get_index_data.ts b/x-pack/plugins/enterprise_search/server/lib/indices/utils/get_index_data.ts index 68ed32aa6d3f3..8edb60b6c8f8b 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/utils/get_index_data.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/utils/get_index_data.ts @@ -137,3 +137,33 @@ export const getIndexData = async ( indexNames, }; }; + +export const getUnattachedIndexData = async ( + client: IScopedClusterClient, + searchQuery?: string +): Promise<{ indexData: IndicesGetResponse; indexNames: string[] }> => { + const expandWildcards: ExpandWildcard[] = ['open']; + const indexPattern = searchQuery ? `*${searchQuery}*` : '*'; + const allIndexMatches = await client.asCurrentUser.indices.get({ + expand_wildcards: expandWildcards, + // for better performance only compute aliases and settings of indices but not mappings + features: ['aliases', 'settings'], + // only get specified index properties from ES to keep the response under 536MB + // node.js string length limit: https://github.com/nodejs/node/issues/33960 + filter_path: ['*.aliases', '*.settings.index.hidden', '*.settings.index.verified_before_close'], + index: indexPattern, + }); + + const allIndexNames = Object.keys(allIndexMatches).filter( + (indexName) => + allIndexMatches[indexName] && + !isHidden(allIndexMatches[indexName]) && + !isClosed(allIndexMatches[indexName]) + ); + const indexNames = allIndexNames; + + return { + indexData: allIndexMatches, + indexNames, + }; +}; diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts index 7c6706b5aef48..7ad04cf753dd7 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts @@ -35,6 +35,7 @@ import { addConnector } from '../../lib/connectors/add_connector'; import { startSync } from '../../lib/connectors/start_sync'; import { deleteAccessControlIndex } from '../../lib/indices/delete_access_control_index'; import { fetchIndexCounts } from '../../lib/indices/fetch_index_counts'; +import { fetchUnattachedIndices } from '../../lib/indices/fetch_unattached_indices'; import { generateApiKey } from '../../lib/indices/generate_api_key'; import { deleteIndexPipelines } from '../../lib/pipelines/delete_pipelines'; import { getDefaultPipeline } from '../../lib/pipelines/get_default_pipeline'; @@ -696,4 +697,42 @@ export function registerConnectorRoutes({ router, log }: RouteDependencies) { return response.ok(); }) ); + + router.get( + { + path: '/internal/enterprise_search/connectors/available_indices', + validate: { + query: schema.object({ + from: schema.number({ defaultValue: 0, min: 0 }), + search_query: schema.maybe(schema.string()), + size: schema.number({ defaultValue: 40, min: 0 }), + }), + }, + }, + elasticsearchErrorHandler(log, async (context, request, response) => { + const { from, size, search_query: searchQuery } = request.query; + const { client } = (await context.core).elasticsearch; + + const { indexNames, totalResults } = await fetchUnattachedIndices( + client, + searchQuery, + from, + size + ); + + return response.ok({ + body: { + indexNames, + meta: { + page: { + from, + size, + total: totalResults, + }, + }, + }, + headers: { 'content-type': 'application/json' }, + }); + }) + ); } diff --git a/x-pack/plugins/event_log/generated/mappings.json b/x-pack/plugins/event_log/generated/mappings.json index 561217eeae803..84c7b8acd303f 100644 --- a/x-pack/plugins/event_log/generated/mappings.json +++ b/x-pack/plugins/event_log/generated/mappings.json @@ -398,6 +398,9 @@ "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 b8be2221ec1ed..d4865320c042d 100644 --- a/x-pack/plugins/event_log/generated/schemas.ts +++ b/x-pack/plugins/event_log/generated/schemas.ts @@ -175,6 +175,7 @@ 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 6d0ec3635ab41..db5334d7d4ef6 100644 --- a/x-pack/plugins/event_log/scripts/mappings.js +++ b/x-pack/plugins/event_log/scripts/mappings.js @@ -173,6 +173,9 @@ 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/fleet/.storybook/context/index.tsx b/x-pack/plugins/fleet/.storybook/context/index.tsx index fec359e896822..a0450cb2e9f6e 100644 --- a/x-pack/plugins/fleet/.storybook/context/index.tsx +++ b/x-pack/plugins/fleet/.storybook/context/index.tsx @@ -13,7 +13,7 @@ import { createBrowserHistory } from 'history'; import { I18nProvider } from '@kbn/i18n-react'; -import type { PluginsServiceStart } from '@kbn/core/public'; +import type { PluginsServiceStart, SecurityServiceStart } from '@kbn/core/public'; import { CoreScopedHistory } from '@kbn/core/public'; import { getStorybookContextProvider } from '@kbn/custom-integrations-plugin/storybook'; @@ -95,13 +95,21 @@ export const StorybookContext: React.FC<{ storyContext?: Parameters theme$: EMPTY, getTheme: () => ({ darkMode: false }), }, + security: {} as unknown as SecurityServiceStart, plugins: {} as unknown as PluginsServiceStart, authz: { fleet: { all: true, setup: true, readEnrollmentTokens: true, + + // subfeatures + allAgents: true, + readAgents: true, + allSettings: true, + readSettings: true, readAgentPolicies: true, + allAgentPolicies: true, }, integrations: { readPackageInfo: true, diff --git a/x-pack/plugins/fleet/common/authz.ts b/x-pack/plugins/fleet/common/authz.ts index e47234730e84d..83e4e3dfe783d 100644 --- a/x-pack/plugins/fleet/common/authz.ts +++ b/x-pack/plugins/fleet/common/authz.ts @@ -23,6 +23,11 @@ export interface FleetAuthz { setup: boolean; readEnrollmentTokens: boolean; readAgentPolicies: boolean; + allAgentPolicies: boolean; + readAgents: boolean; + allAgents: boolean; + readSettings: boolean; + allSettings: boolean; }; integrations: { @@ -58,18 +63,24 @@ export interface FleetAuthz { }; } +interface ReadAllParams { + all: boolean; + read: boolean; +} + interface CalculateParams { fleet: { all: boolean; setup: boolean; + read?: boolean; + agents?: ReadAllParams; + agentPolicies?: ReadAllParams; + settings?: ReadAllParams; }; - integrations: { - all: boolean; - read: boolean; - }; + integrations: ReadAllParams; - isSuperuser: boolean; + subfeatureEnabled: boolean; } type PrivilegeMap = Record; @@ -77,32 +88,62 @@ type PrivilegeMap = Record; export const calculateAuthz = ({ fleet, integrations, - isSuperuser, -}: CalculateParams): FleetAuthz => ({ - fleet: { - all: fleet.all && (integrations.all || integrations.read), - - // These are currently used by Fleet Server setup - setup: fleet.all || fleet.setup, - readEnrollmentTokens: fleet.all || fleet.setup, - readAgentPolicies: fleet.all || fleet.setup, - }, + subfeatureEnabled, +}: CalculateParams): FleetAuthz => { + // TODO remove fallback when the feature flag is removed + const fleetAuthz: FleetAuthz['fleet'] = subfeatureEnabled + ? { + all: fleet.all && (integrations.all || integrations.read), + + readAgents: (fleet.agents?.read || fleet.agents?.all) ?? false, + allAgents: (fleet.all || fleet.agents?.all) ?? false, + readSettings: (fleet.settings?.read || fleet.settings?.all) ?? false, + allSettings: fleet.settings?.all ?? false, + allAgentPolicies: fleet.agentPolicies?.all ?? false, + + // These are currently used by Fleet Server setup + setup: fleet.all || fleet.setup, + readEnrollmentTokens: (fleet.all || fleet.setup || fleet.agents?.all) ?? false, + readAgentPolicies: + (fleet.all || fleet.read || fleet.setup || fleet.agentPolicies?.read) ?? false, + } + : { + all: fleet.all && (integrations.all || integrations.read), + + readAgents: fleet.all && (integrations.all || integrations.read), + allAgents: fleet.all && (integrations.all || integrations.read), + readSettings: fleet.all && (integrations.all || integrations.read), + allSettings: fleet.all && (integrations.all || integrations.read), + allAgentPolicies: fleet.all && (integrations.all || integrations.read), + + // These are currently used by Fleet Server setup + setup: fleet.all || fleet.setup, + readEnrollmentTokens: (fleet.all || fleet.setup || fleet.agents?.all) ?? false, + readAgentPolicies: + (fleet.all || fleet.read || fleet.setup || fleet.agentPolicies?.read) ?? false, + }; - integrations: { - readPackageInfo: fleet.all || fleet.setup || integrations.all || integrations.read, - readInstalledPackages: integrations.all || integrations.read, - installPackages: fleet.all && integrations.all, - upgradePackages: fleet.all && integrations.all, - removePackages: fleet.all && integrations.all, - uploadPackages: fleet.all && integrations.all, - - readPackageSettings: fleet.all && integrations.all, - writePackageSettings: fleet.all && integrations.all, - - readIntegrationPolicies: fleet.all && (integrations.all || integrations.read), - writeIntegrationPolicies: fleet.all && integrations.all, - }, -}); + return { + fleet: fleetAuthz, + integrations: { + readPackageInfo: fleet.all || fleet.setup || integrations.all || integrations.read, + readInstalledPackages: integrations.all || integrations.read, + installPackages: fleet.all && integrations.all, + upgradePackages: fleet.all && integrations.all, + removePackages: fleet.all && integrations.all, + uploadPackages: fleet.all && integrations.all, + + readPackageSettings: fleet.all && integrations.all, + writePackageSettings: fleet.all && integrations.all, + + readIntegrationPolicies: + ((fleet.all || fleet.read || fleet.agentPolicies?.read) ?? false) && + (integrations.all || integrations.read), + writeIntegrationPolicies: + ((fleet.all || fleet.agentPolicies?.all) ?? false) && integrations.all, + }, + }; +}; export function calculatePackagePrivilegesFromCapabilities( capabilities: Capabilities | undefined diff --git a/x-pack/plugins/fleet/common/mocks.ts b/x-pack/plugins/fleet/common/mocks.ts index 8e2545adf5ed5..82f3ccd661166 100644 --- a/x-pack/plugins/fleet/common/mocks.ts +++ b/x-pack/plugins/fleet/common/mocks.ts @@ -80,8 +80,13 @@ export const createFleetAuthzMock = (): FleetAuthz => { fleet: { all: true, setup: true, + readAgents: true, readEnrollmentTokens: true, readAgentPolicies: true, + allAgentPolicies: true, + allAgents: true, + allSettings: true, + readSettings: true, }, integrations: { readPackageInfo: true, diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index 7edc939ee1bcd..6291f73d02f09 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -107,6 +107,13 @@ interface AgentBase { tags?: string[]; components?: FleetServerAgentComponent[]; agent?: FleetServerAgentMetadata; + unhealthy_reason?: UnhealthyReason[]; +} + +export enum UnhealthyReason { + INPUT = 'input', + OUTPUT = 'output', + OTHER = 'other', } export interface AgentMetrics { @@ -336,6 +343,11 @@ export interface FleetServerAgent { * Outputs map */ outputs?: OutputMap; + + /** + * Unhealthy reason: input, output, other + */ + unhealthy_reason?: UnhealthyReason[]; } /** diff --git a/x-pack/plugins/fleet/public/mock/fleet_start_services.tsx b/x-pack/plugins/fleet/public/mock/fleet_start_services.tsx index aea31e42d517a..30661fd94869d 100644 --- a/x-pack/plugins/fleet/public/mock/fleet_start_services.tsx +++ b/x-pack/plugins/fleet/public/mock/fleet_start_services.tsx @@ -39,6 +39,11 @@ const fleetAuthzMock: FleetAuthz = { setup: true, readEnrollmentTokens: true, readAgentPolicies: true, + readAgents: true, + readSettings: true, + allAgentPolicies: true, + allAgents: true, + allSettings: true, }, integrations: { readPackageInfo: true, diff --git a/x-pack/plugins/fleet/public/mock/plugin_interfaces.ts b/x-pack/plugins/fleet/public/mock/plugin_interfaces.ts index c85e9e713ebcf..735c3283bdbbd 100644 --- a/x-pack/plugins/fleet/public/mock/plugin_interfaces.ts +++ b/x-pack/plugins/fleet/public/mock/plugin_interfaces.ts @@ -20,6 +20,11 @@ export const createStartMock = (extensionsStorage: UIExtensionsStorage = {}): Mo setup: true, readEnrollmentTokens: true, readAgentPolicies: true, + allAgentPolicies: true, + allAgents: true, + allSettings: true, + readAgents: true, + readSettings: true, }, integrations: { readPackageInfo: true, diff --git a/x-pack/plugins/fleet/public/plugin.ts b/x-pack/plugins/fleet/public/plugin.ts index 7799b3653c0b8..415484633c084 100644 --- a/x-pack/plugins/fleet/public/plugin.ts +++ b/x-pack/plugins/fleet/public/plugin.ts @@ -324,7 +324,7 @@ export class FleetPlugin implements Plugin { .get({ path: AGENT_POLICY_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readAgentPolicies: true }, }, }) .addVersion( @@ -92,7 +92,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: AGENT_POLICY_API_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgentPolicies: true }, }, }) .addVersion( @@ -108,7 +108,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: AGENT_POLICY_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgentPolicies: true }, }, }) .addVersion( @@ -124,7 +124,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: AGENT_POLICY_API_ROUTES.COPY_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgentPolicies: true }, }, }) .addVersion( @@ -140,7 +140,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: AGENT_POLICY_API_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgentPolicies: true }, }, }) .addVersion( @@ -156,7 +156,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: AGENT_POLICY_API_ROUTES.FULL_INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readAgentPolicies: true }, }, }) .addVersion( @@ -172,7 +172,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: AGENT_POLICY_API_ROUTES.FULL_INFO_DOWNLOAD_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readAgentPolicies: true }, }, enableQueryVersion: true, }) @@ -189,7 +189,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: K8S_API_ROUTES.K8S_INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readAgentPolicies: true }, }, }) .addVersion( @@ -205,7 +205,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: K8S_API_ROUTES.K8S_DOWNLOAD_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readAgentPolicies: true }, }, enableQueryVersion: true, }) diff --git a/x-pack/plugins/fleet/server/routes/download_source/index.tsx b/x-pack/plugins/fleet/server/routes/download_source/index.tsx index a307d5a3296da..7e0d761f7d4ed 100644 --- a/x-pack/plugins/fleet/server/routes/download_source/index.tsx +++ b/x-pack/plugins/fleet/server/routes/download_source/index.tsx @@ -31,7 +31,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: DOWNLOAD_SOURCE_API_ROUTES.LIST_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -46,7 +46,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: DOWNLOAD_SOURCE_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -61,7 +61,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: DOWNLOAD_SOURCE_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -76,7 +76,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: DOWNLOAD_SOURCE_API_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -91,7 +91,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: DOWNLOAD_SOURCE_API_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts index 3623fb24b451d..4797fa2ef5625 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts @@ -44,7 +44,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: ENROLLMENT_API_KEY_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( @@ -74,7 +74,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: ENROLLMENT_API_KEY_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( @@ -104,7 +104,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: ENROLLMENT_API_KEY_ROUTES.DELETE_PATTERN_DEPRECATED, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( @@ -134,7 +134,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: ENROLLMENT_API_KEY_ROUTES.CREATE_PATTERN_DEPRECATED, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts b/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts index 5cd35e027275a..5100ae77c2377 100644 --- a/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts +++ b/x-pack/plugins/fleet/server/routes/fleet_proxies/index.ts @@ -27,7 +27,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: FLEET_PROXY_API_ROUTES.LIST_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -42,7 +42,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: FLEET_PROXY_API_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -57,7 +57,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: FLEET_PROXY_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -70,9 +70,9 @@ export const registerRoutes = (router: FleetAuthzRouter) => { router.versioned .get({ - path: FLEET_PROXY_API_ROUTES.DELETE_PATTERN, + path: FLEET_PROXY_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -87,7 +87,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: FLEET_PROXY_API_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/fleet_server_hosts/index.ts b/x-pack/plugins/fleet/server/routes/fleet_server_hosts/index.ts index 5dddc693206b0..8c6ad90f23683 100644 --- a/x-pack/plugins/fleet/server/routes/fleet_server_hosts/index.ts +++ b/x-pack/plugins/fleet/server/routes/fleet_server_hosts/index.ts @@ -30,7 +30,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: FLEET_SERVER_HOST_API_ROUTES.LIST_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -44,7 +44,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: FLEET_SERVER_HOST_API_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -58,7 +58,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: FLEET_SERVER_HOST_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -72,7 +72,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: FLEET_SERVER_HOST_API_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -86,7 +86,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: FLEET_SERVER_HOST_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/output/index.ts b/x-pack/plugins/fleet/server/routes/output/index.ts index 3a566471aa4d8..0ca7f350b2925 100644 --- a/x-pack/plugins/fleet/server/routes/output/index.ts +++ b/x-pack/plugins/fleet/server/routes/output/index.ts @@ -34,7 +34,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: OUTPUT_API_ROUTES.LIST_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -48,7 +48,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: OUTPUT_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -62,7 +62,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: OUTPUT_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -77,7 +77,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: OUTPUT_API_ROUTES.CREATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -92,7 +92,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .delete({ path: OUTPUT_API_ROUTES.DELETE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -107,7 +107,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .post({ path: OUTPUT_API_ROUTES.LOGSTASH_API_KEY_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( @@ -122,7 +122,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: OUTPUT_API_ROUTES.GET_OUTPUT_HEALTH_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/settings/index.ts b/x-pack/plugins/fleet/server/routes/settings/index.ts index 89da7496dc0c2..2246c73c710b4 100644 --- a/x-pack/plugins/fleet/server/routes/settings/index.ts +++ b/x-pack/plugins/fleet/server/routes/settings/index.ts @@ -70,7 +70,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .get({ path: SETTINGS_API_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { readSettings: true }, }, }) .addVersion( @@ -84,7 +84,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: SETTINGS_API_ROUTES.UPDATE_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/uninstall_token/index.ts b/x-pack/plugins/fleet/server/routes/uninstall_token/index.ts index a7214607cb309..9fb91b45fa373 100644 --- a/x-pack/plugins/fleet/server/routes/uninstall_token/index.ts +++ b/x-pack/plugins/fleet/server/routes/uninstall_token/index.ts @@ -24,7 +24,7 @@ export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType .get({ path: UNINSTALL_TOKEN_ROUTES.LIST_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( @@ -39,7 +39,7 @@ export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType .get({ path: UNINSTALL_TOKEN_ROUTES.INFO_PATTERN, fleetAuthz: { - fleet: { all: true }, + fleet: { allAgents: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts index 806bb93f85b74..635c6f8c9a62a 100644 --- a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts @@ -21,6 +21,7 @@ import { FleetUnauthorizedError } from '../../errors'; import { getAuthzFromRequest } from '../security'; import type { FleetAuthz } from '../../../common'; +import { createFleetAuthzMock } from '../../../common/mocks'; import type { AgentClient } from './agent_service'; import { AgentServiceImpl } from './agent_service'; @@ -53,8 +54,13 @@ describe('AgentService', () => { fleet: { all: false, setup: false, + readAgents: false, readEnrollmentTokens: false, readAgentPolicies: false, + allAgentPolicies: false, + allAgents: false, + allSettings: false, + readSettings: false, }, integrations: { readPackageInfo: false, @@ -121,28 +127,7 @@ describe('AgentService', () => { ); beforeEach(() => - mockGetAuthzFromRequest.mockReturnValue( - Promise.resolve({ - fleet: { - all: true, - setup: true, - readEnrollmentTokens: true, - readAgentPolicies: true, - }, - integrations: { - readPackageInfo: true, - readInstalledPackages: true, - installPackages: true, - upgradePackages: true, - uploadPackages: true, - removePackages: true, - readPackageSettings: true, - writePackageSettings: true, - readIntegrationPolicies: true, - writeIntegrationPolicies: true, - }, - }) - ) + mockGetAuthzFromRequest.mockReturnValue(Promise.resolve(createFleetAuthzMock())) ); expectApisToCallServicesSuccessfully(mockEsClient, mockSoClient, agentClient); diff --git a/x-pack/plugins/fleet/server/services/agents/helpers.ts b/x-pack/plugins/fleet/server/services/agents/helpers.ts index 6da24cdbfb55c..21e4e864e3b6f 100644 --- a/x-pack/plugins/fleet/server/services/agents/helpers.ts +++ b/x-pack/plugins/fleet/server/services/agents/helpers.ts @@ -92,6 +92,7 @@ export function searchHitToAgent( // key-value pairs user_provided_metadata: hit._source?.user_provided_metadata!, local_metadata: hit._source?.local_metadata!, + unhealthy_reason: hit._source?.unhealthy_reason, }; if (!hit.fields?.status?.length) { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.test.ts index 6452671644763..e51fa38b6ac3c 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.test.ts @@ -5,9 +5,6 @@ * 2.0. */ -import { loggerMock } from '@kbn/logging-mocks'; -import type { Logger } from '@kbn/core/server'; - import { securityMock } from '@kbn/security-plugin/server/mocks'; import { appContextService } from '../../../app_context'; @@ -21,45 +18,10 @@ mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ ...securityMock.createSetup(), })); -let mockedLogger: jest.Mocked; describe('buildDefaultSettings', () => { - beforeEach(() => { - mockedLogger = loggerMock.create(); - mockedAppContextService.getLogger.mockReturnValue(mockedLogger); - }); - - it('should generate default settings', () => { + it('should not generate default_field settings ', () => { const settings = buildDefaultSettings({ - templateName: 'test_template', - packageName: 'test_package', type: 'logs', - fields: [ - { - name: 'field1Keyword', - type: 'keyword', - }, - { - name: 'field2Boolean', - type: 'boolean', - }, - { - name: 'field3Text', - type: 'text', - }, - { - name: 'field4MatchOnlyText', - type: 'match_only_text', - }, - { - name: 'field5Wildcard', - type: 'wildcard', - }, - { - name: 'field6NotDefault', - type: 'keyword', - default_field: false, - }, - ], }); expect(settings).toMatchInlineSnapshot(` @@ -68,65 +30,8 @@ describe('buildDefaultSettings', () => { "lifecycle": Object { "name": "logs", }, - "query": Object { - "default_field": Array [ - "field1Keyword", - "field3Text", - "field4MatchOnlyText", - "field5Wildcard", - ], - }, }, } `); }); - - it('should log a warning if there is too many default fields', () => { - const fields = []; - for (let i = 0; i < 20000; i++) { - fields.push({ name: `field${i}`, type: 'keyword' }); - } - buildDefaultSettings({ - type: 'logs', - templateName: 'test_template', - packageName: 'test_package', - fields, - }); - - expect(mockedLogger.warn).toBeCalledWith( - 'large amount of default fields detected for index template test_template in package test_package, applying the first 1024 fields' - ); - }); - - it('should not add field with index:false or doc_values:false to default fields', () => { - const fields = [ - { - name: 'field_valid', - type: 'keyword', - }, - { - name: 'field_invalid_index_false', - type: 'keyword', - index: false, - }, - { - name: 'field_invalid_docvalues_false', - type: 'keyword', - doc_values: false, - }, - { - name: 'field_invalid_default_field_false', - type: 'keyword', - default_field: false, - }, - ]; - const settings = buildDefaultSettings({ - type: 'logs', - templateName: 'test_template', - packageName: 'test_package', - fields, - }); - - expect(settings.index.query?.default_field).toEqual(['field_valid']); - }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.ts index 6d42f106464b4..ab39665904eba 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/default_settings.ts @@ -6,61 +6,14 @@ */ import { appContextService } from '../../../app_context'; -import type { Field, Fields } from '../../fields/field'; - -const QUERY_DEFAULT_FIELD_TYPES = ['keyword', 'text', 'match_only_text', 'wildcard']; -const QUERY_DEFAULT_FIELD_LIMIT = 1024; - -const flattenAndExtractFields = (fields: Fields, path: string = ''): Field[] => { - let newFields: Array> = []; - fields.forEach((field) => { - const fieldName = path ? `${path}.${field.name}` : field.name; - newFields.push({ - ...field, - name: fieldName, - }); - if (field.fields && field.fields.length) { - newFields = newFields.concat(flattenAndExtractFields(field.fields, fieldName)); - } - }); - return newFields; -}; export function buildDefaultSettings({ - templateName, - packageName, - fields, ilmPolicy, type, }: { type: string; - templateName: string; - packageName: string; ilmPolicy?: string | undefined; - fields: Field[]; }) { - const logger = appContextService.getLogger(); - // Find all field names to set `index.query.default_field` to, which will be - // the first 1024 keyword or text fields - const defaultFields = flattenAndExtractFields(fields).filter( - (field) => - field.type && - QUERY_DEFAULT_FIELD_TYPES.includes(field.type) && - field.default_field !== false && - field.index !== false && - field.doc_values !== false - ); - if (defaultFields.length > QUERY_DEFAULT_FIELD_LIMIT) { - logger.warn( - `large amount of default fields detected for index template ${templateName} in package ${packageName}, applying the first ${QUERY_DEFAULT_FIELD_LIMIT} fields` - ); - } - const defaultFieldNames = ( - defaultFields.length > QUERY_DEFAULT_FIELD_LIMIT - ? defaultFields.slice(0, QUERY_DEFAULT_FIELD_LIMIT) - : defaultFields - ).map((field) => field.name); - const isILMPolicyDisabled = appContextService.getConfig()?.internal?.disableILMPolicies ?? false; return { @@ -73,16 +26,6 @@ export function buildDefaultSettings({ name: ilmPolicy ? ilmPolicy : type, }, }), - // All the default fields which should be queried have to be added here. - // So far we add all keyword and text fields here if there are any, otherwise - // this setting is skipped. - ...(defaultFieldNames.length - ? { - query: { - default_field: defaultFieldNames, - }, - } - : {}), }, }; } diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts index b729e34fa8bb6..3b4b74cf772e5 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { range } from 'lodash'; + import { createAppContextStartContractMock } from '../../../../mocks'; import { appContextService } from '../../..'; import { loadDatastreamsFieldsFromYaml } from '../../fields/field'; @@ -297,6 +299,109 @@ describe('EPM index template install', () => { ); }); + it('test prepareTemplate with default total_fields.limit in settings', () => { + const dataStream = { + type: 'logs', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + } as RegistryDataStream; + + const { componentTemplates } = prepareTemplate({ + packageInstallContext, + dataStream, + }); + + const packageTemplate = componentTemplates['logs-package.dataset@package'].template; + + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); + } + + expect(packageTemplate.settings?.index?.mapping?.total_fields).toEqual( + expect.objectContaining({ limit: 1000 }) + ); + }); + + it('test prepareTemplate with extended total_fields.limit in settings due to more than 500 fields', () => { + const dataStream = { + type: 'logs', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + } as RegistryDataStream; + + mockedLoadFieldsFromYaml.mockReturnValue( + range(10).map((_, i) => ({ + name: `test_group${i}`, + type: 'group', + fields: range(60).map((__, j) => ({ + name: `test_field${i}_${j}`, + type: 'keyword', + })), + })) + ); + + const { componentTemplates } = prepareTemplate({ + packageInstallContext, + dataStream, + }); + + const packageTemplate = componentTemplates['logs-package.dataset@package'].template; + + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); + } + + expect(packageTemplate.settings?.index?.mapping?.total_fields).toEqual( + expect.objectContaining({ limit: 10000 }) + ); + }); + + it('test prepareTemplate to override total_fields in settings', () => { + const dataStream = { + type: 'logs', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + elasticsearch: { + 'index_template.settings': { + index: { + mapping: { + total_fields: { + limit: 50000, + }, + }, + }, + }, + }, + } as RegistryDataStream; + + const { componentTemplates } = prepareTemplate({ + packageInstallContext, + dataStream, + }); + + const packageTemplate = componentTemplates['logs-package.dataset@package'].template; + + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); + } + + expect(packageTemplate.settings?.index?.mapping?.total_fields).toEqual( + expect.objectContaining({ limit: 50000 }) + ); + }); + it('test prepareTemplate to set a runtime field in index_template.mappings', () => { const dataStream = { type: 'logs', diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts index 2dce7b7323567..58dde5d714886 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts @@ -30,6 +30,7 @@ import type { EsAssetReference, ExperimentalDataStreamFeature, } from '../../../../types'; +import type { Fields } from '../../fields/field'; import { loadDatastreamsFieldsFromYaml, processFields } from '../../fields/field'; import { getAssetFromAssetsMap, getPathParts } from '../../archive'; import { @@ -288,6 +289,26 @@ function putComponentTemplate( }; } +const DEFAULT_FIELD_LIMIT = 1000; +const MAX_FIELD_LIMIT = 10000; +const FIELD_LIMIT_THRESHOLD = 500; + +/** + * The total field limit is set to 1000 by default, but can be increased to 10000 if the field count is higher than 500. + * An explicit limit always overrides the default. + * + * This can be replaced by a static limit of 1000 once a new major version of the package spec is released which clearly documents the field limit. + */ +function getFieldsLimit(fieldCount: number | undefined, explicitLimit: number | undefined) { + if (explicitLimit) { + return explicitLimit; + } + if (typeof fieldCount !== 'undefined' && fieldCount > FIELD_LIMIT_THRESHOLD) { + return MAX_FIELD_LIMIT; + } + return DEFAULT_FIELD_LIMIT; +} + export function buildComponentTemplates(params: { mappings: IndexTemplateMappings; templateName: string; @@ -297,6 +318,7 @@ export function buildComponentTemplates(params: { defaultSettings: IndexTemplate['template']['settings']; experimentalDataStreamFeature?: ExperimentalDataStreamFeature; lifecycle?: IndexTemplate['template']['lifecycle']; + fieldCount?: number; }) { const { templateName, @@ -307,6 +329,7 @@ export function buildComponentTemplates(params: { pipelineName, experimentalDataStreamFeature, lifecycle, + fieldCount, } = params; const packageTemplateName = `${templateName}${PACKAGE_TEMPLATE_SUFFIX}`; const userSettingsTemplateName = `${templateName}${USER_SETTINGS_TEMPLATE_SUFFIX}`; @@ -365,8 +388,10 @@ export function buildComponentTemplates(params: { mapping: { ...templateSettings.index?.mapping, total_fields: { - ...templateSettings.index?.mapping?.total_fields, - limit: '10000', + limit: getFieldsLimit( + fieldCount, + templateSettings.index?.mapping?.total_fields?.limit + ), }, }, }, @@ -499,6 +524,19 @@ export async function ensureAliasHasWriteIndex(opts: { } } +function countFields(fields: Fields): number { + return fields.reduce((acc, field) => { + let subCount = 1; + if (field.fields) { + subCount += countFields(field.fields); + } + if (field.multi_fields) { + subCount += countFields(field.multi_fields); + } + return subCount + acc; + }, 0); +} + export function prepareTemplate({ packageInstallContext, dataStream, @@ -528,9 +566,6 @@ export function prepareTemplate({ const pipelineName = getPipelineNameForDatastream({ dataStream, packageVersion }); const defaultSettings = buildDefaultSettings({ - templateName, - packageName, - fields: validFields, type: dataStream.type, ilmPolicy: dataStream.ilm_policy, }); @@ -544,6 +579,7 @@ export function prepareTemplate({ registryElasticsearch: dataStream.elasticsearch, experimentalDataStreamFeature, lifecycle: lifecyle, + fieldCount: countFields(validFields), }); const template = getTemplate({ diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts index 308a10f1bf94d..740ea2af537e9 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts @@ -727,7 +727,7 @@ async function handleTransformInstall({ body: transform.content, }, // add '{ headers: { es-secondary-authorization: 'ApiKey {encodedApiKey}' } }' - secondaryAuth ? { ...secondaryAuth } : undefined + { ignore: [409], ...(secondaryAuth ? { ...secondaryAuth } : {}) } ), { logger } ); @@ -740,7 +740,9 @@ async function handleTransformInstall({ err?.body?.error?.reason?.includes('unauthorized for API key'); const isAlreadyExistError = - isResponseError && err?.body?.error?.type === 'resource_already_exists_exception'; + isResponseError && + (err?.body?.error?.type === 'resource_already_exists_exception' || + err?.body?.error?.caused_by?.type?.includes('version_conflict_engine_exception')); // swallow the error if the transform already exists or if API key has insufficient permissions if (!isUnauthorizedAPIKey && !isAlreadyExistError) { @@ -770,9 +772,9 @@ async function handleTransformInstall({ err?.body?.error?.type === 'security_exception' && err?.body?.error?.reason?.includes('lacks the required permissions'); - // swallow the error if the transform can't be started if API key has insufficient permissions + // No need to throw error if transform cannot be started, as failure to start shouldn't block package installation if (!isUnauthorizedAPIKey) { - throw err; + logger.debug(`Error starting transform: ${transform.installationName} cause ${err}`); } } } @@ -785,7 +787,7 @@ async function handleTransformInstall({ () => esClient.transform.getTransformStats( { transform_id: transform.installationName }, - { ignore: [409] } + { ignore: [409, 404] } ), { logger, additionalResponseStatuses: [400] } ); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts index 72474d3081f39..4b58dda7d0746 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts @@ -203,6 +203,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], [ { @@ -210,6 +211,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ @@ -351,6 +353,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ @@ -576,6 +579,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts index f0b84ebac1f29..d664392b8b676 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts @@ -127,7 +127,7 @@ export async function handleTransformReauthorizeAndStart({ { transform_id: transformId, }, - { ...(secondaryAuth ? secondaryAuth : {}) } + { ...(secondaryAuth ? secondaryAuth : {}), ignore: [404] } ), { logger, additionalResponseStatuses: [400] } ) @@ -136,6 +136,7 @@ export async function handleTransformReauthorizeAndStart({ const transformsMetadata: FleetTransformMetadata[] = transformInfos .flat() + .filter((t) => t.transforms !== undefined) .map((t) => { const transform = t.transforms?.[0]; return { ...transform._meta, transformId: transform?.id }; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts index 5939104091818..4d927ca4cef69 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts @@ -337,7 +337,7 @@ _meta: number_of_shards: 1, number_of_routing_shards: 30, hidden: true, - mapping: { total_fields: { limit: '10000' } }, + mapping: { total_fields: { limit: 1000 } }, }, }, mappings: { @@ -402,7 +402,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -626,7 +628,7 @@ _meta: number_of_shards: 1, number_of_routing_shards: 30, hidden: true, - mapping: { total_fields: { limit: '10000' } }, + mapping: { total_fields: { limit: 1000 } }, }, }, mappings: { @@ -684,7 +686,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -898,7 +902,7 @@ _meta: name: 'logs-endpoint.metadata_current-template@package', body: { template: { - settings: { index: { mapping: { total_fields: { limit: '10000' } } } }, + settings: { index: { mapping: { total_fields: { limit: 1000 } } } }, mappings: { properties: { '@timestamp': { @@ -943,7 +947,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -1094,7 +1100,9 @@ _meta: authorizationHeader, }); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); // Does not start transform because start is set to false in manifest.yml expect(esClient.transform.startTransform.mock.calls).toEqual([]); }); @@ -1211,7 +1219,9 @@ _meta: { ignore: [404] }, ], ]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); }); test('retain old transforms and do nothing if fleet_transform_version is the same', async () => { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/fields.ts b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/fields.ts index 059edae2f1b6d..d02ee39e8383b 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/fields.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/fields.ts @@ -20,273 +20,3 @@ export const createBaseFields = () => { ]; return yaml.dump(fields); }; - -export const createAgentFields = () => { - const fields = [ - { - name: 'cloud', - title: 'Cloud', - group: 2, - description: 'Fields related to the cloud or infrastructure the events are coming from.', - footnote: - 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.', - type: 'group', - fields: [ - { - name: 'account.id', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: - 'The cloud account or organization id used to identify different entities in a multi-tenant environment.\nExamples: AWS account id, Google Cloud ORG Id, or other unique identifier.', - example: 666777888999, - }, - { - name: 'availability_zone', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Availability zone in which this host is running.', - example: 'us-east-1c', - }, - { - name: 'instance.id', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Instance ID of the host machine.', - example: 'i-1234567890abcdef0', - }, - { - name: 'instance.name', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Instance name of the host machine.', - }, - { - name: 'machine.type', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Machine type of the host machine.', - example: 't2.medium', - }, - { - name: 'provider', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: - 'Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.', - example: 'aws', - }, - { - name: 'region', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Region in which this host is running.', - example: 'us-east-1', - }, - { - name: 'project.id', - type: 'keyword', - description: 'Name of the project in Google Cloud.', - }, - { - name: 'image.id', - type: 'keyword', - description: 'Image ID for the cloud instance.', - }, - ], - }, - { - name: 'container', - title: 'Container', - group: 2, - description: - 'Container fields are used for meta information about the specific container that is the source of information.\nThese fields help correlate data based containers from any runtime.', - type: 'group', - fields: [ - { - name: 'id', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: 'Unique container id.', - }, - { - name: 'image.name', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Name of the image the container was built on.', - }, - { - name: 'labels', - level: 'extended', - type: 'object', - object_type: 'keyword', - description: 'Image labels.', - }, - { - name: 'name', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Container name.', - }, - ], - }, - { - name: 'host', - title: 'Host', - group: 2, - description: - 'A host is defined as a general computing instance.\nECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.', - type: 'group', - fields: [ - { - name: 'architecture', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: 'Operating system architecture.', - example: 'x86_64', - }, - { - name: 'domain', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: - "Name of the domain of which the host is a member.\nFor example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider.", - example: 'CONTOSO', - default_field: false, - }, - { - name: 'hostname', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: - 'Hostname of the host.\nIt normally contains what the `hostname` command returns on the host machine', - }, - { - name: 'id', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: - 'Unique host id.\nAs hostname is not always unique, use values that are meaningful in your environment.\nExample: The current usage of `beat.name`', - }, - { - name: 'ip', - level: 'core', - type: 'ip', - description: 'Host ip addresses.', - }, - { - name: 'mac', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: 'Host mac addresses.', - }, - { - name: 'name', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: - 'Name of the host.\nIt can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use', - }, - { - name: 'os.family', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'OS family (such as redhat, debian, freebsd, windows).', - example: 'debian', - }, - { - name: 'os.kernel', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Operating system kernel version as a raw string.', - example: '4.4.0-112-generic', - }, - { - name: 'os.name', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - multi_fields: [ - { - name: 'text', - type: 'text', - norms: false, - default_field: false, - }, - ], - description: 'Operating system name, without the version.', - example: 'Mac OS X', - }, - { - name: 'os.platform', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Operating system platform (such centos, ubuntu, windows).', - example: 'darwin', - }, - { - name: 'os.version', - level: 'extended', - type: 'keyword', - ignore_above: 1024, - description: 'Operating system version as a raw string.', - example: '10.14.1', - }, - { - name: 'type', - level: 'core', - type: 'keyword', - ignore_above: 1024, - description: - 'Type of host.\nFor Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment', - }, - { - name: 'containerized', - type: 'boolean', - description: 'If the host is a container.\n', - }, - { - name: 'os.build', - type: 'keyword', - example: '18D109', - description: 'OS build information.\n', - }, - { - name: 'os.codename', - type: 'keyword', - example: 'stretch', - description: 'OS codename, if any.\n', - }, - ], - }, - { - name: 'input.type', - type: 'keyword', - description: 'Input type', - }, - { - name: 'log.offset', - type: 'long', - description: 'Log offset', - }, - ]; - return yaml.dump(fields); -}; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/utils.ts b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/utils.ts index c3512443c8828..993bfc073e46f 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/utils.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/dataset/utils.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { MappingTypeMapping } from '@elastic/elasticsearch/lib/api/types'; + import type { CustomPackageDatasetConfiguration } from '../../../install'; export const generateDatastreamEntries = ( @@ -22,6 +24,12 @@ export const generateDatastreamEntries = ( release: 'ga' as const, // NOTE: This ensures our default.yml pipeline is used as the default_pipeline in the index template ingest_pipeline: 'default', + elasticsearch: { + // TODO: Needs to be cast because https://github.com/elastic/elasticsearch-specification/pull/2445 hasn't landed yet, can be removed once it has + 'index_template.mappings': { + subobjects: false, + } as MappingTypeMapping, + }, }; }); }; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/generate.ts b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/generate.ts index a9063c76f7413..f32e1983a274e 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/generate.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/custom_integrations/assets/generate.ts @@ -11,7 +11,7 @@ import { pkgToPkgKey } from '../../../registry'; import type { CustomPackageDatasetConfiguration } from '../../install'; -import { createAgentFields, createBaseFields, createDatasetManifest } from './dataset'; +import { createBaseFields, createDatasetManifest } from './dataset'; import { createDefaultPipeline } from './dataset/ingest_pipeline'; import { createManifest } from './manifest'; @@ -45,10 +45,6 @@ export const createAssets = (assetOptions: AssetOptions) => { })}/data_stream/${datasetName}/fields/base-fields.yml`, content: Buffer.from(createBaseFields()), }, - { - path: `${pkgToPkgKey({ name, version })}/data_stream/${datasetName}/fields/agent.yml`, - content: Buffer.from(createAgentFields()), - }, { path: `${pkgToPkgKey({ name, diff --git a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts index d8e8030279620..565c56695c141 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts @@ -71,6 +71,22 @@ describe('fetchAgentMetrics', () => { }, ], }, + unhealthy_reason: { + buckets: [ + { + key: 'input', + doc_count: 2, + }, + { + key: 'output', + doc_count: 1, + }, + { + key: 'other', + doc_count: 3, + }, + ], + }, }, }); @@ -95,6 +111,11 @@ describe('fetchAgentMetrics', () => { scheduled: 0, watching: 0, }, + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }); }); }); diff --git a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts index 6fc0966e266ed..d753bf1e31888 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts @@ -20,6 +20,7 @@ export interface AgentMetrics { agents: AgentUsage; agents_per_version: AgentPerVersion[]; upgrading_step: UpgradingSteps; + unhealthy_reason: UnhealthyReason; } export interface UpgradingSteps { @@ -34,6 +35,12 @@ export interface UpgradingSteps { failed: number; } +export interface UnhealthyReason { + input: number; + output: number; + other: number; +} + export const fetchAgentMetrics = async ( core: CoreSetup, abortController: AbortController @@ -63,6 +70,7 @@ export const fetchAgentMetrics = async ( agents: await getAgentUsage(soClient, esClient), agents_per_version: await getAgentsPerVersion(esClient, abortController), upgrading_step: await getUpgradingSteps(esClient, abortController), + unhealthy_reason: await getUnhealthyReason(esClient, abortController), }; return usage; }; @@ -195,3 +203,53 @@ export const getUpgradingSteps = async ( return upgradingSteps; } }; + +export const getUnhealthyReason = async ( + esClient: ElasticsearchClient, + abortController: AbortController +): Promise => { + const unhealthyReason = { + input: 0, + output: 0, + other: 0, + }; + try { + const response = await retryTransientEsErrors(() => + esClient.search( + { + index: AGENTS_INDEX, + size: 0, + aggs: { + unhealthy_reason: { + terms: { field: 'unhealthy_reason' }, + }, + }, + }, + { signal: abortController.signal } + ) + ); + ((response?.aggregations?.unhealthy_reason as any)?.buckets ?? []).forEach((bucket: any) => { + switch (bucket.key) { + case 'input': + unhealthyReason.input = bucket.doc_count; + break; + case 'output': + unhealthyReason.output = bucket.doc_count; + break; + case 'other': + unhealthyReason.other = bucket.doc_count; + break; + default: + break; + } + }); + return unhealthyReason; + } catch (error) { + if (error.statusCode === 404) { + appContextService.getLogger().debug('Index .fleet-agents does not exist yet.'); + } else { + throw error; + } + return unhealthyReason; + } +}; diff --git a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts index 17c6ede4c3f74..649fa6fc848c5 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts @@ -104,6 +104,11 @@ describe('fleet metrics task', () => { count: 2, }, ], + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }); }); @@ -149,6 +154,11 @@ describe('fleet metrics task', () => { scheduled: 1, requested: 1, }, + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }, }, }), diff --git a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts index bd72976fa603c..c60716f312148 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts @@ -20,7 +20,7 @@ import { appContextService } from '../app_context'; import type { AgentMetrics } from './fetch_agent_metrics'; export const TYPE = 'Fleet-Metrics-Task'; -export const VERSION = '1.0.0'; +export const VERSION = '1.1.0'; const TITLE = 'Fleet Metrics Task'; const TIMEOUT = '1m'; const SCOPE = ['fleet']; @@ -115,6 +115,7 @@ export class FleetMetricsTask { unhealthy: agents.unhealthy, inactive: agents.inactive, upgrading_step: agentMetrics.upgrading_step, + unhealthy_reason: agentMetrics.unhealthy_reason, }, }, }; diff --git a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts index 98effa4070c96..bbc1b07010fb7 100644 --- a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts +++ b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts @@ -133,7 +133,7 @@ const ROUTE_AUTHZ_REQUIREMENTS = deepFreeze { const fleetAuthz = deepFreeze({ @@ -17,7 +21,12 @@ describe('When using calculateRouteAuthz()', () => { all: false, setup: false, readEnrollmentTokens: false, + allAgentPolicies: false, readAgentPolicies: false, + readAgents: false, + allAgents: false, + readSettings: false, + allSettings: false, }, integrations: { readPackageInfo: false, @@ -541,3 +550,334 @@ describe('When using calculateRouteAuthz()', () => { }); }); }); + +describe('getAuthzFromRequest', () => { + let mockSecurity: jest.MockedObjectDeep; + let checkPrivileges: jest.MockedFn; + beforeEach(() => { + checkPrivileges = jest.fn(); + mockSecurity = { + authc: { getCurrentUser: jest.fn() }, + authz: { + checkPrivilegesDynamicallyWithRequest: jest.fn().mockReturnValue(checkPrivileges), + actions: { + ui: { + get: (s: string) => `ui:${s}`, + }, + api: { + get: (s: string) => `api:${s}`, + }, + }, + mode: { + useRbacForRequest: jest.fn(), + }, + }, + } as unknown as jest.MockedObjectDeep; + + jest.mocked(appContextService.getSecurity).mockReturnValue(mockSecurity); + jest.mocked(appContextService.getSecurityLicense).mockReturnValue({ + isEnabled: () => true, + } as any); + jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ + subfeaturePrivileges: true, + } as any); + }); + it('should not authorize access if RBAC is not enabled', async () => { + mockSecurity.authz.mode.useRbacForRequest.mockReturnValue(false); + const res = await getAuthzFromRequest({} as any); + for (const val of Object.values(res.fleet)) { + expect(val).toBe(false); + } + for (const val of Object.values(res.integrations)) { + expect(val).toBe(false); + } + }); + describe('Fleet readAgents', () => { + beforeEach(() => { + mockSecurity.authz.mode.useRbacForRequest.mockReturnValue(true); + }); + it('should authorize Fleet:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-all', + authorized: true, + }, + { + resource: 'default', + privilege: 'api:fleet-agents-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(true); + }); + + it('should authorize Fleet:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-read', + authorized: true, + }, + { + resource: 'default', + privilege: 'api:fleet-agents-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(true); + }); + + it('should authorize Fleet:Agents:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-agents-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(true); + }); + + it('should authorize Fleet:Agents:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-agents-all', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(true); + }); + + it('without kibana privilege it should not authorize Fleet Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(false); + }); + }); + + describe('Fleet allAgents', () => { + beforeEach(() => { + mockSecurity.authz.mode.useRbacForRequest.mockReturnValue(true); + }); + it('should authorize Fleet:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-all', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: true, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.allAgents).toBe(true); + }); + + it('should not authorize Fleet:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.allAgents).toBe(false); + }); + + it('should not authorize Fleet:Agents:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-agents-read', + authorized: false, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.allAgents).toBe(false); + }); + + it('should authorize Fleet:Agents:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-agents-all', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.allAgents).toBe(true); + }); + }); + + describe('Fleet readSettings', () => { + beforeEach(() => { + mockSecurity.authz.mode.useRbacForRequest.mockReturnValue(true); + }); + it('should authorize Fleet:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-all', + authorized: true, + }, + { + resource: 'default', + privilege: 'api:fleet-settings-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readSettings).toBe(true); + }); + + it('should authorize Fleet:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-read', + authorized: true, + }, + { + resource: 'default', + privilege: 'api:fleet-settings-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readSettings).toBe(true); + }); + + it('should authorize Fleet:Settings:Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-settings-read', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readSettings).toBe(true); + }); + + it('should authorize Fleet:Settings:All', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [ + { + resource: 'default', + privilege: 'api:fleet-settings-all', + authorized: true, + }, + ], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readSettings).toBe(true); + }); + + it('without kibana privilege it should not authorize Fleet Read', async () => { + checkPrivileges.mockResolvedValue({ + privileges: { + kibana: [], + elasticsearch: {} as any, + }, + hasAllRequested: false, + username: 'test', + }); + const res = await getAuthzFromRequest({} as any); + expect(res.fleet.readAgents).toBe(false); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/security/security.ts b/x-pack/plugins/fleet/server/services/security/security.ts index 76986768416ff..01bbc16e17794 100644 --- a/x-pack/plugins/fleet/server/services/security/security.ts +++ b/x-pack/plugins/fleet/server/services/security/security.ts @@ -74,8 +74,12 @@ const computeUiApiPrivileges = ( ); }; +const FLEET_SUBFEATURES = ['agents', 'agent-policies', 'settings']; + export async function getAuthzFromRequest(req: KibanaRequest): Promise { const security = appContextService.getSecurity(); + const isSubfeatureEnabled = + appContextService.getExperimentalFeatures()?.subfeaturePrivileges ?? false; if (security.authz.mode.useRbacForRequest(req)) { const checkPrivileges = security.authz.checkPrivilegesDynamicallyWithRequest(req); @@ -88,6 +92,7 @@ export async function getAuthzFromRequest(req: KibanaRequest): Promise [ + security.authz.actions.api.get(`${PLUGIN_ID}-${subfeature}-all`), + security.authz.actions.api.get(`${PLUGIN_ID}-${subfeature}-read`), + ]), + ...endpointPrivileges, ...endpointExceptionsPrivileges, ], }); + const fleetAllAuth = getAuthorizationFromPrivileges({ kibanaPrivileges: privileges.kibana, prefix: `${PLUGIN_ID}-all`, }); + const fleetReadAuth = getAuthorizationFromPrivileges({ + kibanaPrivileges: privileges.kibana, + prefix: `${PLUGIN_ID}-read`, + }); const intAllAuth = getAuthorizationFromPrivileges({ kibanaPrivileges: privileges.kibana, prefix: `${INTEGRATIONS_PLUGIN_ID}-all`, @@ -115,15 +131,56 @@ export async function getAuthzFromRequest(req: KibanaRequest): Promise', () => { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx index d4e5876761c36..a27fb82fb82b0 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx @@ -528,7 +528,7 @@ describe('', () => { await actions.completeStepOne({ name: TEMPLATE_NAME, indexPatterns: DEFAULT_INDEX_PATTERNS, - allowAutoCreate: true, + allowAutoCreate: 'TRUE', }); // Component templates await actions.completeStepTwo('test_component_template_1'); @@ -556,7 +556,7 @@ describe('', () => { body: JSON.stringify({ name: TEMPLATE_NAME, indexPatterns: DEFAULT_INDEX_PATTERNS, - allowAutoCreate: true, + allowAutoCreate: 'TRUE', dataStream: {}, _kbnMeta: { type: 'default', @@ -655,7 +655,7 @@ describe('', () => { }, index_patterns: DEFAULT_INDEX_PATTERNS, data_stream: {}, - allow_auto_create: false, + allow_auto_create: 'NO_OVERWRITE', }), }) ); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx index f6fea16442bfa..eb9e6c793aa5a 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx @@ -145,7 +145,7 @@ describe('', () => { name: 'test', indexPatterns: ['myPattern*'], version: 1, - allowAutoCreate: false, + allowAutoCreate: 'NO_OVERWRITE', dataStream: { hidden: true, anyUnknownKey: 'should_be_kept', @@ -210,7 +210,7 @@ describe('', () => { await actions.completeStepOne({ indexPatterns: UPDATED_INDEX_PATTERN, priority: 3, - allowAutoCreate: true, + allowAutoCreate: 'TRUE', }); // Component templates await actions.completeStepTwo(); @@ -265,7 +265,7 @@ describe('', () => { indexPatterns: UPDATED_INDEX_PATTERN, priority: 3, version: templateToEdit.version, - allowAutoCreate: true, + allowAutoCreate: 'TRUE', _kbnMeta: { type: 'default', hasDatastream: false, diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts index 745b2a69b9498..7977c4373d765 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts @@ -192,7 +192,17 @@ export const formSetup = async (initTestBed: SetupFunc) => { } if (allowAutoCreate) { - form.toggleEuiSwitch('allowAutoCreateField.input'); + let optionIndex = 0; + if (allowAutoCreate === 'TRUE') { + optionIndex = 1; + } + if (allowAutoCreate === 'FALSE') { + optionIndex = 2; + } + const radioGroup = find('allowAutoCreateField.input'); + const radioOption = radioGroup.childAt(optionIndex).find('input'); + radioOption.simulate('change', { target: { checked: true } }); + component.update(); } }); component.update(); diff --git a/x-pack/plugins/index_management/common/constants/allow_auto_create.ts b/x-pack/plugins/index_management/common/constants/allow_auto_create.ts new file mode 100644 index 0000000000000..6b83471735c94 --- /dev/null +++ b/x-pack/plugins/index_management/common/constants/allow_auto_create.ts @@ -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 { i18n } from '@kbn/i18n'; + +export const allowAutoCreateRadioIds = { + NO_OVERWRITE_RADIO_OPTION: 'NO_OVERWRITE', + TRUE_RADIO_OPTION: 'TRUE', + FALSE_RADIO_OPTION: 'FALSE', +}; + +export const allowAutoCreateRadioValues = { + [allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION]: undefined, + [allowAutoCreateRadioIds.TRUE_RADIO_OPTION]: true, + [allowAutoCreateRadioIds.FALSE_RADIO_OPTION]: false, +}; + +export const allowAutoCreateRadios = [ + { + id: allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION, + label: i18n.translate( + 'xpack.idxMgmt.templateForm.stepLogistics.allowAutoCreate.noOverwriteRadioOptionLabel', + { + defaultMessage: 'Do not overwrite cluster setting', + } + ), + }, + { + id: allowAutoCreateRadioIds.TRUE_RADIO_OPTION, + label: i18n.translate( + 'xpack.idxMgmt.templateForm.stepLogistics.allowAutoCreate.trueRadioOptionLabel', + { + defaultMessage: 'True', + } + ), + }, + { + id: allowAutoCreateRadioIds.FALSE_RADIO_OPTION, + label: i18n.translate( + 'xpack.idxMgmt.templateForm.stepLogistics.allowAutoCreate.falseRadioOptionLabel', + { + defaultMessage: 'False', + } + ), + }, +]; diff --git a/x-pack/plugins/index_management/common/constants/index.ts b/x-pack/plugins/index_management/common/constants/index.ts index efe9630a5f238..718775ed9167e 100644 --- a/x-pack/plugins/index_management/common/constants/index.ts +++ b/x-pack/plugins/index_management/common/constants/index.ts @@ -54,3 +54,4 @@ export { MAJOR_VERSION } from './plugin'; export { Section, IndexDetailsSection } from './home_sections'; export type { IndexDetailsTab, IndexDetailsTabId } from './home_sections'; +export * from './allow_auto_create'; diff --git a/x-pack/plugins/index_management/common/lib/template_serialization.test.ts b/x-pack/plugins/index_management/common/lib/template_serialization.test.ts new file mode 100644 index 0000000000000..8f9f73c334a9f --- /dev/null +++ b/x-pack/plugins/index_management/common/lib/template_serialization.test.ts @@ -0,0 +1,59 @@ +/* + * 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 { deserializeTemplate, serializeTemplate } from './template_serialization'; +import { TemplateDeserialized, TemplateSerialized } from '../types'; + +const defaultSerializedTemplate: TemplateSerialized = { + template: {}, + index_patterns: ['test'], + data_stream: {}, +}; + +const defaultDeserializedTemplate: TemplateDeserialized = { + name: 'my_template', + indexPatterns: ['test'], + _kbnMeta: { + type: 'default', + hasDatastream: true, + }, + allowAutoCreate: 'NO_OVERWRITE', +}; + +const allowAutoCreateRadioOptions = ['NO_OVERWRITE', 'TRUE', 'FALSE']; +const allowAutoCreateSerializedValues = [undefined, true, false]; + +describe('Template serialization', () => { + describe('serialization of allow_auto_create parameter', () => { + describe('deserializeTemplate()', () => { + allowAutoCreateSerializedValues.forEach((value, index) => { + test(`correctly deserializes ${value} value`, () => { + expect( + deserializeTemplate({ + ...defaultSerializedTemplate, + name: 'my_template', + allow_auto_create: value, + }) + ).toHaveProperty('allowAutoCreate', allowAutoCreateRadioOptions[index]); + }); + }); + }); + + describe('serializeTemplate()', () => { + allowAutoCreateRadioOptions.forEach((option, index) => { + test(`correctly serializes ${option} radio option`, () => { + expect( + serializeTemplate({ + ...defaultDeserializedTemplate, + allowAutoCreate: option, + }) + ).toHaveProperty('allow_auto_create', allowAutoCreateSerializedValues[index]); + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/index_management/common/lib/template_serialization.ts b/x-pack/plugins/index_management/common/lib/template_serialization.ts index 7467930e6f016..aacbc15aab3b8 100644 --- a/x-pack/plugins/index_management/common/lib/template_serialization.ts +++ b/x-pack/plugins/index_management/common/lib/template_serialization.ts @@ -13,6 +13,7 @@ import { TemplateType, } from '../types'; import { deserializeESLifecycle } from './data_stream_serialization'; +import { allowAutoCreateRadioValues, allowAutoCreateRadioIds } from '../constants'; const hasEntries = (data: object = {}) => Object.entries(data).length > 0; @@ -38,7 +39,7 @@ export function serializeTemplate(templateDeserialized: TemplateDeserialized): T data_stream: dataStream, composed_of: composedOf, ignore_missing_component_templates: ignoreMissingComponentTemplates, - allow_auto_create: allowAutoCreate, + allow_auto_create: allowAutoCreateRadioValues?.[allowAutoCreate], _meta, deprecated, }; @@ -83,7 +84,12 @@ export function deserializeTemplate( composedOf: composedOf ?? [], ignoreMissingComponentTemplates: ignoreMissingComponentTemplates ?? [], dataStream, - allowAutoCreate, + allowAutoCreate: + allowAutoCreate === true + ? allowAutoCreateRadioIds.TRUE_RADIO_OPTION + : allowAutoCreate === false + ? allowAutoCreateRadioIds.FALSE_RADIO_OPTION + : allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION, _meta, deprecated, _kbnMeta: { diff --git a/x-pack/plugins/index_management/common/types/templates.ts b/x-pack/plugins/index_management/common/types/templates.ts index 9205605c70010..b05a29a961a73 100644 --- a/x-pack/plugins/index_management/common/types/templates.ts +++ b/x-pack/plugins/index_management/common/types/templates.ts @@ -49,7 +49,7 @@ export interface TemplateDeserialized { ignoreMissingComponentTemplates?: string[]; version?: number; priority?: number; // Composable template only - allowAutoCreate?: boolean; + allowAutoCreate: string; order?: number; // Legacy template only ilmPolicy?: { name: string; diff --git a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx index 5307852d3c9e3..84cb0fa027ad1 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx @@ -13,6 +13,7 @@ import { EuiButtonEmpty, EuiSpacer, EuiLink, + EuiCode, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; @@ -27,11 +28,13 @@ import { Forms, JsonEditorField, NumericField, + RadioGroupField, } from '../../../../shared_imports'; import { UnitField, timeUnits } from '../../shared'; import { DataRetention } from '../../../../../common'; import { documentationService } from '../../../services/documentation'; import { schemas, nameConfig, nameConfigWithoutValidations } from '../template_form_schemas'; +import { allowAutoCreateRadios } from '../../../../../common/constants'; // Create or Form components with partial props that are common to all instances const UseField = getUseField({ component: Field }); @@ -132,12 +135,15 @@ function getFieldsMeta(esDocsBase: string) { title: i18n.translate('xpack.idxMgmt.templateForm.stepLogistics.allowAutoCreateTitle', { defaultMessage: 'Allow auto create', }), - description: i18n.translate( - 'xpack.idxMgmt.templateForm.stepLogistics.allowAutoCreateDescription', - { - defaultMessage: - 'Indices can be automatically created even if auto-creation of indices is disabled via actions.auto_create_index.', - } + description: ( + action.auto_create_index, + true: true, + }} + /> ), testSubject: 'allowAutoCreateField', }, @@ -399,7 +405,14 @@ export const StepLogistics: React.FunctionComponent = React.memo( )} diff --git a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx index 7d01966d207e9..58072fd728c5c 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx @@ -22,6 +22,7 @@ import { EuiCodeBlock, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { allowAutoCreateRadioIds } from '../../../../../common/constants'; import { serializers } from '../../../../shared_imports'; import { serializeLegacyTemplate, serializeTemplate } from '../../../../../common/lib'; @@ -192,19 +193,30 @@ export const StepReview: React.FunctionComponent = React.memo( {/* Allow auto create */} - {isLegacy !== true && ( - <> - - - - - {getDescriptionText(allowAutoCreate)} - - - )} + {isLegacy !== true && + allowAutoCreate !== allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION && ( + <> + + + + + {allowAutoCreate === allowAutoCreateRadioIds.TRUE_RADIO_OPTION ? ( + + ) : ( + + )} + + + )} {/* components */} {isLegacy !== true && ( diff --git a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx index 7796452a62afe..be1fdbaa47315 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx @@ -11,6 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiSpacer, EuiButton, EuiPageHeader } from '@elastic/eui'; import { ScopedHistory } from '@kbn/core/public'; +import { allowAutoCreateRadioIds } from '../../../../common/constants'; import { TemplateDeserialized } from '../../../../common'; import { serializers, Forms, GlobalFlyout } from '../../../shared_imports'; import { @@ -123,6 +124,7 @@ export const TemplateForm = ({ hasDatastream: false, isLegacy, }, + allowAutoCreate: allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION, }; const { diff --git a/x-pack/plugins/index_management/public/application/components/template_form/template_form_schemas.tsx b/x-pack/plugins/index_management/public/application/components/template_form/template_form_schemas.tsx index 383b60c365086..dec31faad794a 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/template_form_schemas.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/template_form_schemas.tsx @@ -20,6 +20,7 @@ import { } from '../../../shared_imports'; import { + allowAutoCreateRadioIds, INVALID_INDEX_PATTERN_CHARS, INVALID_TEMPLATE_NAME_CHARS, } from '../../../../common/constants'; @@ -238,11 +239,11 @@ export const schemas: Record = { }, allowAutoCreate: { - type: FIELD_TYPES.TOGGLE, + type: FIELD_TYPES.RADIO_GROUP, label: i18n.translate('xpack.idxMgmt.templateForm.stepLogistics.fieldAllowAutoCreateLabel', { - defaultMessage: 'Allow auto create (optional)', + defaultMessage: 'Allow auto create', }), - defaultValue: false, + defaultValue: allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION, }, _meta: { label: i18n.translate('xpack.idxMgmt.templateForm.stepLogistics.metaFieldEditorLabel', { diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx index 492c6f426acd5..3f451217f8413 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx @@ -25,6 +25,7 @@ import { getLifecycleValue } from '../../../../../lib/data_streams'; import { TemplateDeserialized } from '../../../../../../../common'; import { ILM_PAGES_POLICY_EDIT } from '../../../../../constants'; import { useIlmLocator } from '../../../../../services/use_ilm_locator'; +import { allowAutoCreateRadioIds } from '../../../../../../../common/constants'; interface Props { templateDetails: TemplateDeserialized; @@ -216,19 +217,22 @@ export const TabSummary: React.FunctionComponent = ({ templateDetails }) )} {/* Allow auto create */} - {isLegacy !== true && ( - <> - - - - - {allowAutoCreate ? i18nTexts.yes : i18nTexts.no} - - - )} + {isLegacy !== true && + allowAutoCreate !== allowAutoCreateRadioIds.NO_OVERWRITE_RADIO_OPTION && ( + <> + + + + + {allowAutoCreate === allowAutoCreateRadioIds.TRUE_RADIO_OPTION + ? i18nTexts.yes + : i18nTexts.no} + + + )} diff --git a/x-pack/plugins/index_management/public/shared_imports.ts b/x-pack/plugins/index_management/public/shared_imports.ts index 3630cb7758e67..9bec64d46b21c 100644 --- a/x-pack/plugins/index_management/public/shared_imports.ts +++ b/x-pack/plugins/index_management/public/shared_imports.ts @@ -67,6 +67,7 @@ export { NumericField, JsonEditorField, ComboBoxField, + RadioGroupField, } from '@kbn/es-ui-shared-plugin/static/forms/components'; export { isJSON } from '@kbn/es-ui-shared-plugin/static/validators/string'; diff --git a/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts b/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts index 792e0c75c9b28..782277d3abc03 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts @@ -13,7 +13,7 @@ export const templateSchema = schema.object({ version: schema.maybe(schema.number()), order: schema.maybe(schema.number()), priority: schema.maybe(schema.number()), - allowAutoCreate: schema.maybe(schema.boolean()), + allowAutoCreate: schema.string(), template: schema.maybe( schema.object({ settings: schema.maybe(schema.object({}, { unknowns: 'allow' })), diff --git a/x-pack/plugins/index_management/test/fixtures/template.ts b/x-pack/plugins/index_management/test/fixtures/template.ts index f7db386095b07..ca7f625d61bb9 100644 --- a/x-pack/plugins/index_management/test/fixtures/template.ts +++ b/x-pack/plugins/index_management/test/fixtures/template.ts @@ -22,7 +22,7 @@ export const getComposableTemplate = ({ hasDatastream = false, isLegacy = false, type = 'default', - allowAutoCreate = false, + allowAutoCreate = 'NO_OVERWRITE', composedOf = [], }: Partial< TemplateDeserialized & { @@ -70,7 +70,7 @@ export const getTemplate = ({ hasDatastream = false, isLegacy = false, type = 'default', - allowAutoCreate = false, + allowAutoCreate = 'NO_OVERWRITE', }: Partial< TemplateDeserialized & { isLegacy?: boolean; diff --git a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx index 2acbd21632f2a..c780cd62b05ed 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx @@ -212,6 +212,7 @@ export const PipelineTable: FunctionComponent = ({ ], box: { incremental: true, + 'data-test-subj': 'pipelineTableSearch', }, filters: [ { diff --git a/x-pack/plugins/lens/public/app_plugin/save_modal.tsx b/x-pack/plugins/lens/public/app_plugin/save_modal.tsx index 48dce06f08b4c..cbab6d4e06a89 100644 --- a/x-pack/plugins/lens/public/app_plugin/save_modal.tsx +++ b/x-pack/plugins/lens/public/app_plugin/save_modal.tsx @@ -111,7 +111,7 @@ export const SaveModal = (props: Props) => { managed ? i18n.translate('xpack.lens.app.mustCopyOnSave', { defaultMessage: - 'This visualization is managed by Elastic. Changes here must be saved to a new visualization.', + 'Elastic manages this visualization. Save any changes to a new visualization.', }) : undefined } diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx index 06a118dc165ce..26703a2eebbf3 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx @@ -17,7 +17,7 @@ import { insertOrReplaceFormulaColumn } from './parse'; import type { FormBasedLayer } from '../../../types'; import { IndexPattern } from '../../../../../types'; import { TermsIndexPatternColumn } from '../terms'; -import { MovingAverageIndexPatternColumn } from '../calculations'; +import type { MovingAverageIndexPatternColumn } from '../calculations'; import { StaticValueIndexPatternColumn } from '../static_value'; import { getFilter } from '../helpers'; import { createOperationDefinitionMock } from './mocks/operation_mocks'; @@ -43,6 +43,7 @@ const operationDefinitionMap: Record = { terms: createOperationDefinitionMock('terms', {}, { scale: 'ordinal' }), sum: createOperationDefinitionMock('sum', { filterable: true }), last_value: createOperationDefinitionMock('last_value', { + input: 'field', getPossibleOperationForField: jest.fn(({ type }) => ({ scale: type === 'string' ? 'ordinal' : 'ratio', isBucketed: false, @@ -54,14 +55,14 @@ const operationDefinitionMap: Record = { filterable: true, canReduceTimeRange: true, }), - derivative: createOperationDefinitionMock('derivative', { input: 'fullReference' }), - moving_average: createOperationDefinitionMock('moving_average', { - // @ts-expect-error upgrade typescript v4.9.5 + derivative: createOperationDefinitionMock('derivative', { + input: 'fullReference', + }), + moving_average: createOperationDefinitionMock('moving_average', { input: 'fullReference', operationParams: [{ name: 'window', type: 'number', required: true }], filterable: true, getErrorMessage: jest.fn(() => ['mock error']), - // @ts-expect-error upgrade typescript v4.9.5 buildColumn: ({ referenceIds }, columnsParams) => ({ label: 'moving_average', dataType: 'number', @@ -74,7 +75,9 @@ const operationDefinitionMap: Record = { filter: getFilter(undefined, columnsParams), }), }), - cumulative_sum: createOperationDefinitionMock('cumulative_sum', { input: 'fullReference' }), + cumulative_sum: createOperationDefinitionMock('cumulative_sum', { + input: 'fullReference', + }), interval: createOperationDefinitionMock('interval', { input: 'managedReference', usedInMath: true, diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts index 74d3236aa17c5..2e9c0acd41485 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts @@ -21,14 +21,14 @@ type OperationByInputType = E { input: Input } >; -export function createOperationDefinitionMock( +export function createOperationDefinitionMock( operation: string, { input = 'field', getErrorMessage, buildColumn, ...params - }: Partial = {}, + }: Partial> = {}, { label = operation, dataType = 'number', @@ -81,13 +81,11 @@ export function createOperationDefinitionMock( return { buildColumn: buildColumn ?? - jest.fn(({ referenceIds }, columnParams: PartialColumnParams) => ({ + jest.fn(({ referenceIds }, columnParams: PartialColumnParams | undefined) => ({ references: referenceIds, filter: getFilter(undefined, columnParams), ...sharedColumnParams, })), - onFieldChange: jest.fn(), - toEsAggsFn: jest.fn(), getPossibleOperation: jest.fn(() => ({ scale: 'ratio', dataType: 'number', diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts index fd6b68c2bf65d..c7f8ed1e6923d 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts @@ -731,11 +731,13 @@ export type OperationType = string; * This is an operation definition of an unspecified column out of all possible * column types. */ -export type GenericOperationDefinition = - | OperationDefinition - | OperationDefinition - | OperationDefinition - | OperationDefinition; +export type GenericOperationDefinition< + ColumnType extends BaseIndexPatternColumn = BaseIndexPatternColumn +> = + | OperationDefinition + | OperationDefinition + | OperationDefinition + | OperationDefinition; /** * List of all available operation definitions diff --git a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts index 32e1ac52085a2..9a19a8fa2f16d 100644 --- a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts +++ b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts @@ -8,12 +8,12 @@ import type { HasParentApi, HasType, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, PublishesPanelTitle, } from '@kbn/presentation-publishing'; import { apiIsOfType, - apiPublishesLocalUnifiedSearch, + apiPublishesUnifiedSearch, apiPublishesPanelTitle, } from '@kbn/presentation-publishing'; import { LensSavedObjectAttributes } from '../embeddable'; @@ -24,7 +24,7 @@ export type HasLensConfig = HasType<'lens'> & { export type LensApi = HasLensConfig & PublishesPanelTitle & - PublishesLocalUnifiedSearch & + PublishesUnifiedSearch & Partial>; export const isLensApi = (api: unknown): api is LensApi => { @@ -33,6 +33,6 @@ export const isLensApi = (api: unknown): api is LensApi => { apiIsOfType(api, 'lens') && typeof (api as HasLensConfig).getSavedVis === 'function' && apiPublishesPanelTitle(api) && - apiPublishesLocalUnifiedSearch(api) + apiPublishesUnifiedSearch(api) ); }; diff --git a/x-pack/plugins/lens/readme.md b/x-pack/plugins/lens/readme.md index fc2fd5df4c85a..776718e1b9e48 100644 --- a/x-pack/plugins/lens/readme.md +++ b/x-pack/plugins/lens/readme.md @@ -236,8 +236,8 @@ Run all tests from the `x-pack` root directory - Run `node scripts/functional_tests_server` - Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.ts --grep=Lens` - Performance journeys: - - Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts` - - Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts` + - Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts` + - Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts` ## Developing tips diff --git a/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts b/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts index caf7e6d8da62b..de8818ae7a9a3 100644 --- a/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts +++ b/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts @@ -7,39 +7,24 @@ interface Cluster { monitor_ml: boolean; - manage_ccr: boolean; manage_index_templates: boolean; - monitor_watcher: boolean; monitor_transform: boolean; - read_ilm: boolean; manage_security: boolean; manage_own_api_key: boolean; - manage_saml: boolean; all: boolean; - manage_ilm: boolean; - manage_ingest_pipelines: boolean; - read_ccr: boolean; - manage_rollup: boolean; monitor: boolean; - manage_watcher: boolean; manage: boolean; manage_transform: boolean; manage_api_key: boolean; - manage_token: boolean; manage_ml: boolean; manage_pipeline: boolean; - monitor_rollup: boolean; - transport_client: boolean; - create_snapshot: boolean; } interface Index { [indexName: string]: { all: boolean; - manage_ilm: boolean; read: boolean; create_index: boolean; - read_cross_cluster: boolean; index: boolean; monitor: boolean; delete: boolean; @@ -48,8 +33,6 @@ interface Index { create_doc: boolean; view_index_metadata: boolean; create: boolean; - manage_follow_index: boolean; - manage_leader_index: boolean; maintenance: boolean; write: boolean; }; @@ -80,30 +63,17 @@ export const getReadPrivilegeMock = ( application: {}, cluster: { all: booleanValues, - create_snapshot: booleanValues, manage: booleanValues, manage_api_key: booleanValues, - manage_ccr: booleanValues, - manage_ilm: booleanValues, manage_index_templates: booleanValues, - manage_ingest_pipelines: booleanValues, manage_ml: booleanValues, manage_own_api_key: booleanValues, manage_pipeline: booleanValues, - manage_rollup: booleanValues, - manage_saml: booleanValues, manage_security: booleanValues, - manage_token: booleanValues, manage_transform: booleanValues, - manage_watcher: booleanValues, monitor: booleanValues, monitor_ml: booleanValues, - monitor_rollup: booleanValues, monitor_transform: booleanValues, - monitor_watcher: booleanValues, - read_ccr: booleanValues, - read_ilm: booleanValues, - transport_client: booleanValues, }, has_all_requested: booleanValues, index: { @@ -117,12 +87,8 @@ export const getReadPrivilegeMock = ( index: booleanValues, maintenance: booleanValues, manage: booleanValues, - manage_follow_index: booleanValues, - manage_ilm: booleanValues, - manage_leader_index: booleanValues, monitor: booleanValues, read: booleanValues, - read_cross_cluster: booleanValues, view_index_metadata: booleanValues, write: booleanValues, }, @@ -133,30 +99,17 @@ export const getReadPrivilegeMock = ( application: {}, cluster: { all: booleanValues, - create_snapshot: booleanValues, manage: booleanValues, manage_api_key: booleanValues, - manage_ccr: booleanValues, - manage_ilm: booleanValues, manage_index_templates: booleanValues, - manage_ingest_pipelines: booleanValues, manage_ml: booleanValues, manage_own_api_key: booleanValues, manage_pipeline: booleanValues, - manage_rollup: booleanValues, - manage_saml: booleanValues, manage_security: booleanValues, - manage_token: booleanValues, manage_transform: booleanValues, - manage_watcher: booleanValues, monitor: booleanValues, monitor_ml: booleanValues, - monitor_rollup: booleanValues, monitor_transform: booleanValues, - monitor_watcher: booleanValues, - read_ccr: booleanValues, - read_ilm: booleanValues, - transport_client: booleanValues, }, has_all_requested: booleanValues, index: { @@ -170,12 +123,8 @@ export const getReadPrivilegeMock = ( index: booleanValues, maintenance: booleanValues, manage: booleanValues, - manage_follow_index: booleanValues, - manage_ilm: booleanValues, - manage_leader_index: booleanValues, monitor: booleanValues, read: booleanValues, - read_cross_cluster: booleanValues, view_index_metadata: booleanValues, write: booleanValues, }, diff --git a/x-pack/plugins/maps/public/embeddable/map_api.ts b/x-pack/plugins/maps/public/embeddable/map_api.ts index 171816289a8af..bd20c45721a49 100644 --- a/x-pack/plugins/maps/public/embeddable/map_api.ts +++ b/x-pack/plugins/maps/public/embeddable/map_api.ts @@ -10,11 +10,11 @@ import type { HasType, PublishesDataViews, PublishesPanelTitle, - PublishesLocalUnifiedSearch, + PublishesUnifiedSearch, } from '@kbn/presentation-publishing'; import { apiIsOfType, - apiPublishesLocalUnifiedSearch, + apiPublishesUnifiedSearch, apiPublishesPanelTitle, } from '@kbn/presentation-publishing'; import type { ILayer } from '../classes/layers/layer'; @@ -23,7 +23,7 @@ export type MapApi = HasType<'map'> & { getLayerList: () => ILayer[]; } & PublishesDataViews & PublishesPanelTitle & - PublishesLocalUnifiedSearch & + PublishesUnifiedSearch & Partial>; export const isMapApi = (api: unknown): api is MapApi => { @@ -32,6 +32,6 @@ export const isMapApi = (api: unknown): api is MapApi => { apiIsOfType(api, 'map') && typeof (api as MapApi).getLayerList === 'function' && apiPublishesPanelTitle(api) && - apiPublishesLocalUnifiedSearch(api) + apiPublishesUnifiedSearch(api) ); }; diff --git a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx index c40157fbbe68e..e6d317b5aa1e8 100644 --- a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx @@ -492,8 +492,7 @@ export class MapApp extends React.Component { ? [ getManagedContentBadge( i18n.translate('xpack.maps.mapController.managedMapDescriptionTooltip', { - defaultMessage: - 'This map is managed by Elastic. Changes here must be saved to a new map.', + defaultMessage: 'Elastic manages this map. Save any changes to a new map.', }) ), ] diff --git a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx index cb55d0b71f899..0aabdf877cd42 100644 --- a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx @@ -243,8 +243,7 @@ export function getTopNavConfig({ mustCopyOnSaveMessage={ savedMap.isManaged() ? i18n.translate('xpack.maps.topNav.mustCopyOnSaveMessage', { - defaultMessage: - 'This map is managed by Elastic. Changes here must be saved to a new map.', + defaultMessage: 'Elastic manages this map. Save any changes to a new map.', }) : undefined } diff --git a/x-pack/plugins/ml/common/constants/jobs_list.ts b/x-pack/plugins/ml/common/constants/jobs_list.ts index 4667177890623..76cb0d83c7923 100644 --- a/x-pack/plugins/ml/common/constants/jobs_list.ts +++ b/x-pack/plugins/ml/common/constants/jobs_list.ts @@ -7,6 +7,8 @@ export const DEFAULT_REFRESH_INTERVAL_MS = 30000; export const MINIMUM_REFRESH_INTERVAL_MS = 1000; -export const DELETING_JOBS_REFRESH_INTERVAL_MS = 2000; +export const BLOCKED_JOBS_REFRESH_INTERVAL_MS = 2000; +export const BLOCKED_JOBS_REFRESH_INTERVAL_SLOW_MS = 120000; // 2mins +export const BLOCKED_JOBS_REFRESH_THRESHOLD_MS = 60000; // 1min export const RESETTING_JOBS_REFRESH_INTERVAL_MS = 1000; export const PROGRESS_JOBS_REFRESH_INTERVAL_MS = 2000; diff --git a/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/register_anomaly_detection_rule.tsx b/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/register_anomaly_detection_rule.tsx index 6c69f6e54b6f2..be111830d5344 100644 --- a/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/register_anomaly_detection_rule.tsx +++ b/x-pack/plugins/ml/public/alerting/anomaly_detection_rule/register_anomaly_detection_rule.tsx @@ -22,6 +22,8 @@ export function registerAnomalyDetectionRule( getStartServices: MlCoreSetup['getStartServices'], mlCapabilities: MlCapabilities ) { + const MlAlertTrigger = lazy(() => import('./ml_anomaly_alert_trigger')); + triggersActionsUi.ruleTypeRegistry.register({ id: ML_ALERT_TYPES.ANOMALY_DETECTION, description: i18n.translate('xpack.ml.alertTypes.anomalyDetection.description', { @@ -32,7 +34,6 @@ export function registerAnomalyDetectionRule( return docLinks.links.ml.alertingRules; }, ruleParamsExpression: (props: RuleTypeParamsExpressionProps) => { - const MlAlertTrigger = lazy(() => import('./ml_anomaly_alert_trigger')); return ( = ({ coreStart, deps, appMountParams, isServerless, mlFe const services: StartServices = useMemo(() => { return { + ...coreStart, cases: deps.cases, charts: deps.charts, contentManagement: deps.contentManagement, @@ -124,7 +125,6 @@ const App: FC = ({ coreStart, deps, appMountParams, isServerless, mlFe uiActions: deps.uiActions, unifiedSearch: deps.unifiedSearch, usageCollection: deps.usageCollection, - ...coreStart, mlServices: getMlGlobalServices(coreStart.http, deps.data.dataViews, deps.usageCollection), }; }, [deps, coreStart]); diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx index 3ff17c8bd61a3..1626a8d3ec661 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx @@ -24,7 +24,7 @@ import { import { i18n } from '@kbn/i18n'; import { deleteJobs } from '../utils'; -import { DELETING_JOBS_REFRESH_INTERVAL_MS } from '../../../../../../common/constants/jobs_list'; +import { BLOCKED_JOBS_REFRESH_INTERVAL_MS } from '../../../../../../common/constants/jobs_list'; import { DeleteSpaceAwareItemCheckModal } from '../../../../components/delete_space_aware_item_check_modal'; import type { MlSummaryJob } from '../../../../../../common/types/anomaly_detection_jobs'; import { isManagedJob } from '../../../jobs_utils'; @@ -91,7 +91,7 @@ export const DeleteJobModal: FC = ({ setShowFunction, unsetShowFunction, setTimeout(() => { closeModal(); refreshJobs(); - }, DELETING_JOBS_REFRESH_INTERVAL_MS); + }, BLOCKED_JOBS_REFRESH_INTERVAL_MS); }, [jobIds, deleteUserAnnotations, deleteAlertingRules, closeModal, refreshJobs]); if (modalVisible === false || jobIds.length === 0) { diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js index 97d32ebe0dc60..40df5bd90915b 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js @@ -26,7 +26,11 @@ import { JobsAwaitingNodeWarning } from '../../../../components/jobs_awaiting_no import { SavedObjectsWarning } from '../../../../components/saved_objects_warning'; import { UpgradeWarning } from '../../../../components/upgrade'; -import { DELETING_JOBS_REFRESH_INTERVAL_MS } from '../../../../../../common/constants/jobs_list'; +import { + BLOCKED_JOBS_REFRESH_INTERVAL_MS, + BLOCKED_JOBS_REFRESH_INTERVAL_SLOW_MS, + BLOCKED_JOBS_REFRESH_THRESHOLD_MS, +} from '../../../../../../common/constants/jobs_list'; import { JobListMlAnomalyAlertFlyout } from '../../../../../alerting/ml_alerting_flyout'; import { StopDatafeedsConfirmModal } from '../confirm_modals/stop_datafeeds_confirm_modal'; import { CloseJobsConfirmModal } from '../confirm_modals/close_jobs_confirm_modal'; @@ -49,6 +53,7 @@ export class JobsListView extends Component { itemIdToExpandedRowMap: {}, filterClauses: [], blockingJobIds: [], + blockingJobsFirstFoundMs: null, jobsAwaitingNodeCount: 0, }; @@ -350,14 +355,17 @@ export class JobsListView extends Component { }); this.isDoneRefreshing(); - if ( - blockingJobsRefreshTimeout === null && - jobsSummaryList.some((j) => j.blocked !== undefined) - ) { + if (jobsSummaryList.some((j) => j.blocked !== undefined)) { // if there are some jobs in a deleting state, start polling for // deleting jobs so we can update the jobs list once the // deleting tasks are over this.checkBlockingJobTasks(true); + if (this.state.blockingJobsFirstFoundMs === null) { + // keep a record of when the first blocked job was found + this.setState({ blockingJobsFirstFoundMs: Date.now() }); + } + } else { + this.setState({ blockingJobsFirstFoundMs: null }); } } catch (error) { console.error(error); @@ -366,7 +374,7 @@ export class JobsListView extends Component { } async checkBlockingJobTasks(forceRefresh = false) { - if (this._isMounted === false) { + if (this._isMounted === false || blockingJobsRefreshTimeout !== null) { return; } @@ -384,12 +392,22 @@ export class JobsListView extends Component { this.refreshJobSummaryList(); } - if (blockingJobIds.length > 0 && blockingJobsRefreshTimeout === null) { + if (this.state.blockingJobsFirstFoundMs !== null || blockingJobIds.length > 0) { blockingJobsRefreshTimeout = setTimeout(() => { blockingJobsRefreshTimeout = null; this.checkBlockingJobTasks(); - }, DELETING_JOBS_REFRESH_INTERVAL_MS); + }, this.getBlockedJobsRefreshInterval()); + } + } + + getBlockedJobsRefreshInterval() { + const runningTimeMs = Date.now() - this.state.blockingJobsFirstFoundMs; + if (runningTimeMs > BLOCKED_JOBS_REFRESH_THRESHOLD_MS) { + // if the jobs have been in a blocked state for more than a minute + // increase the polling interval + return BLOCKED_JOBS_REFRESH_INTERVAL_SLOW_MS; } + return BLOCKED_JOBS_REFRESH_INTERVAL_MS; } renderJobsListComponents() { diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts index e8d6d890a0a0c..27490eff19991 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts @@ -81,7 +81,7 @@ export async function getJobsItemsFromEmbeddable(embeddable: LensApi, lens?: Len ? (embeddable.parentApi as DashboardAPI) : undefined; - const timeRange = embeddable.localTimeRange?.value ?? dashboardApi?.localTimeRange?.value; + const timeRange = embeddable.timeRange$?.value ?? dashboardApi?.timeRange$?.value; if (timeRange === undefined) { throw Error( i18n.translate('xpack.ml.newJob.fromLens.createJob.error.noTimeRange', { @@ -104,8 +104,8 @@ export async function getJobsItemsFromEmbeddable(embeddable: LensApi, lens?: Len chartInfo: await getChartInfoFromVisualization(lens, vis), from: timeRange.from, to: timeRange.to, - query: (dashboardApi?.localQuery?.value as Query) ?? { query: '', language: 'kuery' }, - filters: dashboardApi?.localFilters?.value ?? [], + query: (dashboardApi?.query$?.value as Query) ?? { query: '', language: 'kuery' }, + filters: dashboardApi?.filters$?.value ?? [], dashboard: dashboardApi, }; } diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/quick_create_job.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/quick_create_job.ts index cf4d4a35545ae..82a22a854af02 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/quick_create_job.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/quick_create_job.ts @@ -80,8 +80,8 @@ export class QuickGeoJobCreator extends QuickJobCreatorBase { } = await getJobsItemsFromEmbeddable(embeddable); // Map level stuff - const embeddableQuery = (embeddable.localQuery?.value as Query) ?? getDefaultQuery(); - const embeddableFilters = embeddable.localFilters?.value ?? []; + const embeddableQuery = (embeddable.query$?.value as Query) ?? getDefaultQuery(); + const embeddableFilters = embeddable.filters$?.value ?? []; if (dashboardQuery === undefined || dashboardFilters === undefined) { throw new Error('Cannot create job, query and filters are undefined'); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/utils.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/utils.ts index 5fe0c3bc0846e..307306734d142 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/utils.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_map/utils.ts @@ -22,8 +22,8 @@ export async function redirectToGeoJobWizard( share: SharePluginStart ) { const { query, filters, to, from } = await getJobsItemsFromEmbeddable(embeddable); - const embeddableQuery = embeddable.localQuery?.value; - const embeddableFilters = embeddable.localFilters?.value ?? []; + const embeddableQuery = embeddable.query$?.value; + const embeddableFilters = embeddable.filters$?.value ?? []; const locator = share.url.locators.get(ML_APP_LOCATOR); const pageState = { @@ -55,7 +55,7 @@ export async function getJobsItemsFromEmbeddable(embeddable: MapApi) { const dashboardApi = apiIsOfType(embeddable.parentApi, 'dashboard') ? (embeddable.parentApi as DashboardAPI) : undefined; - const timeRange = embeddable.localTimeRange?.value ?? dashboardApi?.localTimeRange?.value; + const timeRange = embeddable.timeRange$?.value ?? dashboardApi?.timeRange$?.value; if (timeRange === undefined) { throw Error( i18n.translate('xpack.ml.newJob.fromGeo.createJob.error.noTimeRange', { @@ -66,8 +66,8 @@ export async function getJobsItemsFromEmbeddable(embeddable: MapApi) { return { from: timeRange.from, to: timeRange.to, - query: (dashboardApi?.localQuery?.value as Query) ?? { query: '', language: 'kuery' }, - filters: dashboardApi?.localFilters?.value ?? [], + query: (dashboardApi?.query$?.value as Query) ?? { query: '', language: 'kuery' }, + filters: dashboardApi?.filters$?.value ?? [], dashboard: dashboardApi, }; } diff --git a/x-pack/plugins/ml/public/embeddables/job_creation/lens/lens_vis_layer_selection_flyout/layer/compatible_layer.tsx b/x-pack/plugins/ml/public/embeddables/job_creation/lens/lens_vis_layer_selection_flyout/layer/compatible_layer.tsx index 3c9eefd47370a..7e0ffe677510f 100644 --- a/x-pack/plugins/ml/public/embeddables/job_creation/lens/lens_vis_layer_selection_flyout/layer/compatible_layer.tsx +++ b/x-pack/plugins/ml/public/embeddables/job_creation/lens/lens_vis_layer_selection_flyout/layer/compatible_layer.tsx @@ -73,7 +73,7 @@ export const CompatibleLayer: FC = ({ layer, layerIndex, embeddable }) => diff --git a/x-pack/plugins/ml/public/embeddables/job_creation/map/map_vis_layer_selection_flyout/layer/compatible_layer.tsx b/x-pack/plugins/ml/public/embeddables/job_creation/map/map_vis_layer_selection_flyout/layer/compatible_layer.tsx index c5b8c69e72be3..b5f3f30420188 100644 --- a/x-pack/plugins/ml/public/embeddables/job_creation/map/map_vis_layer_selection_flyout/layer/compatible_layer.tsx +++ b/x-pack/plugins/ml/public/embeddables/job_creation/map/map_vis_layer_selection_flyout/layer/compatible_layer.tsx @@ -143,7 +143,7 @@ export const CompatibleLayer: FC = ({ embeddable, layer, layerIndex }) => layerIndex={layerIndex} createADJob={createGeoJob} createADJobInWizard={createGeoJobInWizard} - timeRange={embeddable.localTimeRange?.value} + timeRange={embeddable.timeRange$?.value} incomingCreateError={createError} > <> diff --git a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts index ec4ab6e170856..0d0917c9dd7d9 100644 --- a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts +++ b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts @@ -27,6 +27,7 @@ import { import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; import { ALERT_REASON, ALERT_URL } from '@kbn/rule-data-utils'; import type { MlJob } from '@elastic/elasticsearch/lib/api/types'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { getAnomalyDescription } from '../../../common/util/anomaly_description'; import { getMetricChangeDescription } from '../../../common/util/metric_change_description'; import type { MlClient } from '../ml_client'; @@ -52,7 +53,6 @@ import { resolveMaxTimeInterval } from '../../../common/util/job_utils'; import { getTopNBuckets, resolveLookbackInterval } from '../../../common/util/alerts'; import type { DatafeedsService } from '../../models/job_service/datafeeds'; import type { FieldFormatsRegistryProvider } from '../../../common/types/kibana'; -import type { AwaitReturnType } from '../../../common/types/common'; import { getTypicalAndActualValues } from '../../models/results_service/results_service'; import type { GetDataViewsService } from '../data_views_utils'; @@ -175,6 +175,15 @@ const resultTypeScoreMapping = { [ML_ANOMALY_RESULT_TYPE.INFLUENCER]: 'influencer_score', }; +export interface AnomalyDetectionAlertFieldFormatters { + numberFormatter: IFieldFormat['convert']; + fieldFormatters: Record; +} + +export interface AnomalyDetectionRuleState { + contextFieldFormatters?: AnomalyDetectionAlertFieldFormatters; +} + /** * Alerting related server-side methods * @param mlClient @@ -186,10 +195,10 @@ export function alertingServiceProvider( getFieldsFormatRegistry: FieldFormatsRegistryProvider, getDataViewsService: GetDataViewsService ) { - type FieldFormatters = AwaitReturnType>; - let jobs: MlJob[] = []; + let contextFieldFormatters: AnomalyDetectionAlertFieldFormatters | undefined; + /** * Provides formatters based on the data view of the datafeed index pattern * and set of default formatters for fallback. @@ -208,10 +217,13 @@ export function alertingServiceProvider( }, {} as Record) : {}; - return { + // store formatters to pass to the executor state update + contextFieldFormatters = { numberFormatter: numberFormatter.convert.bind(numberFormatter), fieldFormatters, }; + + return contextFieldFormatters; }); /** @@ -223,7 +235,7 @@ export function alertingServiceProvider( const dataViewsService = await getDataViewsService(); const dataViews = await dataViewsService.find(indexPattern); - const dataView = dataViews.find(({ title }) => title === indexPattern); + const dataView = dataViews.find((dView) => dView.getIndexPattern() === indexPattern); if (!dataView) return; @@ -550,7 +562,7 @@ export function alertingServiceProvider( const getResultsToContextFormatter = ( resultType: MlAnomalyResultType, useInitialScore: boolean = false, - formatters: FieldFormatters + formatters: AnomalyDetectionAlertFieldFormatters ) => { const resultsLabel = getAggResultsLabel(resultType); return (v: AggResultsResponse): AlertExecutionResult | undefined => { @@ -719,7 +731,8 @@ export function alertingServiceProvider( const resultsLabel = getAggResultsLabel(params.resultType); - const fieldsFormatters = await getFormatters(datafeeds![0]!.indices[0]); + const fieldsFormatters = + contextFieldFormatters ?? (await getFormatters(datafeeds![0]!.indices[0])); const formatter = getResultsToContextFormatter( params.resultType, @@ -926,7 +939,7 @@ export function alertingServiceProvider( | { payload: AnomalyDetectionAlertPayload; context: AnomalyDetectionAlertContext; name: string } | undefined > => { - const formatters = await getFormatters(indexPattern); + const formatters = contextFieldFormatters ?? (await getFormatters(indexPattern)); const context = getResultsToContextFormatter(resultType, false, formatters)(value); const payload = getResultsToPayloadFormatter(resultType, false)(value); @@ -963,13 +976,15 @@ export function alertingServiceProvider( */ execute: async ( params: MlAnomalyDetectionAlertParams, - spaceId: string + spaceId: string, + state?: AnomalyDetectionRuleState ): Promise< | { payload: AnomalyDetectionAlertPayload; context: AnomalyDetectionAlertContext; name: string; isHealthy: boolean; + stateUpdate: AnomalyDetectionRuleState; } | undefined > => { @@ -981,10 +996,18 @@ export function alertingServiceProvider( const result = await fetchResult(queryParams); + if (state && isPopulatedObject(state?.contextFieldFormatters)) { + contextFieldFormatters = state.contextFieldFormatters; + } + const formattedResult = result ? await getFormatted(queryParams.indexPattern, queryParams.resultType, spaceId, result) : undefined; + const stateUpdate: AnomalyDetectionRuleState = { + contextFieldFormatters, + }; + if (!formattedResult) { // If no anomalies found, report as recovered. @@ -1032,6 +1055,7 @@ export function alertingServiceProvider( jobIds: queryParams.jobIds, message: contextMessage, } as AnomalyDetectionAlertContext, + stateUpdate, }; } @@ -1040,6 +1064,7 @@ export function alertingServiceProvider( payload: formattedResult.payload, name: formattedResult.name, isHealthy: false, + stateUpdate, }; }, /** diff --git a/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts b/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts index a1ca450d18567..a2e6468823a8c 100644 --- a/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts +++ b/x-pack/plugins/ml/server/lib/alerts/register_anomaly_detection_alert_type.ts @@ -40,6 +40,7 @@ import { import type { RegisterAlertParams } from './register_ml_alerts'; import type { InfluencerAnomalyAlertDoc } from '../../../common/types/alerts'; import { type RecordAnomalyAlertDoc } from '../../../common/types/alerts'; +import type { AnomalyDetectionRuleState } from './alerting_service'; /** * Base Anomaly detection alerting rule context. @@ -157,6 +158,8 @@ export function registerAnomalyDetectionAlertType({ alerting, mlSharedServices, }: RegisterAlertParams) { + const fieldFormatCache = new Map(); + alerting.registerType< MlAnomalyDetectionAlertParams, never, // Only use if defining useSavedObjectReferences hook @@ -250,9 +253,10 @@ export function registerAnomalyDetectionAlertType({ services, params, spaceId, + rule, }: ExecutorOptions) => { const fakeRequest = {} as KibanaRequest; - const { execute } = mlSharedServices.alertingServiceProvider( + const alertingService = mlSharedServices.alertingServiceProvider( services.savedObjectsClient, fakeRequest ); @@ -262,11 +266,17 @@ export function registerAnomalyDetectionAlertType({ throw new AlertsClientError(); } - const executionResult = await execute(params, spaceId); + const executionResult = await alertingService.execute( + params, + spaceId, + fieldFormatCache.get(rule.id) + ); if (!executionResult) return { state: {} }; - const { isHealthy, name, context, payload } = executionResult; + const { isHealthy, name, context, payload, stateUpdate } = executionResult; + + fieldFormatCache.set(rule.id, stateUpdate); if (!isHealthy) { const { alertDoc } = alertsClient.report({ diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/index.tsx index 9e8a0e2baf46e..3c2bb140235d7 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/index.tsx @@ -6,11 +6,6 @@ */ import { - EuiButton, - EuiCallOut, - EuiFlexGroup, - EuiFlexItem, - EuiLink, EuiLoadingSpinner, EuiSpacer, EuiTabbedContent, @@ -18,27 +13,29 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; import { EmbeddableProfilingSearchBar, ProfilingEmptyState, } from '@kbn/observability-shared-plugin/public'; import React, { useMemo } from 'react'; import { useHistory } from 'react-router-dom'; +import { isJavaAgentName as getIsJavaAgentName } from '../../../../common/agent_name'; import { ApmDocumentType } from '../../../../common/document_type'; +import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../hooks/use_apm_params'; -import { useLocalStorage } from '../../../hooks/use_local_storage'; import { usePreferredDataSourceAndBucketSize } from '../../../hooks/use_preferred_data_source_and_bucket_size'; import { useProfilingPlugin } from '../../../hooks/use_profiling_plugin'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { ApmPluginStartDeps } from '../../../plugin'; import { push } from '../../shared/links/url_helpers'; -import { ProfilingFlamegraph } from './profiling_flamegraph'; -import { ProfilingTopNFunctions } from './profiling_top_functions'; +import { ProfilingFlamegraph } from '../../shared/profiling/flamegraph'; +import { ProfilingTopNFunctions } from '../../shared/profiling/top_functions'; +import { SearchBar } from '../../shared/search_bar/search_bar'; +import { ProfilingHostsCallout } from './profiling_hosts_callout'; +import { ProfilingHostsFlamegraph } from './profiling_hosts_flamegraph'; +import { ProfilingHostsTopNFunctions } from './profiling_hosts_top_functions'; export function ProfilingOverview() { const history = useHistory(); - const { services } = useKibana(); const { path: { serviceName }, query: { rangeFrom, rangeTo, environment, kuery }, @@ -53,13 +50,8 @@ export function ProfilingOverview() { numBuckets: 20, }); - const [ - apmUniversalProfilingShowCallout, - setAPMUniversalProfilingShowCallout, - ] = useLocalStorage('apmUniversalProfilingShowCallout', true); - - const baseUrl = - services.docLinks?.ELASTIC_WEBSITE_URL || 'https://www.elastic.co/'; + const { agentName, transactionType } = useApmServiceContext(); + const isJavaAgent = getIsJavaAgentName(agentName); const tabs = useMemo((): EuiTabbedContentProps['tabs'] => { return [ @@ -71,16 +63,27 @@ export function ProfilingOverview() { content: ( <> - + {isJavaAgent ? ( + + ) : ( + + )} ), }, @@ -92,18 +95,29 @@ export function ProfilingOverview() { content: ( <> - + {isJavaAgent ? ( + + ) : ( + + )} ), }, @@ -111,12 +125,14 @@ export function ProfilingOverview() { }, [ end, environment, + isJavaAgent, kuery, preferred?.source, rangeFrom, rangeTo, serviceName, start, + transactionType, ]); if (isLoading) { @@ -138,68 +154,29 @@ export function ProfilingOverview() { return ( <> - {apmUniversalProfilingShowCallout && ( + {isJavaAgent ? ( + + ) : ( <> - -

- {i18n.translate('xpack.apm.profiling.callout.description', { - defaultMessage: - 'Universal Profiling provides unprecedented code visibility into the runtime behaviour of all applications. It profiles every line of code on the host(s) running your services, including not only your application code but also the kernel and third-party libraries.', - })} -

- - - - {i18n.translate('xpack.apm.profiling.callout.learnMore', { - defaultMessage: 'Learn more', - })} - - - - { - setAPMUniversalProfilingShowCallout(false); - }} - > - {i18n.translate('xpack.apm.profiling.callout.dismiss', { - defaultMessage: 'Dismiss', - })} - - - -
+ + { + push(history, { + query: { + kuery: next.query, + rangeFrom: next.dateRange.from, + rangeTo: next.dateRange.to, + }, + }); + }} + onRefresh={refreshTimeRange} + /> )} - { - push(history, { - query: { - kuery: next.query, - rangeFrom: next.dateRange.from, - rangeTo: next.dateRange.to, - }, - }); - }} - onRefresh={refreshTimeRange} - /> (); + + const baseUrl = + services.docLinks?.ELASTIC_WEBSITE_URL || 'https://www.elastic.co/'; + + const [ + apmUniversalProfilingShowCallout, + setAPMUniversalProfilingShowCallout, + ] = useLocalStorage('apmUniversalProfilingShowCallout', true); + + if (apmUniversalProfilingShowCallout === false) { + return null; + } + + return ( + +

+ {i18n.translate('xpack.apm.profiling.callout.description', { + defaultMessage: + 'Universal Profiling provides unprecedented code visibility into the runtime behaviour of all applications. It profiles every line of code on the host(s) running your services, including not only your application code but also the kernel and third-party libraries.', + })} +

+ + + + {i18n.translate('xpack.apm.profiling.callout.learnMore', { + defaultMessage: 'Learn more', + })} + + + + setAPMUniversalProfilingShowCallout(false)} + > + {i18n.translate('xpack.apm.profiling.callout.dismiss', { + defaultMessage: 'Dismiss', + })} + + + +
+ ); +} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx similarity index 89% rename from x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx rename to x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx index 2504ce687307b..9f8bcb2095f0e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx @@ -15,7 +15,7 @@ import { toKueryFilterFormat, } from '../../../../common/utils/kuery_utils'; import { useFetcher } from '../../../hooks/use_fetcher'; -import { ProfilingFlamegraphChart } from '../../shared/profiling/flamegraph'; +import { FlamegraphChart } from '../../shared/charts/flamegraph'; import { ProfilingFlamegraphLink } from '../../shared/profiling/flamegraph/flamegraph_link'; import { HostnamesFilterWarning } from './host_names_filter_warning'; @@ -32,7 +32,7 @@ interface Props { rangeTo: string; } -export function ProfilingFlamegraph({ +export function ProfilingHostsFlamegraph({ start, end, serviceName, @@ -46,7 +46,7 @@ export function ProfilingFlamegraph({ (callApmApi) => { if (dataSource) { return callApmApi( - 'GET /internal/apm/services/{serviceName}/profiling/flamegraph', + 'GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph', { params: { path: { serviceName }, @@ -87,7 +87,7 @@ export function ProfilingFlamegraph({ - + ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_top_functions.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx similarity index 95% rename from x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_top_functions.tsx rename to x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx index 8785a4974a2d3..56d8b0cb1a604 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_top_functions.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx @@ -34,7 +34,7 @@ interface Props { rangeTo: string; } -export function ProfilingTopNFunctions({ +export function ProfilingHostsTopNFunctions({ serviceName, start, end, @@ -50,7 +50,7 @@ export function ProfilingTopNFunctions({ (callApmApi) => { if (dataSource) { return callApmApi( - 'GET /internal/apm/services/{serviceName}/profiling/functions', + 'GET /internal/apm/services/{serviceName}/profiling/hosts/functions', { params: { path: { serviceName }, diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_flamegraph.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_flamegraph.tsx deleted file mode 100644 index 2f87d2be50214..0000000000000 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_flamegraph.tsx +++ /dev/null @@ -1,80 +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 { EuiSpacer } from '@elastic/eui'; -import React from 'react'; -import { useFetcher } from '../../../hooks/use_fetcher'; -import { useTimeRange } from '../../../hooks/use_time_range'; -import { ProfilingFlamegraphChart } from '../../shared/profiling/flamegraph'; -import { ProfilingFlamegraphLink } from '../../shared/profiling/flamegraph/flamegraph_link'; - -interface Props { - serviceName: string; - rangeFrom: string; - rangeTo: string; - kuery: string; - transactionName: string; - transactionType?: string; - environment: string; -} - -export function ProfilingFlamegraph({ - serviceName, - rangeFrom, - rangeTo, - kuery, - transactionName, - transactionType, - environment, -}: Props) { - const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - - const { data, status } = useFetcher( - (callApmApi) => { - if (!transactionType) { - return; - } - return callApmApi( - 'GET /internal/apm/services/{serviceName}/transactions/flamegraph', - { - params: { - path: { serviceName }, - query: { - start, - end, - kuery, - transactionName, - transactionType, - environment, - }, - }, - } - ); - }, - [ - serviceName, - start, - end, - kuery, - transactionName, - transactionType, - environment, - ] - ); - - return ( - <> - - - - - ); -} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_tab.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_tab.tsx index 1728e214ff8f3..4d56c62fa0a7a 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_tab.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_tab.tsx @@ -17,8 +17,8 @@ import React, { useMemo } from 'react'; import { ProfilingEmptyState } from '@kbn/observability-shared-plugin/public'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useProfilingPlugin } from '../../../hooks/use_profiling_plugin'; -import { ProfilingFlamegraph } from './profiling_flamegraph'; -import { ProfilingTopNFunctions } from './profiling_top_functions'; +import { ProfilingFlamegraph } from '../../shared/profiling/flamegraph'; +import { ProfilingTopNFunctions } from '../../shared/profiling/top_functions'; function ProfilingTab() { const { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/transaction_details_tabs.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/transaction_details_tabs.tsx index 56511f94fb38d..5ccd49b539edb 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/transaction_details_tabs.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/transaction_details_tabs.tsx @@ -28,6 +28,8 @@ import { latencyCorrelationsTab } from './latency_correlations_tab'; import { profilingTab } from './profiling_tab'; import { traceSamplesTab } from './trace_samples_tab'; import { useTransactionProfilingSetting } from '../../../hooks/use_profiling_integration_setting'; +import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; +import { isJavaAgentName } from '../../../../common/agent_name'; export interface TabContentProps { clearChartSelection: () => void; @@ -43,6 +45,7 @@ export function TransactionDetailsTabs() { '/services/{serviceName}/transactions/view', '/mobile-services/{serviceName}/transactions/view' ); + const { agentName } = useApmServiceContext(); const isCriticalPathFeatureEnabled = useCriticalPathFeatureEnabledSetting(); const isTransactionProfilingEnabled = useTransactionProfilingSetting(); @@ -57,12 +60,12 @@ export function TransactionDetailsTabs() { tabs.push(aggregatedCriticalPathTab); } - if (isTransactionProfilingEnabled) { + if (isTransactionProfilingEnabled && isJavaAgentName(agentName)) { tabs.push(profilingTab); } return tabs; - }, [isCriticalPathFeatureEnabled, isTransactionProfilingEnabled]); + }, [agentName, isCriticalPathFeatureEnabled, isTransactionProfilingEnabled]); const { urlParams } = useLegacyUrlParams(); const history = useHistory(); diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/flamegraph/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/flamegraph/index.tsx new file mode 100644 index 0000000000000..b091e91f2a750 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/flamegraph/index.tsx @@ -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 { EuiEmptyPrompt } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { EmbeddableFlamegraph } from '@kbn/observability-shared-plugin/public'; +import { BaseFlameGraph } from '@kbn/profiling-utils'; +import { isEmpty } from 'lodash'; +import React from 'react'; +import { FETCH_STATUS, isPending } from '../../../../hooks/use_fetcher'; + +interface Props { + data?: BaseFlameGraph; + status: FETCH_STATUS; +} + +export function FlamegraphChart({ data, status }: Props) { + return ( + <> + {status === FETCH_STATUS.SUCCESS && + (isEmpty(data) || data?.TotalSamples === 0) ? ( + + {i18n.translate('xpack.apm.profiling.flamegraph.noDataFound', { + defaultMessage: 'No data found', + })} +
+ } + /> + ) : ( + + )} + + ); +} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/flamegraph/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/flamegraph/index.tsx index cfe92331486a2..a492370578d90 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/flamegraph/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/flamegraph/index.tsx @@ -4,41 +4,77 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiEmptyPrompt } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { EmbeddableFlamegraph } from '@kbn/observability-shared-plugin/public'; -import { BaseFlameGraph } from '@kbn/profiling-utils'; -import { isEmpty } from 'lodash'; +import { EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { FETCH_STATUS, isPending } from '../../../../hooks/use_fetcher'; +import { useFetcher } from '../../../../hooks/use_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { FlamegraphChart } from '../../charts/flamegraph'; +import { ProfilingFlamegraphLink } from './flamegraph_link'; interface Props { - data?: BaseFlameGraph; - status: FETCH_STATUS; + serviceName: string; + rangeFrom: string; + rangeTo: string; + kuery: string; + transactionName?: string; + transactionType?: string; + environment: string; } -export function ProfilingFlamegraphChart({ data, status }: Props) { +export function ProfilingFlamegraph({ + serviceName, + rangeFrom, + rangeTo, + kuery, + transactionName, + transactionType, + environment, +}: Props) { + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + + const { data, status } = useFetcher( + (callApmApi) => { + if (!transactionType) { + return; + } + return callApmApi( + 'GET /internal/apm/services/{serviceName}/profiling/flamegraph', + { + params: { + path: { serviceName }, + query: { + start, + end, + kuery, + transactionName, + transactionType, + environment, + }, + }, + } + ); + }, + [ + serviceName, + start, + end, + kuery, + transactionName, + transactionType, + environment, + ] + ); + return ( <> - {status === FETCH_STATUS.SUCCESS && - (isEmpty(data) || data?.TotalSamples === 0) ? ( - - {i18n.translate('xpack.apm.profiling.flamegraph.noDataFound', { - defaultMessage: 'No data found', - })} -
- } - /> - ) : ( - - )} + + + ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_top_functions.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/top_functions/index.tsx similarity index 65% rename from x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_top_functions.tsx rename to x-pack/plugins/observability_solution/apm/public/components/shared/profiling/top_functions/index.tsx index 96ef5f3497346..4d0cc1be4dad6 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/profiling_top_functions.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/profiling/top_functions/index.tsx @@ -7,16 +7,16 @@ import { EuiSpacer } from '@elastic/eui'; import { EmbeddableFunctions } from '@kbn/observability-shared-plugin/public'; import React from 'react'; -import { isPending, useFetcher } from '../../../hooks/use_fetcher'; -import { useTimeRange } from '../../../hooks/use_time_range'; -import { ProfilingTopNFunctionsLink } from '../../shared/profiling/top_functions/top_functions_link'; +import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { ProfilingTopNFunctionsLink } from './top_functions_link'; interface Props { serviceName: string; rangeFrom: string; rangeTo: string; kuery: string; - transactionName: string; + transactionName?: string; transactionType?: string; environment: string; } @@ -34,27 +34,26 @@ export function ProfilingTopNFunctions({ const { data, status } = useFetcher( (callApmApi) => { - if (!transactionType) { - return; - } - return callApmApi( - 'GET /internal/apm/services/{serviceName}/transactions/functions', - { - params: { - path: { serviceName }, - query: { - start, - end, - kuery, - transactionName, - startIndex: 0, - endIndex: 10, - transactionType, - environment, + if (transactionType) { + return callApmApi( + 'GET /internal/apm/services/{serviceName}/profiling/functions', + { + params: { + path: { serviceName }, + query: { + start, + end, + kuery, + transactionName, + startIndex: 0, + endIndex: 10, + transactionType, + environment, + }, }, - }, - } - ); + } + ); + } }, [ serviceName, diff --git a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts index 7c555366c9e68..302a8d004760f 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts @@ -13,10 +13,13 @@ import { PickByValue } from 'utility-types'; import { agentExplorerRouteRepository } from '../agent_explorer/route'; import { agentKeysRouteRepository } from '../agent_keys/route'; import { alertsChartPreviewRouteRepository } from '../alerts/route'; +import { assistantRouteRepository } from '../assistant_functions/route'; import { correlationsRouteRepository } from '../correlations/route'; +import { serviceDashboardsRouteRepository } from '../custom_dashboards/route'; import { dataViewRouteRepository } from '../data_view/route'; import { debugTelemetryRoute } from '../debug_telemetry/route'; import { dependencisRouteRepository } from '../dependencies/route'; +import { diagnosticsRepository } from '../diagnostics/route'; import { environmentsRouteRepository } from '../environments/route'; import { errorsRouteRepository } from '../errors/route'; import { eventMetadataRouteRepository } from '../event_metadata/route'; @@ -28,6 +31,8 @@ import { latencyDistributionRouteRepository } from '../latency_distribution/rout import { metricsRouteRepository } from '../metrics/route'; import { mobileRouteRepository } from '../mobile/route'; import { observabilityOverviewRouteRepository } from '../observability_overview/route'; +import { profilingHostsRouteRepository } from '../profiling/hosts/route'; +import { profilingRouteRepository } from '../profiling/route'; import { serviceRouteRepository } from '../services/route'; import { serviceGroupRouteRepository } from '../service_groups/route'; import { serviceMapRouteRepository } from '../service_map/route'; @@ -35,7 +40,6 @@ import { agentConfigurationRouteRepository } from '../settings/agent_configurati import { anomalyDetectionRouteRepository } from '../settings/anomaly_detection/route'; import { apmIndicesRouteRepository } from '../settings/apm_indices/route'; import { customLinkRouteRepository } from '../settings/custom_link/route'; -import { diagnosticsRepository } from '../diagnostics/route'; import { labsRouteRepository } from '../settings/labs/route'; import { sourceMapsRouteRepository } from '../source_maps/route'; import { spanLinksRouteRepository } from '../span_links/route'; @@ -44,9 +48,6 @@ import { suggestionsRouteRepository } from '../suggestions/route'; import { timeRangeMetadataRoute } from '../time_range_metadata/route'; import { traceRouteRepository } from '../traces/route'; import { transactionRouteRepository } from '../transactions/route'; -import { assistantRouteRepository } from '../assistant_functions/route'; -import { profilingRouteRepository } from '../profiling/route'; -import { serviceDashboardsRouteRepository } from '../custom_dashboards/route'; function getTypedGlobalApmServerRouteRepository() { const repository = { @@ -86,6 +87,7 @@ function getTypedGlobalApmServerRouteRepository() { ...diagnosticsRepository, ...assistantRouteRepository, ...profilingRouteRepository, + ...profilingHostsRouteRepository, ...serviceDashboardsRouteRepository, }; diff --git a/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_flamegraph.ts b/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_flamegraph.ts new file mode 100644 index 0000000000000..a1ac336938456 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_flamegraph.ts @@ -0,0 +1,77 @@ +/* + * 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 { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; +import { + CoreRequestHandlerContext, + ElasticsearchClient, +} from '@kbn/core/server'; +import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; +import { + SERVICE_NAME, + TRANSACTION_NAME, + TRANSACTION_TYPE, +} from '../../../common/es_fields/apm'; +import { environmentQuery } from '../../../common/utils/environment_query'; + +interface Params { + profilingDataAccessStart: ProfilingDataAccessPluginStart; + core: CoreRequestHandlerContext; + esClient: ElasticsearchClient; + start: number; + end: number; + kuery: string; + serviceName?: string; + transactionName?: string; + environment?: string; + transactionType?: string; + indices?: string[]; + stacktraceIdsField?: string; +} + +export function fetchFlamegraph({ + profilingDataAccessStart, + core, + esClient, + start, + end, + kuery, + serviceName, + transactionName, + environment, + transactionType, + indices, + stacktraceIdsField, +}: Params) { + return profilingDataAccessStart.services.fetchFlamechartData({ + core, + esClient, + totalSeconds: end - start, + indices, + stacktraceIdsField, + query: { + bool: { + filter: [ + ...kqlQuery(kuery), + ...termQuery(SERVICE_NAME, serviceName), + ...termQuery(TRANSACTION_NAME, transactionName), + ...environmentQuery(environment), + ...termQuery(TRANSACTION_TYPE, transactionType), + { + range: { + ['@timestamp']: { + gte: String(start), + lt: String(end), + format: 'epoch_second', + }, + }, + }, + ], + }, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_functions.ts b/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_functions.ts new file mode 100644 index 0000000000000..c6b0bb66c9558 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/profiling/fetch_functions.ts @@ -0,0 +1,83 @@ +/* + * 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 { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; +import { + CoreRequestHandlerContext, + ElasticsearchClient, +} from '@kbn/core/server'; +import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; +import { + SERVICE_NAME, + TRANSACTION_NAME, + TRANSACTION_TYPE, +} from '../../../common/es_fields/apm'; +import { environmentQuery } from '../../../common/utils/environment_query'; + +interface Params { + profilingDataAccessStart: ProfilingDataAccessPluginStart; + core: CoreRequestHandlerContext; + esClient: ElasticsearchClient; + startIndex: number; + endIndex: number; + start: number; + end: number; + kuery: string; + serviceName?: string; + transactionName?: string; + environment?: string; + transactionType?: string; + indices?: string[]; + stacktraceIdsField?: string; +} + +export function fetchFunctions({ + profilingDataAccessStart, + core, + esClient, + startIndex, + endIndex, + start, + end, + kuery, + serviceName, + transactionName, + environment, + transactionType, + indices, + stacktraceIdsField, +}: Params) { + return profilingDataAccessStart.services.fetchFunctions({ + core, + esClient, + startIndex, + endIndex, + totalSeconds: end - start, + indices, + stacktraceIdsField, + query: { + bool: { + filter: [ + ...kqlQuery(kuery), + ...termQuery(SERVICE_NAME, serviceName), + ...termQuery(TRANSACTION_NAME, transactionName), + ...environmentQuery(environment), + ...termQuery(TRANSACTION_TYPE, transactionType), + { + range: { + ['@timestamp']: { + gte: String(start), + lt: String(end), + format: 'epoch_second', + }, + }, + }, + ], + }, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/apm/server/routes/profiling/hosts/route.ts b/x-pack/plugins/observability_solution/apm/server/routes/profiling/hosts/route.ts new file mode 100644 index 0000000000000..ca57069942677 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/profiling/hosts/route.ts @@ -0,0 +1,173 @@ +/* + * 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 { toNumberRt } from '@kbn/io-ts-utils'; +import type { BaseFlameGraph, TopNFunctions } from '@kbn/profiling-utils'; +import * as t from 'io-ts'; +import { HOST_NAME } from '../../../../common/es_fields/apm'; +import { + mergeKueries, + toKueryFilterFormat, +} from '../../../../common/utils/kuery_utils'; +import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; +import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; +import { + environmentRt, + kueryRt, + rangeRt, + serviceTransactionDataSourceRt, +} from '../../default_api_types'; +import { fetchFlamegraph } from '../fetch_flamegraph'; +import { fetchFunctions } from '../fetch_functions'; +import { getServiceHostNames } from '../get_service_host_names'; + +const profilingHostsFlamegraphRoute = createApmServerRoute({ + endpoint: + 'GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph', + params: t.type({ + path: t.type({ serviceName: t.string }), + query: t.intersection([ + rangeRt, + environmentRt, + serviceTransactionDataSourceRt, + kueryRt, + ]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise< + { flamegraph: BaseFlameGraph; hostNames: string[] } | undefined + > => { + const { context, plugins, params } = resources; + const core = await context.core; + const [esClient, apmEventClient, profilingDataAccessStart] = + await Promise.all([ + core.elasticsearch.client, + await getApmEventClient(resources), + await plugins.profilingDataAccess?.start(), + ]); + if (profilingDataAccessStart) { + const { start, end, environment, documentType, rollupInterval, kuery } = + params.query; + const { serviceName } = params.path; + + const serviceHostNames = await getServiceHostNames({ + apmEventClient, + start, + end, + environment, + serviceName, + documentType, + rollupInterval, + }); + + if (!serviceHostNames.length) { + return undefined; + } + const startSecs = start / 1000; + const endSecs = end / 1000; + + const flamegraph = await fetchFlamegraph({ + profilingDataAccessStart, + core, + esClient: esClient.asCurrentUser, + start: startSecs, + end: endSecs, + kuery: mergeKueries([ + `(${toKueryFilterFormat(HOST_NAME, serviceHostNames)})`, + kuery, + ]), + }); + + return { flamegraph, hostNames: serviceHostNames }; + } + + return undefined; + }, +}); + +const profilingHostsFunctionsRoute = createApmServerRoute({ + endpoint: + 'GET /internal/apm/services/{serviceName}/profiling/hosts/functions', + params: t.type({ + path: t.type({ serviceName: t.string }), + query: t.intersection([ + rangeRt, + environmentRt, + serviceTransactionDataSourceRt, + t.type({ startIndex: toNumberRt, endIndex: toNumberRt }), + kueryRt, + ]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise<{ functions: TopNFunctions; hostNames: string[] } | undefined> => { + const { context, plugins, params } = resources; + const core = await context.core; + const [esClient, apmEventClient, profilingDataAccessStart] = + await Promise.all([ + core.elasticsearch.client, + await getApmEventClient(resources), + await plugins.profilingDataAccess?.start(), + ]); + if (profilingDataAccessStart) { + const { + start, + end, + environment, + startIndex, + endIndex, + documentType, + rollupInterval, + kuery, + } = params.query; + const { serviceName } = params.path; + + const serviceHostNames = await getServiceHostNames({ + apmEventClient, + start, + end, + environment, + serviceName, + documentType, + rollupInterval, + }); + + if (!serviceHostNames.length) { + return undefined; + } + + const startSecs = start / 1000; + const endSecs = end / 1000; + + const functions = await fetchFunctions({ + profilingDataAccessStart, + core, + esClient: esClient.asCurrentUser, + startIndex, + endIndex, + start: startSecs, + end: endSecs, + kuery: mergeKueries([ + `(${toKueryFilterFormat(HOST_NAME, serviceHostNames)})`, + kuery, + ]), + }); + + return { functions, hostNames: serviceHostNames }; + } + + return undefined; + }, +}); + +export const profilingHostsRouteRepository = { + ...profilingHostsFlamegraphRoute, + ...profilingHostsFunctionsRoute, +}; diff --git a/x-pack/plugins/observability_solution/apm/server/routes/profiling/route.ts b/x-pack/plugins/observability_solution/apm/server/routes/profiling/route.ts index 9009f60da03a1..a255cfd3d8c46 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/profiling/route.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/profiling/route.ts @@ -8,209 +8,25 @@ import { isoToEpochSecsRt, toNumberRt } from '@kbn/io-ts-utils'; import type { BaseFlameGraph, TopNFunctions } from '@kbn/profiling-utils'; import * as t from 'io-ts'; -import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - HOST_NAME, - SERVICE_NAME, - TRANSACTION_NAME, - TRANSACTION_PROFILER_STACK_TRACE_IDS, - TRANSACTION_TYPE, -} from '../../../common/es_fields/apm'; -import { - mergeKueries, - toKueryFilterFormat, -} from '../../../common/utils/kuery_utils'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { - environmentRt, - kueryRt, - rangeRt, - serviceTransactionDataSourceRt, -} from '../default_api_types'; -import { getServiceHostNames } from './get_service_host_names'; -import { environmentQuery } from '../../../common/utils/environment_query'; +import { environmentRt, kueryRt } from '../default_api_types'; +import { fetchFlamegraph } from './fetch_flamegraph'; +import { fetchFunctions } from './fetch_functions'; +import { TRANSACTION_PROFILER_STACK_TRACE_IDS } from '../../../common/es_fields/apm'; -const profilingFlamegraphRoute = createApmServerRoute({ +const servicesFlamegraphRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/services/{serviceName}/profiling/flamegraph', - params: t.type({ - path: t.type({ serviceName: t.string }), - query: t.intersection([ - rangeRt, - environmentRt, - serviceTransactionDataSourceRt, - kueryRt, - ]), - }), - options: { tags: ['access:apm'] }, - handler: async ( - resources - ): Promise< - { flamegraph: BaseFlameGraph; hostNames: string[] } | undefined - > => { - const { context, plugins, params } = resources; - const core = await context.core; - const [esClient, apmEventClient, profilingDataAccessStart] = - await Promise.all([ - core.elasticsearch.client, - await getApmEventClient(resources), - await plugins.profilingDataAccess?.start(), - ]); - if (profilingDataAccessStart) { - const { start, end, environment, documentType, rollupInterval, kuery } = - params.query; - const { serviceName } = params.path; - - const serviceHostNames = await getServiceHostNames({ - apmEventClient, - start, - end, - environment, - serviceName, - documentType, - rollupInterval, - }); - - if (!serviceHostNames.length) { - return undefined; - } - const startSecs = start / 1000; - const endSecs = end / 1000; - - const flamegraph = - await profilingDataAccessStart?.services.fetchFlamechartData({ - core, - esClient: esClient.asCurrentUser, - totalSeconds: endSecs - startSecs, - query: { - bool: { - filter: [ - ...kqlQuery( - mergeKueries([ - `(${toKueryFilterFormat(HOST_NAME, serviceHostNames)})`, - kuery, - ]) - ), - { - range: { - ['@timestamp']: { - gte: String(startSecs), - lt: String(endSecs), - format: 'epoch_second', - }, - }, - }, - ], - }, - }, - }); - - return { flamegraph, hostNames: serviceHostNames }; - } - - return undefined; - }, -}); - -const profilingFunctionsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/services/{serviceName}/profiling/functions', - params: t.type({ - path: t.type({ serviceName: t.string }), - query: t.intersection([ - rangeRt, - environmentRt, - serviceTransactionDataSourceRt, - t.type({ startIndex: toNumberRt, endIndex: toNumberRt }), - kueryRt, - ]), - }), - options: { tags: ['access:apm'] }, - handler: async ( - resources - ): Promise<{ functions: TopNFunctions; hostNames: string[] } | undefined> => { - const { context, plugins, params } = resources; - const core = await context.core; - const [esClient, apmEventClient, profilingDataAccessStart] = - await Promise.all([ - core.elasticsearch.client, - await getApmEventClient(resources), - await plugins.profilingDataAccess?.start(), - ]); - if (profilingDataAccessStart) { - const { - start, - end, - environment, - startIndex, - endIndex, - documentType, - rollupInterval, - kuery, - } = params.query; - const { serviceName } = params.path; - - const serviceHostNames = await getServiceHostNames({ - apmEventClient, - start, - end, - environment, - serviceName, - documentType, - rollupInterval, - }); - - if (!serviceHostNames.length) { - return undefined; - } - - const startSecs = start / 1000; - const endSecs = end / 1000; - - const functions = await profilingDataAccessStart?.services.fetchFunction({ - core, - esClient: esClient.asCurrentUser, - startIndex, - endIndex, - totalSeconds: endSecs - startSecs, - query: { - bool: { - filter: [ - ...kqlQuery( - mergeKueries([ - `(${toKueryFilterFormat(HOST_NAME, serviceHostNames)})`, - kuery, - ]) - ), - { - range: { - ['@timestamp']: { - gte: String(startSecs), - lt: String(endSecs), - format: 'epoch_second', - }, - }, - }, - ], - }, - }, - }); - return { functions, hostNames: serviceHostNames }; - } - - return undefined; - }, -}); - -const transactionsFlamegraphRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/services/{serviceName}/transactions/flamegraph', params: t.type({ path: t.type({ serviceName: t.string }), query: t.intersection([ kueryRt, environmentRt, - t.type({ + t.partial({ transactionName: t.string, + }), + t.type({ start: isoToEpochSecsRt, end: isoToEpochSecsRt, transactionType: t.string, @@ -242,32 +58,19 @@ const transactionsFlamegraphRoute = createApmServerRoute({ ProcessorEvent.transaction ); - return await profilingDataAccessStart?.services.fetchFlamechartData({ + return fetchFlamegraph({ + profilingDataAccessStart, core, esClient: esClient.asCurrentUser, + start, + end, + kuery, + serviceName, + transactionName, + environment, + transactionType, indices, stacktraceIdsField: TRANSACTION_PROFILER_STACK_TRACE_IDS, - totalSeconds: end - start, - query: { - bool: { - filter: [ - ...kqlQuery(kuery), - ...termQuery(SERVICE_NAME, serviceName), - ...termQuery(TRANSACTION_NAME, transactionName), - ...environmentQuery(environment), - ...termQuery(TRANSACTION_TYPE, transactionType), - { - range: { - ['@timestamp']: { - gte: String(start), - lt: String(end), - format: 'epoch_second', - }, - }, - }, - ], - }, - }, }); } @@ -275,18 +78,20 @@ const transactionsFlamegraphRoute = createApmServerRoute({ }, }); -const transactionsFunctionsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/services/{serviceName}/transactions/functions', +const servicesFunctionsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/services/{serviceName}/profiling/functions', params: t.type({ path: t.type({ serviceName: t.string }), query: t.intersection([ environmentRt, + t.partial({ + transactionName: t.string, + }), t.type({ start: isoToEpochSecsRt, end: isoToEpochSecsRt, startIndex: toNumberRt, endIndex: toNumberRt, - transactionName: t.string, transactionType: t.string, }), kueryRt, @@ -320,34 +125,21 @@ const transactionsFunctionsRoute = createApmServerRoute({ ProcessorEvent.transaction ); - return profilingDataAccessStart?.services.fetchFunction({ + return fetchFunctions({ + profilingDataAccessStart, core, esClient: esClient.asCurrentUser, startIndex, endIndex, indices, stacktraceIdsField: TRANSACTION_PROFILER_STACK_TRACE_IDS, - totalSeconds: end - start, - query: { - bool: { - filter: [ - ...kqlQuery(kuery), - ...termQuery(SERVICE_NAME, serviceName), - ...termQuery(TRANSACTION_NAME, transactionName), - ...environmentQuery(environment), - ...termQuery(TRANSACTION_TYPE, transactionType), - { - range: { - ['@timestamp']: { - gte: String(start), - lt: String(end), - format: 'epoch_second', - }, - }, - }, - ], - }, - }, + start, + end, + kuery, + serviceName, + transactionName, + environment, + transactionType, }); } @@ -386,9 +178,7 @@ const profilingStatusRoute = createApmServerRoute({ }); export const profilingRouteRepository = { - ...profilingFlamegraphRoute, + ...servicesFlamegraphRoute, ...profilingStatusRoute, - ...profilingFunctionsRoute, - ...transactionsFlamegraphRoute, - ...transactionsFunctionsRoute, + ...servicesFunctionsRoute, }; diff --git a/x-pack/plugins/observability_solution/dataset_quality/README.md b/x-pack/plugins/observability_solution/dataset_quality/README.md index b39802c06f231..afa09dc5781aa 100755 --- a/x-pack/plugins/observability_solution/dataset_quality/README.md +++ b/x-pack/plugins/observability_solution/dataset_quality/README.md @@ -4,9 +4,7 @@ In order to make ongoing maintenance of log collection easy we want to introduce ## Development -### Tests - -#### Unit tests +### Unit Tests Kibana primarily uses Jest for unit testing. Each plugin or package defines a `jest.config.js` that extends a preset provided by the `@kbn/test` package. The following command runs all Dataset quality unit tests: @@ -51,3 +49,38 @@ node x-pack/plugins/observability_solution/dataset_quality/scripts/api --server # run tests node x-pack/plugins/observability_solution/dataset_quality/scripts/api --runner --grep-files=error_group_list ``` + + +### Functional Tests + +### Stateful +#### FTR Server +``` +yarn test:ftr:server --config ./x-pack/test/functional/apps/dataset_quality/config.ts +``` + +#### FTR Runner +``` +yarn test:ftr:runner --config ./x-pack/test/functional/apps/dataset_quality/config.ts --include ./x-pack/test/functional/apps/dataset_quality/index.ts +``` + +#### Running Individual Tests +``` +yarn test:ftr:runner --config ./x-pack/test/functional/apps/dataset_quality/config.ts --include ./x-pack/test/functional/apps/dataset_quality/$1 +``` + +### Serverless + +#### Server +``` +yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts +``` + +#### Runner +``` +yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts +``` +#### Running Individual Tests +``` +yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/$1 +``` \ No newline at end of file diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx index 268a7d07c690c..c1bbb72c8fbf3 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx @@ -14,6 +14,7 @@ import { useDatasetQualityFilters } from '../../../hooks/use_dataset_quality_fil import { useKibanaContextForPlugin } from '../../../utils/use_kibana'; import { FilterBar } from './filter_bar'; import { IntegrationsSelector } from './integrations_selector'; +import { NamespacesSelector } from './namespaces_selector'; // Allow for lazy loading // eslint-disable-next-line import/no-default-export @@ -25,7 +26,9 @@ export default function Filters() { onRefreshChange, isLoading, integrations, + namespaces, onIntegrationsChange, + onNamespacesChange, selectedQuery, onQueryChange, } = useDatasetQualityFilters(); @@ -49,7 +52,7 @@ export default function Filters() { ); return ( - + @@ -60,6 +63,13 @@ export default function Filters() { onIntegrationsChange={onIntegrationsChange} /> + + + void; +} + +export interface NamespaceItem { + label: string; + checked?: EuiSelectableOptionCheckedType; +} + +export function NamespacesSelector({ + isLoading, + namespaces, + onNamespacesChange, +}: NamespacesSelectorProps) { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const onButtonClick = () => { + setIsPopoverOpen(!isPopoverOpen); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const renderOption = (namespace: NamespaceItem) => {namespace.label}; + + const button = ( + item.checked === 'on')} + numActiveFilters={namespaces.filter((item) => item.checked === 'on').length} + > + {namespacesSelectorLabel} + + ); + + return ( + + + renderOption(option)} + > + {(list, search) => ( +
+ {search} + {list} +
+ )} +
+
+
+ ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/header.tsx index 51684cd641074..494d3f324f276 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/header.tsx @@ -5,12 +5,46 @@ * 2.0. */ -import { EuiPageHeader } from '@elastic/eui'; +import { + EuiBetaBadge, + EuiFlexGroup, + EuiFlexItem, + EuiPageHeader, + EuiPageHeaderSection, + EuiText, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import React from 'react'; import { datasetQualityAppTitle } from '../../../common/translations'; +export const betaBadgeLabel = i18n.translate('xpack.datasetQuality.betaBadgeLabel', { + defaultMessage: 'Beta', +}); + +export const betaBadgeDescription = i18n.translate('xpack.datasetQuality.betaBadgeDescription', { + defaultMessage: + 'This feature is currently in beta. If you encounter any bugs or have feedback, we’d love to hear from you. Please open a support issue and/or visit our discussion forum.', +}); + // Allow for lazy loading // eslint-disable-next-line import/no-default-export export default function Header() { - return ; + return ( + + + + +

{datasetQualityAppTitle}

+
+ + + +
+
+
+ ); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/datasets_quality_indicators.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/datasets_quality_indicators.tsx index 3da7d9b810b06..91dbee88ecd1e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/datasets_quality_indicators.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/datasets_quality_indicators.tsx @@ -92,7 +92,11 @@ const QualityIndicator = ({ ) : (

- + {value || 0}

diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx index ecdd8a7d01dc2..fba5df2e9dbe2 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx @@ -46,9 +46,9 @@ export function LastDayDataPlaceholder({
{isLoading ? ( - + ) : ( - +

{value}

)} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx index 8abcf8da66f04..dd85160f17b80 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx @@ -23,6 +23,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { css } from '@emotion/react'; +import { formatBytes } from '@kbn/formatters'; import { DEGRADED_QUALITY_MINIMUM_PERCENTAGE, POOR_QUALITY_MINIMUM_PERCENTAGE, @@ -144,7 +145,7 @@ export const getDatasetQualityTableColumns = ({ return ( openFlyout(dataStreamStat as FlyoutDataset)} @@ -194,8 +195,9 @@ export const getDatasetQualityTableColumns = ({ }, { name: sizeColumnName, - field: 'size', + field: 'sizeBytes', sortable: true, + render: (_, dataStreamStat: DataStreamStat) => formatBytes(dataStreamStat.sizeBytes || 0), width: '100px', }, { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/fields_list.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/fields_list.tsx index 319b76c1dd05c..0824e85ddd363 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/fields_list.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/fields_list.tsx @@ -39,7 +39,9 @@ export function FieldsList({ {fieldTitle}
- {fieldValue} + + {fieldValue} +
{index < fields.length - 1 ? : null} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx index 49479b875e496..fece0a928a2c8 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx @@ -30,10 +30,15 @@ export default function Flyout({ dataset, closeFlyout }: FlyoutProps) { useDatasetQualityFlyout(); return ( - + <>
- + diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx index a0474dd8d70fa..189567560112f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx @@ -32,7 +32,7 @@ export function Header({ dataStreamStat }: { dataStreamStat: FlyoutDataset }) { - +

{title}

{ const { service } = useDatasetQualityContext(); @@ -18,10 +19,15 @@ export const useDatasetQualityFilters = () => { const { timeRange, integrations: selectedIntegrations, + namespaces: selectedNamespaces, query: selectedQuery, } = useSelector(service, (state) => state.context.filters); const integrations = useSelector(service, (state) => state.context.integrations); + const namespaces = useSelector(service, (state) => state.context.datasets).map( + (dataset) => dataset.namespace + ); + const onTimeChange = useCallback( (selectedTime: { start: string; end: string; isInvalid: boolean }) => { if (selectedTime.isInvalid) { @@ -84,6 +90,27 @@ export const useDatasetQualityFilters = () => { [service] ); + const namespaceItems: NamespaceItem[] = useMemo(() => { + const uniqueNamespaces = [...new Set(namespaces)]; + + return uniqueNamespaces.map((namespace) => ({ + label: namespace, + checked: selectedNamespaces.includes(namespace) ? 'on' : undefined, + })); + }, [namespaces, selectedNamespaces]); + + const onNamespacesChange = useCallback( + (newNamespaceItems: NamespaceItem[]) => { + service.send({ + type: 'UPDATE_NAMESPACES', + namespaces: newNamespaceItems + .filter((namespace) => namespace.checked === 'on') + .map((namespace) => namespace.label), + }); + }, + [service] + ); + const onQueryChange = useCallback( (query: string) => { service.send({ @@ -100,7 +127,9 @@ export const useDatasetQualityFilters = () => { onRefresh, onRefreshChange, integrations: integrationItems, + namespaces: namespaceItems, onIntegrationsChange, + onNamespacesChange, isLoading, selectedQuery, onQueryChange, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx index 0ee4eabdb0195..2b2c48d43998d 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx @@ -39,6 +39,7 @@ export const useDatasetQualityTable = () => { fullNames: showFullDatasetNames, timeRange, integrations, + namespaces, query, } = useSelector(service, (state) => state.context.filters); @@ -133,10 +134,15 @@ export const useDatasetQualityTable = () => { }) : visibleDatasets; + const filteredByNamespaces = + namespaces.length > 0 + ? filteredByIntegrations.filter((dataset) => namespaces.includes(dataset.namespace)) + : filteredByIntegrations; + return query - ? filteredByIntegrations.filter((dataset) => dataset.rawName.includes(query)) - : filteredByIntegrations; - }, [showInactiveDatasets, datasets, timeRange, integrations, query]); + ? filteredByNamespaces.filter((dataset) => dataset.rawName.includes(query)) + : filteredByNamespaces; + }, [showInactiveDatasets, datasets, timeRange, integrations, namespaces, query]); const pagination = { pageIndex: page, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/defaults.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/defaults.ts index 6d5239c34812c..6a5ab9ccc8340 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/defaults.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/defaults.ts @@ -36,6 +36,7 @@ export const DEFAULT_CONTEXT: DefaultDatasetQualityControllerState = { }, }, integrations: [], + namespaces: [], }, flyout: {}, datasets: [], diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts index 21e2578d26190..4fd6d19e2012a 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts @@ -92,6 +92,10 @@ export const createPureDatasetQualityControllerStateMachine = ( target: 'datasets.loaded', actions: ['storeIntegrations'], }, + UPDATE_NAMESPACES: { + target: 'datasets.loaded', + actions: ['storeNamespaces'], + }, UPDATE_QUERY: { actions: ['storeQuery'], }, @@ -225,6 +229,16 @@ export const createPureDatasetQualityControllerStateMachine = ( } : {}; }), + storeNamespaces: assign((context, event) => { + return 'namespaces' in event + ? { + filters: { + ...context.filters, + namespaces: event.namespaces, + }, + } + : {}; + }), storeQuery: assign((context, event) => { return 'query' in event ? { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts index 1ea8aea041980..967458b54bf9b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts @@ -40,6 +40,7 @@ interface FiltersCriteria { fullNames: boolean; timeRange: TimeRangeConfig; integrations: string[]; + namespaces: string[]; query?: string; } @@ -155,6 +156,10 @@ export type DatasetQualityControllerEvent = type: 'UPDATE_INTEGRATIONS'; integrations: string[]; } + | { + type: 'UPDATE_NAMESPACES'; + namespaces: string[]; + } | { type: 'UPDATE_QUERY'; query: string; diff --git a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/rtl_helpers.tsx b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/rtl_helpers.tsx index a38cddbda450e..e89cd6d6d3aff 100644 --- a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/rtl_helpers.tsx +++ b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/rtl_helpers.tsx @@ -108,6 +108,7 @@ const defaultCore = coreMock.createStart(); export const mockCore: () => Partial = () => { const core: Partial = { ...defaultCore, + security: undefined, application: { ...defaultCore.application, getUrlForApp: () => '/app/exploratory-view', diff --git a/x-pack/plugins/observability_solution/infra/public/apps/logs_app.tsx b/x-pack/plugins/observability_solution/infra/public/apps/logs_app.tsx index f75f6fa29efd7..ff5631872bfe8 100644 --- a/x-pack/plugins/observability_solution/infra/public/apps/logs_app.tsx +++ b/x-pack/plugins/observability_solution/infra/public/apps/logs_app.tsx @@ -12,7 +12,6 @@ import ReactDOM from 'react-dom'; import { Router, Routes, Route } from '@kbn/shared-ux-router'; import { AppMountParameters } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import '../index.scss'; import { LinkToLogsPage } from '../pages/link_to/link_to_logs'; import { LogsPage } from '../pages/logs'; import { InfraClientStartDeps, InfraClientStartExports } from '../types'; diff --git a/x-pack/plugins/observability_solution/infra/public/apps/metrics_app.tsx b/x-pack/plugins/observability_solution/infra/public/apps/metrics_app.tsx index 4bfd65cd1ac63..338f7df860a21 100644 --- a/x-pack/plugins/observability_solution/infra/public/apps/metrics_app.tsx +++ b/x-pack/plugins/observability_solution/infra/public/apps/metrics_app.tsx @@ -12,7 +12,6 @@ import ReactDOM from 'react-dom'; import { Router, Routes, Route } from '@kbn/shared-ux-router'; import { AppMountParameters } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import '../index.scss'; import { InfraPublicConfig } from '../../common/plugin_config_types'; import { LinkToMetricsPage } from '../pages/link_to/link_to_metrics'; import { InfrastructurePage } from '../pages/metrics'; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx index 33fb38fa612a7..999270401efc2 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx @@ -5,18 +5,22 @@ * 2.0. */ -import React, { useMemo, useRef } from 'react'; +import React, { useContext, useMemo, useRef } from 'react'; +import { FeatureFeedbackButton } from '@kbn/observability-shared-plugin/public'; import { AnomaliesTable } from '../../../ml/anomaly_detection/anomalies_table/anomalies_table'; import { useAssetDetailsRenderPropsContext } from '../../hooks/use_asset_details_render_props'; import { useDatePickerContext } from '../../hooks/use_date_picker'; import { useIntersectingState } from '../../hooks/use_intersecting_state'; import { useRequestObservable } from '../../hooks/use_request_observable'; +import { KibanaEnvironmentContext } from '../../../../hooks/use_kibana'; +import { INFRA_ML_FLYOUT_FEEDBACK_LINK } from '../../../ml/anomaly_detection/flyout_home'; export const Anomalies = () => { const ref = useRef(null); const { request$ } = useRequestObservable(); const { getParsedDateRange } = useDatePickerContext(); const { asset, overrides } = useAssetDetailsRenderPropsContext(); + const { kibanaVersion, isCloudEnv, isServerlessEnv } = useContext(KibanaEnvironmentContext); const { onClose = () => {} } = overrides?.anomalies ?? {}; const parsedDateRange = useMemo(() => getParsedDateRange(), [getParsedDateRange]); @@ -33,6 +37,25 @@ export const Anomalies = () => { hideDatePicker request$={request$} /> +
+ +
); }; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/services.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/services.tsx index e1caec807e8f8..9f6e420758c2c 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/services.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/services.tsx @@ -17,6 +17,7 @@ import { HOST_FIELD } from '../../../../../common/constants'; import { LinkToApmServices } from '../../links'; import { APM_HOST_FILTER_FIELD } from '../../constants'; import { LinkToApmService } from '../../links/link_to_apm_service'; +import { useKibanaEnvironmentContext } from '../../../../hooks/use_kibana'; export const ServicesContent = ({ hostName, @@ -25,10 +26,15 @@ export const ServicesContent = ({ hostName: string; dateRange: TimeRange; }) => { + const { isServerlessEnv } = useKibanaEnvironmentContext(); const linkProps = useLinkProps({ app: 'home', hash: '/tutorial/apm', }); + const serverlessLinkProps = useLinkProps({ + app: 'apm', + pathname: '/onboarding', + }); const params = useMemo( () => ({ filters: { [HOST_FIELD]: hostName }, @@ -87,7 +93,10 @@ export const ServicesContent = ({ defaultMessage="No services found on this host. Click {apmTutorialLink} to instrument your services with APM." values={{ apmTutorialLink: ( - + { return groupBy ? Array.isArray(groupBy) - ? groupBy.every((group) => validGroups.includes(group)) + ? groupBy.some((group) => validGroups.includes(group)) : validGroups.includes(groupBy) : false; }; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/profiling/lib/fetch_profiling_functions.ts b/x-pack/plugins/observability_solution/infra/server/routes/profiling/lib/fetch_profiling_functions.ts index fdf2399be4faa..8e60772ede3c7 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/profiling/lib/fetch_profiling_functions.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/profiling/lib/fetch_profiling_functions.ts @@ -20,7 +20,7 @@ export async function fetchProfilingFunctions( const startSecs = from / 1000; const endSecs = to / 1000; - return await profilingDataAccess.services.fetchFunction({ + return await profilingDataAccess.services.fetchFunctions({ core: coreRequestContext, esClient: coreRequestContext.elasticsearch.client.asCurrentUser, startIndex, diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/add_data_button.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/add_data_button.tsx index 51e1925e82cbe..28d08aedc4a77 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/add_data_button.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/add_data_button.tsx @@ -37,7 +37,12 @@ export const AddDataButton: React.FunctionComponent<{}> = ({}) => { }); return ( - + {addDataLabel} ); diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/list_status.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/list_status.tsx index 3d782544b92c5..ecdffbcefcbef 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/list_status.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/list_status.tsx @@ -60,7 +60,11 @@ export const ListStatus = ({ }} /> } - actions={[{noDataRetryLabel}]} + actions={[ + + {noDataRetryLabel} + , + ]} /> ); } diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/search_controls.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/search_controls.tsx index 5864dd37e42c0..77cb5082efa26 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/search_controls.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/sub_components/search_controls.tsx @@ -42,6 +42,7 @@ export const SearchControls = ({ search, onSearch, onSort, isLoading }: SearchCo ( import('@kbn/unified-data-table/src/components/source_document') @@ -26,6 +27,11 @@ const DiscoverSourcePopoverContent = dynamic( () => import('@kbn/unified-data-table/src/components/source_popover_content') ); +const sourceDocumentClassName = css` + display: inline !important; + margin-left: ${euiThemeVars.euiSizeXS}; +`; + const LogMessage = ({ field, value }: { field?: string; value: string }) => { const renderFieldPrefix = field && field !== constants.MESSAGE_FIELD; return ( @@ -115,7 +121,7 @@ export const Content = ({ shouldShowFieldHandler={shouldShowFieldHandler} maxEntries={50} dataTestSubj="logsExplorerCellDescriptionList" - className="logsExplorerVirtualColumn__sourceDocument" + className={sourceDocumentClassName} /> )} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/virtual_column.scss b/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/virtual_column.scss deleted file mode 100644 index f4f407875d2b6..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/virtual_column.scss +++ /dev/null @@ -1,4 +0,0 @@ -.logsExplorerVirtualColumn__sourceDocument { - display: inline !important; - margin-left: $euiSizeXS; -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_unified_histogram.ts b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_unified_histogram.ts new file mode 100644 index 0000000000000..e2aa1b1f28568 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_unified_histogram.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. + */ + +import type { ClickTriggerEvent, MultiClickTriggerEvent } from '@kbn/charts-plugin/public'; +import { ACTION_GLOBAL_APPLY_FILTER } from '@kbn/unified-search-plugin/public'; +import type { DiscoverCustomization } from '@kbn/discover-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; + +export type WithPreventableEvent = T & { + preventDefault(): void; +}; + +export type ClickTriggerEventData = ClickTriggerEvent['data'] | MultiClickTriggerEvent['data']; + +type CustomClickTriggerEvent = WithPreventableEvent; + +const isClickTriggerEvent = ( + e: CustomClickTriggerEvent +): e is WithPreventableEvent => { + return Array.isArray(e.data) && 'column' in e.data[0]; +}; + +const isMultiValueTriggerEvent = ( + e: CustomClickTriggerEvent +): e is WithPreventableEvent => { + return Array.isArray(e.data) && 'cells' in e.data[0]; +}; + +export const createCustomUnifiedHistogram = ( + data: DataPublicPluginStart +): DiscoverCustomization => { + return { + id: 'unified_histogram', + onFilter: async (eventData) => { + eventData.preventDefault(); + let filters; + if (isClickTriggerEvent(eventData)) { + filters = await data.actions.createFiltersFromValueClickAction(eventData); + } else if (isMultiValueTriggerEvent(eventData)) { + filters = await data.actions.createFiltersFromMultiValueClickAction(eventData); + } + if (filters && filters.length > 0) { + data.query.filterManager.addFilters(filters); + } + }, + onBrushEnd: (eventData) => { + eventData.preventDefault(); + + const [from, to] = eventData.range; + data.query.timefilter.timefilter.setTime({ + from: new Date(from).toISOString(), + to: new Date(to).toISOString(), + mode: 'absolute', + }); + }, + withDefaultActions: false, + disabledActions: [ACTION_GLOBAL_APPLY_FILTER], + }; +}; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/customizations/logs_explorer_profile.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/logs_explorer_profile.tsx index 75ad792f2f3ff..1588e39a453f0 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/customizations/logs_explorer_profile.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/logs_explorer_profile.tsx @@ -21,6 +21,7 @@ import { createCustomSearchBar } from './custom_search_bar'; import { createCustomCellRenderer } from './custom_cell_renderer'; import { createCustomGridColumnsConfiguration } from './custom_column'; import { smartFields } from './custom_field_list'; +import { createCustomUnifiedHistogram } from './custom_unified_histogram'; const LazyCustomDataSourceFilters = dynamic(() => import('./custom_data_source_filters')); const LazyCustomDataSourceSelector = dynamic(() => import('./custom_data_source_selector')); @@ -99,6 +100,9 @@ export const createLogsExplorerProfileCustomizations = }, }); + // Fix bug where filtering on histogram does not work + customizations.set(createCustomUnifiedHistogram(data)); + /** * Hide New, Open and Save settings to prevent working with saved views. */ diff --git a/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json b/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json index 9225389b7c948..6dee0589db957 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json +++ b/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json @@ -43,6 +43,7 @@ "@kbn/unified-field-list", "@kbn/unified-search-plugin", "@kbn/xstate-utils", + "@kbn/charts-plugin", ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/logs_shared/public/components/data_search_progress.tsx b/x-pack/plugins/observability_solution/logs_shared/public/components/data_search_progress.tsx index 8ccc14a4d9acd..a03844fa9b2fd 100644 --- a/x-pack/plugins/observability_solution/logs_shared/public/components/data_search_progress.tsx +++ b/x-pack/plugins/observability_solution/logs_shared/public/components/data_search_progress.tsx @@ -29,6 +29,7 @@ export const DataSearchProgress: React.FC<{ {onCancel ? ( { export function useFetchGroupByCardinality( indexPattern: string, - timestampField: string, - groupBy: string | string[] -): UseFetchIndexPatternFieldsResponse { + timestampField: string = '@timestamp', + groupBy: string | string[], + filters?: QuerySchema +): UseFetchGroupByCardinalityResponse { const { data: dataService } = useKibana().services; + const serializedFilters = JSON.stringify(filters); + const [filtersState, setFiltersState] = useState(serializedFilters); + + // eslint-disable-next-line react-hooks/exhaustive-deps + const store = useCallback( + debounce((value: string) => setFiltersState(value), 800), + [] + ); + + useEffect(() => { + if (filtersState !== serializedFilters) { + store(serializedFilters); + } + }, [filtersState, serializedFilters, store]); + const { isLoading, isError, isSuccess, data } = useQuery({ - queryKey: ['fetchGroupByCardinality', indexPattern, timestampField, groupBy], + queryKey: ['fetchGroupByCardinality', indexPattern, timestampField, groupBy, filters], queryFn: async ({ signal }) => { try { const result = await lastValueFrom( @@ -45,7 +63,10 @@ export function useFetchGroupByCardinality( body: { query: { bool: { - filter: [{ range: { [timestampField]: { gte: 'now-24h' } } }], + filter: [ + { range: { [timestampField]: { gte: 'now-24h' } } }, + getElasticsearchQueryOrThrow(filters), + ], }, }, runtime_mappings: { @@ -76,7 +97,10 @@ export function useFetchGroupByCardinality( retry: false, refetchOnWindowFocus: false, enabled: - Boolean(indexPattern) && Boolean(timestampField) && Boolean(groupBy) && groupBy !== ALL_VALUE, + Boolean(indexPattern) && + Boolean(timestampField) && + Boolean(groupBy) && + ![groupBy].flat().includes(ALL_VALUE), }); return { isLoading, isError, isSuccess, data }; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.scss b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.scss deleted file mode 100644 index 82b1c88dc4038..0000000000000 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.scss +++ /dev/null @@ -1,3 +0,0 @@ -.obsNewsFeed__itemImg { - @include euiBottomShadowSmall; -} \ No newline at end of file diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.tsx index 7fad8c53564e1..b0d4821d27aa3 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/news_feed/news_feed.tsx @@ -15,17 +15,22 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; +import { css } from '@emotion/css'; import { i18n } from '@kbn/i18n'; import { truncate } from 'lodash'; import React, { useContext } from 'react'; import { ThemeContext } from 'styled-components'; import { NewsItem as INewsItem } from './helpers/get_news_feed'; -import './news_feed.scss'; interface Props { items: INewsItem[]; } +const imageClassName = css` + box-shadow: 0 0.7px 1.4px rgba(0, 0, 0, 0.07), 0 1.9px 4px rgba(0, 0, 0, 0.05), + 0 4.5px 10px rgba(0, 0, 0, 0.05); +`; + export function NewsFeed({ items }: Props) { return ( // The news feed is manually added/edited, to prevent any errors caused by typos or missing fields, @@ -98,7 +103,7 @@ function NewsItem({ item }: { item: INewsItem }) { height={48} alt={item.title.en} src={item.image_url.en} - className="obsNewsFeed__itemImg" + className={imageClassName} /> )} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx b/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx index db3b8239c5112..63252f2286157 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx @@ -35,7 +35,7 @@ export function QueryBuilder(props: SearchBarProps) { return ( <> - + { }; const Container = styled.div` + .controlsWrapper { + align-items: flex-start; + min-height: initial; + } .controlGroup { min-height: initial; } diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts b/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts index cc21bd6944fa2..7023ee1ddd4df 100644 --- a/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts +++ b/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts @@ -5,9 +5,11 @@ * 2.0. */ import { DiscoverStart } from '@kbn/discover-plugin/public'; -import { kqlWithFiltersSchema, SLOWithSummaryResponse } from '@kbn/slo-schema'; +import { ALL_VALUE, kqlWithFiltersSchema, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { Filter, FilterStateStore, TimeRange } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; +import { v4 } from 'uuid'; +import { isEmpty } from 'lodash'; import { buildEsQuery } from '../build_es_query'; function createDiscoverLocator( @@ -16,6 +18,7 @@ function createDiscoverLocator( showGood = false, timeRange?: TimeRange ) { + const indexId = v4(); const filters: Filter[] = []; if (kqlWithFiltersSchema.is(slo.indicator.params.filter)) { @@ -33,8 +36,15 @@ function createDiscoverLocator( const goodFilters = kqlWithFiltersSchema.is(slo.indicator.params.good) ? slo.indicator.params.good.filters : []; + const totalKuery = kqlWithFiltersSchema.is(slo.indicator.params.total) + ? slo.indicator.params.total.kqlQuery + : slo.indicator.params.total; + const totalFilters = kqlWithFiltersSchema.is(slo.indicator.params.total) + ? slo.indicator.params.total.filters + : []; const customGoodFilter = buildEsQuery({ kuery: goodKuery, filters: goodFilters }); - const customBadFilter = { bool: { must_not: customGoodFilter } }; + const customTotalFilter = buildEsQuery({ kuery: totalKuery, filters: totalFilters }); + const customBadFilter = { bool: { filter: customTotalFilter, must_not: customGoodFilter } }; filters.push({ $state: { store: FilterStateStore.APP_STATE }, @@ -44,8 +54,8 @@ function createDiscoverLocator( defaultMessage: 'Good events', }), disabled: !showGood, - index: `${slo.indicator.params.index}-id`, value: JSON.stringify(customGoodFilter), + index: indexId, }, query: customGoodFilter as Record, }); @@ -58,11 +68,56 @@ function createDiscoverLocator( defaultMessage: 'Bad events', }), disabled: !showBad, - index: `${slo.indicator.params.index}-id`, value: JSON.stringify(customBadFilter), + index: indexId, }, query: customBadFilter as Record, }); + + filters.push({ + $state: { store: FilterStateStore.APP_STATE }, + meta: { + type: 'custom', + alias: i18n.translate('xpack.observability.slo.sloDetails.totalFilterLabel', { + defaultMessage: 'Total events', + }), + value: JSON.stringify(customTotalFilter), + index: indexId, + }, + query: customTotalFilter as Record, + }); + } + + const groupBy = [slo.groupBy].flat(); + + if ( + !isEmpty(slo.groupings) && + groupBy.length > 0 && + groupBy.every((field) => field === ALL_VALUE) === false + ) { + groupBy.forEach((field) => { + filters.push({ + meta: { + disabled: false, + negate: false, + alias: null, + key: field, + params: { + query: slo.groupings[field], + }, + type: 'phrase', + index: indexId, + }, + $state: { + store: FilterStateStore.APP_STATE, + }, + query: { + match_phrase: { + [field]: slo.groupings[field], + }, + }, + }); + }); } const timeFieldName = @@ -80,7 +135,7 @@ function createDiscoverLocator( }, filters, dataViewSpec: { - id: `${slo.indicator.params.index}-id`, + id: indexId, title: slo.indicator.params.index, timeFieldName, }, diff --git a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts index 532e093d3d3f7..61ae08864f308 100644 --- a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts @@ -575,7 +575,7 @@ export const uiSettings: Record = { name: i18n.translate('xpack.observability.apmEnableTransactionProfiling', { defaultMessage: 'Enable Universal Profiling on Transaction view', }), - value: false, + value: true, schema: schema.boolean(), requiresPageReload: true, }, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts index ce07d3de03308..dcfd39651bf0a 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts @@ -25,14 +25,12 @@ export type FunctionResponse = } | Observable; -export interface FunctionDefinition< - TParameters extends CompatibleJSONSchema = CompatibleJSONSchema -> { +export interface FunctionDefinition { name: string; description: string; visibility?: FunctionVisibility; descriptionForUser?: string; - parameters: TParameters; + parameters?: TParameters; contexts: string[]; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts index b32161ca0195e..e5494fed64d10 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { ObservabilityAIAssistantChatService } from '../public'; +import type { CompatibleJSONSchema, FunctionResponse } from './functions/types'; export enum MessageRole { System = 'system', @@ -77,6 +79,31 @@ export interface KnowledgeBaseEntry { role: KnowledgeBaseEntryRole; } +export interface ObservabilityAIAssistantScreenContextRequest { + screenDescription?: string; + data?: Array<{ + name: string; + description: string; + value: any; + }>; + actions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; +} + +export type ScreenContextActionRespondFunction = ({}: { + args: TArguments; + signal: AbortSignal; + connectorId: string; + client: Pick; + messages: Message[]; +}) => Promise; + +export interface ScreenContextActionDefinition { + name: string; + description: string; + parameters?: CompatibleJSONSchema; + respond: ScreenContextActionRespondFunction; +} + export interface ObservabilityAIAssistantScreenContext { screenDescription?: string; data?: Array<{ @@ -84,4 +111,5 @@ export interface ObservabilityAIAssistantScreenContext { description: string; value: any; }>; + actions?: ScreenContextActionDefinition[]; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts similarity index 83% rename from x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts rename to x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts index 8c38b03040794..45399ea651bb3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts @@ -6,11 +6,8 @@ */ import { v4 } from 'uuid'; -import { MessageRole } from '../../../common'; -import { - MessageAddEvent, - StreamingChatResponseEventType, -} from '../../../common/conversation_complete'; +import { MessageRole } from '..'; +import { MessageAddEvent, StreamingChatResponseEventType } from '../conversation_complete'; export function createFunctionRequestMessage({ name, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts new file mode 100644 index 0000000000000..79f6e5d4ff6df --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts @@ -0,0 +1,32 @@ +/* + * 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 { createFunctionResponseMessage } from './create_function_response_message'; + +export function createFunctionResponseError({ + name, + error, + message, +}: { + name: string; + error: Error; + message?: string; +}) { + return createFunctionResponseMessage({ + name, + content: { + error: { + ...error, + name: error.name, + message: error.message, + cause: error.cause, + stack: error.stack, + }, + message: message || error.message, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts similarity index 82% rename from x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts rename to x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts index 186ff117734c3..b382e09c19e37 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts @@ -6,11 +6,8 @@ */ import { v4 } from 'uuid'; -import { MessageRole } from '../../../common'; -import { - type MessageAddEvent, - StreamingChatResponseEventType, -} from '../../../common/conversation_complete'; +import { MessageRole } from '..'; +import { type MessageAddEvent, StreamingChatResponseEventType } from '../conversation_complete'; export function createFunctionResponseMessage({ name, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/kibana.jsonc b/x-pack/plugins/observability_solution/observability_ai_assistant/kibana.jsonc index 09b7fb7ec5347..3f818b0f88dcc 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/kibana.jsonc @@ -13,6 +13,7 @@ "licensing", "security", "taskManager", + "dataViews", ], "requiredBundles": ["kibanaReact", "kibanaUtils"], "optionalPlugins": ["cloud", "serverless"], diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts index 1ccc48ddb3934..2ab4fd294dffa 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts @@ -161,7 +161,7 @@ function useChatWithoutContext({ setChatState(ChatState.Loading); const next$ = chatService.complete({ - screenContexts: service.getScreenContexts(), + getScreenContexts: () => service.getScreenContexts(), connectorId, messages: getWithSystemMessage(nextMessages, systemMessage), persist, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts index a3bb72746a86b..80d01706700b8 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts @@ -33,6 +33,8 @@ export { useAbortableAsync, type AbortableAsyncState } from './hooks/use_abortab export { createStorybookChatService, createStorybookService } from './storybook_mock'; +export { createScreenContextAction } from './utils/create_screen_context_action'; + export { ChatState } from './hooks/use_chat'; export { FeedbackButtons, type Feedback } from './components/buttons/feedback_buttons'; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx index fb6438dbe8580..c38307e920641 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx @@ -7,8 +7,9 @@ import { i18n } from '@kbn/i18n'; import { noop } from 'lodash'; import React from 'react'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; +import { ScreenContextActionDefinition } from '../common/types'; import type { ObservabilityAIAssistantAPIClient } from './api'; import type { ObservabilityAIAssistantChatService, @@ -49,6 +50,7 @@ export const mockService: ObservabilityAIAssistantService = { openNewConversation: noop, predefinedConversation$: new Observable(), }, + navigate: async () => of(), }; function createSetupContract(): ObservabilityAIAssistantPublicSetup { @@ -75,6 +77,7 @@ function createStartContract(): ObservabilityAIAssistantPublicStart { getPreferredLanguage: () => 'English', }), getContextualInsightMessages: () => [], + createScreenContextAction: () => ({} as ScreenContextActionDefinition), }; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx index 1e82b135a837a..c003856b03699 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx @@ -28,6 +28,7 @@ import type { } from './types'; import { useUserPreferredLanguage } from './hooks/use_user_preferred_language'; import { getContextualInsightMessages } from './utils/get_contextual_insight_messages'; +import { createScreenContextAction } from './utils/create_screen_context_action'; export class ObservabilityAIAssistantPlugin implements @@ -107,6 +108,7 @@ export class ObservabilityAIAssistantPlugin ) : null, getContextualInsightMessages, + createScreenContextAction, }; } } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts new file mode 100644 index 0000000000000..eca7b6977a7c3 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts @@ -0,0 +1,404 @@ +/* + * 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 { filter, last, lastValueFrom, map, of, throwError, toArray } from 'rxjs'; +import { v4 } from 'uuid'; +import { + type Message, + MessageRole, + StreamingChatResponseEventType, + type StreamingChatResponseEvent, + ChatCompletionErrorCode, + ChatCompletionError, + MessageAddEvent, + createInternalServerError, +} from '../../common'; +import type { ObservabilityAIAssistantChatService } from '../types'; +import { complete } from './complete'; + +const client = { + chat: jest.fn(), + complete: jest.fn(), +} as unknown as ObservabilityAIAssistantChatService; + +const connectorId = 'foo'; + +const messages: Message[] = [ + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.System, + content: 'System message', + }, + }, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: 'User message', + }, + }, +]; + +const createLlmResponse = ( + chunks: Array<{ content: string; function_call?: { name: string; arguments: string } }> +): StreamingChatResponseEvent[] => { + const id = v4(); + const message = chunks.reduce( + (prev, current) => { + prev.content += current.content ?? ''; + prev.function_call!.name += current.function_call?.name ?? ''; + prev.function_call!.arguments! += current.function_call?.arguments ?? ''; + return prev; + }, + { + content: '', + role: MessageRole.Assistant, + function_call: { name: '', arguments: '', trigger: MessageRole.Assistant }, + } + ); + + const events: StreamingChatResponseEvent[] = [ + ...chunks.map((msg) => ({ + id, + message: msg, + type: StreamingChatResponseEventType.ChatCompletionChunk as const, + })), + { + id, + message: { + '@timestamp': new Date().toString(), + message, + }, + type: StreamingChatResponseEventType.MessageAdd as const, + }, + ]; + + return events; +}; + +type CompleteParameters = Parameters[0]; + +describe('complete', () => { + const requestCallback: jest.MockedFunction[1]> = jest.fn(); + + beforeEach(() => { + requestCallback.mockReset(); + }); + + function callComplete(params?: Partial) { + return complete( + { + client, + connectorId, + getScreenContexts: () => [], + messages, + persist: false, + signal: new AbortController().signal, + ...params, + }, + requestCallback + ); + } + + describe('when an error is emitted', () => { + beforeEach(() => { + requestCallback.mockImplementation(() => + of({ + type: StreamingChatResponseEventType.ChatCompletionError, + error: { + message: 'Not found', + code: ChatCompletionErrorCode.NotFoundError, + }, + }) + ); + }); + + it('the observable errors out', async () => { + await expect(async () => await lastValueFrom(callComplete())).rejects.toThrowError( + 'Not found' + ); + + await expect(async () => await lastValueFrom(callComplete())).rejects.toBeInstanceOf( + ChatCompletionError + ); + + await expect(async () => await lastValueFrom(callComplete())).rejects.toHaveProperty( + 'code', + ChatCompletionErrorCode.NotFoundError + ); + }); + }); + + describe('with screen context and an action is called', () => { + const respondFn: jest.MockedFn = jest.fn(); + + const getScreenContexts: CompleteParameters['getScreenContexts'] = jest.fn().mockReturnValue([ + { + actions: [ + { + name: 'my_action', + description: 'My action', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + }, + respond: respondFn, + }, + ], + }, + ]); + + beforeEach(() => { + requestCallback.mockImplementationOnce(() => + of( + ...createLlmResponse([ + { + content: '', + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }, + ]) + ) + ); + }); + describe('and it succeeds', () => { + let allMessages: Message[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce({ content: { bar: 'foo' } }); + + requestCallback.mockImplementationOnce(() => + of(...createLlmResponse([{ content: 'Great action call' }])) + ); + + allMessages = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ) + ); + }); + + it('calls the request callback again with the executed message', () => { + expect(requestCallback).toHaveBeenCalledTimes(2); + + const nextMessages = requestCallback.mock.lastCall![0].params.body.messages; + + const expectedMessages = [ + { + '@timestamp': expect.any(String), + message: { + content: '', + function_call: { + arguments: JSON.stringify({ foo: 'bar' }), + name: 'my_action', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }, + { + '@timestamp': expect.any(String), + message: { + content: JSON.stringify({ bar: 'foo' }), + name: 'my_action', + role: MessageRole.User, + }, + }, + ]; + + expect(nextMessages).toEqual([...messages, ...expectedMessages]); + }); + + it('calls the action handler with the arguments from the LLM', () => { + expect(respondFn).toHaveBeenCalledWith( + expect.objectContaining({ + args: { + foo: 'bar', + }, + }) + ); + }); + + it('returns all the messages in the created observable', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'Great action call', + function_call: { + arguments: '', + name: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + + describe('and it fails', () => { + beforeEach(async () => { + respondFn.mockRejectedValueOnce(new Error('foo')); + + requestCallback.mockImplementationOnce(() => + of(...createLlmResponse([{ content: 'Action call failed' }])) + ); + + await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ) + ); + }); + + it('calls the request callback again with the error', () => { + expect(requestCallback).toHaveBeenCalledTimes(2); + + const nextMessages = requestCallback.mock.lastCall![0].params.body.messages; + + const errorMessage = nextMessages[nextMessages.length - 1]; + + expect(errorMessage).toEqual({ + '@timestamp': expect.any(String), + message: { + content: expect.any(String), + name: 'my_action', + role: MessageRole.User, + }, + }); + + expect(JSON.parse(errorMessage.message.content ?? '{}')).toEqual({ + error: expect.objectContaining({ + message: 'foo', + }), + message: 'foo', + }); + }); + }); + + describe('and it returns an observable that completes', () => { + let allMessages: Message[] = []; + let allEvents: StreamingChatResponseEvent[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce( + of(...createLlmResponse([{ content: 'My function response' }])) + ); + + allEvents = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe(toArray(), last()) + ); + + allMessages = allEvents + .filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ) + .map((event) => event.message); + }); + + it('propagates all the events from the responded observable', () => { + expect(allEvents.length).toEqual(5); + expect( + allEvents.filter( + (event) => event.type === StreamingChatResponseEventType.ChatCompletionChunk + ).length + ).toEqual(2); + }); + + it('automatically adds a function response message', () => { + expect(allMessages[allMessages.length - 2]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: JSON.stringify({ executed: true }), + name: 'my_action', + role: MessageRole.User, + }, + }); + }); + + it('adds the messages from the observable', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'My function response', + function_call: { + name: '', + arguments: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + + describe('and it returns an observable that errors out', () => { + let allMessages: Message[] = []; + let allEvents: StreamingChatResponseEvent[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce(throwError(() => createInternalServerError('Foo'))); + + requestCallback.mockImplementationOnce(() => + of( + ...createLlmResponse([ + { + content: 'Looks like your action failed', + }, + ]) + ) + ); + + allEvents = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe(toArray(), last()) + ); + + allMessages = allEvents + .filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ) + .map((event) => event.message); + }); + + it('appends the error message', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'Looks like your action failed', + function_call: { + arguments: '', + name: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + }); +}); 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 new file mode 100644 index 0000000000000..812d486317b57 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts @@ -0,0 +1,219 @@ +/* + * 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 { + catchError, + combineLatest, + filter, + isObservable, + last, + map, + Observable, + of, + shareReplay, + toArray, +} from 'rxjs'; +import { + MessageRole, + StreamingChatResponseEventType, + type BufferFlushEvent, + type ConversationCreateEvent, + type ConversationUpdateEvent, + type Message, + type MessageAddEvent, + type StreamingChatResponseEvent, + type StreamingChatResponseEventWithoutError, +} from '../../common'; +import { ObservabilityAIAssistantScreenContext } from '../../common/types'; +import { createFunctionResponseError } from '../../common/utils/create_function_response_error'; +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; +import { throwSerializedChatCompletionErrors } from '../../common/utils/throw_serialized_chat_completion_errors'; +import type { ObservabilityAIAssistantAPIClientRequestParamsOf } from '../api'; +import { ObservabilityAIAssistantChatService } from '../types'; + +export function complete( + { + client, + getScreenContexts, + connectorId, + conversationId, + messages: initialMessages, + persist, + signal, + }: { + client: Pick; + getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; + connectorId: string; + conversationId?: string; + messages: Message[]; + persist: boolean; + signal: AbortSignal; + }, + requestCallback: ( + params: ObservabilityAIAssistantAPIClientRequestParamsOf<'POST /internal/observability_ai_assistant/chat/complete'> + ) => Observable +): Observable { + return new Observable((subscriber) => { + const screenContexts = getScreenContexts(); + const allActions = screenContexts.flatMap((context) => context.actions ?? []); + + const response$ = requestCallback({ + params: { + body: { connectorId, messages: initialMessages, persist, screenContexts, conversationId }, + }, + }).pipe( + filter( + (event): event is StreamingChatResponseEvent => + event.type !== StreamingChatResponseEventType.BufferFlush + ), + throwSerializedChatCompletionErrors(), + shareReplay() + ); + + const messages$ = response$.pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ); + + const conversationId$ = response$.pipe( + last( + (event): event is ConversationCreateEvent | ConversationUpdateEvent => + event.type === StreamingChatResponseEventType.ConversationCreate || + event.type === StreamingChatResponseEventType.ConversationUpdate + ), + map((event) => event.conversation.id), + catchError(() => { + return of(conversationId); + }) + ); + + response$.subscribe({ + next: (val) => { + subscriber.next(val); + }, + error: (error) => { + subscriber.error(error); + }, + }); + + combineLatest([conversationId$, messages$, response$.pipe(last())]).subscribe({ + next: ([nextConversationId, allMessages]) => { + const functionCall = allMessages[allMessages.length - 1]?.message.function_call; + + if (!functionCall?.name) { + subscriber.complete(); + return; + } + + const requestedAction = allActions.find((action) => action.name === functionCall.name); + + function next(nextMessages: Message[]) { + if ( + nextMessages[nextMessages.length - 1].message.role === MessageRole.Assistant && + !persist + ) { + subscriber.complete(); + return; + } + + complete( + { + client, + getScreenContexts, + connectorId, + conversationId: nextConversationId || conversationId, + messages: initialMessages.concat(nextMessages), + signal, + persist, + }, + requestCallback + ).subscribe(subscriber); + } + + if (!requestedAction) { + const errorMessage = createFunctionResponseError({ + name: functionCall.name, + error: new Error(`Requested action ${functionCall.name} was not found`), + }); + + subscriber.next(errorMessage); + + next([...allMessages, errorMessage.message]); + return; + } + + requestedAction + .respond({ + signal, + client, + args: JSON.parse(functionCall.arguments || '{}'), + connectorId, + messages: allMessages, + }) + .then(async (functionResponse) => { + if (isObservable(functionResponse)) { + const executedMessage = createFunctionResponseMessage({ + name: functionCall.name, + content: { + executed: true, + }, + }); + + allMessages.push(executedMessage.message); + + subscriber.next(executedMessage); + + return await new Promise((resolve, reject) => { + functionResponse.subscribe({ + next: (val) => { + if (val.type === StreamingChatResponseEventType.MessageAdd) { + allMessages.push(val.message); + } + subscriber.next(val); + }, + error: (error) => { + reject(error); + }, + complete: () => { + resolve(); + }, + }); + }); + } + + return createFunctionResponseMessage({ + name: functionCall.name, + content: functionResponse.content, + data: functionResponse.data, + }); + }) + .catch((error) => { + return createFunctionResponseError({ + name: functionCall.name, + error, + }); + }) + .then((event) => { + if (event) { + allMessages.push(event.message); + + subscriber.next(event); + } + next(allMessages); + }); + }, + error: (error) => { + subscriber.error(error); + }, + }); + }); +} 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 683792d5cf708..2a333d742c5ec 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 @@ -73,7 +73,7 @@ describe('createChatService', () => { reportEvent: () => {}, telemetryCounter$: new Observable(), }, - client: clientSpy, + apiClient: clientSpy, registrations: [], signal: new AbortController().signal, }); 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 257a657ce6487..c92d2f7b3daf9 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 @@ -5,15 +5,27 @@ * 2.0. */ -import { AnalyticsServiceStart, HttpResponse } from '@kbn/core/public'; +import type { AnalyticsServiceStart, HttpResponse } from '@kbn/core/public'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; -import { IncomingMessage } from 'http'; +import type { IncomingMessage } from 'http'; import { pick } from 'lodash'; -import { concatMap, delay, filter, map, Observable, of, scan, shareReplay, timestamp } from 'rxjs'; import { - BufferFlushEvent, + concatMap, + delay, + filter, + from, + map, + Observable, + of, + scan, + shareReplay, + switchMap, + timestamp, +} from 'rxjs'; +import { + type BufferFlushEvent, StreamingChatResponseEventType, - StreamingChatResponseEventWithoutError, + type StreamingChatResponseEventWithoutError, type StreamingChatResponseEvent, } from '../../common/conversation_complete'; import { @@ -21,7 +33,6 @@ import { FunctionResponse, FunctionVisibility, } from '../../common/functions/types'; -import { type Message } from '../../common/types'; import { filterFunctionDefinitions } from '../../common/utils/filter_function_definitions'; import { throwSerializedChatCompletionErrors } from '../../common/utils/throw_serialized_chat_completion_errors'; import { sendEvent } from '../analytics'; @@ -32,6 +43,7 @@ import type { RenderFunction, } from '../types'; import { readableStreamReaderIntoObservable } from '../utils/readable_stream_reader_into_observable'; +import { complete } from './complete'; const MIN_DELAY = 35; @@ -82,19 +94,19 @@ export async function createChatService({ analytics, signal: setupAbortSignal, registrations, - client, + apiClient, }: { analytics: AnalyticsServiceStart; signal: AbortSignal; registrations: ChatRegistrationRenderFunction[]; - client: ObservabilityAIAssistantAPIClient; + apiClient: ObservabilityAIAssistantAPIClient; }): Promise { const functionRegistry: FunctionRegistry = new Map(); const renderFunctionRegistry: Map> = new Map(); const [{ functionDefinitions, contextDefinitions }] = await Promise.all([ - client('GET /internal/observability_ai_assistant/functions', { + apiClient('GET /internal/observability_ai_assistant/functions', { signal: setupAbortSignal, }), ...registrations.map((registration) => { @@ -117,100 +129,8 @@ export async function createChatService({ }); }; - return { - sendAnalyticsEvent: (event) => { - sendEvent(analytics, event); - }, - renderFunction: (name, args, response, onActionClick) => { - const fn = renderFunctionRegistry.get(name); - - if (!fn) { - throw new Error(`Function ${name} not found`); - } - - const parsedArguments = args ? JSON.parse(args) : {}; - - const parsedResponse = { - content: JSON.parse(response.content ?? '{}'), - data: JSON.parse(response.data ?? '{}'), - }; - - return fn?.({ - response: parsedResponse, - arguments: parsedArguments, - onActionClick, - }); - }, - getContexts: () => contextDefinitions, - getFunctions, - hasFunction: (name: string) => { - return functionRegistry.has(name); - }, - hasRenderFunction: (name: string) => { - return renderFunctionRegistry.has(name); - }, - complete({ - screenContexts, - connectorId, - conversationId, - messages, - persist, - signal, - responseLanguage, - }) { - return new Observable((subscriber) => { - client('POST /internal/observability_ai_assistant/chat/complete', { - params: { - body: { - connectorId, - conversationId, - screenContexts, - messages, - persist, - responseLanguage, - }, - }, - signal, - asResponse: true, - rawResponse: true, - }) - .then((_response) => { - const response = _response as unknown as HttpResponse; - const response$ = toObservable(response) - .pipe( - map((line) => JSON.parse(line) as StreamingChatResponseEvent | BufferFlushEvent), - filter( - (line): line is StreamingChatResponseEvent => - line.type !== StreamingChatResponseEventType.BufferFlush - ), - throwSerializedChatCompletionErrors() - ) - .subscribe(subscriber); - - signal.addEventListener('abort', () => { - response$.unsubscribe(); - }); - }) - .catch((err) => { - subscriber.error(err); - subscriber.complete(); - }); - }); - }, - chat( - name: string, - { - connectorId, - messages, - function: callFunctions = 'auto', - signal, - }: { - connectorId: string; - messages: Message[]; - function?: 'none' | 'auto'; - signal: AbortSignal; - } - ) { + const client: Pick = { + chat(name: string, { connectorId, messages, function: callFunctions = 'auto', signal }) { return new Observable((subscriber) => { const contexts = ['core', 'apm']; @@ -222,7 +142,7 @@ export async function createChatService({ ); }); - client('POST /internal/observability_ai_assistant/chat', { + apiClient('POST /internal/observability_ai_assistant/chat', { params: { body: { name, @@ -279,5 +199,68 @@ export async function createChatService({ shareReplay() ); }, + complete({ getScreenContexts, connectorId, conversationId, messages, persist, signal }) { + return complete( + { + getScreenContexts, + connectorId, + conversationId, + messages, + persist, + signal, + client, + }, + ({ params }) => { + return from( + apiClient('POST /internal/observability_ai_assistant/chat/complete', { + params, + signal, + asResponse: true, + rawResponse: true, + }) + ).pipe( + map((_response) => toObservable(_response as unknown as HttpResponse)), + switchMap((response$) => response$), + map((line) => JSON.parse(line) as StreamingChatResponseEvent | BufferFlushEvent), + shareReplay() + ); + } + ); + }, + }; + + return { + sendAnalyticsEvent: (event) => { + sendEvent(analytics, event); + }, + renderFunction: (name, args, response, onActionClick) => { + const fn = renderFunctionRegistry.get(name); + + if (!fn) { + throw new Error(`Function ${name} not found`); + } + + const parsedArguments = args ? JSON.parse(args) : {}; + + const parsedResponse = { + content: JSON.parse(response.content ?? '{}'), + data: JSON.parse(response.data ?? '{}'), + }; + + return fn?.({ + response: parsedResponse, + arguments: parsedArguments, + onActionClick, + }); + }, + getContexts: () => contextDefinitions, + getFunctions, + hasFunction: (name: string) => { + return functionRegistry.has(name); + }, + hasRenderFunction: (name: string) => { + return renderFunctionRegistry.has(name); + }, + ...client, }; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts index 0db5b9cf8b5ba..9ccfca66e53b3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts @@ -6,9 +6,11 @@ */ import type { AnalyticsServiceStart, CoreStart } from '@kbn/core/public'; -import { without } from 'lodash'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { compact, without } from 'lodash'; +import { BehaviorSubject, debounceTime, filter, lastValueFrom, of, Subject, take } from 'rxjs'; import type { Message, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import { createFunctionRequestMessage } from '../../common/utils/create_function_request_message'; +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; import { createCallObservabilityAIAssistantAPI } from '../api'; import type { ChatRegistrationRenderFunction, ObservabilityAIAssistantService } from '../types'; @@ -21,7 +23,7 @@ export function createService({ coreStart: CoreStart; enabled: boolean; }): ObservabilityAIAssistantService { - const client = createCallObservabilityAIAssistantAPI(coreStart); + const apiClient = createCallObservabilityAIAssistantAPI(coreStart); const registrations: ChatRegistrationRenderFunction[] = []; @@ -37,17 +39,50 @@ export function createService({ }, start: async ({ signal }) => { const mod = await import('./create_chat_service'); - return await mod.createChatService({ analytics, client, signal, registrations }); + return await mod.createChatService({ analytics, apiClient, signal, registrations }); }, - callApi: client, + callApi: apiClient, getScreenContexts() { return screenContexts$.value; }, setScreenContext: (context: ObservabilityAIAssistantScreenContext) => { screenContexts$.next(screenContexts$.value.concat(context)); - return () => { + + function unsubscribe() { screenContexts$.next(without(screenContexts$.value, context)); - }; + } + + return unsubscribe; + }, + navigate: async (cb) => { + cb(); + + // wait for at least 1s of no network activity + await lastValueFrom( + coreStart.http.getLoadingCount$().pipe( + filter((count) => count === 0), + debounceTime(1000), + take(1) + ) + ); + + return of( + createFunctionRequestMessage({ + name: 'context', + args: { + queries: [], + categories: [], + }, + }), + createFunctionResponseMessage({ + name: 'context', + content: { + screenDescription: compact( + screenContexts$.value.map((context) => context.screenDescription) + ).join('\n\n'), + }, + }) + ); }, conversations: { openNewConversation: ({ messages, title }: { messages: Message[]; title?: string }) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx index 1b2d71a71b345..01c2f658e360b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { noop } from 'lodash'; import React from 'react'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; import type { ObservabilityAIAssistantAPIClient } from './api'; import type { ObservabilityAIAssistantChatService, ObservabilityAIAssistantService } from './types'; @@ -44,4 +44,5 @@ export const createStorybookService = (): ObservabilityAIAssistantService => ({ openNewConversation: noop, predefinedConversation$: new Observable(), }, + navigate: async () => of(), }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts index d8c719dfa0364..bf26ce44eb81f 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts @@ -9,7 +9,10 @@ import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/public'; import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public'; import type { Observable } from 'rxjs'; -import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; +import type { + MessageAddEvent, + StreamingChatResponseEventWithoutError, +} from '../common/conversation_complete'; import type { ContextDefinition, FunctionDefinition, @@ -30,6 +33,7 @@ import { useChat } from './hooks/use_chat'; import type { UseGenAIConnectorsResult } from './hooks/use_genai_connectors'; import { useObservabilityAIAssistantChatService } from './hooks/use_observability_ai_assistant_chat_service'; import type { UseUserPreferredLanguageResult } from './hooks/use_user_preferred_language'; +import { createScreenContextAction } from './utils/create_screen_context_action'; /* eslint-disable @typescript-eslint/no-empty-interface*/ @@ -47,7 +51,7 @@ export interface ObservabilityAIAssistantChatService { } ) => Observable; complete: (options: { - screenContexts: ObservabilityAIAssistantScreenContext[]; + getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; conversationId?: string; connectorId: string; messages: Message[]; @@ -80,6 +84,7 @@ export interface ObservabilityAIAssistantService { setScreenContext: (screenContext: ObservabilityAIAssistantScreenContext) => () => void; getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; conversations: ObservabilityAIAssistantConversationService; + navigate: (callback: () => void) => Promise>; } export type RenderFunction = (options: { @@ -123,4 +128,5 @@ export interface ObservabilityAIAssistantPublicStart { useChat: typeof useChat; useUserPreferredLanguage: () => UseUserPreferredLanguageResult; getContextualInsightMessages: ({}: { message: string; instructions: string }) => Message[]; + createScreenContextAction: typeof createScreenContextAction; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts new file mode 100644 index 0000000000000..3dbc4dbaf36f0 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts @@ -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 type { FromSchema } from 'json-schema-to-ts'; +import { CompatibleJSONSchema } from '../../common/functions/types'; +import type { + ScreenContextActionDefinition, + ScreenContextActionRespondFunction, +} from '../../common/types'; + +type ReturnOf> = + TActionDefinition['parameters'] extends CompatibleJSONSchema + ? FromSchema + : undefined; + +export function createScreenContextAction< + TActionDefinition extends Omit, + TResponse = ReturnOf +>( + definition: TActionDefinition, + respond: ScreenContextActionRespondFunction +): ScreenContextActionDefinition { + return { + ...definition, + respond, + }; +} 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 225a248b160ac..61603210a44f2 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 @@ -18,8 +18,8 @@ import { MessageAddEvent } from '../../common/conversation_complete'; import { FunctionVisibility } from '../../common/functions/types'; import { MessageRole, type Message } from '../../common/types'; import { concatenateChatCompletionChunks } from '../../common/utils/concatenate_chat_completion_chunks'; +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; import type { ObservabilityAIAssistantClient } from '../service/client'; -import { createFunctionResponseMessage } from '../service/util/create_function_response_message'; import { parseSuggestionScores } from './parse_suggestion_scores'; const MAX_TOKEN_COUNT_FOR_DATA_ON_SCREEN = 1000; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts index 84057b04e3bd4..7d375a6ae9d2c 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts @@ -25,11 +25,15 @@ const chatRoute = createObservabilityAIAssistantServerRoute({ messages: t.array(messageRt), connectorId: t.string, functions: t.array( - t.type({ - name: t.string, - description: t.string, - parameters: t.any, - }) + t.intersection([ + t.type({ + name: t.string, + description: t.string, + }), + t.partial({ + parameters: t.any, + }), + ]) ), }), t.partial({ diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts index cef56f673e235..1e185018b84c3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts @@ -13,7 +13,7 @@ import { type ConversationUpdateRequest, type Message, MessageRole, - type ObservabilityAIAssistantScreenContext, + type ObservabilityAIAssistantScreenContextRequest, } from '../../common/types'; const serializeableRt = t.any; @@ -94,7 +94,7 @@ export const conversationRt: t.Type = t.intersection([ }), ]); -export const screenContextRt: t.Type = t.partial({ +export const screenContextRt: t.Type = t.partial({ description: t.string, data: t.array( t.type({ @@ -103,4 +103,15 @@ export const screenContextRt: t.Type = t. value: t.any, }) ), + actions: t.array( + t.intersection([ + t.type({ + name: t.string, + description: t.string, + }), + t.partial({ + parameters: t.record(t.string, t.any), + }), + ]) + ), }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts index 618f7eef00276..5f55f11c29764 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts @@ -10,13 +10,13 @@ import Ajv, { type ErrorObject, type ValidateFunction } from 'ajv'; import dedent from 'dedent'; import { compact, keyBy } from 'lodash'; import { - type ContextRegistry, FunctionVisibility, - type RegisterContextDefinition, type ContextDefinition, + type ContextRegistry, type FunctionResponse, + type RegisterContextDefinition, } from '../../../common/functions/types'; -import type { Message, ObservabilityAIAssistantScreenContext } from '../../../common/types'; +import type { Message, ObservabilityAIAssistantScreenContextRequest } from '../../../common/types'; import { filterFunctionDefinitions } from '../../../common/utils/filter_function_definitions'; import type { FunctionHandler, FunctionHandlerRegistry, RegisterFunction } from '../types'; @@ -35,9 +35,13 @@ export class ChatFunctionClient { private readonly functionRegistry: FunctionHandlerRegistry = new Map(); private readonly validators: Map = new Map(); - constructor(private readonly screenContexts: ObservabilityAIAssistantScreenContext[]) { + private readonly actions: Required['actions']; + + constructor(private readonly screenContexts: ObservabilityAIAssistantScreenContextRequest[]) { const allData = compact(screenContexts.flatMap((context) => context.data)); + this.actions = compact(screenContexts.flatMap((context) => context.actions)); + if (allData.length) { this.registerFunction( { @@ -74,10 +78,18 @@ export class ChatFunctionClient { } ); } + + this.actions.forEach((action) => { + if (action.parameters) { + this.validators.set(action.name, ajv.compile(action.parameters)); + } + }); } registerFunction: RegisterFunction = (definition, respond) => { - this.validators.set(definition.name, ajv.compile(definition.parameters)); + if (definition.parameters) { + this.validators.set(definition.name, ajv.compile(definition.parameters)); + } this.functionRegistry.set(definition.name, { definition, respond }); }; @@ -85,8 +97,12 @@ export class ChatFunctionClient { this.contextRegistry.set(context.name, context); }; - private validate(name: string, parameters: unknown) { + validate(name: string, parameters: unknown) { const validator = this.validators.get(name)!; + if (!validator) { + return; + } + const result = validator(parameters); if (!result) { throw new FunctionArgsValidationError(validator.errors!); @@ -97,6 +113,10 @@ export class ChatFunctionClient { return Array.from(this.contextRegistry.values()); } + hasAction(name: string) { + return !!this.actions.find((action) => action.name === name)!; + } + getFunctions({ contexts, filter, @@ -117,6 +137,10 @@ export class ChatFunctionClient { return matchingDefinitions.map((definition) => functionsByName[definition.name]); } + getActions() { + return this.actions; + } + hasFunction(name: string): boolean { return this.functionRegistry.has(name); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts index f864ba02c8ac5..de727f1168aa0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts @@ -90,7 +90,9 @@ export const createBedrockClaudeAdapter: LlmApiAdapterFactory = ({ (fn) => ` ${fn.name} ${fn.description} - + ${ + fn.parameters + ? ` ${jsonSchemaToFlatParameters(fn.parameters).map((param) => { return ` ${param.name} @@ -107,7 +109,9 @@ export const createBedrockClaudeAdapter: LlmApiAdapterFactory = ({ `; })} - + ` + : '' + } ` ) .join('\n')} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts index 61935d891a1db..5eb6834d44482 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { compact, isEmpty, omit } from 'lodash'; +import { compact, isEmpty, merge, omit } from 'lodash'; import OpenAI from 'openai'; import { MessageRole } from '../../../../common'; import { processOpenAiStream } from '../../../../common/utils/process_openai_stream'; @@ -44,7 +44,16 @@ export const createOpenAiAdapter: LlmApiAdapterFactory = ({ }) ); - const functionsForOpenAI = functions; + const functionsForOpenAI = functions?.map((fn) => ({ + ...fn, + parameters: merge( + { + type: 'object', + properties: {}, + }, + fn.parameters + ), + })); const request: Omit & { model?: string } = { messages: messagesForOpenAI as OpenAI.ChatCompletionCreateParams['messages'], diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts index 03fa2fa86461b..bf747051a0347 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts @@ -24,7 +24,7 @@ async function parseFunctionCallXml({ functions, }: { xml: string; - functions?: Array<{ name: string; description: string; parameters: JSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: JSONSchema }>; }) { const parser = new Parser(); @@ -45,7 +45,9 @@ async function parseFunctionCallXml({ ); } - const args = convertDeserializedXmlWithJsonSchema(parameters, functionDef.parameters); + const args = functionDef.parameters + ? convertDeserializedXmlWithJsonSchema(parameters, functionDef.parameters) + : {}; return { name: fnName, @@ -58,7 +60,7 @@ export function processBedrockStream({ functions, }: { logger: Logger; - functions?: Array<{ name: string; description: string; parameters: JSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: JSONSchema }>; }) { return (source: Observable) => new Observable((subscriber) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts index fff3edeccb7db..44c8b5711be32 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts @@ -15,7 +15,7 @@ import { CompatibleJSONSchema } from '../../../../common/functions/types'; export type LlmApiAdapterFactory = (options: { logger: Logger; messages: Message[]; - functions?: Array<{ name: string; description: string; parameters: CompatibleJSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; functionCall?: string; }) => LlmApiAdapter; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts index 96ef44adfee64..216e3dfce1361 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts @@ -23,10 +23,10 @@ import { MessageAddEvent, StreamingChatResponseEventType, } from '../../../common/conversation_complete'; +import { createFunctionResponseMessage } from '../../../common/utils/create_function_response_message'; import type { CreateChatCompletionResponseChunk } from '../../../common/utils/process_openai_stream'; -import type { ChatFunctionClient } from '../chat_function_client'; +import { ChatFunctionClient } from '../chat_function_client'; import type { KnowledgeBaseService } from '../knowledge_base_service'; -import { createFunctionResponseMessage } from '../util/create_function_response_message'; import { observableIntoStream } from '../util/observable_into_stream'; type ChunkDelta = CreateChatCompletionResponseChunk['choices'][number]['delta']; @@ -116,6 +116,9 @@ describe('Observability AI Assistant client', () => { executeFunction: jest.fn(), getFunctions: jest.fn(), hasFunction: jest.fn(), + hasAction: jest.fn(), + getActions: jest.fn(), + validate: jest.fn(), } as any; let llmSimulator: LlmSimulator; @@ -128,6 +131,9 @@ describe('Observability AI Assistant client', () => { return name !== 'context'; }); + functionClientMock.hasAction.mockReturnValue(false); + functionClientMock.getActions.mockReturnValue([]); + actionsClientMock.get.mockResolvedValue({ actionTypeId: ObservabilityAIAssistantConnectorType.OpenAI, id: 'foo', @@ -1468,4 +1474,123 @@ describe('Observability AI Assistant client', () => { 'You MUST respond in the users preferred language which is: Orcish. This is a system message' ); }); + + describe('when executing an action', () => { + let completePromise: Promise; + + beforeEach(async () => { + client = createClient(); + + llmSimulator = createLlmSimulator(); + + actionsClientMock.execute.mockImplementation(async () => { + llmSimulator = createLlmSimulator(); + return { + actionId: '', + status: 'ok', + data: llmSimulator.stream, + }; + }); + + const complete$ = await client.complete({ + connectorId: 'foo', + messages: [ + system('This is a system message'), + user('Can you call the my_action function?'), + ], + functionClient: new ChatFunctionClient([ + { + actions: [ + { + name: 'my_action', + description: 'My action description', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + required: ['foo'], + }, + }, + ], + }, + ]), + signal: new AbortController().signal, + title: 'My predefined title', + persist: false, + }); + + const messages: Message[] = []; + + completePromise = new Promise((resolve, reject) => { + complete$.subscribe({ + next: (event) => { + if (event.type === StreamingChatResponseEventType.MessageAdd) { + messages.push(event.message); + } + }, + complete: () => resolve(messages), + }); + }); + }); + + describe('and validation succeeds', () => { + beforeEach(async () => { + await llmSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }); + await llmSimulator.complete(); + }); + + it('completes the observable function request being the last event', async () => { + const messages = await completePromise; + expect(messages.length).toBe(1); + + expect(messages[0].message.function_call).toEqual({ + name: 'my_action', + arguments: JSON.stringify({ foo: 'bar' }), + trigger: MessageRole.Assistant, + }); + }); + }); + + describe('and validation fails', () => { + beforeEach(async () => { + await llmSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ bar: 'foo' }) }, + }); + + await llmSimulator.complete(); + + await waitFor(() => + actionsClientMock.execute.mock.calls.length === 2 + ? Promise.resolve() + : Promise.reject(new Error('Waiting until execute is called again')) + ); + + await nextTick(); + + await llmSimulator.next({ + content: 'Looks like the function call failed', + }); + + await llmSimulator.complete(); + }); + + it('appends a function response error and sends it back to the LLM', async () => { + const messages = await completePromise; + expect(messages.length).toBe(3); + + expect(messages[0].message.function_call?.name).toBe('my_action'); + + expect(messages[1].message.name).toBe('my_action'); + + expect(JSON.parse(messages[1].message.content ?? '{}')).toHaveProperty('error'); + + expect(messages[2].message.content).toBe('Looks like the function call failed'); + }); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts index cec07bc949cab..932adbc3a0f5d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts @@ -48,6 +48,7 @@ import { type Message, } from '../../../common/types'; import { concatenateChatCompletionChunks } from '../../../common/utils/concatenate_chat_completion_chunks'; +import { createFunctionResponseError } from '../../../common/utils/create_function_response_error'; import { emitWithConcatenatedMessage } from '../../../common/utils/emit_with_concatenated_message'; import type { ChatFunctionClient } from '../chat_function_client'; import { @@ -159,6 +160,19 @@ export class ObservabilityAIAssistantClient { const MAX_FUNCTION_CALLS = 5; const MAX_FUNCTION_RESPONSE_TOKEN_COUNT = 4000; + const allFunctions = functionClient + .getFunctions() + .filter((fn) => { + const visibility = fn.definition.visibility ?? FunctionVisibility.All; + return ( + visibility === FunctionVisibility.All || + visibility === FunctionVisibility.AssistantOnly + ); + }) + .map((fn) => pick(fn.definition, 'name', 'description', 'parameters')); + + const allActions = functionClient.getActions(); + const next = async (nextMessages: Message[]): Promise => { const lastMessage = last(nextMessages); @@ -199,18 +213,7 @@ export class ObservabilityAIAssistantClient { return await next(nextMessages.concat(addedMessage)); } else if (isUserMessage) { const functions = - numFunctionsCalled >= MAX_FUNCTION_CALLS - ? [] - : functionClient - .getFunctions() - .filter((fn) => { - const visibility = fn.definition.visibility ?? FunctionVisibility.All; - return ( - visibility === FunctionVisibility.All || - visibility === FunctionVisibility.AssistantOnly - ); - }) - .map((fn) => pick(fn.definition, 'name', 'description', 'parameters')); + numFunctionsCalled >= MAX_FUNCTION_CALLS ? [] : allFunctions.concat(allActions); if (numFunctionsCalled >= MAX_FUNCTION_CALLS) { this.dependencies.logger.debug( @@ -254,9 +257,37 @@ export class ObservabilityAIAssistantClient { } if (isAssistantMessageWithFunctionRequest) { - const span = apm.startSpan( - `execute_function ${lastMessage.message.function_call!.name}` - ); + const functionCallName = lastMessage.message.function_call!.name; + + if (functionClient.hasAction(functionCallName)) { + this.dependencies.logger.debug(`Executing client-side action: ${functionCallName}`); + + // if validation fails, return the error to the LLM. + // otherwise, close the stream. + + try { + functionClient.validate( + functionCallName, + JSON.parse(lastMessage.message.function_call!.arguments || '{}') + ); + } catch (error) { + const functionResponseMessage = createFunctionResponseError({ + name: functionCallName, + error, + }); + nextMessages = nextMessages.concat(functionResponseMessage.message); + + subscriber.next(functionResponseMessage); + + return await next(nextMessages); + } + + subscriber.complete(); + + return; + } + + const span = apm.startSpan(`execute_function ${functionCallName}`); span?.addLabels({ ai_assistant_args: JSON.stringify(lastMessage.message.function_call!.arguments ?? {}), @@ -273,7 +304,7 @@ export class ObservabilityAIAssistantClient { : await functionClient .executeFunction({ connectorId, - name: lastMessage.message.function_call!.name, + name: functionCallName, messages: nextMessages, args: lastMessage.message.function_call!.arguments, signal, @@ -313,6 +344,7 @@ export class ObservabilityAIAssistantClient { numFunctionsCalled++; if (signal.aborted) { + span?.end(); return; } @@ -455,7 +487,7 @@ export class ObservabilityAIAssistantClient { }: { messages: Message[]; connectorId: string; - functions?: Array<{ name: string; description: string; parameters: CompatibleJSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; functionCall?: string; signal: AbortSignal; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts index 1df243fc2ba35..e1a19df6b44b0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts @@ -13,7 +13,10 @@ import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { getSpaceIdFromPath } from '@kbn/spaces-plugin/common'; import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import { once } from 'lodash'; -import { KnowledgeBaseEntryRole, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import { + KnowledgeBaseEntryRole, + ObservabilityAIAssistantScreenContextRequest, +} from '../../common/types'; import type { ObservabilityAIAssistantPluginStartDependencies } from '../types'; import { ChatFunctionClient } from './chat_function_client'; import { ObservabilityAIAssistantClient } from './client'; @@ -291,7 +294,7 @@ export class ObservabilityAIAssistantService { resources, client, }: { - screenContexts: ObservabilityAIAssistantScreenContext[]; + screenContexts: ObservabilityAIAssistantScreenContextRequest[]; signal: AbortSignal; resources: RespondFunctionResources; client: ObservabilityAIAssistantClient; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts index 1ade4fc0e179a..cc21d373be4eb 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts @@ -11,7 +11,7 @@ import type { FunctionDefinition, FunctionResponse, } from '../../common/functions/types'; -import type { Message, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import type { Message, ObservabilityAIAssistantScreenContextRequest } from '../../common/types'; import type { ObservabilityAIAssistantRouteHandlerResources } from '../routes/types'; import { ChatFunctionClient } from './chat_function_client'; import type { ObservabilityAIAssistantClient } from './client'; @@ -26,7 +26,7 @@ type RespondFunction = ( arguments: TArguments; messages: Message[]; connectorId: string; - screenContexts: ObservabilityAIAssistantScreenContext[]; + screenContexts: ObservabilityAIAssistantScreenContextRequest[]; }, signal: AbortSignal ) => Promise; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/kibana.jsonc b/x-pack/plugins/observability_solution/observability_ai_assistant_app/kibana.jsonc index 801de5f1e386f..1a172d51a514b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/kibana.jsonc @@ -16,7 +16,6 @@ "lens", "ruleRegistry", "uiActions", - "dataViews", "triggersActionsUi", "share", "security", diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx index 2d7387d9a1040..6dadba00f2394 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx @@ -11,8 +11,9 @@ import { i18n } from '@kbn/i18n'; export function NewChatButton( props: React.ComponentProps & { collapsed?: boolean } ) { + const { collapsed, ...nextProps } = props; return !props.collapsed ? ( - + {i18n.translate('xpack.observabilityAiAssistant.newChatButton', { defaultMessage: 'New chat', @@ -23,7 +24,7 @@ export function NewChatButton( data-test-subj="observabilityAiAssistantNewChatButtonButton" iconType={EuiIconNewChat} size="xs" - {...props} + {...nextProps} /> ); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx index 19ee4af2be538..2210f50d7a6b7 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx @@ -15,6 +15,7 @@ import { ChatFlyout } from '../chat/chat_flyout'; import { useKibana } from '../../hooks/use_kibana'; import { useIsNavControlVisible } from '../../hooks/is_nav_control_visible'; import { useTheme } from '../../hooks/use_theme'; +import { useNavControlScreenContext } from '../../hooks/use_nav_control_screen_context'; export function NavControl({}: {}) { const service = useObservabilityAIAssistantAppService(); @@ -31,6 +32,8 @@ export function NavControl({}: {}) { const [hasBeenOpened, setHasBeenOpened] = useState(false); + useNavControlScreenContext(); + const chatService = useAbortableAsync( ({ signal }) => { return hasBeenOpened ? service.start({ signal }) : undefined; @@ -77,6 +80,7 @@ export function NavControl({}: {}) { return ( <> { service.conversations.openNewConversation({ diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx index 2f7d872d191d7..e190cc0c34782 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx @@ -13,7 +13,7 @@ import { } from '@testing-library/react-hooks'; import { merge } from 'lodash'; import React from 'react'; -import { Observable, Subject } from 'rxjs'; +import { Observable, of, Subject } from 'rxjs'; import { MessageRole, StreamingChatResponseEventType, @@ -54,6 +54,7 @@ const mockService: MockedService = { openNewConversation: jest.fn(), predefinedConversation$: new Observable(), }, + navigate: jest.fn().mockReturnValue(of()), }; const mockChatService = createMockChatService(); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts new file mode 100644 index 0000000000000..7baf9aae82512 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts @@ -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 { useEffect, useState } from 'react'; +import datemath from '@elastic/datemath'; +import moment from 'moment'; +import { useKibana } from './use_kibana'; +import { useObservabilityAIAssistantAppService } from './use_observability_ai_assistant_app_service'; + +export function useNavControlScreenContext() { + const service = useObservabilityAIAssistantAppService(); + + const { + services: { + plugins: { + start: { data }, + }, + }, + } = useKibana(); + + const { from, to } = data.query.timefilter.timefilter.getTime(); + + const [href, setHref] = useState(window.location.href); + + useEffect(() => { + const originalPushState = window.history.pushState.bind(window.history); + const originalReplaceState = window.history.replaceState.bind(window.history); + + let unmounted: boolean = false; + + function updateHref() { + if (!unmounted) { + setHref(window.location.href); + } + } + + window.history.pushState = (...args: Parameters) => { + originalPushState(...args); + updateHref(); + }; + + window.history.replaceState = (...args: Parameters) => { + originalReplaceState(...args); + updateHref(); + }; + window.addEventListener('popstate', updateHref); + + window.addEventListener('hashchange', updateHref); + + return () => { + unmounted = true; + window.removeEventListener('popstate', updateHref); + window.removeEventListener('hashchange', updateHref); + }; + }, []); + + useEffect(() => { + const start = datemath.parse(from)?.format() ?? moment().subtract(1, 'day').toISOString(); + const end = datemath.parse(to)?.format() ?? moment().toISOString(); + + return service.setScreenContext({ + screenDescription: `The user is looking at ${href}. The current time range is ${start} - ${end}.`, + }); + }, [service, from, to, href]); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts index 5bce062b9eecd..2876ddaf3332d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts @@ -27,6 +27,7 @@ import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ObservabilityAIAssistantAppPublicStart {} @@ -44,6 +45,7 @@ export interface ObservabilityAIAssistantAppPluginStartDependencies { observabilityShared: ObservabilitySharedPluginStart; ml: MlPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + data: DataPublicPluginStart; } export interface ObservabilityAIAssistantAppPluginSetupDependencies { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts index ff36484381b2a..a3f86aaa03de7 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts @@ -22,7 +22,7 @@ import { } from '@kbn/observability-ai-assistant-plugin/common/utils/concatenate_chat_completion_chunks'; import { ChatCompletionChunkEvent } from '@kbn/observability-ai-assistant-plugin/common/conversation_complete'; import { emitWithConcatenatedMessage } from '@kbn/observability-ai-assistant-plugin/common/utils/emit_with_concatenated_message'; -import { createFunctionResponseMessage } from '@kbn/observability-ai-assistant-plugin/server/service/util/create_function_response_message'; +import { createFunctionResponseMessage } from '@kbn/observability-ai-assistant-plugin/common/utils/create_function_response_message'; import type { FunctionRegistrationParameters } from '..'; import { correctCommonEsqlMistakes } from './correct_common_esql_mistakes'; @@ -352,11 +352,16 @@ export function registerQueryFunction({ ], connectorId, signal, + functions: functions.getActions(), } ); return esqlResponse$.pipe( emitWithConcatenatedMessage((msg) => { + if (msg.message.function_call.name) { + return msg; + } + const esqlQuery = correctCommonEsqlMistakes(msg.message.content, resources.logger).match( /```esql([\s\S]*?)```/ )?.[1]; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json b/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json index ac80f9b74f1cf..65fe909cd7e04 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json @@ -48,7 +48,8 @@ "@kbn/ml-plugin", "@kbn/react-kibana-context-theme", "@kbn/shared-ux-link-redirect-app", - "@kbn/shared-ux-utility" + "@kbn/shared-ux-utility", + "@kbn/data-plugin" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/common/url_schema/dataset_quality/url_schema_v1.ts b/x-pack/plugins/observability_solution/observability_logs_explorer/common/url_schema/dataset_quality/url_schema_v1.ts index 7395b70585afb..a1a55789daf0e 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/common/url_schema/dataset_quality/url_schema_v1.ts +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/common/url_schema/dataset_quality/url_schema_v1.ts @@ -68,6 +68,7 @@ export const filtersRT = rt.exact( fullNames: rt.boolean, timeRange: timeRangeRT, integrations: rt.array(rt.string), + namespaces: rt.array(rt.string), query: rt.string, }) ); diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx index c5f4785712099..fc224093dfe60 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx @@ -228,6 +228,7 @@ export const AlertsPopover = () => { diff --git a/x-pack/plugins/observability_solution/profiling/public/components/flamegraph/index.tsx b/x-pack/plugins/observability_solution/profiling/public/components/flamegraph/index.tsx index b3dfb877963cd..c1d50ba9142a6 100644 --- a/x-pack/plugins/observability_solution/profiling/public/components/flamegraph/index.tsx +++ b/x-pack/plugins/observability_solution/profiling/public/components/flamegraph/index.tsx @@ -194,7 +194,7 @@ export function FlameGraph({ primaryFlamegraph.TotalAnnualCostsUSDItems[valueIndex] } baselineScaleFactor={baseline} - comparisonAnnualCO2KgsInclusive={comparisonNode.TotalAnnualCO2Kgs} + comparisonAnnualCO2KgsInclusive={comparisonNode?.TotalAnnualCO2Kgs} comparisonAnnualCostsUSDInclusive={comparisonNode?.TotalAnnualCostUSD} comparisonCountExclusive={comparisonNode?.CountExclusive} comparisonCountInclusive={comparisonNode?.CountInclusive} diff --git a/x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.test.ts b/x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.test.ts new file mode 100644 index 0000000000000..d99fc7ead0ee5 --- /dev/null +++ b/x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.test.ts @@ -0,0 +1,21 @@ +/* + * 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 { asInteger } from './as_integer'; + +describe('asInteger', () => { + it('rounds numbers appropriately', () => { + expect(asInteger(999)).toBe('999'); + + expect(asInteger(1.11)).toBe('1'); + + expect(asInteger(1.5)).toBe('2'); + + expect(asInteger(0.001)).toBe('0'); + + expect(asInteger(0)).toBe('0'); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/get_knowledge_base_status.ts b/x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.ts similarity index 52% rename from x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/get_knowledge_base_status.ts rename to x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.ts index aa089fa86dce3..6679163ad9aef 100644 --- a/x-pack/plugins/elastic_assistant/server/schemas/knowledge_base/get_knowledge_base_status.ts +++ b/x-pack/plugins/observability_solution/profiling/public/utils/formatters/as_integer.ts @@ -5,9 +5,6 @@ * 2.0. */ -import * as t from 'io-ts'; - -/** Validates the URL path of a GET request to the `/knowledge_base/{resource}` endpoint */ -export const GetKnowledgeBaseStatusPathParams = t.type({ - resource: t.union([t.string, t.undefined]), -}); +export function asInteger(value: number) { + return Math.round(value).toString(); +} diff --git a/x-pack/plugins/observability_solution/profiling/server/routes/functions.ts b/x-pack/plugins/observability_solution/profiling/server/routes/functions.ts index a261708c5b457..e6b71b17db8be 100644 --- a/x-pack/plugins/observability_solution/profiling/server/routes/functions.ts +++ b/x-pack/plugins/observability_solution/profiling/server/routes/functions.ts @@ -45,7 +45,7 @@ export function registerTopNFunctionsSearchRoute({ const endSecs = timeTo / 1000; const esClient = await getClient(context); - const topNFunctions = await profilingDataAccess.services.fetchFunction({ + const topNFunctions = await profilingDataAccess.services.fetchFunctions({ core, esClient, startIndex, diff --git a/x-pack/plugins/observability_solution/profiling_data_access/server/services/register_services.ts b/x-pack/plugins/observability_solution/profiling_data_access/server/services/register_services.ts index 60f582ac16b7e..dfd51e2125c46 100644 --- a/x-pack/plugins/observability_solution/profiling_data_access/server/services/register_services.ts +++ b/x-pack/plugins/observability_solution/profiling_data_access/server/services/register_services.ts @@ -31,6 +31,6 @@ export function registerServices(params: RegisterServicesParams) { fetchFlamechartData: createFetchFlamechart(params), getStatus: createGetStatusService(params), getSetupState: createSetupState(params), - fetchFunction: createFetchFunctions(params), + fetchFunctions: createFetchFunctions(params), }; } diff --git a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc index f76ac53a42455..ac894c024e5cd 100644 --- a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc +++ b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc @@ -31,7 +31,8 @@ "taskManager", "triggersActionsUi", "usageCollection", - "bfetch" + "bfetch", + "unifiedSearch" ], "optionalPlugins": [ "cloud", diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.test.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.test.ts new file mode 100644 index 0000000000000..f07acbf278d25 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.test.ts @@ -0,0 +1,26 @@ +/* + * 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 { formatAge } from './common'; + +describe('formatAge', () => { + it('should return -- when age is not provided', () => { + expect(formatAge()).toBe('--'); + }); + + it('should handle singular day count', () => { + expect(formatAge('1d')).toBe('1 day + rollover'); + }); + + it('should return formatted age when age is provided', () => { + expect(formatAge('5d')).toBe('5 days + rollover'); + }); + + it('handles a string with no "d" in it', () => { + expect(formatAge('5')).toBe('5 days + rollover'); + }); +}); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.ts new file mode 100644 index 0000000000000..72d7d0a242c9d --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/common.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. + */ + +import { i18n } from '@kbn/i18n'; + +export const formatAge = (age?: string) => { + if (!age) { + return '--'; + } + const [value] = age.split('d'); + return i18n.translate('xpack.synthetics.settingsRoute.table.retentionPeriodValue', { + defaultMessage: '{value} {value, plural, one {day} other {days}} + rollover', + values: { value }, + }); +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx new file mode 100644 index 0000000000000..a7371801eb017 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx @@ -0,0 +1,122 @@ +/* + * 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, EuiBasicTableColumn, EuiEmptyPrompt, EuiLink } from '@elastic/eui'; +import { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React from 'react'; +import { DataStreamStatus, useGetDataStreamStatuses } from '../hooks/use_get_data_stream_statuses'; +import { Unprivileged } from './unprivileged'; +import { useManagementLocator } from './use_management_locator'; + +export const DslRetentionTab = () => { + const { dataStreamStatuses = [], loading, error } = useGetDataStreamStatuses(); + if (loading === false && dataStreamStatuses.length === 0) + return ; + + if (error && (error as unknown as IHttpFetchError).body?.statusCode === 403) + return ; + + return ( + + ); +}; + +const DSL_RETENTION_COLUMNS: Array> = [ + { + field: 'name', + name: i18n.translate('xpack.synthetics.dslRetention.columns.name', { + defaultMessage: 'Dataset', + }), + render: (name: string, { dataStreamName }: DataStreamStatus) => { + if (!dataStreamName) { + return name; + } + return ; + }, + }, + { + field: 'storageSize', + name: i18n.translate('xpack.synthetics.dslRetention.columns.currentSize', { + defaultMessage: 'Current size', + }), + }, + { + field: 'lifecycle.data_retention', + name: i18n.translate('xpack.synthetics.dslRetention.columns.retentionPeriod', { + defaultMessage: 'Retention period', + }), + }, + { + field: 'indexTemplateName', + name: i18n.translate('xpack.synthetics.dslRetention.columns.indexTemplateName', { + defaultMessage: 'Index template', + }), + render: (indexTemplateName: string) => ( + + ), + }, +]; + +function DataStreamLink({ dataStream, name }: { dataStream: string; name: string }) { + const templatePath = useManagementLocator(`/data_streams/${dataStream}`); + + if (templatePath === null) return <>{name}; + return ( + + {name} + + ); +} + +function IndexTemplateLabel({ indexTemplateName }: { indexTemplateName: string }) { + const templatePath = useManagementLocator(`/templates/${indexTemplateName}`); + + if (templatePath === null) return <>{indexTemplateName}; + return ( + + {indexTemplateName} + + ); +} + +const ErrorEmptyPrompt = ({ error }: { error?: string }) => ( + + ) + } + color="danger" + title={ + + } + /> +); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/ilm_retention_tab.tsx similarity index 57% rename from x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention.tsx rename to x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/ilm_retention_tab.tsx index 851b64bbb7094..416a328db999a 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/ilm_retention_tab.tsx @@ -6,24 +6,15 @@ */ import { FormattedMessage } from '@kbn/i18n-react'; -import { - EuiBasicTable, - EuiCallOut, - EuiEmptyPrompt, - EuiIcon, - EuiLink, - EuiMarkdownFormat, - EuiSpacer, -} from '@elastic/eui'; +import { EuiBasicTable, EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; -import { css } from '@emotion/react'; import { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { PolicyLink, PolicyNameLabel } from './policy_link'; -import { useGetIlmPolicies } from './hooks/use_get_ilm_policies'; +import { PolicyLink, PolicyNameLabel } from '../policy_link'; +import { useGetIlmPolicies } from '../hooks/use_get_ilm_policies'; +import { Unprivileged } from './unprivileged'; -export const DataRetentionTab = () => { +export const IlmRetentionTab = () => { const { data, loading, error } = useGetIlmPolicies(); if (error && (error as unknown as IHttpFetchError).body?.statusCode === 403) { @@ -89,65 +80,6 @@ export const DataRetentionTab = () => { ); }; -const Unprivileged = () => { - const { - services: { docLinks }, - } = useKibana(); - return ( - } - title={ -

- -

- } - body={ -

- - {i18n.translate('xpack.synthetics.monitorManagement.projectDelete.docsLink', { - defaultMessage: 'Learn more', - })} - - ), - }} - /> -

- } - footer={ - - } - /> - ); -}; - -const INDEX_PRIVILEGES = i18n.translate('xpack.synthetics.dataRetention.unprivileged.index', { - defaultMessage: '`read`, `monitor` on the following Elasticsearch indices: `synthetics-*`', -}); - -const CLUSTER_PRIVILEGES = i18n.translate('xpack.synthetics.dataRetention.unprivileged.cluster', { - defaultMessage: - '`read_ilm`, `monitor` to view and `manage_ilm` to manage ILM policies on the Elasticsearch cluster.', -}); - const CALLOUT_TITLE = i18n.translate('xpack.synthetics.settingsRoute.retentionCalloutTitle', { defaultMessage: 'Synthetics data is configured by managed index lifecycle policies', }); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/index.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/index.tsx new file mode 100644 index 0000000000000..048474968fb2d --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/index.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, { useContext } from 'react'; +import { SyntheticsSettingsContext } from '../../../contexts'; +import { DslRetentionTab } from './dsl_retention_tab'; +import { IlmRetentionTab } from './ilm_retention_tab'; + +export const DataRetentionTab = () => { + const { isServerless } = useContext(SyntheticsSettingsContext); + + return isServerless ? : ; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/policy_labels.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/policy_labels.ts new file mode 100644 index 0000000000000..ad25a7b28f8ae --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/policy_labels.ts @@ -0,0 +1,52 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const policyLabels = [ + { + name: 'synthetics', + label: i18n.translate('xpack.synthetics.settingsRoute.allChecks', { + defaultMessage: 'All Checks', + }), + indexTemplate: 'synthetics', + }, + { + name: 'synthetics-synthetics.browser-default_policy', + label: i18n.translate('xpack.synthetics.settingsRoute.browserChecks', { + defaultMessage: 'Browser Checks', + }), + indexTemplate: 'synthetics-browser', + }, + { + name: 'synthetics-synthetics.browser_network-default_policy', + label: i18n.translate('xpack.synthetics.settingsRoute.browserNetworkRequests', { + defaultMessage: 'Browser Network Requests', + }), + indexTemplate: 'synthetics-browser.network', + }, + { + name: 'synthetics-synthetics.browser_screenshot-default_policy', + label: 'Browser Screenshots', + indexTemplate: 'synthetics-browser.screenshot', + }, + { + name: 'synthetics-synthetics.http-default_policy', + label: 'HTTP Pings', + indexTemplate: 'synthetics-http', + }, + { + name: 'synthetics-synthetics.icmp-default_policy', + label: 'ICMP Pings', + indexTemplate: 'synthetics-icmp', + }, + { + name: 'synthetics-synthetics.tcp-default_policy', + label: 'TCP Pings', + indexTemplate: 'synthetics-tcp', + }, +]; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/unprivileged.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/unprivileged.tsx new file mode 100644 index 0000000000000..799bdce20f4ba --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/unprivileged.tsx @@ -0,0 +1,71 @@ +/* + * 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 { FormattedMessage } from '@kbn/i18n-react'; +import { EuiEmptyPrompt, EuiIcon, EuiLink, EuiMarkdownFormat } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; + +export const Unprivileged = ({ hideIlmMessage = false }: { hideIlmMessage?: boolean }) => { + const { + services: { docLinks }, + } = useKibana(); + return ( + } + title={ +

+ +

+ } + body={ +

+ + {i18n.translate('xpack.synthetics.monitorManagement.projectDelete.docsLink', { + defaultMessage: 'Learn more', + })} + + ), + }} + /> +

+ } + footer={ + + } + /> + ); +}; + +const INDEX_PRIVILEGES = i18n.translate('xpack.synthetics.dataRetention.unprivileged.index', { + defaultMessage: '`read`, `monitor` on the following Elasticsearch indices: `synthetics-*`', +}); + +const CLUSTER_PRIVILEGES = i18n.translate('xpack.synthetics.dataRetention.unprivileged.cluster', { + defaultMessage: + '`read_ilm`, `monitor` to view and `manage_ilm` to manage ILM policies on the Elasticsearch cluster.', +}); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/use_management_locator.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/use_management_locator.ts new file mode 100644 index 0000000000000..4bbad22b257fc --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/use_management_locator.ts @@ -0,0 +1,26 @@ +/* + * 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 } from '@kbn/kibana-react-plugin/public'; +import { useEffect, useState } from 'react'; +import { ClientPluginsStart } from '../../../../../plugin'; +import { useSyntheticsSettingsContext } from '../../../contexts'; + +export function useManagementLocator(extraPath?: string) { + const [templatePath, setTemplatePath] = useState(null); + const { basePath } = useSyntheticsSettingsContext(); + const { share, application } = useKibana().services; + const canManageIndices = !!application.capabilities.management?.data?.index_management; + useEffect(() => { + if (!canManageIndices) return; + const managementLocator = share.url.locators.get('MANAGEMENT_APP_LOCATOR'); + managementLocator + ?.getLocation({ sectionId: 'data', appId: 'index_management' }) + .then(({ app, path }) => setTemplatePath(`${basePath}/app/${app}${path}${extraPath}`)); + }, [share.url.locators, basePath, setTemplatePath, canManageIndices, extraPath]); + return templatePath; +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/api.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/api.ts index aad0d6b17b7d2..8d8839c508a0b 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/api.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/api.ts @@ -6,6 +6,7 @@ */ import { PolicyFromES } from '@kbn/index-lifecycle-management-plugin/common/types'; +import { DataStream } from '@kbn/index-management-plugin/common'; import { CatIndicesResponse } from '@elastic/elasticsearch/lib/api/types'; import { apiService } from '../../../../../utils/api_service'; import { SYNTHETICS_API_URLS } from '../../../../../../common/constants'; @@ -14,6 +15,20 @@ export const getIlmPolicies = async (): Promise => { return await apiService.get('/api/index_lifecycle_management/policies'); }; +export const getDslPolicies = async (): Promise<{ data: DataStream[] }> => { + return apiService.get( + '/api/index_management/data_streams', + { + includeStats: true, + }, + undefined, + undefined, + { + 'X-Elastic-Internal-Origin': 'Kibana', + } + ); +}; + export const getIndicesData = async (): Promise<{ data: CatIndicesResponse }> => { return await apiService.get(SYNTHETICS_API_URLS.INDEX_SIZE); }; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.test.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.test.ts new file mode 100644 index 0000000000000..67cf9589fb818 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.test.ts @@ -0,0 +1,199 @@ +/* + * 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 { FETCH_STATUS, useFetcher } from '@kbn/observability-shared-plugin/public'; +import { useGetDataStreamStatuses } from './use_get_data_stream_statuses'; +import { policyLabels } from '../data_retention/policy_labels'; +import { DataStream } from '@kbn/index-management-plugin/common'; + +jest.mock('@kbn/observability-shared-plugin/public', () => ({ + ...jest.requireActual('@kbn/observability-shared-plugin/public'), + useFetcher: jest.fn(), +})); + +jest.mock('./api', () => ({ + getDslPolicies: jest.fn(), +})); + +describe('useGetDataStreamStatuses', () => { + it('filters and formats the data returned by the data streams API', () => { + (useFetcher as jest.Mock).mockImplementation((callback) => { + callback(); + return { + error: undefined, + loading: false, + status: FETCH_STATUS.SUCCESS, + refetch: () => {}, + fetch: jest.fn(), + data: exampleData, + }; + }); + + const { + result: { + current: { dataStreamStatuses, error, loading }, + }, + } = renderHook(() => useGetDataStreamStatuses()); + + expect(dataStreamStatuses).not.toBeNull(); + expect(Array.isArray(dataStreamStatuses)).toBe(true); + expect(dataStreamStatuses).toHaveLength(policyLabels.length); + expect(error).toBeUndefined(); + expect(loading).toBe(false); + const dataStreamSummary = dataStreamStatuses?.find((d) => d.name === 'All Checks'); + expect(dataStreamSummary).not.toBeUndefined(); + // check special cases for summary row + expect(dataStreamSummary?.storageSize).toEqual('18 MB'); + expect(dataStreamSummary?.lifecycle?.data_retention).toEqual('--'); + }); + + it('returns a undefined set for no data', () => { + (useFetcher as jest.Mock).mockImplementation((callback) => { + callback(); + return { + error: undefined, + loading: false, + status: FETCH_STATUS.SUCCESS, + refetch: () => {}, + fetch: jest.fn(), + data: undefined, + }; + }); + const { + result: { + current: { dataStreamStatuses, loading }, + }, + } = renderHook(() => useGetDataStreamStatuses()); + expect(dataStreamStatuses).toBeUndefined(); + expect(loading).toBe(false); + }); + + it('returns a undefined set for error', () => { + (useFetcher as jest.Mock).mockImplementation((callback) => { + callback(); + return { + error: new Error('A sample error message'), + loading: false, + status: 'success' as FETCH_STATUS.SUCCESS, + refetch: () => {}, + fetch: jest.fn(), + data: undefined, + }; + }); + const { + result: { + current: { dataStreamStatuses, loading, error }, + }, + } = renderHook(() => useGetDataStreamStatuses()); + expect(dataStreamStatuses).toBeUndefined(); + expect(error).toEqual(new Error('A sample error message')); + expect(loading).toBe(false); + }); +}); + +function testData(overrides: Partial) { + return { + name: 'test', + timeStampField: { + name: '@timestamp', + }, + indices: [ + { + name: 'test', + uuid: 'test', + preferILM: true, + managedBy: 'Data stream lifecycle', + }, + ], + generation: 1, + health: 'green', + indexTemplateName: 'test', + storageSize: '564b', + storageSizeBytes: 564, + maxTimeStamp: 0, + _meta: { + namespace: 'default', + kibana: { + version: '8.13.0', + }, + managed: true, + }, + privileges: { + delete_index: true, + manage_data_stream_lifecycle: true, + }, + hidden: true, + lifecycle: { + enabled: true, + }, + nextGenerationManagedBy: 'Data stream lifecycle', + ...overrides, + }; +} + +const exampleData = [ + testData({ + name: '.alerts-default.alerts-default', + indexTemplateName: '.alerts-default.alerts-default-index-template', + }), + testData({ + name: '.alerts-ml.anomaly-detection-health.alerts-default', + indexTemplateName: '.alerts-ml.anomaly-detection-health.alerts-default-index-template', + }), + testData({ + name: 'synthetics-browser-default', + indexTemplateName: 'synthetics-browser', + indices: [ + { + name: '.ds-synthetics-browser-default-2024.01.04-000008', + uuid: '7KCI2rQOSfumKmT93_leDw', + preferILM: true, + managedBy: 'Data stream lifecycle', + }, + { + name: '.ds-synthetics-browser-default-2024.01.17-000011', + uuid: 'fmJwJiFzS4ue06JHdklVmA', + preferILM: true, + managedBy: 'Data stream lifecycle', + }, + { + name: '.ds-synthetics-browser-default-2024.01.29-000012', + uuid: 'mR-EKznRSxSuGNYq0ZltMA', + preferILM: true, + managedBy: 'Data stream lifecycle', + }, + { + name: '.ds-synthetics-browser-default-2024.03.06-000014', + uuid: 'YeE2r1wjSwi7PCnMBmmYoA', + preferILM: true, + managedBy: 'Data stream lifecycle', + }, + ], + lifecycle: { + enabled: true, + data_retention: '365d', + }, + storageSize: '18.3mb', + storageSizeBytes: 19265414, + maxTimeStamp: 1709752759520, + }), + testData({ + name: 'synthetics-browser.network-default', + + indexTemplateName: 'synthetics-browser.network', + }), + testData({ + name: 'synthetics-browser.screenshot-default', + indexTemplateName: 'synthetics-browser.screenshot', + }), + testData({ + name: 'synthetics-http-default', + indexTemplateName: 'synthetics-http', + }), +]; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.ts new file mode 100644 index 0000000000000..f3b3136200bd7 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_data_stream_statuses.ts @@ -0,0 +1,124 @@ +/* + * 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 { useFetcher } from '@kbn/observability-shared-plugin/public'; +import { DataStream } from '@kbn/index-management-plugin/common'; +import { useContext } from 'react'; +import { keyBy } from 'lodash'; +import { getDslPolicies } from './api'; +import { SyntheticsRefreshContext } from '../../../contexts'; +import { formatBytes } from '../../step_details_page/hooks/use_object_metrics'; +import { formatAge } from '../data_retention/common'; +import { policyLabels } from '../data_retention/policy_labels'; + +export type DataStreamStatus = DataStream & { + dataStreamName?: string; + isEmpty?: boolean; +}; + +export interface DataStreamStatusResponse { + dataStreamStatuses?: DataStreamStatus[]; + error?: Error; + loading?: boolean; +} + +/** + * Query the Data Streams API for stats and info about the current data streams. + * + * Filters out non-synthetics streams and overlays additional useful fields for display. + */ +export function useGetDataStreamStatuses(): DataStreamStatusResponse { + const { lastRefresh } = useContext(SyntheticsRefreshContext); + const { data, error, loading } = useFetcher(getDslPolicies, [lastRefresh]); + + if (!Array.isArray(data) || !!error) return { dataStreamStatuses: undefined, error, loading }; + + const dataStreamMap = keyBy(data, 'indexTemplateName'); + + const dataStreamStatuses: DataStream[] = []; + let totalBytes = 0; + let summaryItem: DataStreamStatus | null = null; + for (const { indexTemplate, label } of policyLabels) { + const dataStream = dataStreamMap[indexTemplate]; + if (dataStream) { + dataStreamStatuses.push(formatDataStreamInfo(dataStream)); + totalBytes += dataStream.storageSizeBytes ?? 0; + } else { + const missingStream = toMissingDataStream({ indexTemplate, label }); + dataStreamStatuses.push(missingStream); + if (indexTemplate === 'synthetics') summaryItem = missingStream; + } + } + + if (summaryItem !== null) summaryItem.storageSize = formatBytes(totalBytes); + + dataStreamStatuses.sort(({ indexTemplateName: a }, { indexTemplateName: b }) => + a.localeCompare(b) + ); + + return { + dataStreamStatuses, + error, + loading, + }; +} + +/** + * The table expects entries even when the data stream is missing, so we need to create a placeholder. + */ +function toMissingDataStream({ + label: name, + indexTemplate: indexTemplateName, +}: { + indexTemplate: string; + label: string; +}): DataStreamStatus { + return { + isEmpty: true, + name, + indices: [], + indexTemplateName, + storageSize: formatBytes(0), + storageSizeBytes: 0, + lifecycle: { + enabled: false, + data_retention: indexTemplateName === 'synthetics' ? '--' : '', + }, + timeStampField: { name: '@timestamp' }, + generation: 0, + health: 'green', + privileges: { delete_index: true, manage_data_stream_lifecycle: true }, + hidden: false, + nextGenerationManagedBy: 'Data stream lifecycle', + }; +} + +/** + * Overlay inferred fields to match the table's expectations. + */ +function formatDataStreamInfo({ + name, + lifecycle, + indexTemplateName, + storageSizeBytes, + ...rest +}: DataStream): DataStreamStatus { + const policyLabel = policyLabels.find(({ indexTemplate }) => indexTemplate === indexTemplateName); + return { + ...rest, + name: policyLabel?.label ?? name, + dataStreamName: name, + indexTemplateName, + storageSize: storageSizeBytes !== undefined ? formatBytes(storageSizeBytes) : '', + storageSizeBytes, + lifecycle: { + ...lifecycle, + data_retention: + lifecycle?.data_retention !== undefined ? formatAge(String(lifecycle?.data_retention)) : '', + }, + }; +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_ilm_policies.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_ilm_policies.ts index 054174fe0daa3..e39a670ad533f 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_ilm_policies.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/hooks/use_get_ilm_policies.ts @@ -5,55 +5,12 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import { useFetcher } from '@kbn/observability-shared-plugin/public'; import { formatBytes } from '../../step_details_page/hooks/use_object_metrics'; +import { formatAge } from '../data_retention/common'; +import { policyLabels } from '../data_retention/policy_labels'; import { getIlmPolicies, getIndicesData } from './api'; -const policyLabels = [ - { - name: 'synthetics', - label: i18n.translate('xpack.synthetics.settingsRoute.allChecks', { - defaultMessage: 'All Checks', - }), - indexTemplate: 'synthetics', - }, - { - name: 'synthetics-synthetics.browser-default_policy', - label: i18n.translate('xpack.synthetics.settingsRoute.browserChecks', { - defaultMessage: 'Browser Checks', - }), - indexTemplate: 'synthetics-browser', - }, - { - name: 'synthetics-synthetics.browser_network-default_policy', - label: i18n.translate('xpack.synthetics.settingsRoute.browserNetworkRequests', { - defaultMessage: 'Browser Network Requests', - }), - indexTemplate: 'synthetics-browser.network', - }, - { - name: 'synthetics-synthetics.browser_screenshot-default_policy', - label: 'Browser Screenshots', - indexTemplate: 'synthetics-browser.screenshot', - }, - { - name: 'synthetics-synthetics.http-default_policy', - label: 'HTTP Pings', - indexTemplate: 'synthetics-http', - }, - { - name: 'synthetics-synthetics.icmp-default_policy', - label: 'ICMP Pings', - indexTemplate: 'synthetics-icmp', - }, - { - name: 'synthetics-synthetics.tcp-default_policy', - label: 'TCP Pings', - indexTemplate: 'synthetics-tcp', - }, -]; - export const useGetIlmPolicies = () => { const { data, error, loading } = useFetcher(async () => { return getIlmPolicies(); @@ -103,14 +60,3 @@ export const useGetIlmPolicies = () => { loading: loading || indicesLoading, }; }; - -const formatAge = (age?: string) => { - if (!age) { - return '--'; - } - const [value] = age.split('d'); - return i18n.translate('xpack.synthetics.settingsRoute.table.retentionPeriodValue', { - defaultMessage: '{value} days + rollover', - values: { value }, - }); -}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/synthetics_app.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/synthetics_app.tsx index 3bd3407dcb3c1..9288395290fda 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/synthetics_app.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/synthetics_app.tsx @@ -95,6 +95,7 @@ const Application = (props: SyntheticsAppProps) => { cases: startPlugins.cases, spaces: startPlugins.spaces, fleet: startPlugins.fleet, + unifiedSearch: startPlugins.unifiedSearch, }} > diff --git a/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts b/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts index 5aac19589bf68..2df15b228590e 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts @@ -7,7 +7,7 @@ import { isRight } from 'fp-ts/lib/Either'; import { formatErrors } from '@kbn/securitysolution-io-ts-utils'; -import { HttpFetchQuery, HttpSetup } from '@kbn/core/public'; +import { HttpFetchQuery, HttpHeadersInit, HttpSetup } from '@kbn/core/public'; import { FETCH_STATUS, AddInspectorRequest } from '@kbn/observability-shared-plugin/public'; import { InspectorRequestProps } from '@kbn/observability-shared-plugin/public/contexts/inspector/inspector_context'; type Params = HttpFetchQuery & { version?: string }; @@ -60,13 +60,20 @@ class ApiService { return response; } - public async get(apiUrl: string, params: Params = {}, decodeType?: any, asResponse = false) { + public async get( + apiUrl: string, + params: Params = {}, + decodeType?: any, + asResponse = false, + headers?: HttpHeadersInit + ) { const { version, ...queryParams } = params; const response = await this._http!.fetch({ path: apiUrl, query: queryParams, asResponse, version, + headers, }); this.addInspectorRequest?.({ diff --git a/x-pack/plugins/observability_solution/synthetics/tsconfig.json b/x-pack/plugins/observability_solution/synthetics/tsconfig.json index 87d0119811587..9e1f64d07acea 100644 --- a/x-pack/plugins/observability_solution/synthetics/tsconfig.json +++ b/x-pack/plugins/observability_solution/synthetics/tsconfig.json @@ -83,7 +83,8 @@ "@kbn/code-editor", "@kbn/code-editor-mock", "@kbn/serverless", - "@kbn/repo-info" + "@kbn/repo-info", + "@kbn/index-management-plugin" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts index a2072a8d87c82..aa82fbdeb0b16 100644 --- a/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts +++ b/x-pack/plugins/rule_registry/common/assets/field_maps/technical_rule_field_map.test.ts @@ -42,6 +42,11 @@ it('matches snapshot', () => { "required": false, "type": "keyword", }, + "kibana.alert.consecutive_matches": Object { + "array": false, + "required": false, + "type": "long", + }, "kibana.alert.duration.us": Object { "array": false, "required": false, diff --git a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts index 2367167b49697..46cbe2eb1eb29 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts @@ -26,6 +26,7 @@ import { SPACE_IDS, ALERT_FLAPPING, TAGS, + ALERT_CONSECUTIVE_MATCHES, } from '../../common/technical_rule_data_field_names'; import { createRuleDataClientMock } from '../rule_data_client/rule_data_client.mock'; import { createLifecycleExecutor } from './create_lifecycle_executor'; @@ -1931,6 +1932,473 @@ describe('createLifecycleExecutor', () => { ); }); }); + + describe('set consecutive matches on the document', () => { + it('updates documents with consecutive matches for active alerts', async () => { + const logger = loggerMock.create(); + const ruleDataClientMock = createRuleDataClientMock(); + ruleDataClientMock.getReader().search.mockResolvedValue({ + hits: { + hits: [ + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_0', + [ALERT_UUID]: 'ALERT_0_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [ALERT_WORKFLOW_STATUS]: 'closed', + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', + [ALERT_UUID]: 'ALERT_1_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [ALERT_WORKFLOW_STATUS]: 'open', + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', + [ALERT_UUID]: 'ALERT_2_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [ALERT_WORKFLOW_STATUS]: 'open', + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', + [ALERT_UUID]: 'ALERT_3_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [ALERT_WORKFLOW_STATUS]: 'open', + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + ], + }, + } as any); + const executor = createLifecycleExecutor( + logger, + ruleDataClientMock + )<{}, TestRuleState, never, never, never>(async ({ services, state }) => { + services.alertWithLifecycle({ + id: 'TEST_ALERT_0', + fields: {}, + }); + services.alertWithLifecycle({ + id: 'TEST_ALERT_1', + fields: {}, + }); + services.alertWithLifecycle({ + id: 'TEST_ALERT_2', + fields: {}, + }); + services.alertWithLifecycle({ + id: 'TEST_ALERT_3', + fields: {}, + }); + + return { state }; + }); + + const serializedAlerts = await executor( + createDefaultAlertExecutorOptions({ + alertId: 'TEST_ALERT_0', + params: {}, + state: { + wrapped: initialRuleState, + trackedAlerts: { + TEST_ALERT_0: { + alertId: 'TEST_ALERT_0', + alertUuid: 'TEST_ALERT_0_UUID', + started: '2020-01-01T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_1: { + alertId: 'TEST_ALERT_1', + alertUuid: 'TEST_ALERT_1_UUID', + started: '2020-01-02T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_2: { + alertId: 'TEST_ALERT_2', + alertUuid: 'TEST_ALERT_2_UUID', + started: '2020-01-01T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_3: { + alertId: 'TEST_ALERT_3', + alertUuid: 'TEST_ALERT_3_UUID', + started: '2020-01-02T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + }, + trackedAlertsRecovered: {}, + }, + logger, + }) + ); + + expect(serializedAlerts.state.trackedAlerts).toEqual({ + TEST_ALERT_0: { + activeCount: 1, + alertId: 'TEST_ALERT_0', + alertUuid: 'TEST_ALERT_0_UUID', + flapping: false, + flappingHistory: [false], + pendingRecoveredCount: 0, + started: '2020-01-01T12:00:00.000Z', + }, + TEST_ALERT_1: { + activeCount: 1, + alertId: 'TEST_ALERT_1', + alertUuid: 'TEST_ALERT_1_UUID', + flapping: false, + flappingHistory: [false], + pendingRecoveredCount: 0, + started: '2020-01-02T12:00:00.000Z', + }, + TEST_ALERT_2: { + activeCount: 1, + alertId: 'TEST_ALERT_2', + alertUuid: 'TEST_ALERT_2_UUID', + flapping: false, + flappingHistory: [false], + pendingRecoveredCount: 0, + started: '2020-01-01T12:00:00.000Z', + }, + TEST_ALERT_3: { + activeCount: 1, + alertId: 'TEST_ALERT_3', + alertUuid: 'TEST_ALERT_3_UUID', + flapping: false, + flappingHistory: [false], + pendingRecoveredCount: 0, + started: '2020-01-02T12:00:00.000Z', + }, + }); + + expect(serializedAlerts.state.trackedAlertsRecovered).toEqual({}); + + expect((await ruleDataClientMock.getWriter()).bulk).toHaveBeenCalledWith( + expect.objectContaining({ + body: [ + // alert document + { index: expect.objectContaining({ _id: 'TEST_ALERT_0_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_0', + [ALERT_WORKFLOW_STATUS]: 'closed', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [ALERT_CONSECUTIVE_MATCHES]: 1, + [EVENT_ACTION]: 'active', + [EVENT_KIND]: 'signal', + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_1_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', + [ALERT_WORKFLOW_STATUS]: 'open', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [EVENT_ACTION]: 'active', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 1, + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_2_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', + [ALERT_WORKFLOW_STATUS]: 'open', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [EVENT_ACTION]: 'active', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 1, + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_3_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', + [ALERT_WORKFLOW_STATUS]: 'open', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [EVENT_ACTION]: 'active', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 1, + }), + ], + }) + ); + }); + + it('updates existing documents for recovered alerts', async () => { + const logger = loggerMock.create(); + const ruleDataClientMock = createRuleDataClientMock(); + ruleDataClientMock.getReader().search.mockResolvedValue({ + hits: { + hits: [ + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_0', + [ALERT_UUID]: 'ALERT_0_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', + [ALERT_UUID]: 'ALERT_1_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', + [ALERT_UUID]: 'ALERT_2_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + { + _source: { + '@timestamp': '', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', + [ALERT_UUID]: 'ALERT_3_UUID', + [ALERT_RULE_CATEGORY]: 'RULE_TYPE_NAME', + [ALERT_RULE_CONSUMER]: 'CONSUMER', + [ALERT_RULE_NAME]: 'NAME', + [ALERT_RULE_PRODUCER]: 'PRODUCER', + [ALERT_RULE_TYPE_ID]: 'RULE_TYPE_ID', + [ALERT_RULE_UUID]: 'RULE_UUID', + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + [SPACE_IDS]: ['fake-space-id'], + }, + _index: '.alerts-index-name', + _seq_no: 4, + _primary_term: 2, + }, + ], + }, + } as any); + const executor = createLifecycleExecutor( + logger, + ruleDataClientMock + )<{}, TestRuleState, never, never, never>(async ({ services, state }) => { + return { state }; + }); + + const serializedAlerts = await executor( + createDefaultAlertExecutorOptions({ + alertId: 'TEST_ALERT_0', + params: {}, + state: { + wrapped: initialRuleState, + trackedAlerts: { + TEST_ALERT_0: { + alertId: 'TEST_ALERT_0', + alertUuid: 'TEST_ALERT_0_UUID', + started: '2020-01-01T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_1: { + alertId: 'TEST_ALERT_1', + alertUuid: 'TEST_ALERT_1_UUID', + started: '2020-01-02T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_2: { + alertId: 'TEST_ALERT_2', + alertUuid: 'TEST_ALERT_2_UUID', + started: '2020-01-02T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + TEST_ALERT_3: { + alertId: 'TEST_ALERT_3', + alertUuid: 'TEST_ALERT_3_UUID', + started: '2020-01-02T12:00:00.000Z', + flappingHistory: [], + flapping: false, + pendingRecoveredCount: 0, + activeCount: 0, + }, + }, + trackedAlertsRecovered: {}, + }, + logger, + }) + ); + + expect(serializedAlerts.state.trackedAlerts).toEqual({}); + + expect(serializedAlerts.state.trackedAlertsRecovered).toEqual({ + TEST_ALERT_0: { + activeCount: 0, + alertId: 'TEST_ALERT_0', + alertUuid: 'TEST_ALERT_0_UUID', + flapping: false, + flappingHistory: [true], + pendingRecoveredCount: 0, + started: '2020-01-01T12:00:00.000Z', + }, + TEST_ALERT_1: { + activeCount: 0, + alertId: 'TEST_ALERT_1', + alertUuid: 'TEST_ALERT_1_UUID', + flapping: false, + flappingHistory: [true], + pendingRecoveredCount: 0, + started: '2020-01-02T12:00:00.000Z', + }, + TEST_ALERT_2: { + activeCount: 0, + alertId: 'TEST_ALERT_2', + alertUuid: 'TEST_ALERT_2_UUID', + flapping: false, + flappingHistory: [true], + pendingRecoveredCount: 0, + started: '2020-01-02T12:00:00.000Z', + }, + TEST_ALERT_3: { + activeCount: 0, + alertId: 'TEST_ALERT_3', + alertUuid: 'TEST_ALERT_3_UUID', + flapping: false, + flappingHistory: [true], + pendingRecoveredCount: 0, + started: '2020-01-02T12:00:00.000Z', + }, + }); + + expect((await ruleDataClientMock.getWriter()).bulk).toHaveBeenCalledWith( + expect.objectContaining({ + body: expect.arrayContaining([ + // alert document + { index: expect.objectContaining({ _id: 'TEST_ALERT_0_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_0', + [ALERT_STATUS]: ALERT_STATUS_RECOVERED, + [EVENT_ACTION]: 'close', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 0, + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_1_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', + [ALERT_STATUS]: ALERT_STATUS_RECOVERED, + [EVENT_ACTION]: 'close', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 0, + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_2_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', + [ALERT_STATUS]: ALERT_STATUS_RECOVERED, + [EVENT_ACTION]: 'close', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 0, + }), + { index: expect.objectContaining({ _id: 'TEST_ALERT_3_UUID' }) }, + expect.objectContaining({ + [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', + [ALERT_STATUS]: ALERT_STATUS_RECOVERED, + [EVENT_ACTION]: 'close', + [EVENT_KIND]: 'signal', + [ALERT_CONSECUTIVE_MATCHES]: 0, + }), + ]), + }) + ); + }); + }); }); type TestRuleState = Record & { diff --git a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type.test.ts b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type.test.ts index 58aa875cf2344..465c49f9aa9b7 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type.test.ts @@ -253,6 +253,7 @@ describe('createLifecycleRuleTypeFactory', () => { "@timestamp": "2021-06-16T09:01:00.000Z", "event.action": "open", "event.kind": "signal", + "kibana.alert.consecutive_matches": 1, "kibana.alert.duration.us": 0, "kibana.alert.flapping": false, "kibana.alert.instance.id": "opbeans-java", @@ -290,6 +291,7 @@ describe('createLifecycleRuleTypeFactory', () => { "@timestamp": "2021-06-16T09:01:00.000Z", "event.action": "open", "event.kind": "signal", + "kibana.alert.consecutive_matches": 1, "kibana.alert.duration.us": 0, "kibana.alert.flapping": false, "kibana.alert.instance.id": "opbeans-node", diff --git a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts index abb9ebba6d016..a6f428d598262 100644 --- a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.test.ts @@ -70,6 +70,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 2, "event": Object { + "kibana.alert.consecutive_matches": 2, "kibana.alert.status": "active", }, "flappingHistory": Array [], @@ -78,6 +79,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 1, "event": Object { + "kibana.alert.consecutive_matches": 1, "kibana.alert.status": "active", }, "flappingHistory": Array [ @@ -99,6 +101,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": true, @@ -107,6 +110,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": false, @@ -115,6 +119,7 @@ describe('getAlertsForNotification', () => { "activeCount": 0, "event": Object { "event.action": "active", + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "active", }, "flapping": true, @@ -133,6 +138,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": true, @@ -141,6 +147,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": false, @@ -149,6 +156,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": true, @@ -174,6 +182,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 2, "event": Object { + "kibana.alert.consecutive_matches": 2, "kibana.alert.status": "active", }, "flappingHistory": Array [], @@ -182,6 +191,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 1, "event": Object { + "kibana.alert.consecutive_matches": 1, "kibana.alert.status": "active", }, "flappingHistory": Array [ @@ -203,6 +213,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": true, @@ -211,6 +222,7 @@ describe('getAlertsForNotification', () => { Object { "activeCount": 0, "event": Object { + "kibana.alert.consecutive_matches": 0, "kibana.alert.status": "recovered", }, "flapping": false, @@ -243,6 +255,7 @@ describe('getAlertsForNotification', () => { "activeCount": 2, "event": Object { "event.action": "open", + "kibana.alert.consecutive_matches": 2, "kibana.alert.duration.us": 0, "kibana.alert.maintenance_window_ids": Array [ "maintenance-window-id", diff --git a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts index 5ec0e5b835eec..15dcedeaf88ca 100644 --- a/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts +++ b/x-pack/plugins/rule_registry/server/utils/get_alerts_for_notification.ts @@ -16,6 +16,7 @@ import { EVENT_ACTION, ALERT_TIME_RANGE, ALERT_MAINTENANCE_WINDOW_IDS, + ALERT_CONSECUTIVE_MATCHES, } from '@kbn/rule-data-utils'; export function getAlertsForNotification( @@ -72,6 +73,7 @@ export function getAlertsForNotification( trackedEvent.pendingRecoveredCount = 0; } } + trackedEvent.event[ALERT_CONSECUTIVE_MATCHES] = trackedEvent.activeCount; events.push(trackedEvent); } return events; diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts index ea1f76a55dd4a..ad2cde68e4dde 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts @@ -388,7 +388,7 @@ export class HeadlessChromiumDriverFactory { } getPageExit(browser: Browser, page: Page): Rx.Observable { - const pageError$ = this.getPageEventAsObservable(page, 'requestfailed').pipe( + const pageError$ = this.getPageEventAsObservable(page, 'error').pipe( map((err) => new Error(`Reporting encountered an error: ${err.toString()}`)) ); diff --git a/x-pack/plugins/security/public/build_security_api.test.ts b/x-pack/plugins/security/public/build_security_api.test.ts new file mode 100644 index 0000000000000..344e3daea5467 --- /dev/null +++ b/x-pack/plugins/security/public/build_security_api.test.ts @@ -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 type { CoreSecurityContract } from '@kbn/core-security-browser'; + +import { authenticationMock } from './authentication/index.mock'; +import { buildSecurityApi } from './build_security_api'; +import { securityMock } from './mocks'; + +describe('buildSecurityApi', () => { + let authc: ReturnType; + let api: CoreSecurityContract; + + beforeEach(() => { + authc = authenticationMock.createSetup(); + api = buildSecurityApi({ authc }); + }); + + describe('authc.getCurrentUser', () => { + it('properly delegates to the service', async () => { + await api.authc.getCurrentUser(); + + expect(authc.getCurrentUser).toHaveBeenCalledTimes(1); + }); + + it('returns the result from the service', async () => { + const delegateReturn = securityMock.createMockAuthenticatedUser(); + + authc.getCurrentUser.mockReturnValue(Promise.resolve(delegateReturn)); + + const currentUser = await api.authc.getCurrentUser(); + + expect(currentUser).toBe(delegateReturn); + }); + }); +}); diff --git a/x-pack/plugins/security/public/build_security_api.ts b/x-pack/plugins/security/public/build_security_api.ts new file mode 100644 index 0000000000000..5c2849c2266c9 --- /dev/null +++ b/x-pack/plugins/security/public/build_security_api.ts @@ -0,0 +1,21 @@ +/* + * 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 { CoreSecurityContract } from '@kbn/core-security-browser'; +import type { AuthenticationServiceSetup } from '@kbn/security-plugin-types-public'; + +export const buildSecurityApi = ({ + authc, +}: { + authc: AuthenticationServiceSetup; +}): CoreSecurityContract => { + return { + authc: { + getCurrentUser: () => authc.getCurrentUser(), + }, + }; +}; diff --git a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts index b69e09aa7bff7..fd40a64bb0ea6 100644 --- a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts +++ b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts @@ -253,4 +253,29 @@ export const kibanaFeatures = [ }, ], }), + createFeature({ + id: 'with_require_all_spaces_for_feature_and_sub_features', + name: 'Require all spaces Features and Sub Features', + requireAllSpacesOnAllPrivilege: true, + subFeatures: [ + { + name: 'Require all spaces Sub Feature', + requireAllSpaces: true, + privilegeGroups: [ + { + groupType: 'mutually_exclusive', + privileges: [ + { + id: 'cool_toggle_1', + name: 'Cool toggle 1', + includeIn: 'all', + savedObject: { all: [], read: [] }, + ui: ['cool_toggle_1-ui'], + }, + ], + }, + ], + }, + ], + }), ]; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.test.tsx index c487cdab96e2d..8b40b6d16d403 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.test.tsx @@ -111,6 +111,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -164,9 +168,13 @@ describe('FeatureTable', () => { with_require_all_spaces_sub_features: { primaryFeaturePrivilege: 'all', ...(canCustomizeSubFeaturePrivileges - ? { - subFeaturePrivileges: ['cool_toggle_1'], - } + ? { subFeaturePrivileges: ['cool_toggle_1'] } + : { subFeaturePrivileges: [] }), + }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'all', + ...(canCustomizeSubFeaturePrivileges + ? { subFeaturePrivileges: ['cool_toggle_1'] } : { subFeaturePrivileges: [] }), }, }); @@ -224,6 +232,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -322,6 +334,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -708,6 +724,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -750,6 +770,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -792,6 +816,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); @@ -981,6 +1009,10 @@ describe('FeatureTable', () => { primaryFeaturePrivilege: 'none', subFeaturePrivileges: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + primaryFeaturePrivilege: 'none', + subFeaturePrivileges: [], + }, }); }); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx index 80da1f4092144..b3856bb59f1f3 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx @@ -351,4 +351,61 @@ describe('FeatureTableExpandedRow', () => { const object = wrapper.find('SubFeatureForm'); expect(object.props()).toMatchObject({ disabled: false }); }); + + it('require all spaces enabled and allSpacesSelected is true: option is enabled for both feature and sub-features', () => { + // Create role with `all` privilege turned on. + const role = createRole([ + { + base: [], + feature: { + with_require_all_spaces_for_feature_and_sub_features: ['all'], + }, + spaces: ['foo'], + }, + ]); + + const kibanaPrivileges = createKibanaPrivileges(kibanaFeatures); + const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); + const feature = kibanaPrivileges.getSecuredFeature( + 'with_require_all_spaces_for_feature_and_sub_features' + ); + + // Make sure we update `selectedFeaturePrivileges` when `onChange` is called. + const onChange = jest.fn((_, selectedFeaturePrivileges) => { + wrapper.setProps({ selectedFeaturePrivileges }); + }); + + const wrapper = mountWithIntl( + + ); + + // Make sure sub-feature customization toggle is unchecked. + let customizeToggle = findTestSubject(wrapper, 'customizeSubFeaturePrivileges'); + expect(customizeToggle.props()['aria-checked']).toBe(false); + + // Click on the toggle to start customization. + act(() => { + customizeToggle.simulate('click'); + wrapper.update(); + }); + + // Make sure `onChange` is called with the expected arguments (all -> `minimal_all` + `cool_toggle_1`). + expect(onChange).toHaveBeenCalledWith('with_require_all_spaces_for_feature_and_sub_features', [ + 'minimal_all', + 'cool_toggle_1', + ]); + expect(onChange).toHaveBeenCalledTimes(1); + + // Make sure sub-feature customization toggle retained its checked state. + customizeToggle = findTestSubject(wrapper, 'customizeSubFeaturePrivileges'); + expect(customizeToggle.props()['aria-checked']).toBe(true); + }); }); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx index abc33abcb8660..42090f8c6c044 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx @@ -63,7 +63,8 @@ export const FeatureTableExpandedRow = ({ privilegeCalculator.updateSelectedFeaturePrivilegesForCustomization( feature.id, privilegeIndex, - e.target.checked + e.target.checked, + allSpacesSelected ) ); setIsCustomizing(e.target.checked); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.test.ts b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.test.ts index dc2f03731c650..a2d98fdd350d4 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.test.ts +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.test.ts @@ -98,7 +98,11 @@ describe('PrivilegeFormCalculator', () => { const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); expect( - calculator.getDisplayedPrimaryFeaturePrivilegeId('with_sub_features', 0) + calculator.getDisplayedPrimaryFeaturePrivilegeId( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) ).toBeUndefined(); }); @@ -115,9 +119,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.getDisplayedPrimaryFeaturePrivilegeId('with_sub_features', 0)).toEqual( - 'all' - ); + expect( + calculator.getDisplayedPrimaryFeaturePrivilegeId( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual('all'); }); it('returns the most permissive assigned primary feature privilege id', () => { @@ -133,9 +141,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.getDisplayedPrimaryFeaturePrivilegeId('with_sub_features', 0)).toEqual( - 'all' - ); + expect( + calculator.getDisplayedPrimaryFeaturePrivilegeId( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual('all'); }); it('returns the primary version of the minimal privilege id when assigned', () => { @@ -151,9 +163,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.getDisplayedPrimaryFeaturePrivilegeId('with_sub_features', 0)).toEqual( - 'read' - ); + expect( + calculator.getDisplayedPrimaryFeaturePrivilegeId( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual('read'); }); }); @@ -171,7 +187,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(false); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(false); }); it('returns false when there are no sub-feature privileges assigned', () => { @@ -187,7 +209,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(false); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(false); }); it('returns false when the assigned sub-features are also granted by other assigned privileges', () => { @@ -203,7 +231,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(false); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(false); }); it('returns true when the assigned sub-features are not also granted by other assigned privileges', () => { @@ -219,7 +253,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(true); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(true); }); it('returns true when a minimal primary feature privilege is assigned, whose corresponding primary grants sub-feature privileges which are not assigned ', () => { @@ -235,7 +275,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(true); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(true); }); it('returns false when a minimal primary feature privilege is assigned, whose corresponding primary grants sub-feature privileges which are all assigned ', () => { @@ -251,7 +297,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(false); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(false); }); it('returns true when a minimal primary feature privilege is assigned, whose corresponding primary does not grant all assigned sub-feature privileges', () => { @@ -272,7 +324,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(true); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(true); }); it('returns false when a base privilege is assigned', () => { @@ -288,7 +346,13 @@ describe('PrivilegeFormCalculator', () => { ]); const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); - expect(calculator.hasCustomizedSubFeaturePrivileges('with_sub_features', 0)).toEqual(false); + expect( + calculator.hasCustomizedSubFeaturePrivileges( + 'with_sub_features', + 0, + /** allSpacesSelected **/ false + ) + ).toEqual(false); }); }); @@ -670,11 +734,21 @@ describe('PrivilegeFormCalculator', () => { const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); expect( - calculator.updateSelectedFeaturePrivilegesForCustomization('with_sub_features', 0, true) + calculator.updateSelectedFeaturePrivilegesForCustomization( + 'with_sub_features', + 0, + true, + /** allSpacesSelected **/ false + ) ).toEqual(['some-privilege']); expect( - calculator.updateSelectedFeaturePrivilegesForCustomization('with_sub_features', 0, false) + calculator.updateSelectedFeaturePrivilegesForCustomization( + 'with_sub_features', + 0, + false, + /** allSpacesSelected **/ false + ) ).toEqual(['some-privilege']); }); @@ -693,7 +767,12 @@ describe('PrivilegeFormCalculator', () => { const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); expect( - calculator.updateSelectedFeaturePrivilegesForCustomization('with_sub_features', 0, true) + calculator.updateSelectedFeaturePrivilegesForCustomization( + 'with_sub_features', + 0, + true, + /** allSpacesSelected **/ false + ) ).toEqual(['minimal_read', 'cool_read', 'cool_toggle_2']); }); @@ -712,7 +791,12 @@ describe('PrivilegeFormCalculator', () => { const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); expect( - calculator.updateSelectedFeaturePrivilegesForCustomization('with_sub_features', 0, false) + calculator.updateSelectedFeaturePrivilegesForCustomization( + 'with_sub_features', + 0, + false, + /** allSpacesSelected **/ false + ) ).toEqual(['read']); }); }); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.ts b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.ts index d6afdaf6efafd..0cf554bdc19dd 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.ts +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_form_calculator/privilege_form_calculator.ts @@ -47,11 +47,12 @@ export class PrivilegeFormCalculator { * * @param featureId the feature id to get the Primary Feature KibanaPrivilege for. * @param privilegeIndex the index of the kibana privileges role component + * @param allSpacesSelected indicates if the privilege form is configured to grant access to all spaces. */ public getDisplayedPrimaryFeaturePrivilegeId( featureId: string, privilegeIndex: number, - allSpacesSelected?: boolean + allSpacesSelected: boolean ) { return this.getDisplayedPrimaryFeaturePrivilege(featureId, privilegeIndex, allSpacesSelected) ?.id; @@ -62,11 +63,12 @@ export class PrivilegeFormCalculator { * * @param featureId the feature id * @param privilegeIndex the index of the kibana privileges role component + * @param allSpacesSelected indicates if the privilege form is configured to grant access to all spaces. */ public hasCustomizedSubFeaturePrivileges( featureId: string, privilegeIndex: number, - allSpacesSelected?: boolean + allSpacesSelected: boolean ) { const feature = this.kibanaPrivileges.getSecuredFeature(featureId); @@ -185,13 +187,19 @@ export class PrivilegeFormCalculator { * @param featureId the feature id * @param privilegeIndex the index of the kibana privileges role component * @param willBeCustomizing flag indicating if this feature is about to have its sub-feature privileges customized or not + * @param allSpacesSelected indicates if the privilege form is configured to grant access to all spaces. */ public updateSelectedFeaturePrivilegesForCustomization( featureId: string, privilegeIndex: number, - willBeCustomizing: boolean + willBeCustomizing: boolean, + allSpacesSelected: boolean ) { - const primary = this.getDisplayedPrimaryFeaturePrivilege(featureId, privilegeIndex); + const primary = this.getDisplayedPrimaryFeaturePrivilege( + featureId, + privilegeIndex, + allSpacesSelected + ); const selectedFeaturePrivileges = this.getSelectedFeaturePrivileges(featureId, privilegeIndex); if (!primary) { @@ -283,11 +291,12 @@ export class PrivilegeFormCalculator { * * @param featureId the feature id to get the Primary Feature KibanaPrivilege for. * @param privilegeIndex the index of the kibana privileges role component + * @param allSpacesSelected indicates if the privilege form is configured to grant access to all spaces. */ private getDisplayedPrimaryFeaturePrivilege( featureId: string, privilegeIndex: number, - allSpacesSelected?: boolean + allSpacesSelected: boolean ) { const feature = this.kibanaPrivileges.getSecuredFeature(featureId); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_calculator.test.ts b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_calculator.test.ts index f2869c11f13c6..b0418eac51c62 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_calculator.test.ts +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_calculator.test.ts @@ -58,6 +58,11 @@ describe('PrivilegeSummaryCalculator', () => { primary: undefined, subFeature: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: undefined, + subFeature: [], + }, }); }); @@ -111,6 +116,13 @@ describe('PrivilegeSummaryCalculator', () => { }), subFeature: ['cool_toggle_1'], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: expect.objectContaining({ + id: 'all', + }), + subFeature: ['cool_toggle_1'], + }, }); }); @@ -174,6 +186,13 @@ describe('PrivilegeSummaryCalculator', () => { }), subFeature: ['cool_toggle_1'], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: expect.objectContaining({ + id: 'all', + }), + subFeature: ['cool_toggle_1'], + }, }); }); @@ -240,6 +259,13 @@ describe('PrivilegeSummaryCalculator', () => { }), subFeature: ['cool_toggle_1'], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: expect.objectContaining({ + id: 'all', + }), + subFeature: ['cool_toggle_1'], + }, }); }); @@ -288,6 +314,13 @@ describe('PrivilegeSummaryCalculator', () => { }), subFeature: ['cool_toggle_1'], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: expect.objectContaining({ + id: 'all', + }), + subFeature: ['cool_toggle_1'], + }, }); }); @@ -332,6 +365,11 @@ describe('PrivilegeSummaryCalculator', () => { primary: undefined, subFeature: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: undefined, + subFeature: [], + }, }); }); @@ -376,6 +414,11 @@ describe('PrivilegeSummaryCalculator', () => { primary: undefined, subFeature: [], }, + with_require_all_spaces_for_feature_and_sub_features: { + hasCustomizedSubFeaturePrivileges: false, + primary: undefined, + subFeature: [], + }, }); }); }); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_table.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_table.test.tsx index 22ec00d393c9c..b76ac9f1a1fc8 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_table.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_table.test.tsx @@ -99,6 +99,15 @@ const expectNoPrivileges = (displayedPrivileges: any, expectSubFeatures: boolean }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(expectSubFeatures, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }; @@ -266,6 +275,15 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': ['Cool toggle 1'], + }), + }, + }, }); }); @@ -337,6 +355,15 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': ['Cool toggle 1'], + }), + }, + }, }); }); @@ -406,6 +433,15 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': ['Cool toggle 1'], + }), + }, + }, }); }); @@ -477,6 +513,15 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }); @@ -583,6 +628,22 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': ['Cool toggle 1'], + }), + }, + }, }); }); @@ -691,6 +752,22 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }); @@ -799,6 +876,22 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }); @@ -909,6 +1002,22 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + 'default, space-1': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }); @@ -1057,6 +1166,29 @@ describe('PrivilegeSummaryTable', () => { }), }, }, + with_require_all_spaces_for_feature_and_sub_features: { + '*': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + default: { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'None', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': ['Cool toggle 1'], + }), + }, + 'space-1, space-2': { + hasCustomizedSubFeaturePrivileges: false, + primaryFeaturePrivilege: 'Read', + ...maybeExpectSubFeaturePrivileges(allowSubFeaturePrivileges, { + 'Require all spaces Sub Feature': [], + }), + }, + }, }); }); }); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx index d50ab47160923..6c633d6513692 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx @@ -79,6 +79,10 @@ describe('PrivilegeSpaceForm', () => { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], }, + "with_require_all_spaces_for_feature_and_sub_features": Object { + "primaryFeaturePrivilege": "none", + "subFeaturePrivileges": Array [], + }, "with_require_all_spaces_sub_features": Object { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], @@ -133,6 +137,12 @@ describe('PrivilegeSpaceForm', () => { "primaryFeaturePrivilege": "all", "subFeaturePrivileges": Array [], }, + "with_require_all_spaces_for_feature_and_sub_features": Object { + "primaryFeaturePrivilege": "none", + "subFeaturePrivileges": Array [ + "cool_toggle_1", + ], + }, "with_require_all_spaces_sub_features": Object { "primaryFeaturePrivilege": "all", "subFeaturePrivileges": Array [ @@ -195,6 +205,10 @@ describe('PrivilegeSpaceForm', () => { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], }, + "with_require_all_spaces_for_feature_and_sub_features": Object { + "primaryFeaturePrivilege": "none", + "subFeaturePrivileges": Array [], + }, "with_require_all_spaces_sub_features": Object { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], @@ -300,6 +314,10 @@ describe('PrivilegeSpaceForm', () => { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], }, + "with_require_all_spaces_for_feature_and_sub_features": Object { + "primaryFeaturePrivilege": "none", + "subFeaturePrivileges": Array [], + }, "with_require_all_spaces_sub_features": Object { "primaryFeaturePrivilege": "none", "subFeaturePrivileges": Array [], @@ -365,6 +383,7 @@ describe('PrivilegeSpaceForm', () => { no_sub_features: ['read'], with_sub_features: ['read'], with_require_all_spaces_sub_features: ['read'], + with_require_all_spaces_for_feature_and_sub_features: ['read'], }, spaces: ['foo'], }, @@ -471,6 +490,7 @@ describe('PrivilegeSpaceForm', () => { no_sub_features: ['read'], with_sub_features: ['read'], with_require_all_spaces_sub_features: ['read'], + with_require_all_spaces_for_feature_and_sub_features: ['read'], }, spaces: ['foo'], }, @@ -591,6 +611,7 @@ describe('PrivilegeSpaceForm', () => { no_sub_features_require_all_space: ['read'], with_sub_features: ['read'], with_require_all_spaces_sub_features: ['read'], + with_require_all_spaces_for_feature_and_sub_features: ['read'], }, spaces: ['foo'], }, @@ -695,6 +716,7 @@ describe('PrivilegeSpaceForm', () => { no_sub_features_require_all_space: ['all'], with_sub_features: ['all'], with_require_all_spaces_sub_features: ['all'], + with_require_all_spaces_for_feature_and_sub_features: ['all'], }, spaces: ['*'], }, diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index c3c285a57418d..6abf5a04ae5c6 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -579,11 +579,7 @@ export class PrivilegeSpaceForm extends Component { } const form = this.state.role.kibana[this.state.privilegeIndex]; - if (form.base.length === 0 && Object.keys(form.feature).length === 0) { - return false; - } - - return true; + return !(form.base.length === 0 && Object.keys(form.feature).length === 0); }; private isDefiningGlobalPrivilege = () => this.state.selectedSpaceIds.includes('*'); diff --git a/x-pack/plugins/security/public/plugin.test.tsx b/x-pack/plugins/security/public/plugin.test.tsx index 61cc138c38a20..540f2c44f3074 100644 --- a/x-pack/plugins/security/public/plugin.test.tsx +++ b/x-pack/plugins/security/public/plugin.test.tsx @@ -77,6 +77,18 @@ describe('Security Plugin', () => { getStartServices: coreSetupMock.getStartServices, }); }); + + it('calls core.security.registerSecurityApi', () => { + const coreSetupMock = coreMock.createSetup({ basePath: '/some-base-path' }); + + const plugin = new SecurityPlugin(coreMock.createPluginInitializerContext()); + + plugin.setup(coreSetupMock, { + licensing: licensingMock.createSetup(), + }); + + expect(coreSetupMock.security.registerSecurityApi).toHaveBeenCalledTimes(1); + }); }); describe('#start', () => { diff --git a/x-pack/plugins/security/public/plugin.tsx b/x-pack/plugins/security/public/plugin.tsx index 16d82762350fe..820c3bc2cc172 100644 --- a/x-pack/plugins/security/public/plugin.tsx +++ b/x-pack/plugins/security/public/plugin.tsx @@ -32,6 +32,7 @@ import { accountManagementApp, UserProfileAPIClient } from './account_management import { AnalyticsService } from './analytics'; import { AnonymousAccessService } from './anonymous_access'; import { AuthenticationService } from './authentication'; +import { buildSecurityApi } from './build_security_api'; import type { SecurityApiClients } from './components'; import type { ConfigType } from './config'; import { ManagementService, UserAPIClient } from './management'; @@ -132,6 +133,8 @@ export class SecurityPlugin securityApiClients: this.securityApiClients, }); + core.security.registerSecurityApi(buildSecurityApi({ authc: this.authc })); + if (management) { this.managementService.setup({ license, diff --git a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap index fe6552fa889af..bb41711d8745a 100644 --- a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap +++ b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; -exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; diff --git a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap index 43f406782acc2..89f47f333dbbe 100644 --- a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; -exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; diff --git a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index 80155b3fde5ac..e7b46c6638513 100644 --- a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; -exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; diff --git a/x-pack/plugins/security/server/build_security_api.test.ts b/x-pack/plugins/security/server/build_security_api.test.ts new file mode 100644 index 0000000000000..ffbf0fb28d3b4 --- /dev/null +++ b/x-pack/plugins/security/server/build_security_api.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 { httpServerMock } from '@kbn/core-http-server-mocks'; +import type { CoreSecurityContract } from '@kbn/core-security-server'; + +import { authenticationServiceMock } from './authentication/authentication_service.mock'; +import { buildSecurityApi } from './build_security_api'; +import { securityMock } from './mocks'; + +describe('buildSecurityApi', () => { + let authc: ReturnType; + let api: CoreSecurityContract; + + beforeEach(() => { + authc = authenticationServiceMock.createStart(); + api = buildSecurityApi({ getAuthc: () => authc }); + }); + + describe('authc.getCurrentUser', () => { + it('properly delegates to the service', () => { + const request = httpServerMock.createKibanaRequest(); + api.authc.getCurrentUser(request); + + expect(authc.getCurrentUser).toHaveBeenCalledTimes(1); + expect(authc.getCurrentUser).toHaveBeenCalledWith(request); + }); + + it('returns the result from the service', async () => { + const request = httpServerMock.createKibanaRequest(); + const delegateReturn = securityMock.createMockAuthenticatedUser(); + + authc.getCurrentUser.mockReturnValue(delegateReturn); + + const currentUser = api.authc.getCurrentUser(request); + + expect(currentUser).toBe(delegateReturn); + }); + }); +}); diff --git a/x-pack/plugins/security/server/build_security_api.ts b/x-pack/plugins/security/server/build_security_api.ts new file mode 100644 index 0000000000000..fa4d5f25f8ffa --- /dev/null +++ b/x-pack/plugins/security/server/build_security_api.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 type { CoreSecurityContract } from '@kbn/core-security-server'; + +import type { InternalAuthenticationServiceStart } from './authentication'; + +export const buildSecurityApi = ({ + getAuthc, +}: { + getAuthc: () => InternalAuthenticationServiceStart; +}): CoreSecurityContract => { + return { + authc: { + getCurrentUser: (request) => { + return getAuthc().getCurrentUser(request); + }, + }, + }; +}; diff --git a/x-pack/plugins/security/server/plugin.test.ts b/x-pack/plugins/security/server/plugin.test.ts index 407b41f909ace..78da2544922af 100644 --- a/x-pack/plugins/security/server/plugin.test.ts +++ b/x-pack/plugins/security/server/plugin.test.ts @@ -132,6 +132,12 @@ describe('Security Plugin', () => { } `); }); + + it('calls core.security.registerSecurityApi', () => { + plugin.setup(mockCoreSetup, mockSetupDependencies); + + expect(mockCoreSetup.security.registerSecurityApi).toHaveBeenCalledTimes(1); + }); }); describe('start()', () => { diff --git a/x-pack/plugins/security/server/plugin.ts b/x-pack/plugins/security/server/plugin.ts index 9f9a7047227d5..71ae6c6436063 100644 --- a/x-pack/plugins/security/server/plugin.ts +++ b/x-pack/plugins/security/server/plugin.ts @@ -44,6 +44,7 @@ import type { InternalAuthenticationServiceStart } from './authentication'; import { AuthenticationService } from './authentication'; import type { AuthorizationServiceSetupInternal } from './authorization'; import { AuthorizationService } from './authorization'; +import { buildSecurityApi } from './build_security_api'; import type { ConfigSchema, ConfigType } from './config'; import { createConfig } from './config'; import { getPrivilegeDeprecationsService, registerKibanaUserRoleDeprecation } from './deprecations'; @@ -304,6 +305,12 @@ export class SecurityPlugin this.registerDeprecations(core, license); + core.security.registerSecurityApi( + buildSecurityApi({ + getAuthc: this.getAuthentication.bind(this), + }) + ); + defineRoutes({ router: core.http.createRouter(), basePath: core.http.basePath, diff --git a/x-pack/plugins/security/server/routes/authentication/common.test.ts b/x-pack/plugins/security/server/routes/authentication/common.test.ts index 6abf1b445b98a..c494389eb7c13 100644 --- a/x-pack/plugins/security/server/routes/authentication/common.test.ts +++ b/x-pack/plugins/security/server/routes/authentication/common.test.ts @@ -8,7 +8,7 @@ import { Type } from '@kbn/config-schema'; import type { RequestHandler, RouteConfig } from '@kbn/core/server'; import { kibanaResponseFactory } from '@kbn/core/server'; -import { httpServerMock } from '@kbn/core/server/mocks'; +import { coreMock, httpServerMock } from '@kbn/core/server/mocks'; import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; import { defineCommonRoutes } from './common'; @@ -38,11 +38,11 @@ describe('Common authentication routes', () => { authc = authenticationServiceMock.createStart(); routeParamsMock.getAuthenticationService.mockReturnValue(authc); - mockContext = { + mockContext = coreMock.createCustomRequestHandlerContext({ licensing: { license: { check: jest.fn().mockReturnValue({ check: 'valid' }) }, }, - } as unknown as SecurityRequestHandlerContext; + }) as unknown as SecurityRequestHandlerContext; defineCommonRoutes(routeParamsMock); }); @@ -176,13 +176,14 @@ describe('Common authentication routes', () => { it('returns current user.', async () => { const mockUser = mockAuthenticatedUser(); - authc.getCurrentUser.mockReturnValue(mockUser); + const coreContextMock = await mockContext.core; + (coreContextMock.security.authc.getCurrentUser as jest.Mock).mockReturnValue(mockUser); const response = await routeHandler(mockContext, mockRequest, kibanaResponseFactory); expect(response.status).toBe(200); expect(response.payload).toEqual(mockUser); - expect(authc.getCurrentUser).toHaveBeenCalledWith(mockRequest); + expect(coreContextMock.security.authc.getCurrentUser).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/security/server/routes/authentication/common.ts b/x-pack/plugins/security/server/routes/authentication/common.ts index 5132cbfb86e09..42bbf2f019a5d 100644 --- a/x-pack/plugins/security/server/routes/authentication/common.ts +++ b/x-pack/plugins/security/server/routes/authentication/common.ts @@ -91,15 +91,15 @@ export function defineCommonRoutes({ ]) { router.get( { path, validate: false }, - createLicensedRouteHandler((context, request, response) => { + createLicensedRouteHandler(async (context, request, response) => { if (path === '/api/security/v1/me') { logger.warn( `The "${basePath.serverBasePath}${path}" endpoint is deprecated and will be removed in the next major version.`, { tags: ['deprecation'] } ); } - - return response.ok({ body: getAuthenticationService().getCurrentUser(request)! }); + const { security: coreSecurity } = await context.core; + return response.ok({ body: coreSecurity.authc.getCurrentUser()! }); }) ); } diff --git a/x-pack/plugins/security/tsconfig.json b/x-pack/plugins/security/tsconfig.json index a135ce6ebdb56..9fdbe3fd0e372 100644 --- a/x-pack/plugins/security/tsconfig.json +++ b/x-pack/plugins/security/tsconfig.json @@ -73,6 +73,8 @@ "@kbn/kibana-utils-plugin", "@kbn/code-editor", "@kbn/code-editor-mock", + "@kbn/core-security-browser", + "@kbn/core-security-server", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts index 44d3023739446..68a6dbb461673 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts @@ -47,10 +47,8 @@ export const indexRecord = t.record( t.type({ all: t.boolean, maintenance: t.boolean, - manage_ilm: t.boolean, read: t.boolean, create_index: t.boolean, - read_cross_cluster: t.boolean, index: t.boolean, monitor: t.boolean, delete: t.boolean, @@ -59,8 +57,6 @@ export const indexRecord = t.record( create_doc: t.boolean, view_index_metadata: t.boolean, create: t.boolean, - manage_follow_index: t.boolean, - manage_leader_index: t.boolean, write: t.boolean, }) ); @@ -70,29 +66,16 @@ export const privilege = t.type({ has_all_requested: t.boolean, cluster: t.type({ monitor_ml: t.boolean, - manage_ccr: t.boolean, manage_index_templates: t.boolean, - monitor_watcher: t.boolean, monitor_transform: t.boolean, - read_ilm: t.boolean, manage_security: t.boolean, manage_own_api_key: t.boolean, - manage_saml: t.boolean, all: t.boolean, - manage_ilm: t.boolean, - manage_ingest_pipelines: t.boolean, - read_ccr: t.boolean, - manage_rollup: t.boolean, monitor: t.boolean, - manage_watcher: t.boolean, manage: t.boolean, manage_transform: t.boolean, - manage_token: t.boolean, manage_ml: t.boolean, manage_pipeline: t.boolean, - monitor_rollup: t.boolean, - transport_client: t.boolean, - create_snapshot: t.boolean, }), index: indexRecord, is_authenticated: t.boolean, diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts index 27ea555cf7270..2e35fd290681d 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts @@ -77,6 +77,7 @@ const toEsSearchHit = ( _id: '123', _score: 1.0, _source: hitSource, + sort: ['abc'], }; }; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts index 98a5fc2d153d7..34c0a8bafe10b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts @@ -120,7 +120,11 @@ interface ActionResponseFields { * An endpoint Action created in the Endpoint's `.logs-endpoint.actions-default` index. * @since v7.16 */ -export interface LogsEndpointAction { +export interface LogsEndpointAction< + TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes, + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} +> { '@timestamp': string; agent: { id: string | string[]; @@ -134,6 +138,8 @@ export interface LogsEndpointAction { id: string; name: string; }; + /** Area to store any additional metadata */ + meta?: TMeta; } export interface LogsEndpointActionWithHosts extends LogsEndpointAction { @@ -150,7 +156,8 @@ export interface LogsEndpointActionWithHosts extends LogsEndpointAction { * @since v7.16 */ export interface LogsEndpointActionResponse< - TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} > { '@timestamp': string; agent: { @@ -163,6 +170,8 @@ export interface LogsEndpointActionResponse< input_type: ResponseActionAgentType; }; error?: EcsError; + /** Area to store any other metadata for the action response */ + meta?: TMeta; } interface ResponseActionParametersWithPid { diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 5465d8fc2c507..031aecfee2bb1 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -77,10 +77,20 @@ export const allowedExperimentalValues = Object.freeze({ automatedProcessActionsEnabled: false, /** - * Enables the ability to send Response actions to SentinelOne + * Enables the ability to send Response actions to SentinelOne and persist the results + * in ES. Adds API changes to support `agentType` and supports `isolate` and `release` + * response actions in Response Console. + * + * Release: v8.13.0 */ responseActionsSentinelOneV1Enabled: false, + /** + * Enables use of SentinelOne response actions that complete asynchronously as well as support + * for more response actions. + */ + responseActionsSentinelOneV2Enabled: false, + /** * Enables top charts on Alerts Page */ diff --git a/x-pack/plugins/security_solution/public/assistant/content/conversations/index.tsx b/x-pack/plugins/security_solution/public/assistant/content/conversations/index.tsx index 61bd9fd3c937f..2b580e1257a8a 100644 --- a/x-pack/plugins/security_solution/public/assistant/content/conversations/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/content/conversations/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ELASTIC_AI_ASSISTANT_TITLE, WELCOME_CONVERSATION_TITLE } from '@kbn/elastic-assistant'; +import { WELCOME_CONVERSATION_TITLE } from '@kbn/elastic-assistant'; import type { Conversation } from '@kbn/elastic-assistant'; import { DATA_QUALITY_DASHBOARD_CONVERSATION_ID } from '@kbn/ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/tabs/summary_tab/callout_summary/translations'; import { DETECTION_RULES_CONVERSATION_ID } from '../../../detections/pages/detection_engine/rules/translations'; @@ -13,57 +13,56 @@ import { ALERT_SUMMARY_CONVERSATION_ID, EVENT_SUMMARY_CONVERSATION_ID, } from '../../../common/components/event_details/translations'; -import { ELASTIC_AI_ASSISTANT } from '../../comment_actions/translations'; import { TIMELINE_CONVERSATION_TITLE } from './translations'; export const BASE_SECURITY_CONVERSATIONS: Record = { [ALERT_SUMMARY_CONVERSATION_ID]: { - id: ALERT_SUMMARY_CONVERSATION_ID, + id: '', + title: ALERT_SUMMARY_CONVERSATION_ID, + category: 'assistant', isDefault: true, messages: [], - apiConfig: {}, + replacements: [], }, [DATA_QUALITY_DASHBOARD_CONVERSATION_ID]: { - id: DATA_QUALITY_DASHBOARD_CONVERSATION_ID, + id: '', + title: DATA_QUALITY_DASHBOARD_CONVERSATION_ID, + category: 'assistant', isDefault: true, messages: [], - apiConfig: {}, + replacements: [], }, [DETECTION_RULES_CONVERSATION_ID]: { - id: DETECTION_RULES_CONVERSATION_ID, + id: '', + title: DETECTION_RULES_CONVERSATION_ID, + category: 'assistant', isDefault: true, messages: [], - apiConfig: {}, + replacements: [], }, [EVENT_SUMMARY_CONVERSATION_ID]: { - id: EVENT_SUMMARY_CONVERSATION_ID, + id: '', + title: EVENT_SUMMARY_CONVERSATION_ID, + category: 'assistant', isDefault: true, messages: [], - apiConfig: {}, + replacements: [], }, [TIMELINE_CONVERSATION_TITLE]: { excludeFromLastConversationStorage: true, - id: TIMELINE_CONVERSATION_TITLE, + id: '', + title: TIMELINE_CONVERSATION_TITLE, + category: 'assistant', isDefault: true, messages: [], - apiConfig: {}, + replacements: [], }, [WELCOME_CONVERSATION_TITLE]: { - id: WELCOME_CONVERSATION_TITLE, + id: '', + title: WELCOME_CONVERSATION_TITLE, + category: 'assistant', isDefault: true, - theme: { - title: ELASTIC_AI_ASSISTANT_TITLE, - titleIcon: 'logoSecurity', - assistant: { - name: ELASTIC_AI_ASSISTANT, - icon: 'logoSecurity', - }, - system: { - icon: 'logoElastic', - }, - user: {}, - }, messages: [], - apiConfig: {}, + replacements: [], }, }; 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 8e6c9f20f7395..278a72de88894 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 @@ -5,13 +5,21 @@ * 2.0. */ +import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/public/common'; import { getComments } from '.'; import type { ConversationRole } from '@kbn/elastic-assistant/impl/assistant_context/types'; const user: ConversationRole = 'user'; const currentConversation = { - apiConfig: {}, + apiConfig: { + connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', + connectorTypeTitle: 'OpenAI', + provider: OpenAiProviderType.OpenAi, + }, + replacements: [], + category: 'assistant', id: '1', + title: '1', messages: [ { role: user, @@ -23,7 +31,7 @@ const currentConversation = { }; const showAnonymizedValues = false; const testProps = { - amendMessage: jest.fn(), + refetchCurrentConversation: jest.fn(), regenerateMessage: jest.fn(), isFetchingResponse: false, currentConversation, @@ -38,8 +46,15 @@ describe('getComments', () => { const result = getComments({ ...testProps, currentConversation: { - apiConfig: {}, + category: 'assistant', + apiConfig: { + connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', + connectorTypeTitle: 'OpenAI', + provider: OpenAiProviderType.OpenAi, + }, + replacements: [], id: '1', + title: '1', messages: [ { role: user, 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 d8cfc46ec5a22..0329e5f6f3889 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 @@ -11,7 +11,8 @@ import { EuiAvatar, EuiLoadingSpinner } from '@elastic/eui'; import React from 'react'; import { AssistantAvatar } from '@kbn/elastic-assistant'; -import { getMessageContentWithReplacements } from '../helpers'; +import type { Replacement } from '@kbn/elastic-assistant-common'; +import { replaceAnonymizedValuesWithOriginalValues } from '@kbn/elastic-assistant-common'; import { StreamComment } from './stream'; import { CommentActions } from '../comment_actions'; import * as i18n from './translations'; @@ -28,45 +29,37 @@ const transformMessageWithReplacements = ({ message: Message; content: string; showAnonymizedValues: boolean; - replacements?: Record; + replacements: Replacement[]; }): ContentMessage => { return { ...message, - content: - showAnonymizedValues || !replacements - ? content - : getMessageContentWithReplacements({ - messageContent: content, - replacements, - }), + content: showAnonymizedValues + ? content + : replaceAnonymizedValuesWithOriginalValues({ + messageContent: content, + replacements, + }), }; }; export const getComments = ({ - amendMessage, currentConversation, isFetchingResponse, + refetchCurrentConversation, regenerateMessage, showAnonymizedValues, }: { - amendMessage: ({ conversationId, content }: { conversationId: string; content: string }) => void; currentConversation: Conversation; isFetchingResponse: boolean; + refetchCurrentConversation: () => void; regenerateMessage: (conversationId: string) => void; showAnonymizedValues: boolean; }): EuiCommentProps[] => { - const amendMessageOfConversation = (content: string) => { - amendMessage({ - conversationId: currentConversation.id, - content, - }); - }; - const regenerateMessageOfConversation = () => { regenerateMessage(currentConversation.id); }; - const connectorTypeTitle = currentConversation.apiConfig.connectorTypeTitle ?? ''; + const connectorTypeTitle = currentConversation.apiConfig?.connectorTypeTitle ?? ''; const extraLoadingComment = isFetchingResponse ? [ @@ -76,11 +69,10 @@ export const getComments = ({ timestamp: '...', children: ( ({ content: '' } as unknown as ContentMessage)} isFetching // we never need to append to a code block in the loading comment, which is what this index is used for @@ -110,6 +102,8 @@ export const getComments = ({ eventColor: message.isError ? 'danger' : undefined, }; + const isControlsEnabled = isLastComment && !isUser; + const transformMessage = (content: string) => transformMessageWithReplacements({ message, @@ -124,12 +118,12 @@ export const getComments = ({ ...messageProps, children: ( @@ -145,14 +139,13 @@ export const getComments = ({ actions: , children: ( ), diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.test.tsx index 29570959fb839..8e93fd69d1fd3 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.test.tsx @@ -15,10 +15,10 @@ jest.mock('./use_stream'); const content = 'Test Content'; const testProps = { - amendMessage: jest.fn(), + refetchCurrentConversation: jest.fn(), content, index: 1, - isLastComment: true, + isControlsEnabled: true, connectorTypeTitle: 'OpenAI', regenerateMessage: jest.fn(), transformMessage: jest.fn(), 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 bc1e20bba2a77..1ee37aa618827 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 @@ -15,49 +15,49 @@ import { MessagePanel } from './message_panel'; import { MessageText } from './message_text'; interface Props { - amendMessage: (message: string) => void; content?: string; isError?: boolean; isFetching?: boolean; - isLastComment: boolean; + isControlsEnabled?: boolean; index: number; connectorTypeTitle: string; reader?: ReadableStreamDefaultReader; + refetchCurrentConversation: () => void; regenerateMessage: () => void; transformMessage: (message: string) => ContentMessage; } export const StreamComment = ({ - amendMessage, content, connectorTypeTitle, index, + isControlsEnabled = false, isError = false, isFetching = false, - isLastComment, reader, + refetchCurrentConversation, regenerateMessage, transformMessage, }: Props) => { const { error, isLoading, isStreaming, pendingMessage, setComplete } = useStream({ - amendMessage, + refetchCurrentConversation, content, connectorTypeTitle, reader, isError, }); - const currentState = useRef({ isStreaming, pendingMessage, amendMessage }); + const currentState = useRef({ isStreaming, pendingMessage, refetchCurrentConversation }); useEffect(() => { - currentState.current = { isStreaming, pendingMessage, amendMessage }; - }, [amendMessage, isStreaming, pendingMessage]); + currentState.current = { isStreaming, pendingMessage, refetchCurrentConversation }; + }, [refetchCurrentConversation, isStreaming, pendingMessage]); useEffect( () => () => { - // if the component is unmounted while streaming, amend the message with the pending message - if (currentState.current.isStreaming && currentState.current.pendingMessage.length > 0) { - currentState.current.amendMessage(currentState.current.pendingMessage ?? ''); + // if the component is unmounted while streaming, fetch the convo to get the completed stream + if (currentState.current.isStreaming) { + currentState.current.refetchCurrentConversation(); } }, // store values in currentState to detect true unmount @@ -74,10 +74,10 @@ export const StreamComment = ({ [isFetching, isLoading, isStreaming] ); const controls = useMemo(() => { - if (reader == null || !isLastComment) { + if (!isControlsEnabled) { return; } - if (isAnythingLoading) { + if (isAnythingLoading && reader) { return ( { @@ -93,7 +93,7 @@ export const StreamComment = ({
); - }, [isAnythingLoading, isLastComment, reader, regenerateMessage, setComplete]); + }, [isAnythingLoading, isControlsEnabled, reader, regenerateMessage, setComplete]); return ( ; const defaultProps = { - amendMessage, + refetchCurrentConversation, reader: readerComplete, isError: false, connectorTypeTitle: 'OpenAI', 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 9271758a8558e..bc75629deaf1a 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 @@ -10,7 +10,7 @@ import type { Subscription } from 'rxjs'; import { getPlaceholderObservable, getStreamObservable } from './stream_observable'; interface UseStreamProps { - amendMessage: (message: string) => void; + refetchCurrentConversation: () => void; isError: boolean; content?: string; connectorTypeTitle: string; @@ -31,16 +31,17 @@ interface UseStream { /** * A hook that takes a ReadableStreamDefaultReader and returns an object with properties and functions * that can be used to handle streaming data from a readable stream - * @param amendMessage - handles the amended message * @param content - the content of the message. If provided, the function will not use the reader to stream data. + * @param connectorTypeTitle - the title of the connector type + * @param refetchCurrentConversation - refetch the current conversation * @param reader - The readable stream reader used to stream data. If provided, the function will use this reader to stream data. * @param isError - indicates whether the reader response is an error message or not */ export const useStream = ({ - amendMessage, content, connectorTypeTitle, reader, + refetchCurrentConversation, isError, }: UseStreamProps): UseStream => { const [pendingMessage, setPendingMessage] = useState(); @@ -57,8 +58,9 @@ export const useStream = ({ const onCompleteStream = useCallback(() => { subscription?.unsubscribe(); setLoading(false); - amendMessage(pendingMessage ?? ''); - }, [amendMessage, pendingMessage, subscription]); + refetchCurrentConversation(); + }, [refetchCurrentConversation, subscription]); + const [complete, setComplete] = useState(false); useEffect(() => { if (complete) { diff --git a/x-pack/plugins/security_solution/public/assistant/helpers.tsx b/x-pack/plugins/security_solution/public/assistant/helpers.tsx index 821bb927d5031..61856ea1b17f3 100644 --- a/x-pack/plugins/security_solution/public/assistant/helpers.tsx +++ b/x-pack/plugins/security_solution/public/assistant/helpers.tsx @@ -9,7 +9,7 @@ import { EuiIcon } from '@elastic/eui'; import { analyzeMarkdown } from '@kbn/elastic-assistant'; import type { Conversation, CodeBlockDetails } from '@kbn/elastic-assistant'; import React from 'react'; - +import { replaceAnonymizedValuesWithOriginalValues } from '@kbn/elastic-assistant-common'; import type { TimelineEventsDetailsItem } from '../../common/search_strategy'; import type { Rule } from '../detection_engine/rule_management/logic'; import { SendToTimelineButton } from './send_to_timeline'; @@ -21,8 +21,6 @@ export interface QueryField { values: string; } -export const SECURITY_ASSISTANT_UI_SETTING_KEY = 'securityAssistant'; - export const getPromptContextFromDetectionRules = (rules: Rule[]): string => { const data = rules.map((rule) => `Rule Name:${rule.name}\nRule Description:${rule.description}`); @@ -56,26 +54,6 @@ const sendToTimelineEligibleQueryTypes: Array = [ 'sql', // Models often put the code block language as sql, for esql, so adding this as a fallback ]; -/** - * Returns message contents with replacements applied. - * - * @param message - * @param replacements - */ -export const getMessageContentWithReplacements = ({ - messageContent, - replacements, -}: { - messageContent: string; - replacements: Record | undefined; -}): string => - replacements != null - ? Object.keys(replacements).reduce( - (acc, replacement) => acc.replaceAll(replacement, replacements[replacement]), - messageContent - ) - : messageContent; - /** * Augments the messages in a conversation with code block details, including * the start and end indices of the code block in the message, the type of the @@ -84,14 +62,17 @@ export const getMessageContentWithReplacements = ({ * @param currentConversation */ export const augmentMessageCodeBlocks = ( - currentConversation: Conversation + currentConversation: Conversation, + showAnonymizedValues: boolean ): CodeBlockDetails[][] => { const cbd = currentConversation.messages.map(({ content }) => analyzeMarkdown( - getMessageContentWithReplacements({ - messageContent: content ?? '', - replacements: currentConversation.replacements, - }) + showAnonymizedValues + ? content ?? '' + : replaceAnonymizedValuesWithOriginalValues({ + messageContent: content ?? '', + replacements: currentConversation.replacements, + }) ) ); diff --git a/x-pack/plugins/security_solution/public/assistant/provider.tsx b/x-pack/plugins/security_solution/public/assistant/provider.tsx index 43ae8eb696128..614b747b2f8c3 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.tsx @@ -7,20 +7,27 @@ import React, { useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import type { IToasts } from '@kbn/core-notifications-browser'; -import { AssistantProvider as ElasticAssistantProvider } from '@kbn/elastic-assistant'; +import type { Conversation } from '@kbn/elastic-assistant'; +import { + AssistantProvider as ElasticAssistantProvider, + bulkChangeConversations, + mergeBaseWithPersistedConversations, + useFetchCurrentUserConversations, +} from '@kbn/elastic-assistant'; +import type { FetchConversationsResponse } from '@kbn/elastic-assistant/impl/assistant/api'; +import { once } from 'lodash/fp'; import { useBasePath, useKibana } from '../common/lib/kibana'; import { useAssistantTelemetry } from './use_assistant_telemetry'; import { getComments } from './get_comments'; -import { augmentMessageCodeBlocks, LOCAL_STORAGE_KEY } from './helpers'; -import { useConversationStore } from './use_conversation_store'; +import { LOCAL_STORAGE_KEY, augmentMessageCodeBlocks } from './helpers'; +import { useBaseConversations } from './use_conversation_store'; import { DEFAULT_ALLOW, DEFAULT_ALLOW_REPLACEMENT } from './content/anonymization'; import { PROMPT_CONTEXTS } from './content/prompt_contexts'; import { BASE_SECURITY_QUICK_PROMPTS } from './content/quick_prompts'; import { BASE_SECURITY_SYSTEM_PROMPTS } from './content/prompts/system'; import { useAnonymizationStore } from './use_anonymization_store'; import { useAssistantAvailability } from './use_assistant_availability'; -import { APP_ID } from '../../common/constants'; import { useAppToasts } from '../common/hooks/use_app_toasts'; import { useSignalIndex } from '../detections/containers/detection_engine/alerts/use_signal_index'; @@ -28,30 +35,97 @@ const ASSISTANT_TITLE = i18n.translate('xpack.securitySolution.assistant.title', defaultMessage: 'Elastic AI Assistant', }); +const LOCAL_CONVERSATIONS_MIGRATION_STATUS_TOAST_TITLE = i18n.translate( + 'xpack.securitySolution.assistant.conversationMigrationStatus.title', + { + defaultMessage: 'Local storage conversations persisted successfuly.', + } +); + /** * This component configures the Elastic AI Assistant context provider for the Security Solution app. */ export const AssistantProvider: React.FC = ({ children }) => { const { http, + notifications, + storage, triggersActionsUi: { actionTypeRegistry }, docLinks: { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }, } = useKibana().services; const basePath = useBasePath(); - const { conversations, setConversations } = useConversationStore(); - const getInitialConversation = useCallback(() => { - return conversations; - }, [conversations]); - + const baseConversations = useBaseConversations(); const assistantAvailability = useAssistantAvailability(); 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; + } + } + ); + const onFetchedConversations = useCallback( + (conversationsData: FetchConversationsResponse): Record => { + const mergedData = mergeBaseWithPersistedConversations({}, conversationsData); + if (assistantAvailability.isAssistantEnabled && assistantAvailability.hasAssistantPrivilege) { + migrateConversationsFromLocalStorage(mergedData); + } + return mergedData; + }, + [ + assistantAvailability.hasAssistantPrivilege, + assistantAvailability.isAssistantEnabled, + migrateConversationsFromLocalStorage, + ] + ); + useFetchCurrentUserConversations({ http, onFetch: onFetchedConversations }); + const { defaultAllow, defaultAllowReplacement, setDefaultAllow, setDefaultAllowReplacement } = useAnonymizationStore(); - const nameSpace = `${APP_ID}.${LOCAL_STORAGE_KEY}`; - const { signalIndexName } = useSignalIndex(); const alertsIndexPattern = signalIndexName ?? undefined; const toasts = useAppToasts() as unknown as IToasts; // useAppToasts is the current, non-deprecated method of getting the toasts service in the Security Solution, but it doesn't return the IToasts interface (defined by core) @@ -63,22 +137,20 @@ export const AssistantProvider: React.FC = ({ children }) => { augmentMessageCodeBlocks={augmentMessageCodeBlocks} assistantAvailability={assistantAvailability} assistantTelemetry={assistantTelemetry} - defaultAllow={defaultAllow} - defaultAllowReplacement={defaultAllowReplacement} + defaultAllow={defaultAllow} // to server and plugin start + defaultAllowReplacement={defaultAllowReplacement} // to server and plugin start docLinks={{ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }} - baseAllow={DEFAULT_ALLOW} - baseAllowReplacement={DEFAULT_ALLOW_REPLACEMENT} + baseAllow={DEFAULT_ALLOW} // to server and plugin start + baseAllowReplacement={DEFAULT_ALLOW_REPLACEMENT} // to server and plugin start basePath={basePath} basePromptContexts={Object.values(PROMPT_CONTEXTS)} - baseQuickPrompts={BASE_SECURITY_QUICK_PROMPTS} - baseSystemPrompts={BASE_SECURITY_SYSTEM_PROMPTS} - getInitialConversations={getInitialConversation} + baseQuickPrompts={BASE_SECURITY_QUICK_PROMPTS} // to server and plugin start + baseSystemPrompts={BASE_SECURITY_SYSTEM_PROMPTS} // to server and plugin start + baseConversations={baseConversations} getComments={getComments} http={http} - nameSpace={nameSpace} - setConversations={setConversations} - setDefaultAllow={setDefaultAllow} - setDefaultAllowReplacement={setDefaultAllowReplacement} + setDefaultAllow={setDefaultAllow} // remove + setDefaultAllowReplacement={setDefaultAllowReplacement} // remove title={ASSISTANT_TITLE} toasts={toasts} > diff --git a/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.test.tsx index a61a740394c7b..a60fa24a9f489 100644 --- a/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.test.tsx @@ -16,6 +16,7 @@ const mockedConversations = { [customId]: { id: customId, apiConfig: {}, + replacements: [], messages: [], }, }; @@ -30,14 +31,6 @@ const mockedTelemetry = { reportAssistantSettingToggled: () => {}, }; -jest.mock('../use_conversation_store', () => { - return { - useConversationStore: () => ({ - conversations: mockedConversations, - }), - }; -}); - jest.mock('../../common/lib/kibana', () => { const original = jest.requireActual('../../common/lib/kibana'); @@ -51,6 +44,16 @@ jest.mock('../../common/lib/kibana', () => { }; }); +jest.mock('@kbn/elastic-assistant', () => ({ + getConversationById: jest.fn().mockReturnValue({ + id: customId, + title: 'Custom', + apiConfig: {}, + replacements: [], + messages: [], + }), +})); + const trackingFns = [ 'reportAssistantInvoked', 'reportAssistantMessageSent', @@ -69,12 +72,12 @@ describe('useAssistantTelemetry', () => { }); describe.each(trackingFns)('Handles %s id masking', (fn) => { - it('Should call tracking with appropriate id when tracking is called with an isDefault=true conversation id', () => { + it('Should call tracking with appropriate id when tracking is called with an isDefault=true conversation id', async () => { const { result } = renderHook(() => useAssistantTelemetry()); const validId = Object.keys(mockedConversations)[0]; // @ts-ignore const trackingFn = result.current[fn]; - trackingFn({ conversationId: validId, invokedBy: 'shortcut' }); + await trackingFn({ conversationId: validId, invokedBy: 'shortcut' }); // @ts-ignore const trackingMockedFn = mockedTelemetry[fn]; expect(trackingMockedFn).toHaveBeenCalledWith({ @@ -83,11 +86,11 @@ describe('useAssistantTelemetry', () => { }); }); - it('Should call tracking with "Custom" id when tracking is called with an isDefault=false conversation id', () => { + it('Should call tracking with "Custom" id when tracking is called with an isDefault=false conversation id', async () => { const { result } = renderHook(() => useAssistantTelemetry()); // @ts-ignore const trackingFn = result.current[fn]; - trackingFn({ conversationId: customId, invokedBy: 'shortcut' }); + await trackingFn({ conversationId: customId, invokedBy: 'shortcut' }); // @ts-ignore const trackingMockedFn = mockedTelemetry[fn]; expect(trackingMockedFn).toHaveBeenCalledWith({ @@ -96,11 +99,11 @@ describe('useAssistantTelemetry', () => { }); }); - it('Should call tracking with "Custom" id when tracking is called with an unknown conversation id', () => { + it('Should call tracking with "Custom" id when tracking is called with an unknown conversation id', async () => { const { result } = renderHook(() => useAssistantTelemetry()); // @ts-ignore const trackingFn = result.current[fn]; - trackingFn({ conversationId: '123', invokedBy: 'shortcut' }); + await trackingFn({ conversationId: '123', invokedBy: 'shortcut' }); // @ts-ignore const trackingMockedFn = mockedTelemetry[fn]; expect(trackingMockedFn).toHaveBeenCalledWith({ diff --git a/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.tsx b/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.tsx index b0896bfb7db66..3de834c08829a 100644 --- a/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/use_assistant_telemetry/index.tsx @@ -5,35 +5,39 @@ * 2.0. */ -import type { AssistantTelemetry } from '@kbn/elastic-assistant'; +import { type AssistantTelemetry } from '@kbn/elastic-assistant'; import { useCallback } from 'react'; -import { useConversationStore } from '../use_conversation_store'; import { useKibana } from '../../common/lib/kibana'; +import { useBaseConversations } from '../use_conversation_store'; export const useAssistantTelemetry = (): AssistantTelemetry => { - const { conversations } = useConversationStore(); const { services: { telemetry }, } = useKibana(); + const baseConversations = useBaseConversations(); - const getAnonymizedConversationId = useCallback( - (id) => { - const convo = conversations[id] ?? { isDefault: false }; - return convo.isDefault ? id : 'Custom'; + const getAnonymizedConversationTitle = useCallback( + async (title) => { + // With persistent storage for conversation replacing id to title, because id is UUID now + // and doesn't make any value for telemetry tracking + return baseConversations[title] ? title : 'Custom'; }, - [conversations] + [baseConversations] ); const reportTelemetry = useCallback( - ({ + async ({ fn, params: { conversationId, ...rest }, - }): { fn: keyof AssistantTelemetry; params: AssistantTelemetry[keyof AssistantTelemetry] } => + }): Promise<{ + fn: keyof AssistantTelemetry; + params: AssistantTelemetry[keyof AssistantTelemetry]; + }> => fn({ ...rest, - conversationId: getAnonymizedConversationId(conversationId), + conversationId: await getAnonymizedConversationTitle(conversationId), }), - [getAnonymizedConversationId] + [getAnonymizedConversationTitle] ); return { diff --git a/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.test.tsx index 6a9c890dcb874..7fee44d0178b1 100644 --- a/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { renderHook } from '@testing-library/react-hooks'; -import { useConversationStore } from '.'; +import { useBaseConversations } from '.'; import { useLinkAuthorized } from '../../common/links'; import { useKibana as mockUseKibana } from '../../common/lib/kibana/__mocks__'; import { DATA_QUALITY_DASHBOARD_CONVERSATION_ID } from '@kbn/ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/tabs/summary_tab/callout_summary/translations'; @@ -22,6 +22,14 @@ jest.mock('../../common/links', () => ({ useLinkAuthorized: jest.fn(), })); +jest.mock('@kbn/elastic-assistant', () => ({ + useFetchCurrentUserConversations: jest.fn().mockReturnValue({ + data: {}, + isLoading: false, + isError: false, + }), +})); + const mockedUseKibana = { ...mockUseKibana(), services: { @@ -40,7 +48,7 @@ jest.mock('../../common/lib/kibana', () => { }; }); -describe('useConversationStore', () => { +describe('useBaseConversations', () => { beforeEach(() => { jest.clearAllMocks(); @@ -49,18 +57,16 @@ describe('useConversationStore', () => { it('should return conversations with "Data Quality dashboard" conversation', () => { (useLinkAuthorized as jest.Mock).mockReturnValue(true); - const { result } = renderHook(() => useConversationStore()); + const { result } = renderHook(() => useBaseConversations()); - expect(result.current.conversations).toEqual( - expect.objectContaining(BASE_SECURITY_CONVERSATIONS) - ); + expect(result.current).toEqual(expect.objectContaining(BASE_SECURITY_CONVERSATIONS)); }); it('should return conversations Without "Data Quality dashboard" conversation', () => { (useLinkAuthorized as jest.Mock).mockReturnValue(false); - const { result } = renderHook(() => useConversationStore()); + const { result } = renderHook(() => useBaseConversations()); - expect(result.current.conversations).toEqual( + expect(result.current).toEqual( expect.objectContaining(BASE_CONVERSATIONS_WITHOUT_DATA_QUALITY) ); }); diff --git a/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.tsx b/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.tsx index e195f4542e29d..3cc2d47682ec0 100644 --- a/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/use_conversation_store/index.tsx @@ -5,23 +5,16 @@ * 2.0. */ -import type { Conversation } from '@kbn/elastic-assistant'; +import { type Conversation } from '@kbn/elastic-assistant'; import { unset } from 'lodash/fp'; import { DATA_QUALITY_DASHBOARD_CONVERSATION_ID } from '@kbn/ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/tabs/summary_tab/callout_summary/translations'; import { useMemo } from 'react'; -import { useLocalStorage } from '../../common/components/local_storage'; -import { LOCAL_STORAGE_KEY } from '../helpers'; import { BASE_SECURITY_CONVERSATIONS } from '../content/conversations'; import { useLinkAuthorized } from '../../common/links'; import { SecurityPageName } from '../../../common'; -export interface UseConversationStore { - conversations: Record; - setConversations: React.Dispatch>>; -} - -export const useConversationStore = (): UseConversationStore => { +export const useBaseConversations = (): Record => { const isDataQualityDashboardPageExists = useLinkAuthorized(SecurityPageName.dataQuality); const baseConversations = useMemo( () => @@ -30,16 +23,5 @@ export const useConversationStore = (): UseConversationStore => { : unset(DATA_QUALITY_DASHBOARD_CONVERSATION_ID, BASE_SECURITY_CONVERSATIONS), [isDataQualityDashboardPageExists] ); - const [conversations, setConversations] = useLocalStorage>({ - defaultValue: baseConversations, - key: LOCAL_STORAGE_KEY, - isInvalidDefault: (valueFromStorage) => { - return !valueFromStorage; - }, - }); - - return { - conversations, - setConversations, - }; + return baseConversations; }; diff --git a/x-pack/plugins/security_solution/public/common/components/filter_group/index.scss b/x-pack/plugins/security_solution/public/common/components/filter_group/index.scss index 6bdcb0e1cdd44..416a996b9dcaf 100644 --- a/x-pack/plugins/security_solution/public/common/components/filter_group/index.scss +++ b/x-pack/plugins/security_solution/public/common/components/filter_group/index.scss @@ -11,7 +11,7 @@ } .filter-group__wrapper { - .euiFlexGroup.controlGroup { + .euiPanel.controlsWrapper { min-height: 34px; } diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx index c5e4ae70cfe21..b254fcb9e7d09 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx @@ -94,15 +94,12 @@ export const useHoverActionItems = ({ getFilterOutValueButton, getOverflowButton, } = timelines.getHoverActions(); - const filterManagerBackup = useMemo( - () => kibana.services.data.query.filterManager, - [kibana.services.data.query.filterManager] - ); - const filterManager = useMemo( - () => (isActiveTimeline(scopeId ?? '') ? timelineFilterManager : filterManagerBackup), - [scopeId, timelineFilterManager, filterManagerBackup] - ); + const filterManager = useMemo(() => { + return isActiveTimeline(scopeId ?? '') + ? timelineFilterManager + : kibana.services.data.query.filterManager; + }, [scopeId, timelineFilterManager, kibana.services.data.query.filterManager]); /* * Add to Timeline button, adds data to dataprovider but does not persists the Timeline diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx index 7312b1bcd3231..8ccad2b592b07 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx @@ -10,6 +10,7 @@ import { actionTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/a import React from 'react'; import type { AssistantAvailability } from '@kbn/elastic-assistant'; import { AssistantProvider } from '@kbn/elastic-assistant'; +import { BASE_SECURITY_CONVERSATIONS } from '../../assistant/content/conversations'; interface Props { children: React.ReactNode; @@ -44,11 +45,10 @@ export const MockAssistantProviderComponent: React.FC = ({ children }) => }} defaultAllowReplacement={[]} getComments={jest.fn(() => [])} - getInitialConversations={jest.fn(() => ({}))} - setConversations={jest.fn()} setDefaultAllow={jest.fn()} setDefaultAllowReplacement={jest.fn()} http={mockHttp} + baseConversations={BASE_SECURITY_CONVERSATIONS} > {children} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.test.tsx new file mode 100644 index 0000000000000..4be2547598b5d --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table.test.tsx @@ -0,0 +1,306 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import { AddPrebuiltRulesTable } from './add_prebuilt_rules_table'; +import { AddPrebuiltRulesHeaderButtons } from './add_prebuilt_rules_header_buttons'; +import { AddPrebuiltRulesTableContextProvider } from './add_prebuilt_rules_table_context'; + +import { useUserData } from '../../../../../detections/components/user_info'; +import { usePrebuiltRulesInstallReview } from '../../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review'; +import { useFetchPrebuiltRulesStatusQuery } from '../../../../rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query'; +import { useIsUpgradingSecurityPackages } from '../../../../rule_management/logic/use_upgrade_security_packages'; + +// Mock components not needed in this test suite +jest.mock('../../../../rule_management/components/rule_details/rule_details_flyout', () => ({ + RuleDetailsFlyout: jest.fn().mockReturnValue(<>), +})); +jest.mock('../rules_changelog_link', () => ({ + RulesChangelogLink: jest.fn().mockReturnValue(<>), +})); +jest.mock('./add_prebuilt_rules_table_filters', () => ({ + AddPrebuiltRulesTableFilters: jest.fn().mockReturnValue(<>), +})); + +jest.mock('../../../../rule_management/logic/prebuilt_rules/use_perform_rule_install', () => ({ + usePerformInstallAllRules: () => ({ + performInstallAll: jest.fn(), + isLoading: false, + }), + usePerformInstallSpecificRules: () => ({ + performInstallSpecific: jest.fn(), + isLoading: false, + }), +})); + +jest.mock('../../../../../common/lib/kibana', () => ({ + useUiSetting$: jest.fn().mockReturnValue([false]), + useKibana: jest.fn().mockReturnValue({ + services: { + docLinks: { links: { siem: { ruleChangeLog: '' } } }, + }, + }), +})); + +jest.mock('../../../../../common/components/links', () => ({ + useGetSecuritySolutionLinkProps: () => + jest.fn().mockReturnValue({ + onClick: jest.fn(), + }), +})); + +jest.mock( + '../../../../rule_management/api/hooks/prebuilt_rules/use_fetch_prebuilt_rules_status_query', + () => ({ + useFetchPrebuiltRulesStatusQuery: jest.fn().mockReturnValue({ + data: { + prebuiltRulesStatus: { + num_prebuilt_rules_total_in_package: 1, + }, + }, + }), + }) +); + +jest.mock('../../../../rule_management/logic/use_upgrade_security_packages', () => ({ + useIsUpgradingSecurityPackages: jest.fn().mockImplementation(() => false), +})); + +jest.mock( + '../../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_install_review', + () => ({ + usePrebuiltRulesInstallReview: jest.fn().mockReturnValue({ + data: { + rules: [ + { + id: 'rule-1', + name: 'rule-1', + tags: [], + risk_score: 1, + severity: 'low', + }, + ], + stats: { + num_rules_to_install: 1, + tags: [], + }, + }, + isLoading: false, + isFetched: true, + }), + }) +); + +jest.mock('../../../../../detections/components/user_info', () => ({ + useUserData: jest.fn(), +})); + +describe('AddPrebuiltRulesTable', () => { + it('disables `Install all` button if user has no write permissions', async () => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD: false, + }, + ]); + + render( + + + + + ); + + const installAllButton = screen.getByTestId('installAllRulesButton'); + + expect(installAllButton).toHaveTextContent('Install all'); + expect(installAllButton).toBeDisabled(); + }); + + it('disables `Install all` button if prebuilt package is being installed', async () => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD: true, + }, + ]); + + (useIsUpgradingSecurityPackages as jest.Mock).mockReturnValueOnce(true); + + render( + + + + + ); + + const installAllButton = screen.getByTestId('installAllRulesButton'); + + expect(installAllButton).toHaveTextContent('Install all'); + expect(installAllButton).toBeDisabled(); + }); + + it('enables Install all` button when user has permissions', async () => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD: true, + }, + ]); + + render( + + + + + ); + + const installAllButton = screen.getByTestId('installAllRulesButton'); + + expect(installAllButton).toHaveTextContent('Install all'); + expect(installAllButton).toBeEnabled(); + }); + + it.each([ + ['Security:Read', true], + ['Security:Write', false], + ])( + `renders "No rules available for install" when there are no rules to install and user has %s`, + async (_permissions, canUserCRUD) => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD, + }, + ]); + + (usePrebuiltRulesInstallReview as jest.Mock).mockReturnValueOnce({ + data: { + rules: [], + stats: { + num_rules_to_install: 0, + tags: [], + }, + }, + isLoading: false, + isFetched: true, + }); + (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValueOnce({ + data: { + prebuiltRulesStatus: { + num_prebuilt_rules_total_in_package: 0, + }, + }, + }); + + const { findByText } = render( + + + + ); + + expect(await findByText('All Elastic rules have been installed')).toBeInTheDocument(); + } + ); + + it('does not render `Install rule` on rule rows for users with no write permissions', async () => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD: false, + }, + ]); + + const id = 'rule-1'; + (usePrebuiltRulesInstallReview as jest.Mock).mockReturnValueOnce({ + data: { + rules: [ + { + id, + rule_id: id, + name: 'rule-1', + tags: [], + risk_score: 1, + severity: 'low', + }, + ], + stats: { + num_rules_to_install: 1, + tags: [], + }, + }, + isLoading: false, + isFetched: true, + }); + (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValueOnce({ + data: { + prebuiltRulesStatus: { + num_prebuilt_rules_total_in_package: 1, + }, + }, + }); + + render( + + + + ); + + const installRuleButton = screen.queryByTestId(`installSinglePrebuiltRuleButton-${id}`); + + expect(installRuleButton).not.toBeInTheDocument(); + }); + + it('renders `Install rule` on rule rows for users with write permissions', async () => { + (useUserData as jest.Mock).mockReturnValue([ + { + loading: false, + canUserCRUD: true, + }, + ]); + + const id = 'rule-1'; + (usePrebuiltRulesInstallReview as jest.Mock).mockReturnValueOnce({ + data: { + rules: [ + { + id, + rule_id: id, + name: 'rule-1', + tags: [], + risk_score: 1, + severity: 'low', + }, + ], + stats: { + num_rules_to_install: 1, + tags: [], + }, + }, + isLoading: false, + isFetched: true, + }); + (useFetchPrebuiltRulesStatusQuery as jest.Mock).mockReturnValueOnce({ + data: { + prebuiltRulesStatus: { + num_prebuilt_rules_total_in_package: 1, + }, + }, + }); + + render( + + + + ); + + const installRuleButton = screen.queryByTestId(`installSinglePrebuiltRuleButton-${id}`); + + expect(installRuleButton).toBeInTheDocument(); + expect(installRuleButton).toBeEnabled(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx index f13c8130bf740..ac89ff017c78a 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_table_context.tsx @@ -24,6 +24,7 @@ import { useRuleDetailsFlyout } from '../../../../rule_management/components/rul import type { RuleResponse } from '../../../../../../common/api/detection_engine/model/rule_schema'; import { RuleDetailsFlyout } from '../../../../rule_management/components/rule_details/rule_details_flyout'; import * as i18n from './translations'; +import { isUpgradeReviewRequestEnabled } from './add_prebuilt_rules_utils'; export interface AddPrebuiltRulesTableState { /** @@ -125,11 +126,11 @@ export const AddPrebuiltRulesTableContextProvider = ({ refetchInterval: 60000, // Refetch available rules for installation every minute keepPreviousData: true, // Use this option so that the state doesn't jump between "success" and "loading" on page change // Fetch rules to install only after background installation of security_detection_rules package is complete - enabled: Boolean( - !isUpgradingSecurityPackages && - prebuiltRulesStatus && - prebuiltRulesStatus.num_prebuilt_rules_total_in_package > 0 - ), + enabled: isUpgradeReviewRequestEnabled({ + canUserCRUD, + isUpgradingSecurityPackages, + prebuiltRulesStatus, + }), }); const { mutateAsync: installAllRulesRequest } = usePerformInstallAllRules(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_utils.ts new file mode 100644 index 0000000000000..fa032f1b32f6d --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/add_prebuilt_rules_utils.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 type { PrebuiltRulesStatusStats } from '../../../../../../common/api/detection_engine'; + +interface UpgradeReviewEnabledProps { + canUserCRUD: boolean | null; + isUpgradingSecurityPackages: boolean; + prebuiltRulesStatus?: PrebuiltRulesStatusStats; +} + +export const isUpgradeReviewRequestEnabled = ({ + canUserCRUD, + isUpgradingSecurityPackages, + prebuiltRulesStatus, +}: UpgradeReviewEnabledProps) => { + // Wait until security package is updated + if (isUpgradingSecurityPackages) { + return false; + } + + // If user is read-only, allow request to proceed even though the Prebuilt + // Rules might not be installed. For these users, the Fleet endpoint quickly + // fails with 403 so isUpgradingSecurityPackages is false + if (canUserCRUD === false) { + return true; + } + + return prebuiltRulesStatus && prebuiltRulesStatus.num_prebuilt_rules_total_in_package > 0; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx index 25f605772e941..70c40349fc80c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx @@ -8,6 +8,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiButtonEmpty, EuiBadge, EuiText, EuiLoadingSpinner, EuiLink } from '@elastic/eui'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from '../rules_table_empty_column_name'; import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; import { PopoverItems } from '../../../../../common/components/popover_items'; import { useUiSetting$ } from '../../../../../common/lib/kibana'; @@ -63,7 +64,7 @@ export const RULE_NAME_COLUMN: TableColumn = { const TAGS_COLUMN: TableColumn = { field: 'tags', - name: null, + name: , align: 'center', render: (tags: RuleResponse['tags']) => { if (tags == null || tags.length === 0) { @@ -92,7 +93,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'related_integrations', - name: null, + name: , align: 'center', render: (integrations: RuleResponse['related_integrations']) => { if (integrations == null || integrations.length === 0) { @@ -111,7 +112,7 @@ const createInstallButtonColumn = ( isDisabled: boolean ): TableColumn => ({ field: 'rule_id', - name: '', + name: , render: (ruleId: RuleSignatureId, record: Rule) => { const isRuleInstalling = loadingRules.includes(ruleId); const isInstallButtonDisabled = isRuleInstalling || isDisabled; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx new file mode 100644 index 0000000000000..0efd15ff8374e --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx @@ -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 React, { type FC } from 'react'; +import { EuiScreenReaderOnly } from '@elastic/eui'; + +interface RulesTableEmptyColumnNameProps { + name: string; +} + +export const RulesTableEmptyColumnName: FC = React.memo( + ({ name }) => { + return ( + +

{name}

+
+ ); + } +); + +RulesTableEmptyColumnName.displayName = 'RulesTableEmptyColumnName'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx index cd56a0cd49074..b188b1afea7f2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx @@ -8,6 +8,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBadge, EuiButtonEmpty, EuiLink, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from '../rules_table_empty_column_name'; import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; import type { RuleUpgradeInfoForReview } from '../../../../../../common/api/detection_engine/prebuilt_rules'; import type { RuleSignatureId } from '../../../../../../common/api/detection_engine/model/rule_schema'; @@ -62,7 +63,7 @@ const RULE_NAME_COLUMN: TableColumn = { const TAGS_COLUMN: TableColumn = { field: 'current_rule.tags', - name: null, + name: , align: 'center', render: (tags: Rule['tags']) => { if (tags == null || tags.length === 0) { @@ -91,7 +92,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'current_rule.related_integrations', - name: null, + name: , align: 'center', render: (integrations: Rule['related_integrations']) => { if (integrations == null || integrations.length === 0) { @@ -110,7 +111,7 @@ const createUpgradeButtonColumn = ( isDisabled: boolean ): TableColumn => ({ field: 'rule_id', - name: '', + name: , render: (ruleId: RuleUpgradeInfoForReview['rule_id']) => { const isRuleUpgrading = loadingRules.includes(ruleId); const isUpgradeButtonDisabled = isRuleUpgrading || isDisabled; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index ca8808682b208..82f1f42481579 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -10,6 +10,7 @@ import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiLink, EuiText, EuiToolTip } fro import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from './rules_table_empty_column_name'; import type { SecurityJob } from '../../../../common/components/ml_popover/types'; import { DEFAULT_RELATIVE_DATE_THRESHOLD, @@ -188,7 +189,7 @@ const useRuleExecutionStatusColumn = ({ const TAGS_COLUMN: TableColumn = { field: 'tags', - name: null, + name: , align: 'center', render: (tags: Rule['tags']) => { if (tags == null || tags.length === 0) { @@ -217,7 +218,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'related_integrations', - name: null, + name: , align: 'center', render: (integrations: Rule['related_integrations']) => { if (integrations == null || integrations.length === 0) { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx index a1f7b488b1d0a..3f8b9ef5386b2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx @@ -16,6 +16,7 @@ import type { AssistantAvailability } from '@kbn/elastic-assistant'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { actionTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/application/action_type_registry.mock'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { BASE_SECURITY_CONVERSATIONS } from '../../../../assistant/content/conversations'; jest.mock('../../../../common/lib/kibana'); @@ -24,7 +25,6 @@ const DATE = '2022-01-27T15:03:31.176Z'; const MESSAGE = 'This rule is attempting to query data but...'; const actionTypeRegistry = actionTypeRegistryMock.create(); -const mockGetInitialConversations = jest.fn(() => ({})); const mockGetComments = jest.fn(() => []); const mockHttp = httpServiceMock.createStartContract({ basePath: '/test' }); const mockAssistantAvailability: AssistantAvailability = { @@ -61,10 +61,9 @@ const ContextWrapper: React.FC = ({ children }) => ( ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: 'current', }} - getInitialConversations={mockGetInitialConversations} getComments={mockGetComments} http={mockHttp} - setConversations={jest.fn()} + baseConversations={BASE_SECURITY_CONVERSATIONS} setDefaultAllow={jest.fn()} setDefaultAllowReplacement={jest.fn()} > diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts index 8782f9ecad631..e34e924e7a7fb 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts @@ -1275,39 +1275,24 @@ export const mockUserPrivilege: Privilege = { has_all_requested: false, cluster: { monitor_ml: true, - manage_ccr: true, manage_api_key: true, manage_index_templates: true, - monitor_watcher: true, monitor_transform: true, - read_ilm: true, manage_security: true, manage_own_api_key: false, - manage_saml: true, all: true, - manage_ilm: true, - manage_ingest_pipelines: true, - read_ccr: true, - manage_rollup: true, monitor: true, - manage_watcher: true, manage: true, manage_transform: true, - manage_token: true, manage_ml: true, manage_pipeline: true, - monitor_rollup: true, - transport_client: true, - create_snapshot: true, }, index: { '.siem-signals-default': { all: true, maintenance: true, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: true, index: true, monitor: true, delete: true, @@ -1316,8 +1301,6 @@ export const mockUserPrivilege: Privilege = { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, write: true, }, }, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts index 0f89ac8f451b5..16a15bab3d1c0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts @@ -68,39 +68,24 @@ export interface Privilege { has_all_requested: boolean; cluster: { monitor_ml: boolean; - manage_ccr: boolean; manage_index_templates: boolean; - monitor_watcher: boolean; monitor_transform: boolean; - read_ilm: boolean; manage_api_key: boolean; manage_security: boolean; manage_own_api_key: boolean; - manage_saml: boolean; all: boolean; - manage_ilm: boolean; - manage_ingest_pipelines: boolean; - read_ccr: boolean; - manage_rollup: boolean; monitor: boolean; - manage_watcher: boolean; manage: boolean; manage_transform: boolean; - manage_token: boolean; manage_ml: boolean; manage_pipeline: boolean; - monitor_rollup: boolean; - transport_client: boolean; - create_snapshot: boolean; }; index: { [indexName: string]: { all: boolean; maintenance: boolean; - manage_ilm: boolean; read: boolean; create_index: boolean; - read_cross_cluster: boolean; index: boolean; monitor: boolean; delete: boolean; @@ -109,8 +94,6 @@ export interface Privilege { create_doc: boolean; view_index_metadata: boolean; create: boolean; - manage_follow_index: boolean; - manage_leader_index: boolean; write: boolean; }; }; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx index ce92e38dab1d0..5411cada8dd64 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx @@ -26,38 +26,23 @@ const privilege: Privilege = { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: true, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.siem-signals-default': { all: false, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: false, index: true, monitor: true, delete: true, @@ -66,8 +51,6 @@ const privilege: Privilege = { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, maintenance: true, write: true, }, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index 13e52e855f2b1..a7823f39abb70 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -547,6 +547,13 @@ export const COLUMN_TAGS = i18n.translate( } ); +export const COLUMN_INTEGRATIONS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.integrationsTitle', + { + defaultMessage: 'Integrations', + } +); + export const COLUMN_ENABLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.allRules.columns.enabledTitle', { diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx index b908b3a2a241d..0adf0b0639f6b 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx @@ -74,7 +74,7 @@ describe('RiskInputsTab', () => { expect(queryByTestId('risk-input-asset-criticality-title')).not.toBeInTheDocument(); expect(getByTestId('risk-input-table-description-cell')).toHaveTextContent( - 'Risk contributionRule Name' + 'Rule nameRule Name' ); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx index eef4726c09a9e..c77de4b1d4623 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx @@ -118,7 +118,7 @@ export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => name: ( ), truncateText: true, diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.test.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.test.tsx index 722b141401058..d24ad253b551d 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.test.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.test.tsx @@ -7,59 +7,51 @@ import { render, fireEvent, within } from '@testing-library/react'; import React from 'react'; -import { RiskInformationButtonEmpty, RiskInformationButtonIcon } from '.'; +import { RiskInformationButtonEmpty } from '.'; import { TestProviders } from '../../../common/mock'; import { RiskScoreEntity } from '../../../../common/search_strategy'; describe.each([RiskScoreEntity.host, RiskScoreEntity.user])( 'Risk Information entityType: %s', (riskEntity) => { - describe.each(['RiskInformationButtonIcon', 'RiskInformationButtonEmpty'])( - `%s component`, - (componentType) => { - const Component = - componentType === 'RiskInformationButtonIcon' - ? RiskInformationButtonIcon - : RiskInformationButtonEmpty; + describe('RiskInformationButtonEmpty', () => { + it('renders', () => { + const { queryByTestId } = render(); - it('renders', () => { - const { queryByTestId } = render(); + expect(queryByTestId('open-risk-information-flyout-trigger')).toBeInTheDocument(); + }); - expect(queryByTestId('open-risk-information-flyout-trigger')).toBeInTheDocument(); - }); + it('opens and displays a risk levels table with 5 rows', () => { + const NUMBER_OF_ROWS = 1 + 5; // 1 header row + 5 severity rows + const { getByTestId, queryByTestId } = render( + + + + ); - it('opens and displays a risk levels table with 5 rows', () => { - const NUMBER_OF_ROWS = 1 + 5; // 1 header row + 5 severity rows - const { getByTestId, queryByTestId } = render( - - - - ); + fireEvent.click(getByTestId('open-risk-information-flyout-trigger')); - fireEvent.click(getByTestId('open-risk-information-flyout-trigger')); + const riskLevelsTable = queryByTestId('risk-level-information-table'); - const riskLevelsTable = queryByTestId('risk-level-information-table'); + expect(riskLevelsTable).toBeInTheDocument(); + expect(within(riskLevelsTable!).queryAllByRole('row')).toHaveLength(NUMBER_OF_ROWS); + }); - expect(riskLevelsTable).toBeInTheDocument(); - expect(within(riskLevelsTable!).queryAllByRole('row')).toHaveLength(NUMBER_OF_ROWS); - }); + it('opens and displays an asset criticality tiers table with four (4) rows', () => { + const NUMBER_OF_ROWS = 1 + 4; // 1 header row + 4 tier rows + const { getByTestId, queryByTestId } = render( + + + + ); - it('opens and displays an asset criticality tiers table with four (4) rows', () => { - const NUMBER_OF_ROWS = 1 + 4; // 1 header row + 4 tier rows - const { getByTestId, queryByTestId } = render( - - - - ); + fireEvent.click(getByTestId('open-risk-information-flyout-trigger')); - fireEvent.click(getByTestId('open-risk-information-flyout-trigger')); + const criticalityTiersTable = queryByTestId('criticality-level-information-table'); - const criticalityTiersTable = queryByTestId('criticality-level-information-table'); - - expect(criticalityTiersTable).toBeInTheDocument(); - expect(within(criticalityTiersTable!).queryAllByRole('row')).toHaveLength(NUMBER_OF_ROWS); - }); - } - ); + expect(criticalityTiersTable).toBeInTheDocument(); + expect(within(criticalityTiersTable!).queryAllByRole('row')).toHaveLength(NUMBER_OF_ROWS); + }); + }); } ); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.tsx index 3324762bf840f..e0880bf563218 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_information/index.tsx @@ -11,7 +11,6 @@ import { EuiBasicTable, EuiButton, EuiButtonEmpty, - EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiFlyout, @@ -32,7 +31,8 @@ import { css } from '@emotion/react'; import * as i18n from './translations'; import { useOnOpenCloseHandler } from '../../../helper_hooks'; import { RiskScoreLevel } from '../severity/common'; -import { RiskScoreEntity, RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskSeverity } from '../../../../common/search_strategy'; import { CriticalityLevels, CriticalityModifiers, @@ -105,29 +105,6 @@ const getCriticalityLevelTableColumns = (): Array< export const HOST_RISK_INFO_BUTTON_CLASS = 'HostRiskInformation__button'; export const USER_RISK_INFO_BUTTON_CLASS = 'UserRiskInformation__button'; -export const RiskInformationButtonIcon = ({ riskEntity }: { riskEntity: RiskScoreEntity }) => { - const [isFlyoutVisible, handleOnOpen, handleOnClose] = useOnOpenCloseHandler(); - - return ( - <> - - {isFlyoutVisible && } - - ); -}; - export const RiskInformationButtonEmpty = ({ riskEntity }: { riskEntity: RiskScoreEntity }) => { const [isFlyoutVisible, handleOnOpen, handleOnClose] = useOnOpenCloseHandler(); diff --git a/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx b/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx index 00b97308c28c6..c084a84b3784f 100644 --- a/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { memo } from 'react'; +import React, { memo, useMemo } from 'react'; import { EuiLink, @@ -15,7 +15,8 @@ import { EuiPanel, EuiText, EuiAccordion, - EuiButtonIcon, + useEuiTheme, + useEuiShadow, } from '@elastic/eui'; import { css } from '@emotion/css'; import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; @@ -72,13 +73,7 @@ interface ExceptionsListCardProps { }) => () => Promise; readOnly: boolean; } -const buttonCss = css` - z-index: 100; - .euiAccordion__buttonContent { - cursor: pointer; - width: 100%; - } -`; + const ExceptionPanel = styled(EuiPanel)` margin: -${euiThemeVars.euiSizeS} ${euiThemeVars.euiSizeM} 0 ${euiThemeVars.euiSizeM}; `; @@ -98,6 +93,25 @@ export const ExceptionsListCard = memo( onCancelManageRules, onRuleSelectionChange, } = useListDetailsView(exceptionsList.list_id); + const { euiTheme } = useEuiTheme(); + const panelShadow = useEuiShadow(); + + const euiAccordionStyles = useMemo( + () => css` + .euiAccordion__buttonContent { + flex: 1 1 auto; + cursor: pointer; + } + .euiAccordion__triggerWrapper { + z-index: 100; + position: relative; + border-radius: ${euiTheme.border.radius.medium}; + padding: ${euiTheme.size.base}; + ${panelShadow} + } + `, + [euiTheme.border.radius.medium, euiTheme.size.base, panelShadow] + ); const { listId, @@ -140,104 +154,86 @@ export const ExceptionsListCard = memo( }); return ( - - - - setToggleAccordion(!toggleAccordion)} - buttonContent={ - - - - - - - - - - - {listName} - - - - - - {listDescription} - - - - + <> + setToggleAccordion(!toggleAccordion)} + buttonContent={ + + + + + + + {listName} + + + + + + {listDescription} + + + + - - - - - - - - - - - - - - - - - - - - - - } - data-test-subj={`exceptionsManagementListCard-${listId}`} - > - - + + + + + + + + + + + + + + + + + - - - - +
+ + } + data-test-subj={`exceptionsManagementListCard-${listId}`} + > + + + + {showAddExceptionFlyout ? ( ( action={showIncludeExpiredExceptionsModal} /> ) : null} -
+ ); } ); diff --git a/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx b/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx index 3c0fab0343a36..480aa9aca0d2b 100644 --- a/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/index.tsx @@ -28,6 +28,8 @@ import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { useApi, useExceptionLists } from '@kbn/securitysolution-list-hooks'; import { EmptyViewerState, ViewerStatus } from '@kbn/securitysolution-exception-list-components'; +import styled from 'styled-components'; +import { euiThemeVars } from '@kbn/ui-theme'; import { AutoDownload } from '../../../common/components/auto_download/auto_download'; import { useKibana } from '../../../common/lib/kibana'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; @@ -79,6 +81,10 @@ const SORT_FIELDS: Array<{ field: string; label: string; defaultOrder: 'asc' | ' }, ]; +const ExceptionsTable = styled(EuiFlexGroup)` + padding: ${euiThemeVars.euiSizeL} 0; +`; + export const SharedLists = React.memo(() => { const [{ loading: userInfoLoading, canUserCRUD, canUserREAD }] = useUserData(); @@ -587,19 +593,20 @@ export const SharedLists = React.memo(() => { sortFields={SORT_FIELDS} /> {exceptionListsWithRuleRefs.length > 0 && ( -
+ {exceptionListsWithRuleRefs.map((excList) => ( - + + + ))} -
+ )} )} diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/header_actions.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/header_actions.tsx index 52bcb514e7cab..2c48989f54de1 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/header_actions.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/header_actions.tsx @@ -9,7 +9,7 @@ import type { VFC } from 'react'; import React, { memo } from 'react'; import { EuiButtonIcon, EuiCopy, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { NewChatById } from '@kbn/elastic-assistant'; +import { NewChatByTitle } from '@kbn/elastic-assistant'; import { URL_PARAM_KEY } from '../../../../common/hooks/use_url_state'; import { copyFunction } from '../../../shared/utils/copy_to_clipboard'; import { useGetAlertDetailsFlyoutLink } from '../../../../timelines/components/side_panel/event_details/use_get_alert_details_flyout_link'; @@ -57,8 +57,10 @@ export const HeaderActions: VFC = memo(() => { > {showAssistant && ( - diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts index f2325601fd24d..26a252e19a050 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/test_ids.ts @@ -21,7 +21,7 @@ export const SEVERITY_VALUE_TEST_ID = 'severity' as const; export const RISK_SCORE_TITLE_TEST_ID = `${FLYOUT_HEADER_TEST_ID}RiskScoreTitle` as const; export const RISK_SCORE_VALUE_TEST_ID = `${FLYOUT_HEADER_TEST_ID}RiskScoreValue` as const; export const SHARE_BUTTON_TEST_ID = `${FLYOUT_HEADER_TEST_ID}ShareButton` as const; -export const CHAT_BUTTON_TEST_ID = 'newChatById' as const; +export const CHAT_BUTTON_TEST_ID = 'newChatByTitle' as const; export const ASSIGNEES_HEADER_TEST_ID = `${FLYOUT_HEADER_TEST_ID}AssigneesHeader` as const; export const ASSIGNEES_TITLE_TEST_ID = `${FLYOUT_HEADER_TEST_ID}AssigneesTitle` as const; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts index 366f6e4219b4f..b0af7cf2192e9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts @@ -209,6 +209,28 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ } ), }, + { + key: 'linux.advanced.capture_command_line', + first_supported_version: '8.14', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.capture_command_line', + { + defaultMessage: + 'Include process command line in all events that are related to this process. Default: false.', + } + ), + }, + { + key: 'mac.advanced.capture_command_line', + first_supported_version: '8.14', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.mac.advanced.capture_command_line', + { + defaultMessage: + 'Include process command line in all events that are related to this process. Default: false.', + } + ), + }, { key: 'mac.advanced.agent.connection_delay', first_supported_version: '7.9', @@ -422,6 +444,17 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ } ), }, + { + key: 'windows.advanced.capture_command_line', + first_supported_version: '8.14', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.windows.advanced.capture_command_line', + { + defaultMessage: + 'Include process command line in all events that are related to this process. Default: false.', + } + ), + }, { key: 'windows.advanced.agent.connection_delay', first_supported_version: '7.9', diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts index 7719e599f9a1f..6f5c1dda52fc2 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts @@ -8,7 +8,6 @@ import { useRef, useEffect } from 'react'; import { useLocation, useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { clearResolver } from '../store/actions'; import { parameterName } from '../store/parameter_name'; /** * Cleanup any query string keys that were added by this Resolver instance. @@ -49,7 +48,6 @@ export function useResolverQueryParamCleaner(id: string) { urlSearchParams.delete(oldResolverKey); const relativeURL = { search: urlSearchParams.toString() }; history.replace(relativeURL); - dispatch(clearResolver({ id })); }; }, [resolverKey, history, dispatch, id]); } diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx index 2d4d493c5f8ca..d46c7e9f4206f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { NewChatById } from '@kbn/elastic-assistant'; +import { NewChatByTitle } from '@kbn/elastic-assistant'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; import { isEmpty } from 'lodash/fp'; import { @@ -154,8 +154,8 @@ export const ExpandableEventTitle = React.memo( {hasAssistantPrivilege && promptContextId != null && ( - >; +}> = memo(({ shouldRefocusPrompt, setConversationTitle }) => ( + + + +)); + +AssistantTab.displayName = 'AssistantTab'; + +// eslint-disable-next-line import/no-default-export +export { AssistantTab as default }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx index b5c94ce97f670..63f9b12b5a18a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx @@ -7,7 +7,6 @@ import { EuiBadge, EuiSkeletonText, EuiTabs, EuiTab, EuiBetaBadge } from '@elastic/eui'; import { css } from '@emotion/react'; -import { Assistant } from '@kbn/elastic-assistant'; import { isEmpty } from 'lodash/fp'; import type { Ref, ReactElement, ComponentType, Dispatch, SetStateAction } from 'react'; import React, { lazy, memo, Suspense, useCallback, useEffect, useMemo, useState } from 'react'; @@ -18,7 +17,6 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useKibana } from '../../../../common/lib/kibana'; import { useAssistantTelemetry } from '../../../../assistant/use_assistant_telemetry'; -import { useConversationStore } from '../../../../assistant/use_conversation_store'; import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; import type { SessionViewConfig } from '../../../../../common/types'; import type { RowRenderer, TimelineId } from '../../../../../common/types/timeline'; @@ -78,11 +76,6 @@ const tabWithSuspense =

( return Comp; }; -const AssistantTabContainer = styled.div` - overflow-y: auto; - width: 100%; -`; - const QueryTab = tabWithSuspense(lazy(() => import('../query_tab_content'))); const EqlTab = tabWithSuspense(lazy(() => import('../eql_tab_content'))); const GraphTab = tabWithSuspense(lazy(() => import('../graph_tab_content'))); @@ -101,28 +94,10 @@ interface BasicTimelineTab { timelineDescription: string; } -const AssistantTab: React.FC<{ - shouldRefocusPrompt: boolean; - setConversationId: Dispatch>; -}> = memo(({ shouldRefocusPrompt, setConversationId }) => ( - }> - - - - -)); - -AssistantTab.displayName = 'AssistantTab'; - type ActiveTimelineTabProps = BasicTimelineTab & { activeTimelineTab: TimelineTabs; showTimeline: boolean; - setConversationId: Dispatch>; + setConversationTitle: Dispatch>; }; const ActiveTimelineTab = memo( @@ -132,7 +107,7 @@ const ActiveTimelineTab = memo( rowRenderers, timelineId, timelineType, - setConversationId, + setConversationTitle, showTimeline, }) => { const { hasAssistantPrivilege } = useAssistantAvailability(); @@ -159,12 +134,32 @@ const ActiveTimelineTab = memo( [activeTimelineTab] ); - const { conversations } = useConversationStore(); - - const hasTimelineConversationStarted = useMemo( - () => conversations[TIMELINE_CONVERSATION_TITLE].messages.length > 0, - [conversations] - ); + const getAssistantTab = useCallback(() => { + if (showTimeline) { + const AssistantTab = tabWithSuspense(lazy(() => import('../assistant_tab_content'))); + return ( + + ); + } else { + return null; + } + }, [activeTimelineTab, setConversationTitle, showTimeline]); /* Future developer -> why are we doing that * It is really expansive to re-render the QueryTab because the drag/drop @@ -220,26 +215,7 @@ const ActiveTimelineTab = memo( > {isGraphOrNotesTabs && getTab(activeTimelineTab)} - {hasAssistantPrivilege && ( - - )} + {hasAssistantPrivilege ? getAssistantTab() : null} ); } @@ -318,7 +294,7 @@ const TabsContentComponent: React.FC = ({ const isEnterprisePlus = useLicense().isEnterprise(); - const [conversationId, setConversationId] = useState(TIMELINE_CONVERSATION_TITLE); + const [conversationTitle, setConversationTitle] = useState(TIMELINE_CONVERSATION_TITLE); const { reportAssistantInvoked } = useAssistantTelemetry(); const allTimelineNoteIds = useMemo(() => { @@ -371,11 +347,11 @@ const TabsContentComponent: React.FC = ({ setActiveTab(TimelineTabs.securityAssistant); if (activeTab !== TimelineTabs.securityAssistant) { reportAssistantInvoked({ - conversationId, + conversationId: conversationTitle, invokedBy: TIMELINE_CONVERSATION_TITLE, }); } - }, [activeTab, conversationId, reportAssistantInvoked, setActiveTab]); + }, [activeTab, conversationTitle, reportAssistantInvoked, setActiveTab]); const setEsqlAsActiveTab = useCallback(() => { dispatch( @@ -509,7 +485,7 @@ const TabsContentComponent: React.FC = ({ timelineId={timelineId} timelineType={timelineType} timelineDescription={timelineDescription} - setConversationId={setConversationId} + setConversationTitle={setConversationTitle} showTimeline={showTimeline} /> diff --git a/x-pack/plugins/security_solution/server/assistant/tools/alert_counts/alert_counts_tool.test.ts b/x-pack/plugins/security_solution/server/assistant/tools/alert_counts/alert_counts_tool.test.ts index 79b9c2e171f0a..1cd837bcaf2bd 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/alert_counts/alert_counts_tool.test.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/alert_counts/alert_counts_tool.test.ts @@ -10,16 +10,16 @@ import type { KibanaRequest } from '@kbn/core-http-server'; import type { DynamicTool } from 'langchain/tools'; import { omit } from 'lodash/fp'; -import type { RequestBody } from '@kbn/elastic-assistant-plugin/server/lib/langchain/types'; import { ALERT_COUNTS_TOOL } from './alert_counts_tool'; import type { RetrievalQAChain } from 'langchain/chains'; +import type { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; describe('AlertCountsTool', () => { const alertsIndexPattern = 'alerts-index'; const esClient = { search: jest.fn().mockResolvedValue({}), } as unknown as ElasticsearchClient; - const replacements = { key: 'value' }; + const replacements = [{ uuid: 'key', value: 'value' }]; const request = { body: { isEnabledKnowledgeBase: false, @@ -29,7 +29,7 @@ describe('AlertCountsTool', () => { replacements, size: 20, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const isEnabledKnowledgeBase = true; const chain = {} as unknown as RetrievalQAChain; const modelExists = true; @@ -61,7 +61,7 @@ describe('AlertCountsTool', () => { alertsIndexPattern: '.alerts-security.alerts-default', size: 20, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const params = { esClient, request: requestMissingAnonymizationParams, @@ -165,7 +165,7 @@ describe('AlertCountsTool', () => { const requestWithMissingParams = omit('body.allow', request) as unknown as KibanaRequest< unknown, unknown, - RequestBody + ExecuteConnectorRequestBody >; const tool = ALERT_COUNTS_TOOL.getTool({ diff --git a/x-pack/plugins/security_solution/server/assistant/tools/esql_language_knowledge_base/esql_language_knowledge_base_tool.test.ts b/x-pack/plugins/security_solution/server/assistant/tools/esql_language_knowledge_base/esql_language_knowledge_base_tool.test.ts index c9605c902f0ca..10da74669ea63 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/esql_language_knowledge_base/esql_language_knowledge_base_tool.test.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/esql_language_knowledge_base/esql_language_knowledge_base_tool.test.ts @@ -10,7 +10,7 @@ import type { DynamicTool } from 'langchain/tools'; import { ESQL_KNOWLEDGE_BASE_TOOL } from './esql_language_knowledge_base_tool'; import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { KibanaRequest } from '@kbn/core-http-server'; -import type { RequestBody } from '@kbn/elastic-assistant-plugin/server/lib/langchain/types'; +import type { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; describe('EsqlLanguageKnowledgeBaseTool', () => { const chain = {} as RetrievalQAChain; @@ -26,7 +26,7 @@ describe('EsqlLanguageKnowledgeBaseTool', () => { replacements: { key: 'value' }, size: 20, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const rest = { chain, esClient, diff --git a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.test.ts b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.test.ts index 019fc0075679f..650a55d45b1c3 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.test.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.test.ts @@ -11,17 +11,17 @@ import type { DynamicTool } from 'langchain/tools'; import { omit } from 'lodash/fp'; import { OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL } from './open_and_acknowledged_alerts_tool'; -import type { RequestBody } from '@kbn/elastic-assistant-plugin/server/lib/langchain/types'; import { MAX_SIZE } from './helpers'; import type { RetrievalQAChain } from 'langchain/chains'; import { mockAlertsFieldsApi } from '@kbn/elastic-assistant-plugin/server/__mocks__/alerts'; +import type { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; describe('OpenAndAcknowledgedAlertsTool', () => { const alertsIndexPattern = 'alerts-index'; const esClient = { search: jest.fn().mockResolvedValue(mockAlertsFieldsApi), } as unknown as ElasticsearchClient; - const replacements = { key: 'value' }; + const replacements = [{ uuid: 'key', value: 'value' }]; const request = { body: { isEnabledKnowledgeBase: false, @@ -31,7 +31,7 @@ describe('OpenAndAcknowledgedAlertsTool', () => { replacements, size: 20, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const isEnabledKnowledgeBase = true; const chain = {} as unknown as RetrievalQAChain; const modelExists = true; @@ -64,7 +64,7 @@ describe('OpenAndAcknowledgedAlertsTool', () => { alertsIndexPattern: '.alerts-security.alerts-default', size: 20, }, - } as unknown as KibanaRequest; + } as unknown as KibanaRequest; const params = { request: requestMissingAnonymizationParams, ...rest, @@ -218,7 +218,7 @@ describe('OpenAndAcknowledgedAlertsTool', () => { const requestWithMissingParams = omit('body.allow', request) as unknown as KibanaRequest< unknown, unknown, - RequestBody + ExecuteConnectorRequestBody >; const tool = OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL.getTool({ diff --git a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts index 210fdd42c1555..a96e1a96cfdc1 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool.ts @@ -6,6 +6,7 @@ */ import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { Replacement } from '@kbn/elastic-assistant-common'; import { getAnonymizedValue, transformRawData } from '@kbn/elastic-assistant-common'; import { DynamicTool } from 'langchain/tools'; import { requestHasRequiredAnonymizationParams } from '@kbn/elastic-assistant-plugin/server/lib/langchain/helpers'; @@ -67,11 +68,26 @@ export const OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL: AssistantTool = { // Accumulate replacements locally so we can, for example use the same // replacement for a hostname when we see it in multiple alerts: - let localReplacements = { ...replacements }; - const localOnNewReplacements = (newReplacements: Record) => { - localReplacements = { ...localReplacements, ...newReplacements }; // update the local state - + let localReplacements: Replacement[] = replacements ?? []; + const localOnNewReplacements = (newReplacements: Replacement[]) => { + const localReplacementsDict = localReplacements.reduce( + (acc: Record, r) => { + acc[r.value] = r.uuid; + return acc; + }, + {} + ); + const newReplacementsDict = newReplacements.reduce((acc: Record, r) => { + acc[r.value] = r.uuid; + return acc; + }, {}); + const updatedReplacements = { ...localReplacementsDict, ...newReplacementsDict }; + localReplacements = Object.keys(updatedReplacements).map((key) => ({ + value: key, + uuid: updatedReplacements[key], + })); onNewReplacements?.(localReplacements); // invoke the callback with the latest replacements + return Promise.resolve(localReplacements); }; return JSON.stringify( diff --git a/x-pack/plugins/security_solution/server/config.mock.ts b/x-pack/plugins/security_solution/server/config.mock.ts index 9f61523dbbe8b..8bc1458d6a7bc 100644 --- a/x-pack/plugins/security_solution/server/config.mock.ts +++ b/x-pack/plugins/security_solution/server/config.mock.ts @@ -24,6 +24,8 @@ export const createMockConfig = (): ConfigType => { packagerTaskInterval: '60s', packagerTaskTimeout: '5m', packagerTaskPackagePolicyUpdateBatchSize: 10, + completeExternalResponseActionsTaskInterval: '60s', + completeExternalResponseActionsTaskTimeout: '20m', prebuiltRulesPackageVersion: '', alertMergeStrategy: 'missingFields', alertIgnoreFields: [], diff --git a/x-pack/plugins/security_solution/server/config.ts b/x-pack/plugins/security_solution/server/config.ts index 4cb9ff479fff1..8be7b7972e984 100644 --- a/x-pack/plugins/security_solution/server/config.ts +++ b/x-pack/plugins/security_solution/server/config.ts @@ -13,6 +13,15 @@ import type { ExperimentalFeatures } from '../common/experimental_features'; import { parseExperimentalConfigValue } from '../common/experimental_features'; import { parseConfigSettings, type ConfigSettings } from '../common/config_settings'; +/** + * Validates if the value provided is a valid duration for use with Task Manager (ex. 5m, 4s) + */ +const isValidTaskManagerDuration = (value: string): string | undefined => { + if (/^\d+[s,m]{1}$/.test(value)) { + return `Invalid duration [${value}]. Value must be a number followed by either 's' for seconds or 'm' for minutes `; + } +}; + export const configSchema = schema.object({ maxRuleImportExportSize: schema.number({ defaultValue: 10000 }), maxRuleImportPayloadBytes: schema.number({ defaultValue: 10485760 }), @@ -107,6 +116,22 @@ export const configSchema = schema.object({ */ packagerTaskPackagePolicyUpdateBatchSize: schema.number({ defaultValue: 25, max: 50, min: 1 }), + /** + * Complete External Response Actions task: interval duration + */ + completeExternalResponseActionsTaskInterval: schema.string({ + defaultValue: '60s', + validate: isValidTaskManagerDuration, + }), + + /** + * Complete External Response Actions task: Timeout value for how long the task should run + */ + completeExternalResponseActionsTaskTimeout: schema.string({ + defaultValue: '20m', + validate: isValidTaskManagerDuration, + }), + /** * For internal use. Specify which version of the Detection Rules fleet package to install * when upgrading rules. If not provided, the latest compatible package will be installed, diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts index 8547eb6dca11c..8066e6094b568 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts @@ -65,13 +65,13 @@ export class ManifestTask { const taskInterval = packagerTaskInterval; const startTime = new Date(); - this.logger.info(`Started. Checking for changes to endpoint artifacts`); + this.logger.debug(`Started. Checking for changes to endpoint artifacts`); await this.runTask(taskInstance.id); const endTime = new Date().getTime(); - this.logger.info( + this.logger.debug( `Complete. Task run took ${ endTime - startTime.getTime() }ms [ stated: ${startTime.toISOString()} ]` @@ -176,7 +176,7 @@ export class ManifestTask { } if (!oldManifest) { - this.logger.info('Last computed manifest not available yet'); + this.logger.debug('Last computed manifest not available yet'); return; } diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.test.ts new file mode 100644 index 0000000000000..6cc7c8a56afc9 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.test.ts @@ -0,0 +1,164 @@ +/* + * 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 { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; +import { + COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TITLE, + COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE, + COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_VERSION, + CompleteExternalResponseActionsTask, +} from './complete_external_actions_task'; +import { createMockEndpointAppContext } from '../../mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; + +describe('CompleteExternalActionsTask class', () => { + let endpointAppContextMock: ReturnType; + let taskInstance: CompleteExternalResponseActionsTask; + + beforeEach(() => { + endpointAppContextMock = createMockEndpointAppContext(); + taskInstance = new CompleteExternalResponseActionsTask({ + endpointAppContext: endpointAppContextMock, + }); + + endpointAppContextMock.experimentalFeatures = { + ...endpointAppContextMock.experimentalFeatures, + responseActionsSentinelOneV2Enabled: true, + }; + }); + + describe('##setup()', () => { + let taskManagerSetupContractMock: ReturnType; + + beforeEach(() => { + taskManagerSetupContractMock = taskManagerMock.createSetup(); + }); + + it('should register task with task manager', async () => { + await taskInstance.setup({ taskManager: taskManagerSetupContractMock }); + + expect(taskManagerSetupContractMock.registerTaskDefinitions).toHaveBeenCalledWith({ + [COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE]: { + title: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TITLE, + timeout: '20m', + createTaskRunner: expect.any(Function), + }, + }); + }); + + it('should NOT register task with task manager if feature flag is disabled', async () => { + endpointAppContextMock.experimentalFeatures = { + ...endpointAppContextMock.experimentalFeatures, + responseActionsSentinelOneV2Enabled: false, + }; + await taskInstance.setup({ taskManager: taskManagerSetupContractMock }); + + expect(taskManagerSetupContractMock.registerTaskDefinitions).not.toHaveBeenCalled(); + }); + + it('should use timeout value from server config', async () => { + endpointAppContextMock.serverConfig = { + ...endpointAppContextMock.serverConfig, + completeExternalResponseActionsTaskTimeout: '1000s', + }; + await taskInstance.setup({ taskManager: taskManagerSetupContractMock }); + + expect(taskManagerSetupContractMock.registerTaskDefinitions).toHaveBeenCalledWith({ + [COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE]: { + title: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TITLE, + timeout: '1000s', + createTaskRunner: expect.any(Function), + }, + }); + }); + }); + + describe('#start()', () => { + let taskManagerStartContractMock: ReturnType; + let esClientMock: ReturnType; + + const doTaskInstanceSetup = () => + taskInstance.setup({ taskManager: taskManagerMock.createSetup() }); + + beforeEach(() => { + taskManagerStartContractMock = taskManagerMock.createStart(); + esClientMock = elasticsearchServiceMock.createElasticsearchClient(); + }); + + it('should schedule task with task manager', async () => { + await doTaskInstanceSetup(); + await taskInstance.start({ + taskManager: taskManagerStartContractMock, + esClient: esClientMock, + }); + + expect(taskManagerStartContractMock.ensureScheduled).toHaveBeenCalledWith({ + id: `${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}-${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_VERSION}`, + taskType: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE, + scope: ['securitySolution'], + schedule: { + interval: '60s', + }, + state: {}, + params: {}, + }); + }); + + it('should NOT schedule task if feature flag is disabled', async () => { + endpointAppContextMock.experimentalFeatures = { + ...endpointAppContextMock.experimentalFeatures, + responseActionsSentinelOneV2Enabled: false, + }; + await doTaskInstanceSetup(); + await taskInstance.start({ + taskManager: taskManagerStartContractMock, + esClient: esClientMock, + }); + + expect(taskManagerStartContractMock.ensureScheduled).not.toHaveBeenCalled(); + }); + + it(`should use interval value from server config`, async () => { + endpointAppContextMock.serverConfig = { + ...endpointAppContextMock.serverConfig, + completeExternalResponseActionsTaskInterval: '1000s', + }; + await doTaskInstanceSetup(); + await taskInstance.start({ + taskManager: taskManagerStartContractMock, + esClient: esClientMock, + }); + + expect(taskManagerStartContractMock.ensureScheduled).toHaveBeenCalledWith({ + id: `${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}-${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_VERSION}`, + taskType: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE, + scope: ['securitySolution'], + schedule: { + interval: '1000s', + }, + state: {}, + params: {}, + }); + }); + }); + + describe('#stop()', () => { + it('should remove task definition from task manager', async () => { + const taskManagerStartContractMock = taskManagerMock.createStart(); + await taskInstance.setup({ taskManager: taskManagerMock.createSetup() }); + await taskInstance.start({ + taskManager: taskManagerStartContractMock, + esClient: elasticsearchServiceMock.createElasticsearchClient(), + }); + await taskInstance.stop(); + + expect(taskManagerStartContractMock.removeIfExists).toHaveBeenCalledWith( + COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts new file mode 100644 index 0000000000000..ba60fcc37a045 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task.ts @@ -0,0 +1,158 @@ +/* + * 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 { + TaskManagerSetupContract, + TaskManagerStartContract, +} from '@kbn/task-manager-plugin/server'; +import type { Logger } from '@kbn/logging'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { throwUnrecoverableError } from '@kbn/task-manager-plugin/server'; +import { EndpointError } from '../../../../common/endpoint/errors'; +import { CompleteExternalActionsTaskRunner } from './complete_external_actions_task_runner'; +import type { EndpointAppContext } from '../../types'; + +export const COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE = + 'endpoint:complete-external-response-actions'; +export const COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_VERSION = '1.0.0'; +export const COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TITLE = + 'Security Solution Complete External Response Actions'; + +export interface CompleteExternalResponseActionsTaskConstructorOptions { + endpointAppContext: EndpointAppContext; +} + +export interface CompleteExternalResponseActionsTaskSetupOptions { + taskManager: TaskManagerSetupContract; +} + +export interface CompleteExternalResponseActionsTaskStartOptions { + taskManager: TaskManagerStartContract; + esClient: ElasticsearchClient; +} + +export class CompleteExternalResponseActionsTask { + private wasSetup = false; + private wasStarted = false; + private log: Logger; + private esClient: ElasticsearchClient | undefined = undefined; + private cleanup: (() => void | Promise) | undefined; + private taskTimeout = '20m'; // Default. Real value comes from server config + private taskInterval = '60s'; // Default. Real value comes from server config + + constructor(protected readonly options: CompleteExternalResponseActionsTaskConstructorOptions) { + this.log = this.options.endpointAppContext.logFactory.get( + COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE + ); + } + + private get taskId(): string { + return `${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}-${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_VERSION}`; + } + + public async setup({ taskManager }: CompleteExternalResponseActionsTaskSetupOptions) { + if (this.wasSetup) { + throw new Error(`Task has already been setup!`); + } + + this.wasSetup = true; + + if (!this.options.endpointAppContext.experimentalFeatures.responseActionsSentinelOneV2Enabled) { + this.log.info( + `responseActionsSentinelOneV2Enabled feature flag is disabled. Task [${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}] will NOT be registered!` + ); + return; + } + + this.taskInterval = + this.options.endpointAppContext.serverConfig.completeExternalResponseActionsTaskInterval ?? + this.taskInterval; + this.taskTimeout = + this.options.endpointAppContext.serverConfig.completeExternalResponseActionsTaskTimeout ?? + this.taskTimeout; + + this.log.info( + `Registering task [${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}] with timeout of [${this.taskTimeout}] and run interval of [${this.taskInterval}]` + ); + + taskManager.registerTaskDefinitions({ + [COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE]: { + title: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TITLE, + timeout: this.taskTimeout, + createTaskRunner: ({ taskInstance }) => { + if (!this.esClient) { + throw new EndpointError( + `esClient not defined. Was [${this.constructor.name}.start()] called?` + ); + } + + if (taskInstance.id !== this.taskId) { + throwUnrecoverableError( + new EndpointError( + `Outdated task version. Got [${taskInstance.id}] from task instance. Current version is [${this.taskId}]` + ) + ); + } + + return new CompleteExternalActionsTaskRunner( + this.options.endpointAppContext.service, + this.esClient, + this.taskInterval + ); + }, + }, + }); + } + + public async start({ taskManager, esClient }: CompleteExternalResponseActionsTaskStartOptions) { + if (this.wasStarted) { + throw new Error('Task has already been started!'); + } + + this.wasStarted = true; + this.esClient = esClient; + + if (!this.options.endpointAppContext.experimentalFeatures.responseActionsSentinelOneV2Enabled) { + return; + } + + try { + await taskManager.ensureScheduled({ + id: this.taskId, + taskType: COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE, + scope: ['securitySolution'], + schedule: { + interval: this.taskInterval, + }, + state: {}, + params: {}, + }); + } catch (e) { + this.log.error(new EndpointError(`Error scheduling task, received: ${e.message}`, e)); + } + + this.cleanup = () => { + this.log.info( + `Un-registering task definition [${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}] (if it exists)` + ); + taskManager.removeIfExists(COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE); + this.cleanup = undefined; + }; + } + + public async stop() { + this.wasSetup = false; + this.wasStarted = false; + + if (this.cleanup) { + this.cleanup(); + this.cleanup = undefined; + } + + this.log.debug(`Task [${COMPLETE_EXTERNAL_RESPONSE_ACTIONS_TASK_TYPE}] as been stopped`); + } +} diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.test.ts new file mode 100644 index 0000000000000..a5f7b3e1d14b5 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.test.ts @@ -0,0 +1,131 @@ +/* + * 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 { createMockEndpointAppContextService } from '../../mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { CompleteExternalActionsTaskRunner } from './complete_external_actions_task_runner'; +import { RESPONSE_ACTION_AGENT_TYPE } from '../../../../common/endpoint/service/response_actions/constants'; +import { responseActionsClientMock } from '../../services/actions/clients/mocks'; +import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; +import { ENDPOINT_ACTION_RESPONSES_INDEX } from '../../../../common/endpoint/constants'; +import { waitFor } from '@testing-library/react'; + +describe('CompleteExternalTaskRunner class', () => { + let endpointContextServicesMock: ReturnType; + let esClientMock: ReturnType; + let runnerInstance: CompleteExternalActionsTaskRunner; + + beforeEach(() => { + endpointContextServicesMock = createMockEndpointAppContextService(); + esClientMock = elasticsearchServiceMock.createElasticsearchClient(); + runnerInstance = new CompleteExternalActionsTaskRunner( + endpointContextServicesMock, + esClientMock + ); + const actionGenerator = new EndpointActionGenerator('seed'); + + (endpointContextServicesMock.getInternalResponseActionsClient as jest.Mock).mockImplementation( + () => { + const clientMock = responseActionsClientMock.create(); + (clientMock.processPendingActions as jest.Mock).mockImplementation( + async ({ addToQueue }) => { + addToQueue(actionGenerator.generateResponse()); + } + ); + return clientMock; + } + ); + }); + + it('should do nothing if license is not enterprise', async () => { + (endpointContextServicesMock.getLicenseService().isEnterprise as jest.Mock).mockReturnValueOnce( + false + ); + await runnerInstance.run(); + + expect(endpointContextServicesMock.createLogger().debug).toHaveBeenCalledWith( + `Exiting: Run aborted due to license not being Enterprise` + ); + }); + + it('should call `processPendingAction` for each external agent type', async () => { + await runnerInstance.run(); + const getInternalResponseActionsClientMock = ( + endpointContextServicesMock.getInternalResponseActionsClient as jest.Mock + ).mock; + + RESPONSE_ACTION_AGENT_TYPE.filter((agentType) => agentType !== 'endpoint').forEach( + (agentType, index) => { + expect(getInternalResponseActionsClientMock.calls[index][0].agentType).toEqual(agentType); + expect( + getInternalResponseActionsClientMock.results[index].value.processPendingActions + ).toHaveBeenCalledWith({ + abortSignal: expect.any(AbortSignal), + addToQueue: expect.any(Function), + }); + } + ); + }); + + it('should call ES to create action response documents', async () => { + await runnerInstance.run(); + + expect(esClientMock.bulk).toHaveBeenCalledWith({ + index: ENDPOINT_ACTION_RESPONSES_INDEX, + operations: [ + { create: { _index: ENDPOINT_ACTION_RESPONSES_INDEX } }, + expect.objectContaining({ + '@timestamp': expect.any(String), + EndpointActions: expect.any(Object), + agent: expect.any(Object), + }), + ], + }); + }); + + it('should return next `runAt` when complete', async () => { + const result = await runnerInstance.run(); + const now = Date.now(); + const nextRunAt = result!.runAt!.getTime(); + + expect(nextRunAt).toBeGreaterThan(now); + expect(nextRunAt).toBeLessThanOrEqual(now + 60000 /* 60s is the default */); + }); + + it('should abort run if `cancel()` is called', async () => { + let resolveProcessPendingActionsPromise: (result: unknown) => void; + let processPendingActionsAbortSignal: AbortSignal; + + (endpointContextServicesMock.getInternalResponseActionsClient as jest.Mock).mockImplementation( + () => { + const clientMock = responseActionsClientMock.create(); + (clientMock.processPendingActions as jest.Mock).mockImplementation( + async ({ abortSignal }) => { + return new Promise((resolve) => { + if (!resolveProcessPendingActionsPromise) { + resolveProcessPendingActionsPromise = resolve; + processPendingActionsAbortSignal = abortSignal; + } else { + resolve(null); + } + }); + } + ); + return clientMock; + } + ); + runnerInstance.run(); + + await waitFor(() => { + expect(endpointContextServicesMock.getInternalResponseActionsClient).toHaveBeenCalled(); + }); + + runnerInstance.cancel(); + + expect(processPendingActionsAbortSignal!.aborted).toBe(true); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts new file mode 100644 index 0000000000000..c42127ad09cc1 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts @@ -0,0 +1,157 @@ +/* + * 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 { CancellableTask, RunContext, RunResult } from '@kbn/task-manager-plugin/server/task'; +import type { Logger, ElasticsearchClient } from '@kbn/core/server'; +import type { BulkRequest } from '@elastic/elasticsearch/lib/api/types'; +import { catchAndWrapError } from '../../utils'; +import { stringify } from '../../utils/stringify'; +import { RESPONSE_ACTION_AGENT_TYPE } from '../../../../common/endpoint/service/response_actions/constants'; +import type { BatchHandlerCallbackOptions } from '../../utils/queue_processor'; +import { QueueProcessor } from '../../utils/queue_processor'; +import type { LogsEndpointActionResponse } from '../../../../common/endpoint/types'; +import type { EndpointAppContextService } from '../../endpoint_app_context_services'; +import { ENDPOINT_ACTION_RESPONSES_INDEX } from '../../../../common/endpoint/constants'; + +/** + * A task manager runner responsible for checking the status of and completing pending actions + * that were sent to 3rd party EDR systems. + */ +export class CompleteExternalActionsTaskRunner + implements CancellableTask +{ + private readonly log: Logger; + private updatesQueue: QueueProcessor; + private abortController = new AbortController(); + private errors: string[] = []; + + constructor( + private readonly endpointContextServices: EndpointAppContextService, + private readonly esClient: ElasticsearchClient, + private readonly nextRunInterval: string = '60s' + ) { + this.log = this.endpointContextServices.createLogger( + // Adding a unique identifier to the end of the class name to help identify log entries related to this run + `${this.constructor.name}.${Math.random().toString(32).substring(2, 8)}` + ); + + this.updatesQueue = new QueueProcessor({ + batchHandler: this.queueBatchProcessor.bind(this), + batchSize: 50, + logger: this.log, + }); + } + + private async queueBatchProcessor({ + batch, + data, + }: BatchHandlerCallbackOptions): Promise { + const operations: BulkRequest['operations'] = []; + + for (const actionResponseDoc of data) { + operations.push({ create: { _index: ENDPOINT_ACTION_RESPONSES_INDEX } }, actionResponseDoc); + } + + const bulkResponse = await this.esClient + .bulk({ + index: ENDPOINT_ACTION_RESPONSES_INDEX, + operations, + }) + .catch(catchAndWrapError); + + if (bulkResponse.errors) { + this.errors.push( + `Batch [${batch}] processing of [${ + data.length + }] items generated the following errors:\n${stringify(bulkResponse)}` + ); + } + } + + private getNextRunDate(): Date | undefined { + const nextRun = new Date(); + const nextRunInterval = this.nextRunInterval; + + if (nextRunInterval.endsWith('s')) { + const seconds = parseInt(nextRunInterval.slice(0, -1), 10); + nextRun.setSeconds(nextRun.getSeconds() + seconds); + } else if (nextRunInterval.endsWith('m')) { + const minutes = parseInt(nextRunInterval.slice(0, -1), 10); + nextRun.setMinutes(nextRun.getMinutes() + minutes); + } else { + this.log.error(`Invalid task interval: ${nextRunInterval}`); + return; + } + + return nextRun; + } + + public async run(): Promise { + this.log.debug(`Started: Checking status of external response actions`); + this.abortController = new AbortController(); + + // If license is not `enterprise`, then exit. Support for external response actions is a + // Enterprise level feature. + if (!this.endpointContextServices.getLicenseService().isEnterprise()) { + this.abortController.abort(`License not Enterprise!`); + this.log.debug(`Exiting: Run aborted due to license not being Enterprise`); + return; + } + + // Collect update needed to complete response actions + await Promise.all( + RESPONSE_ACTION_AGENT_TYPE.filter((agentType) => agentType !== 'endpoint').map( + (agentType) => { + // If run was aborted, then stop looping through + if (this.abortController.signal.aborted) { + return null; + } + + // FIXME:PT need to implement logic that first checks if a given agent type is currently supported - like do we have what we need to "talk" to them? + + const agentTypeActionsClient = + this.endpointContextServices.getInternalResponseActionsClient({ agentType }); + + return agentTypeActionsClient.processPendingActions({ + abortSignal: this.abortController.signal, + addToQueue: this.updatesQueue.addToQueue.bind(this.updatesQueue), + }); + } + ) + ); + + await this.updatesQueue.complete(); + this.abortController.abort(`Run complete.`); + + if (this.errors.length) { + this.log.error( + `${this.errors.length} errors were encountered while running task:\n${this.errors.join( + '\n' + )}` + ); + } + + this.log.debug(`Completed: Checking status of external response actions`); + + return { + state: {}, + runAt: this.getNextRunDate(), + }; + } + + public async cancel(): Promise { + if (!this.abortController.signal.aborted) { + this.abortController.abort('Task runner canceled!'); + + // Sleep 2 seconds to give an opportunity for the abort signal to be processed + await new Promise((r) => setTimeout(r, 2000)); + + // Wait for remainder of updates to be written to ES + await this.updatesQueue.complete(); + } + } +} diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/index.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/index.ts new file mode 100644 index 0000000000000..7056acca010b8 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/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 * from './complete_external_actions_task'; diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 6a543084f51d3..344d3bbd1f2f9 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -46,6 +46,7 @@ import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-m import { casesPluginMock } from '@kbn/cases-plugin/server/mocks'; import { createCasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; import type { AddVersionOpts, VersionedRouteConfig } from '@kbn/core-http-server'; +import { responseActionsClientMock } from './services/actions/clients/mocks'; import { getEndpointAuthzInitialStateMock } from '../../common/endpoint/service/authz/mocks'; import { createMockConfig, requestContextMock } from '../lib/detection_engine/routes/__mocks__'; import type { @@ -103,6 +104,7 @@ export const createMockEndpointAppContextService = ( const loggerFactory = loggingSystemMock.create(); const featureUsageMock = createFeatureUsageServiceMock(); const messageSigningService = createMessageSigningServiceMock(); + const licenseServiceMock = createLicenseServiceMock(); return { start: jest.fn(), @@ -119,12 +121,14 @@ export const createMockEndpointAppContextService = ( getFleetFromHostFilesClient: jest.fn(async () => fleetFromHostFilesClientMock), getFleetToHostFilesClient: jest.fn(async () => fleetToHostFilesClientMock), setup: jest.fn(), - getLicenseService: jest.fn(), + getLicenseService: jest.fn().mockReturnValue(licenseServiceMock), getFeatureUsageService: jest.fn().mockReturnValue(featureUsageMock), getExceptionListsClient: jest.fn(), getMessageSigningService: jest.fn().mockReturnValue(messageSigningService), getFleetActionsClient: jest.fn(async (_) => fleetActionsClientMock), - getInternalResponseActionsClient: jest.fn(), + getInternalResponseActionsClient: jest.fn(() => { + return responseActionsClientMock.create(); + }), } as unknown as jest.Mocked; }; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts index 2cf83ee9aa491..99445fb3e7dce 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts @@ -204,8 +204,10 @@ describe('EndpointActionsClient', () => { ]); }); + type ResponseActionsMethodsOnly = keyof Omit; + // eslint-disable-next-line @typescript-eslint/no-explicit-any - const responseActionMethods: Record = { + const responseActionMethods: Record = { isolate: responseActionsClientMock.createIsolateOptions(getCommonResponseActionOptions()), release: responseActionsClientMock.createReleaseOptions(getCommonResponseActionOptions()), @@ -229,7 +231,7 @@ describe('EndpointActionsClient', () => { upload: responseActionsClientMock.createUploadOptions(getCommonResponseActionOptions()), }; - it.each(Object.keys(responseActionMethods) as Array)( + it.each(Object.keys(responseActionMethods) as ResponseActionsMethodsOnly[])( 'should handle call to %s() method', async (methodName) => { await endpointActionsClient[methodName](responseActionMethods[methodName]); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.test.ts index d3a5cb3851ac7..cb08cd6cfc30a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.test.ts @@ -18,6 +18,7 @@ import type { LogsEndpointAction, LogsEndpointActionResponse, EndpointActionResponseDataOutput, + EndpointActionDataParameterTypes, } from '../../../../../../common/endpoint/types'; import type { EndpointAppContextService } from '../../../../endpoint_app_context_services'; import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; @@ -28,13 +29,19 @@ import type { Logger } from '@kbn/logging'; import { getActionDetailsById as _getActionDetailsById } from '../../action_details_by_id'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { TransportResult } from '@elastic/elasticsearch'; -import { ENDPOINT_ACTIONS_INDEX } from '../../../../../../common/endpoint/constants'; +import { + ENDPOINT_ACTION_RESPONSES_INDEX, + ENDPOINT_ACTION_RESPONSES_INDEX_PATTERN, + ENDPOINT_ACTIONS_INDEX, +} from '../../../../../../common/endpoint/constants'; import type { DeepMutable } from '../../../../../../common/endpoint/types/utility_types'; import { set } from 'lodash'; import { responseActionsClientMock } from '../mocks'; import type { ResponseActionAgentType } from '../../../../../../common/endpoint/service/response_actions/constants'; import { getResponseActionFeatureKey } from '../../../feature_usage/feature_keys'; import { isActionSupportedByAgentType as _isActionSupportedByAgentType } from '../../../../../../common/endpoint/service/response_actions/is_response_action_supported'; +import { EndpointActionGenerator } from '../../../../../../common/endpoint/data_generators/endpoint_action_generator'; +import type { SearchRequest } from '@elastic/elasticsearch/lib/api/types'; jest.mock('../../action_details_by_id', () => { const original = jest.requireActual('../../action_details_by_id'); @@ -550,6 +557,111 @@ describe('ResponseActionsClientImpl base class', () => { await expect(responsePromise).rejects.toHaveProperty('statusCode', 500); }); }); + + describe('#fetchAllPendingActions()', () => { + beforeEach(() => { + const generator = new EndpointActionGenerator('seed'); + const actionRequestEsHitPages = [ + // Page 1 + [ + generator.generateActionEsHit({ + agent: { id: 'agent-a' }, + EndpointActions: { action_id: 'action-id-1' }, + }), + ], + // Page 2 + [ + generator.generateActionEsHit({ + agent: { id: 'agent-b' }, + EndpointActions: { action_id: 'action-id-2' }, + }), + ], + ]; + let nextActionRequestPageNumber = 0; + + constructorOptions.esClient.search.mockImplementation(async (_searchReq) => { + const searchReq = _searchReq as SearchRequest; + + // FYI: The iterable uses a Point In Time + if (searchReq!.pit) { + return generator.toEsSearchResponse( + actionRequestEsHitPages[nextActionRequestPageNumber++] ?? [] + ); + } + + switch (searchReq!.index) { + case ENDPOINT_ACTION_RESPONSES_INDEX_PATTERN: + // `action-1` will have a response - thus its complete + if (JSON.stringify(searchReq).includes('action-id-1')) { + return generator.toEsSearchResponse([ + generator.toEsSearchHit( + generator.generateResponse({ + agent: { id: 'agent-a' }, + EndpointActions: { action_id: 'action-id-1' }, + }), + ENDPOINT_ACTION_RESPONSES_INDEX + ), + ]); + } + + // `action-2 will not have a response - it will be pending + return generator.toEsSearchResponse([]); + } + + return generator.toEsSearchResponse([]); + }); + }); + + it('should return an async iterable', () => { + const iterable = baseClassMock.fetchAllPendingActions(); + + expect(iterable).toEqual({ + [Symbol.asyncIterator]: expect.any(Function), + }); + }); + + it('should query ES with expected criteria', async () => { + for await (const pendingActions of baseClassMock.fetchAllPendingActions()) { + expect(pendingActions); + } + + expect(constructorOptions.esClient.search).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ + query: { + bool: { + must: { term: { 'EndpointActions.input_type': expect.any(String) } }, + must_not: { exists: { field: 'error' } }, + filter: [{ range: { 'EndpointActions.expiration': { gte: 'now' } } }], + }, + }, + }) + ); + }); + + it('should provide an array of pending actions', async () => { + const iterationData: Array< + Array< + LogsEndpointAction + > + > = []; + + for await (const pendingActions of baseClassMock.fetchAllPendingActions()) { + iterationData.push(pendingActions); + } + + expect(iterationData.length).toBe(2); + expect(iterationData[0]).toEqual([]); // First page of results should be empty due to how the mock was setup + expect(iterationData[1]).toEqual([ + expect.objectContaining({ + EndpointActions: expect.objectContaining({ + action_id: 'action-id-2', + }), + agent: { id: 'agent-b' }, + }), + ]); + }); + }); }); class MockClassWithExposedProtectedMembers extends ResponseActionsClientImpl { @@ -578,4 +690,8 @@ class MockClassWithExposedProtectedMembers extends ResponseActionsClientImpl { ): Promise> { return super.writeActionResponseToEndpointIndex(options); } + + public fetchAllPendingActions(): AsyncIterable { + return super.fetchAllPendingActions(); + } } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts index fb61525683489..5df1079468063 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts @@ -12,7 +12,10 @@ import { v4 as uuidv4 } from 'uuid'; import { AttachmentType, ExternalReferenceStorageType } from '@kbn/cases-plugin/common'; import type { CaseAttachments } from '@kbn/cases-plugin/public/types'; import { i18n } from '@kbn/i18n'; -import { getActionRequestExpiration } from '../../utils'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import { fetchActionResponses } from '../../fetch_action_responses'; +import { createEsSearchIterable } from '../../../../utils/create_es_search_iterable'; +import { categorizeResponseResults, getActionRequestExpiration } from '../../utils'; import { isActionSupportedByAgentType } from '../../../../../../common/endpoint/service/response_actions/is_response_action_supported'; import type { EndpointAppContextService } from '../../../../endpoint_app_context_services'; import { APP_ID } from '../../../../../../common'; @@ -26,7 +29,11 @@ import { ENDPOINT_ACTION_RESPONSES_INDEX, ENDPOINT_ACTIONS_INDEX, } from '../../../../../../common/endpoint/constants'; -import type { CommonResponseActionMethodOptions, ResponseActionsClient } from './types'; +import type { + CommonResponseActionMethodOptions, + ProcessPendingActionsMethodOptions, + ResponseActionsClient, +} from './types'; import type { ActionDetails, EndpointActionDataParameterTypes, @@ -57,6 +64,7 @@ import type { import { stringify } from '../../../../utils/stringify'; import { CASE_ATTACHMENT_ENDPOINT_TYPE_ID } from '../../../../../../common/constants'; import { EMPTY_COMMENT } from '../../../../utils/translations'; +import { ActivityLogItemTypes } from '../../../../../../common/endpoint/types'; const ENTERPRISE_LICENSE_REQUIRED_MSG = i18n.translate( 'xpack.securitySolution.responseActionsList.error.licenseTooLow', @@ -397,12 +405,7 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient } } - /** - * Writes a Response Action response document to the Endpoint index - * @param options - * @protected - */ - protected async writeActionResponseToEndpointIndex< + protected buildActionResponseEsDoc< // Default type purposely set to empty object in order to ensure proper types are used when calling the method TOutputContent extends EndpointActionResponseDataOutput = Record >({ @@ -410,9 +413,7 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient error, agentId, data, - }: ResponseActionsClientWriteActionResponseToEndpointIndexOptions): Promise< - LogsEndpointActionResponse - > { + }: ResponseActionsClientWriteActionResponseToEndpointIndexOptions): LogsEndpointActionResponse { const timestamp = new Date().toISOString(); const doc: LogsEndpointActionResponse = { '@timestamp': timestamp, @@ -429,6 +430,22 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient error, }; + return doc; + } + + /** + * Writes a Response Action response document to the Endpoint index + * @param options + * @protected + */ + protected async writeActionResponseToEndpointIndex< + // Default type purposely set to empty object in order to ensure proper types are used when calling the method + TOutputContent extends EndpointActionResponseDataOutput = Record + >( + options: ResponseActionsClientWriteActionResponseToEndpointIndexOptions + ): Promise> { + const doc = this.buildActionResponseEsDoc(options); + this.log.debug(`Writing response action response:\n${stringify(doc)}`); await this.options.esClient @@ -462,6 +479,97 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient usageService.notifyUsage(featureKey); } + protected fetchAllPendingActions(): AsyncIterable { + const esClient = this.options.esClient; + const query: QueryDslQueryContainer = { + bool: { + must: { + // Only actions for this agent type + term: { 'EndpointActions.input_type': this.agentType }, + }, + must_not: { + // No action requests that have an `error` property defined + exists: { field: 'error' }, + }, + filter: [ + // We only want actions requests whose expiration date is greater than now + { range: { 'EndpointActions.expiration': { gte: 'now' } } }, + ], + }, + }; + + return createEsSearchIterable({ + esClient, + searchRequest: { + index: ENDPOINT_ACTIONS_INDEX, + sort: '@timestamp', + query, + }, + resultsMapper: async (data): Promise => { + const actionRequests = data.hits.hits.map((hit) => hit._source as LogsEndpointAction); + const pendingRequests: LogsEndpointAction[] = []; + + if (actionRequests.length > 0) { + const actionResults = ( + await fetchActionResponses({ + esClient, + actionIds: actionRequests.map((action) => action.EndpointActions.action_id), + }) + ).data; + const categorizedResults = categorizeResponseResults({ results: actionResults }); + + // An object whose keys are the Action ID and values are an array of agent IDs that have sent their responses + // ex: { uuid-1: [ agentA, agentB ] } + const agentResponsesForActionId = categorizedResults.reduce((acc, categoriezedResult) => { + let actionId = ''; + let agentId = ''; + + if (categoriezedResult.type === ActivityLogItemTypes.RESPONSE) { + actionId = categoriezedResult.item.data.EndpointActions.action_id; + agentId = Array.isArray(categoriezedResult.item.data.agent.id) + ? categoriezedResult.item.data.agent.id[0] + : categoriezedResult.item.data.agent.id; + } else { + actionId = categoriezedResult.item.data.action_id; + agentId = categoriezedResult.item.data.agent_id; + } + + if (!acc[actionId]) { + acc[actionId] = []; + } + + acc[actionId].push(agentId); + + return acc; + }, {} as Record); + + // Determine what actions are still pending + for (const actionRequest of actionRequests) { + const thisActionAgentResponses = + agentResponsesForActionId[actionRequest.EndpointActions.action_id]; + + if (!thisActionAgentResponses) { + pendingRequests.push(actionRequest); + } else { + const thisActionAgentIds = Array.isArray(actionRequest.agent.id) + ? actionRequest.agent.id + : [actionRequest.agent.id]; + + // If at least one Agent has not yet sent a response, then this action is still pending + if ( + !thisActionAgentIds.every((agentId) => thisActionAgentResponses.includes(agentId)) + ) { + pendingRequests.push(actionRequest); + } + } + } + } + + return pendingRequests; + }, + }); + } + public async isolate( actionRequest: IsolationRouteRequestBody, options?: CommonResponseActionMethodOptions @@ -521,4 +629,8 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient ): Promise> { throw new ResponseActionsNotSupportedError('upload'); } + + public async processPendingActions(_: ProcessPendingActionsMethodOptions): Promise { + this.log.debug(`#processPendingActions() method is not implemented for ${this.agentType}!`); + } } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts index ba7e9d207b757..8285450298dea 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts @@ -19,6 +19,7 @@ import type { ResponseActionUploadOutputContent, ResponseActionUploadParameters, EndpointActionData, + LogsEndpointActionResponse, } from '../../../../../../common/endpoint/types'; import type { IsolationRouteRequestBody, @@ -56,6 +57,11 @@ export interface CommonResponseActionMethodOptions error?: string; } +export interface ProcessPendingActionsMethodOptions { + addToQueue: (...docs: LogsEndpointActionResponse[]) => void; + abortSignal: AbortSignal; +} + /** * The interface required for a Response Actions provider */ @@ -103,4 +109,13 @@ export interface ResponseActionsClient { actionRequest: OmitUnsupportedAttributes, options?: CommonResponseActionMethodOptions ) => Promise>; + + /** + * Will fetch all pending response actions and check to see if they can be Completed. If so, then + * a Response record will be added to the queue to be written to the responses index. + * + * **NOTE**: the actual write to the index is done by the `QueueProcessor` instance - which at + * the time of this writing, is being controlled by the background task. + */ + processPendingActions: (options: ProcessPendingActionsMethodOptions) => Promise; } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts index c8e8662887602..62e13de5002b3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts @@ -60,6 +60,7 @@ const createResponseActionClientMock = (): jest.Mocked => isolate: jest.fn().mockReturnValue(Promise.resolve()), release: jest.fn().mockReturnValue(Promise.resolve()), runningProcesses: jest.fn().mockReturnValue(Promise.resolve()), + processPendingActions: jest.fn().mockReturnValue(Promise.resolve()), }; }; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts index 92a47e5629d0d..b0c6dd6c0211f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts @@ -17,7 +17,10 @@ import type { SentinelOneGetAgentsResponse, SentinelOneGetAgentsParams, } from '@kbn/stack-connectors-plugin/common/sentinelone/types'; -import type { CommonResponseActionMethodOptions } from '../../..'; +import type { + CommonResponseActionMethodOptions, + ProcessPendingActionsMethodOptions, +} from '../../..'; import type { ResponseActionAgentType } from '../../../../../../common/endpoint/service/response_actions/constants'; import type { SentinelOneConnectorExecuteOptions } from './types'; import { stringify } from '../../../../utils/stringify'; @@ -297,4 +300,14 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { return this.fetchActionDetails(actionRequestDoc.EndpointActions.action_id); } + + async processPendingActions({ + abortSignal, + addToQueue, + }: ProcessPendingActionsMethodOptions): Promise { + // TODO:PT implement resolving of pending S1 actions + // if (abortSignal.aborted) { + // return; + // } + } } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/fetch_action_responses.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/fetch_action_responses.test.ts index 012379758fabd..f6cde845fc829 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/fetch_action_responses.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/fetch_action_responses.test.ts @@ -41,6 +41,7 @@ describe('fetchActionResponses()', () => { error: '', started_at: '2022-04-30T12:56:00.449Z', }, + sort: ['abc'], }, { _id: 'ef278144-d8b9-45c6-9c3c-484c86b57d0b', @@ -77,6 +78,7 @@ describe('fetchActionResponses()', () => { id: 'agent-a', }, }, + sort: ['abc'], }, { _id: 'ef278144-d8b9-45c6-9c3c-484c86b57d0b', @@ -94,6 +96,7 @@ describe('fetchActionResponses()', () => { error: '', started_at: '2022-04-30T12:56:00.449Z', }, + sort: ['abc'], }, { _id: 'ef278144-d8b9-45c6-9c3c-484c86b57d0b', @@ -130,6 +133,7 @@ describe('fetchActionResponses()', () => { id: 'agent-a', }, }, + sort: ['abc'], }, ], }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index 937afb282e08b..663318c7459a3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -697,7 +697,7 @@ export class ManifestManager { await policyUpdateBatchProcessor.complete(); - this.logger.info( + this.logger.debug( `Processed [${updatedPolicies.length + unChangedPolicies.length}] Policies: updated: [${ updatedPolicies.length }], un-changed: [${unChangedPolicies.length}]` @@ -735,7 +735,7 @@ export class ManifestManager { }); } - this.logger.info(`Committed manifest ${manifest.getSemanticVersion()}`); + this.logger.debug(`Committed manifest ${manifest.getSemanticVersion()}`); } private fetchAllPolicies(): AsyncIterable { @@ -776,7 +776,7 @@ export class ManifestManager { total += artifacts.length; } - this.logger.info(`Count of current stored artifacts: ${total}`); + this.logger.debug(`Count of current stored artifacts: ${total}`); return fleetArtifacts; } @@ -828,8 +828,11 @@ export class ManifestManager { }] orphaned artifacts:\n${stringify(errors)}` ); } else if (badArtifactIds.length > 0) { - this.logger.info(`Count of orphan artifacts cleaned up: ${badArtifactIds.length}`); - this.logger.debug(`Orphan artifacts deleted from Fleet:\n${stringify(badArtifactIds)}`); + this.logger.debug( + `Count of orphan artifacts cleaned up: ${badArtifactIds.length}\n${stringify( + badArtifactIds + )}` + ); } } } diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/create_es_search_iterable.ts b/x-pack/plugins/security_solution/server/endpoint/utils/create_es_search_iterable.ts new file mode 100644 index 0000000000000..149d8518d22ad --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/utils/create_es_search_iterable.ts @@ -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. + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; + +import type * as estypes from '@kbn/es-types'; + +import type { SearchRequest, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; + +export interface CreateEsSearchIterableOptions { + esClient: ElasticsearchClient; + searchRequest: Omit & + Pick, 'sort' | 'index'>; + /** + * An optional callback for mapping the results retrieved from ES. If defined, the iterator + * `value` will be set to the data returned by this mapping function. + * + * @param data + */ + resultsMapper?: (data: SearchResponse) => any; + /** If a Point in Time should be used while executing the search. Defaults to `true` */ + usePointInTime?: boolean; +} + +// FIXME:PT need to revisit this type - its not working as expected +type InferEsSearchIteratorResultValue = + CreateEsSearchIterableOptions['resultsMapper'] extends undefined + ? SearchResponse + : ReturnType>['resultsMapper']>; + +/** + * Creates an `AsyncIterable` that can be used to iterate (ex. via `for..await..of`) over all the data + * matching the search query. The search request to ES will use `search_after`, thus can iterate over + * datasets above 10k items as well. + * + * @param options + * + * @example + * + * const yourFn = async () => { + * const dataIterable = createEsSearchIterable({ + * esClient, + * searchRequest: { + * index: 'some-index', + * sort: [ + * { + * created: { order: 'asc' } + * } + * ] + * } + * }); + * + * for await (const data of dataIterable) { + * // data === your search results + * } + * } + */ +export const createEsSearchIterable = ({ + esClient, + searchRequest: { size = 1000, index, ...searchOptions }, + resultsMapper, + usePointInTime = true, +}: CreateEsSearchIterableOptions): AsyncIterable< + InferEsSearchIteratorResultValue +> => { + const keepAliveValue = '5m'; + let done = false; + let value: SearchResponse; + let searchAfterValue: estypes.SearchHit['sort'] | undefined; + let pointInTime: Promise<{ id: string }> = usePointInTime + ? esClient.openPointInTime({ + index, + ignore_unavailable: true, + keep_alive: keepAliveValue, + }) + : Promise.resolve({ id: '' }); + + const createIteratorResult = (): IteratorResult> => { + return { done, value }; + }; + + const setValue = async (searchResponse: SearchResponse): Promise => { + value = resultsMapper ? resultsMapper(searchResponse) : searchResponse; + + if (value && 'then' in value && typeof value.then === 'function') { + // eslint-disable-next-line require-atomic-updates + value = await value; + } + }; + + const setDone = async (): Promise => { + done = true; + + if (usePointInTime) { + const pitId = (await pointInTime).id; + + if (pitId) { + await esClient.closePointInTime({ id: pitId }); + } + } + }; + + const fetchData = async () => { + const pitId = (await pointInTime).id; + + const searchResult = await esClient + .search({ + ...searchOptions, + size, + ...(usePointInTime + ? { + pit: { + id: pitId, + keep_alive: keepAliveValue, + }, + } + : { index }), + search_after: searchAfterValue, + }) + .catch((e) => { + Error.captureStackTrace(e); + throw e; + }); + + const searchHits = searchResult.hits.hits; + const lastSearchHit = searchHits[searchHits.length - 1]; + + if (searchHits.length === 0) { + await setDone(); + return; + } + + // eslint-disable-next-line require-atomic-updates + searchAfterValue = lastSearchHit.sort; + // eslint-disable-next-line require-atomic-updates + pointInTime = Promise.resolve({ id: searchResult.pit_id ?? '' }); + await setValue(searchResult); + + // If (for some reason) we don't have a `searchAfterValue`, + // then throw an error, or else we'll keep looping forever + if (!searchAfterValue) { + await setDone(); + throw new Error( + `Unable to store 'search_after' value. Last 'SearchHit' did not include a 'sort' property \n(did you forget to set the 'sort' attribute on your SearchRequest?)':\n${JSON.stringify( + lastSearchHit + )}` + ); + } + }; + + return { + [Symbol.asyncIterator]() { + return { + async next() { + if (!done) { + await fetchData(); + } + + return createIteratorResult(); + }, + + async return() { + done = true; + return createIteratorResult(); + }, + }; + }, + }; +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/queue_processor.ts b/x-pack/plugins/security_solution/server/endpoint/utils/queue_processor.ts index f4f3e4ac76852..42dd639c9b5f2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/queue_processor.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/queue_processor.ts @@ -7,8 +7,13 @@ import type { Logger } from '@kbn/core/server'; +export interface BatchHandlerCallbackOptions { + batch: number; + data: T[]; +} + export interface QueueProcessorOptions { - batchHandler: (batch: { batch: number; data: T[] }) => Promise; + batchHandler: (batch: BatchHandlerCallbackOptions) => Promise; batchSize?: number; logger?: Logger; /** diff --git a/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts b/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts index e2357d6d614ed..aa481f6081e03 100644 --- a/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts +++ b/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts @@ -112,7 +112,8 @@ describe('telemetry tasks', () => { await cleanupMockedEndpointAlerts(kibanaServer.coreStart.elasticsearch.client.asInternalUser); }); - describe('detection-rules', () => { + // FLAKY: https://github.com/elastic/kibana/issues/178591 + describe.skip('detection-rules', () => { it('should execute when scheduled', async () => { await mockAndScheduleDetectionRulesTask(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts index 6a60604b4eb24..aa3da4e614f14 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts @@ -393,38 +393,23 @@ export const getMockPrivilegesResult = () => ({ has_all_requested: false, cluster: { monitor_ml: true, - manage_ccr: false, manage_index_templates: true, - monitor_watcher: true, monitor_transform: true, - read_ilm: true, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: true, - manage_ingest_pipelines: true, - read_ccr: false, - manage_rollup: true, monitor: true, - manage_watcher: true, manage: true, manage_transform: true, - manage_token: false, manage_ml: true, manage_pipeline: true, - monitor_rollup: true, - transport_client: true, - create_snapshot: true, }, index: { '.siem-signals-test-space': { all: false, - manage_ilm: true, read: false, create_index: true, - read_cross_cluster: false, index: false, monitor: true, delete: false, @@ -433,8 +418,6 @@ export const getMockPrivilegesResult = () => ({ create_doc: false, view_index_metadata: true, create: false, - manage_follow_index: true, - manage_leader_index: true, write: false, }, }, diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 575ee09ee4196..ac173ba2eb5cf 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -20,6 +20,7 @@ import type { NewPackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/co import { FLEET_ENDPOINT_PACKAGE } from '@kbn/fleet-plugin/common'; import { i18n } from '@kbn/i18n'; +import { CompleteExternalResponseActionsTask } from './endpoint/lib/response_actions'; import { registerAgentRoutes } from './endpoint/routes/agent'; import { endpointPackagePoliciesStatsSearchStrategyProvider } from './search_strategy/endpoint_package_policies_stats'; import { turnOffPolicyProtectionsIfNotSupported } from './endpoint/migrations/turn_off_policy_protections'; @@ -151,6 +152,7 @@ export class Plugin implements ISecuritySolutionPlugin { private policyWatcher?: PolicyWatcher; private manifestTask: ManifestTask | undefined; + private completeExternalResponseActionsTask: CompleteExternalResponseActionsTask; private checkMetadataTransformsTask: CheckMetadataTransformsTask | undefined; private telemetryUsageCounter?: UsageCounter; private endpointContext: EndpointAppContext; @@ -182,6 +184,9 @@ export class Plugin implements ISecuritySolutionPlugin { }, experimentalFeatures: this.config.experimentalFeatures, }; + this.completeExternalResponseActionsTask = new CompleteExternalResponseActionsTask({ + endpointAppContext: this.endpointContext, + }); } public setup( @@ -398,6 +403,10 @@ export class Plugin implements ISecuritySolutionPlugin { }); } + if (plugins.taskManager) { + this.completeExternalResponseActionsTask.setup({ taskManager: plugins.taskManager }); + } + core.getStartServices().then(([_, depsStart]) => { appClientFactory.setup({ getSpaceId: depsStart.spaces?.spacesService?.getSpaceId, @@ -637,6 +646,13 @@ export class Plugin implements ISecuritySolutionPlugin { savedObjectsClient, }); + if (plugins.taskManager) { + this.completeExternalResponseActionsTask.start({ + taskManager: plugins.taskManager, + esClient: core.elasticsearch.client.asInternalUser, + }); + } + this.telemetryReceiver.start( core, (type: string) => core.savedObjects.getIndexForType(type), @@ -709,6 +725,7 @@ export class Plugin implements ISecuritySolutionPlugin { this.telemetryEventsSender.stop(); this.endpointAppContextService.stop(); this.policyWatcher?.stop(); + this.completeExternalResponseActionsTask.stop(); licenseService.stop(); } } diff --git a/x-pack/plugins/serverless/public/plugin.tsx b/x-pack/plugins/serverless/public/plugin.tsx index cfb3cd1104580..06cc9f91a5c47 100644 --- a/x-pack/plugins/serverless/public/plugin.tsx +++ b/x-pack/plugins/serverless/public/plugin.tsx @@ -65,15 +65,11 @@ export class ServerlessPlugin // Casting the "chrome.projects" service to an "internal" type: this is intentional to obscure the property from Typescript. const { project } = core.chrome as InternalChromeStart; const { cloud } = dependencies; - if (cloud.projectsUrl) { - project.setProjectsUrl(cloud.projectsUrl); - } + if (cloud.serverless.projectName) { project.setProjectName(cloud.serverless.projectName); } - if (cloud.deploymentUrl) { - project.setProjectUrl(cloud.deploymentUrl); - } + project.setCloudUrls(cloud); const activeNavigationNodes$ = project.getActiveNavigationNodes$(); const navigationTreeUi$ = project.getNavigationTreeUi$(); @@ -82,8 +78,7 @@ export class ServerlessPlugin setSideNavComponentDeprecated: (sideNavigationComponent) => project.setSideNavComponent(sideNavigationComponent), initNavigation: (navigationTree$, { panelContentProvider, dataTestSubj } = {}) => { - project.initNavigation(navigationTree$, { cloudUrls: cloud }); - + project.initNavigation(navigationTree$); project.setSideNavComponent(() => ( { "request_timeouts": Object { "update_by_query": 30000, }, - "requeue_invalid_tasks": Object { - "delay": 3000, - "enabled": false, - "max_attempts": 100, - }, "unsafe": Object { "authenticate_background_task_utilization": true, "exclude_task_types": Array [], @@ -108,11 +103,6 @@ describe('config validation', () => { "request_timeouts": Object { "update_by_query": 30000, }, - "requeue_invalid_tasks": Object { - "delay": 3000, - "enabled": false, - "max_attempts": 100, - }, "unsafe": Object { "authenticate_background_task_utilization": true, "exclude_task_types": Array [], @@ -174,11 +164,6 @@ describe('config validation', () => { "request_timeouts": Object { "update_by_query": 30000, }, - "requeue_invalid_tasks": Object { - "delay": 3000, - "enabled": false, - "max_attempts": 100, - }, "unsafe": Object { "authenticate_background_task_utilization": true, "exclude_task_types": Array [], diff --git a/x-pack/plugins/task_manager/server/config.ts b/x-pack/plugins/task_manager/server/config.ts index 0e30dd16b8841..54783018eed1f 100644 --- a/x-pack/plugins/task_manager/server/config.ts +++ b/x-pack/plugins/task_manager/server/config.ts @@ -56,12 +56,6 @@ const eventLoopDelaySchema = schema.object({ }), }); -const requeueInvalidTasksConfig = schema.object({ - delay: schema.number({ defaultValue: 3000, min: 0 }), - enabled: schema.boolean({ defaultValue: false }), - max_attempts: schema.number({ defaultValue: 100, min: 1, max: 500 }), -}); - const requestTimeoutsConfig = schema.object({ /* The request timeout config for task manager's updateByQuery default:30s, min:10s, max:10m */ update_by_query: schema.number({ defaultValue: 1000 * 30, min: 1000 * 10, max: 1000 * 60 * 10 }), @@ -143,7 +137,6 @@ export const configSchema = schema.object( defaultValue: 1000, min: 1, }), - requeue_invalid_tasks: requeueInvalidTasksConfig, /* These are not designed to be used by most users. Please use caution when changing these */ unsafe: schema.object({ authenticate_background_task_utilization: schema.boolean({ defaultValue: true }), @@ -181,7 +174,6 @@ export const configSchema = schema.object( } ); -export type RequeueInvalidTasksConfig = TypeOf; export type TaskManagerConfig = TypeOf; export type TaskExecutionFailureThreshold = TypeOf; export type EventLoopDelayConfig = TypeOf; diff --git a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts index 98465e88e5466..19cfa2943502c 100644 --- a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts +++ b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts @@ -79,11 +79,6 @@ describe('EphemeralTaskLifecycle', () => { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts index 92153a4878d76..4b95f0fb08974 100644 --- a/x-pack/plugins/task_manager/server/index.ts +++ b/x-pack/plugins/task_manager/server/index.ts @@ -34,8 +34,6 @@ export { throwUnrecoverableError, throwRetryableError, isEphemeralTaskRejectedDueToCapacityError, - isSkipError, - createSkipError, createTaskRunError, TaskErrorSource, } from './task_running'; diff --git a/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts b/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts index 408771d0a55a6..c0939b5b31667 100644 --- a/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts +++ b/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts @@ -74,11 +74,6 @@ describe('managed configuration', () => { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts b/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts index 6570347dc5761..fc2f34701e3c1 100644 --- a/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts +++ b/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts @@ -51,11 +51,6 @@ const config = { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts b/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts index fc1eafbbd3997..196170f716d29 100644 --- a/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts +++ b/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts @@ -62,11 +62,6 @@ const config: TaskManagerConfig = { }, poll_interval: 6000000, request_capacity: 1000, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, unsafe: { authenticate_background_task_utilization: true, exclude_task_types: [], diff --git a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts index 25b6f604ce305..886f528fd25d2 100644 --- a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts @@ -47,11 +47,6 @@ describe('Configuration Statistics Aggregator', () => { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts index 2b3ec904d52b6..7d904565e6403 100644 --- a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts @@ -52,11 +52,6 @@ describe('createMonitoringStatsStream', () => { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/plugin.test.ts b/x-pack/plugins/task_manager/server/plugin.test.ts index 4905dc09fb5c2..b0725bdd86258 100644 --- a/x-pack/plugins/task_manager/server/plugin.test.ts +++ b/x-pack/plugins/task_manager/server/plugin.test.ts @@ -72,11 +72,6 @@ const pluginInitializerContextParams = { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts b/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts index 56675ac868195..942922b84f407 100644 --- a/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts +++ b/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts @@ -77,11 +77,6 @@ describe('TaskPollingLifecycle', () => { warn_threshold: 5000, }, worker_utilization_running_average_window: 5, - requeue_invalid_tasks: { - enabled: false, - delay: 3000, - max_attempts: 20, - }, metrics_reset_interval: 3000, claim_strategy: 'default', request_timeouts: { diff --git a/x-pack/plugins/task_manager/server/polling_lifecycle.ts b/x-pack/plugins/task_manager/server/polling_lifecycle.ts index 475895639fc1d..4d8818813c957 100644 --- a/x-pack/plugins/task_manager/server/polling_lifecycle.ts +++ b/x-pack/plugins/task_manager/server/polling_lifecycle.ts @@ -217,7 +217,6 @@ export class TaskPollingLifecycle implements ITaskEventEmitter; taskRunError?: DecoratedError; - skipAttempts?: number; shouldValidate?: boolean; } & ( | // ensure a SuccessfulRunResult can either specify a new `runAt` or a new `schedule`, but not both @@ -341,11 +340,6 @@ export interface TaskInstance { */ enabled?: boolean; - /** - * Indicates the number of skipped executions. - */ - numSkippedRuns?: number; - /* * Optionally override the timeout defined in the task type for this specific task instance */ @@ -362,6 +356,10 @@ export interface TaskInstanceWithDeprecatedFields extends TaskInstance { * An interval in minutes (e.g. '5m'). If specified, this is a recurring task. * */ interval?: string; + /** + * Indicates the number of skipped executions. + */ + numSkippedRuns?: number; } /** @@ -384,6 +382,11 @@ export interface ConcreteTaskInstance extends TaskInstance { */ interval?: string; + /** + * @deprecated removed with version 8.14.0 + */ + numSkippedRuns?: number; + /** * The saved object version from the Elasticsearch document. */ diff --git a/x-pack/plugins/task_manager/server/task_running/errors.test.ts b/x-pack/plugins/task_manager/server/task_running/errors.test.ts index f4f19583c2a3d..0b486b71f5022 100644 --- a/x-pack/plugins/task_manager/server/task_running/errors.test.ts +++ b/x-pack/plugins/task_manager/server/task_running/errors.test.ts @@ -6,10 +6,8 @@ */ import { - createSkipError, createTaskRunError, getErrorSource, - isSkipError, isUnrecoverableError, isUserError, TaskErrorSource, @@ -36,10 +34,6 @@ describe('Error Types', () => { expect(isUnrecoverableError(new Error('OMG'))).toBeFalsy(); }); - it('createSkipError', () => { - expect(isSkipError(createSkipError(new Error('OMG')))).toBeTruthy(); - }); - it('createTaskRunError', () => { expect(isUserError(createTaskRunError(new Error('OMG'), TaskErrorSource.USER))).toBeTruthy(); }); diff --git a/x-pack/plugins/task_manager/server/task_running/errors.ts b/x-pack/plugins/task_manager/server/task_running/errors.ts index 3898338855efe..52226380ab7db 100644 --- a/x-pack/plugins/task_manager/server/task_running/errors.ts +++ b/x-pack/plugins/task_manager/server/task_running/errors.ts @@ -12,7 +12,6 @@ export { TaskErrorSource }; // Unrecoverable const CODE_UNRECOVERABLE = 'TaskManager/unrecoverable'; const CODE_RETRYABLE = 'TaskManager/retryable'; -const CODE_SKIP = 'TaskManager/skip'; const code = Symbol('TaskManagerErrorCode'); const retry = Symbol('TaskManagerErrorRetry'); @@ -63,18 +62,6 @@ export function throwRetryableError(error: Error, shouldRetry: Date | boolean) { throw error; } -export function isSkipError(error: Error | DecoratedError) { - if (isTaskManagerError(error) && error[code] === CODE_SKIP) { - return true; - } - return false; -} - -export function createSkipError(error: Error): DecoratedError { - (error as DecoratedError)[code] = CODE_SKIP; - return error; -} - export function createTaskRunError( error: Error, errorSource = TaskErrorSource.FRAMEWORK diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts index 1e22e15a7f1e4..8a8bdb2f21e2d 100644 --- a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts +++ b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts @@ -29,7 +29,7 @@ import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import moment from 'moment'; import { TaskDefinitionRegistry, TaskTypeDictionary } from '../task_type_dictionary'; import { mockLogger } from '../test_utils'; -import { createSkipError, throwRetryableError, throwUnrecoverableError } from './errors'; +import { throwRetryableError, throwUnrecoverableError } from './errors'; import apm from 'elastic-apm-node'; import { executionContextServiceMock } from '@kbn/core/server/mocks'; import { usageCountersServiceMock } from '@kbn/usage-collection-plugin/server/usage_counters/usage_counters_service.mock'; @@ -41,16 +41,10 @@ import { TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING, } from './task_runner'; import { schema } from '@kbn/config-schema'; -import { RequeueInvalidTasksConfig } from '../config'; const baseDelay = 5 * 60 * 1000; const executionContext = executionContextServiceMock.createSetupContract(); const minutesFromNow = (mins: number): Date => secondsFromNow(mins * 60); -const mockRequeueInvalidTasksConfig = { - enabled: false, - delay: 3000, - max_attempts: 20, -}; let fakeTimer: sinon.SinonFakeTimers; @@ -1390,11 +1384,6 @@ describe('TaskManagerRunner', () => { }, }, }, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, }); expect(await runner.run()).toEqual({ @@ -1459,11 +1448,6 @@ describe('TaskManagerRunner', () => { }, }, }, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, allowReadingInvalidState: true, }); @@ -2004,552 +1988,6 @@ describe('TaskManagerRunner', () => { tags: ['task:end', 'foo', 'bar'], }); }); - - describe('Skip Tasks', () => { - test('skips task.run when the task has invalid params', async () => { - const mockTaskInstance: Partial = { - schedule: { interval: '10m' }, - status: TaskStatus.Idle, - startedAt: new Date(), - enabled: true, - state: { existingStatePAram: 'foo' }, - runAt: new Date(), - params: { foo: 'bar' }, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async run() { - return { state: { foo: 'bar' } }; - }, - }), - paramsSchema: schema.object({ - baz: schema.string(), // { foo: 'bar' } is valid - }), - }, - }, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledTimes(1); - const instance = store.update.mock.calls[0][0]; - - expect(instance.runAt.getTime()).toBe( - new Date(Date.now()).getTime() + mockRequeueInvalidTasksConfig.delay - ); - expect(instance.state).toEqual(mockTaskInstance.state); - expect(instance.schedule).toEqual(mockTaskInstance.schedule); - expect(instance.attempts).toBe(0); - expect(instance.numSkippedRuns).toBe(1); - expect(result).toEqual( - asErr({ - error: createSkipError( - new Error('[baz]: expected value of type [string] but got [undefined]') - ), - state: { - existingStatePAram: 'foo', - }, - }) - ); - expect(logger.warn).toHaveBeenCalledTimes(2); - expect(logger.warn).toHaveBeenCalledWith( - 'Task (bar/foo) has a validation error: [baz]: expected value of type [string] but got [undefined]' - ); - expect(logger.warn).toHaveBeenCalledWith( - 'Task Manager has skipped executing the Task (bar/foo) 1 times as it has invalid params.' - ); - }); - - test('skips task.run when the task has invalid indirect params e.g. rule', async () => { - const mockTaskInstance: Partial = { - schedule: { interval: '10m' }, - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStatePAram: 'foo' }, - runAt: new Date(), - }; - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - delay: 3000, - enabled: true, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: {} }; - }, - }), - indirectParamsSchema: schema.object({ - baz: schema.string(), // { foo: 'bar' } is valid - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledTimes(1); - const instance = store.update.mock.calls[0][0]; - - expect(instance.runAt.getTime()).toBe( - new Date(Date.now()).getTime() + mockRequeueInvalidTasksConfig.delay - ); - expect(instance.state).toEqual(mockTaskInstance.state); - expect(instance.schedule).toEqual(mockTaskInstance.schedule); - expect(instance.attempts).toBe(0); - expect(instance.numSkippedRuns).toBe(1); - expect(logger.warn).toHaveBeenCalledTimes(2); - expect(logger.warn).toHaveBeenCalledWith( - 'Task (bar/foo) has a validation error in its indirect params: [baz]: expected value of type [string] but got [undefined]' - ); - expect(logger.warn).toHaveBeenCalledWith( - 'Task Manager has skipped executing the Task (bar/foo) 1 times as it has invalid params.' - ); - expect(result).toEqual( - asErr({ - state: mockTaskInstance.state, - error: createSkipError( - new Error('[baz]: expected value of type [string] but got [undefined]') - ), - }) - ); - }); - - test('does not skip when disabled (recurring task)', async () => { - const mockTaskInstance: Partial = { - schedule: { interval: '10m' }, - attempts: 1, - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStatePAram: 'foo' }, - runAt: new Date(), - numSkippedRuns: mockRequeueInvalidTasksConfig.max_attempts, - }; - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - delay: 3000, - enabled: false, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: { new: 'foo' } }; - }, - }), - indirectParamsSchema: schema.object({ - baz: schema.string(), // { foo: 'bar' } is valid - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledTimes(1); - const instance = store.update.mock.calls[0][0]; - - expect(instance.runAt.getTime()).toBeGreaterThan(mockTaskInstance.runAt!.getTime()); // reschedule attempt - expect(instance.state).toEqual({ new: 'foo' }); - expect(instance.schedule).toEqual(mockTaskInstance.schedule); - expect(instance.attempts).toBe(0); - expect(instance.numSkippedRuns).toBe(0); - expect(logger.warn).not.toHaveBeenCalled(); - expect(result).toEqual(asOk({ state: { new: 'foo' } })); - }); - - test('does not skip when disabled (non-recurring task)', async () => { - const mockTaskInstance: Partial = { - attempts: 5, // defaultMaxAttempts - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStatePAram: 'foo' }, - runAt: new Date(), - numSkippedRuns: 0, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - delay: 3000, - enabled: false, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: { new: 'foo' } }; - }, - }), - indirectParamsSchema: schema.object({ - baz: schema.string(), // { foo: 'bar' } is valid - }), - }, - }, - }); - - await runner.run(); - - expect(store.update).not.toHaveBeenCalled(); - expect(logger.warn).not.toHaveBeenCalled(); - expect(store.remove).toHaveBeenCalled(); - }); - - test('resets skip attempts on the first successful run', async () => { - const mockTaskInstance: Partial = { - schedule: { interval: '10m' }, - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: {} }; - }, - }), - indirectParamsSchema: schema.object({ - foo: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledTimes(1); - const instance = store.update.mock.calls[0][0]; - expect(instance.state).toEqual({}); - expect(instance.attempts).toBe(0); - expect(instance.numSkippedRuns).toBe(0); - expect(logger.warn).not.toHaveBeenCalled(); - expect(result).toEqual(asOk({ state: {} })); - }); - - test('removes the non-recurring tasks on the first successful run after skipping', async () => { - const cleanupFn = jest.fn(); - const mockTaskInstance: Partial = { - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: {} }; - }, - cleanup: cleanupFn, - }), - indirectParamsSchema: schema.object({ - foo: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).not.toHaveBeenCalled(); - expect(logger.warn).not.toHaveBeenCalled(); - expect(cleanupFn).toHaveBeenCalled(); - expect(store.remove).toHaveBeenCalledWith('foo'); - expect(result).toEqual(asOk({ state: {} })); - }); - - test('does not resets skip attempts for a recurring task as long as there is an error', async () => { - const taskRunError = createTaskRunError(new Error('test'), TaskErrorSource.FRAMEWORK); - - const mockTaskInstance: Partial = { - schedule: { interval: '10m' }, - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { - state: {}, - taskRunError, - }; - }, - }), - indirectParamsSchema: schema.object({ - foo: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledTimes(1); - expect(store.remove).not.toHaveBeenCalled(); - const instance = store.update.mock.calls[0][0]; - expect(instance.numSkippedRuns).toBe(mockTaskInstance.numSkippedRuns); - expect(logger.warn).not.toHaveBeenCalled(); - expect(result).toEqual( - asOk({ - state: {}, - taskRunError, - }) - ); - }); - - test('does not resets skip attempts for a non-recurring task as long as there is an error', async () => { - const mockTaskInstance: Partial = { - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, - attempts: 3, - }; - const error = new Error('test'); - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: {}, error }; - }, - }), - indirectParamsSchema: schema.object({ - foo: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledWith( - expect.objectContaining({ - attempts: 3, - numSkippedRuns: 20, - state: {}, - status: TaskStatus.Idle, - }), - { validate: true } - ); - expect(store.remove).not.toHaveBeenCalled(); - expect(logger.warn).not.toHaveBeenCalled(); - expect(result).toEqual(asErr({ state: {}, error })); - }); - - test("sets non recurring task's status as dead_letter after skip and retry attempts ", async () => { - const mockTaskInstance: Partial = { - status: TaskStatus.Running, - startedAt: new Date(), - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, // max - attempts: 5, // default max - }; - const error = new Error('test'); - - const { runner, store } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - delay: 3000, - enabled: true, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { foo: 'bar' } } }; - }, - async run() { - return { state: {}, error }; - }, - }), - indirectParamsSchema: schema.object({ - baz: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledWith( - expect.objectContaining({ - attempts: mockTaskInstance.attempts, // default max - numSkippedRuns: mockTaskInstance.numSkippedRuns, - state: mockTaskInstance.state, - status: TaskStatus.DeadLetter, - }), - { validate: true } - ); - expect(store.remove).not.toHaveBeenCalled(); - expect(result).toEqual(asErr({ state: {}, error })); - }); - - test('stops skipping when the max skip limit is reached', async () => { - const taskRunError = createTaskRunError(new Error('test'), TaskErrorSource.FRAMEWORK); - - const mockTaskInstance: Partial = { - status: TaskStatus.Running, - startedAt: new Date(), - schedule: { interval: '3s' }, - enabled: true, - state: { existingStateParam: 'foo' }, - runAt: new Date(), - numSkippedRuns: 20, - attempts: 0, - }; - - const { runner, store, logger } = await readyToRunStageSetup({ - instance: mockTaskInstance, - requeueInvalidTasksConfig: { - enabled: true, - delay: 3000, - max_attempts: 20, - }, - definitions: { - bar: { - title: 'Bar!', - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { baz: 'bar' } } }; - }, - async run() { - return { - state: {}, - taskRunError, - }; - }, - }), - indirectParamsSchema: schema.object({ - foo: schema.string(), - }), - }, - }, - }); - - const result = await runner.run(); - - expect(store.update).toHaveBeenCalledWith( - expect.objectContaining({ - attempts: 0, - numSkippedRuns: 20, - state: {}, - status: TaskStatus.Idle, - }), - { validate: true } - ); - expect(store.remove).not.toHaveBeenCalled(); - expect(logger.warn).toHaveBeenCalledTimes(2); - expect(logger.warn).toHaveBeenCalledWith( - 'Task (bar/foo) has a validation error in its indirect params: [foo]: expected value of type [string] but got [undefined]' - ); - expect(logger.warn).toHaveBeenCalledWith( - 'Task Manager has reached the max skip attempts for task bar/foo' - ); - expect(result).toEqual( - asOk({ - state: {}, - taskRunError, - skipAttempts: 20, - }) - ); - }); - }); }); describe('isAdHocTaskAndOutOfAttempts', () => { @@ -2683,7 +2121,6 @@ describe('TaskManagerRunner', () => { instance?: Partial; definitions?: TaskDefinitionRegistry; onTaskEvent?: jest.Mock<(event: TaskEvent) => void>; - requeueInvalidTasksConfig?: RequeueInvalidTasksConfig; allowReadingInvalidState?: boolean; } @@ -2760,7 +2197,6 @@ describe('TaskManagerRunner', () => { monitor: true, warn_threshold: 5000, }, - requeueInvalidTasksConfig: opts.requeueInvalidTasksConfig || mockRequeueInvalidTasksConfig, allowReadingInvalidState: opts.allowReadingInvalidState || false, }); diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.ts index 2c1242629952c..173b3587d5d0b 100644 --- a/x-pack/plugins/task_manager/server/task_running/task_runner.ts +++ b/x-pack/plugins/task_manager/server/task_running/task_runner.ts @@ -14,10 +14,9 @@ import apm from 'elastic-apm-node'; import { v4 as uuidv4 } from 'uuid'; import { withSpan } from '@kbn/apm-utils'; -import { defaults, flow, identity, isUndefined, omit, random } from 'lodash'; +import { defaults, flow, identity, omit, random } from 'lodash'; import { ExecutionContextStart, Logger, SavedObjectsErrorHelpers } from '@kbn/core/server'; import { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import moment from 'moment'; import { Middleware } from '../lib/middleware'; import { asErr, @@ -49,14 +48,13 @@ import { FailedRunResult, FailedTaskResult, isFailedRunResult, - RunContext, SuccessfulRunResult, TaskDefinition, TaskStatus, } from '../task'; import { TaskTypeDictionary } from '../task_type_dictionary'; -import { createSkipError, isRetryableError, isSkipError, isUnrecoverableError } from './errors'; -import type { EventLoopDelayConfig, RequeueInvalidTasksConfig } from '../config'; +import { isRetryableError, isUnrecoverableError } from './errors'; +import type { EventLoopDelayConfig } from '../config'; import { TaskValidator } from '../task_validator'; export const EMPTY_RUN_RESULT: SuccessfulRunResult = { state: {} }; @@ -109,7 +107,6 @@ type Opts = { executionContext: ExecutionContextStart; usageCounter?: UsageCounter; eventLoopDelayConfig: EventLoopDelayConfig; - requeueInvalidTasksConfig: RequeueInvalidTasksConfig; allowReadingInvalidState: boolean; } & Pick; @@ -159,7 +156,6 @@ export class TaskManagerRunner implements TaskRunner { private readonly executionContext: ExecutionContextStart; private usageCounter?: UsageCounter; private eventLoopDelayConfig: EventLoopDelayConfig; - private readonly requeueInvalidTasksConfig: RequeueInvalidTasksConfig; private readonly taskValidator: TaskValidator; /** @@ -184,7 +180,6 @@ export class TaskManagerRunner implements TaskRunner { executionContext, usageCounter, eventLoopDelayConfig, - requeueInvalidTasksConfig, allowReadingInvalidState, }: Opts) { this.instance = asPending(sanitizeInstance(instance)); @@ -199,7 +194,6 @@ export class TaskManagerRunner implements TaskRunner { this.usageCounter = usageCounter; this.uuid = uuidv4(); this.eventLoopDelayConfig = eventLoopDelayConfig; - this.requeueInvalidTasksConfig = requeueInvalidTasksConfig; this.taskValidator = new TaskValidator({ logger: this.logger, definitions: this.definitions, @@ -370,31 +364,11 @@ export class TaskManagerRunner implements TaskRunner { description: 'run task', }; - let taskParamsValidation; - if (this.requeueInvalidTasksConfig.enabled) { - taskParamsValidation = this.validateTaskParams(modifiedContext); - if (!taskParamsValidation.error) { - taskParamsValidation = await this.validateIndirectTaskParams(modifiedContext); - } - } - - const hasSkipError = !isUndefined(taskParamsValidation?.error); - let shouldSkip = false; - let shouldKeepSkipAttempts = false; - - if (hasSkipError) { - const reachedMaxSkipAttempts = this.hasReachedMaxSkipAttempts(modifiedContext.taskInstance); - shouldSkip = !reachedMaxSkipAttempts; - shouldKeepSkipAttempts = reachedMaxSkipAttempts; - } - - const result = shouldSkip - ? taskParamsValidation - : await this.executionContext.withContext(ctx, () => - withSpan({ name: 'run', type: 'task manager' }, () => this.task!.run()) - ); + const result = await this.executionContext.withContext(ctx, () => + withSpan({ name: 'run', type: 'task manager' }, () => this.task!.run()) + ); - const validatedResult = this.validateResult(shouldKeepSkipAttempts, result); + const validatedResult = this.validateResult(result); const processedResult = await withSpan({ name: 'process result', type: 'task manager' }, () => this.processResult(validatedResult, stopTaskTimer()) ); @@ -420,23 +394,6 @@ export class TaskManagerRunner implements TaskRunner { } } - private validateTaskParams({ taskInstance }: RunContext) { - let error; - const { state, taskType, params, id } = taskInstance; - - try { - const paramsSchema = this.definition.paramsSchema; - if (paramsSchema) { - paramsSchema.validate(params); - } - } catch (err) { - this.logger.warn(`Task (${taskType}/${id}) has a validation error: ${err.message}`); - error = createSkipError(err); - } - - return { ...(error ? { error } : {}), state }; - } - private validateTaskState(taskInstance: ConcreteTaskInstance) { const { taskType, id } = taskInstance; try { @@ -449,30 +406,6 @@ export class TaskManagerRunner implements TaskRunner { } } - private async validateIndirectTaskParams({ taskInstance }: RunContext) { - let error; - const { state, taskType, id } = taskInstance; - const indirectParamsSchema = this.definition.indirectParamsSchema; - - if (this.task?.loadIndirectParams && !!indirectParamsSchema) { - const { data } = await this.task.loadIndirectParams(); - if (data) { - try { - if (indirectParamsSchema) { - indirectParamsSchema.validate(data.indirectParams); - } - } catch (err) { - this.logger.warn( - `Task (${taskType}/${id}) has a validation error in its indirect params: ${err.message}` - ); - error = createSkipError(err); - } - } - } - - return { ...(error ? { error } : {}), state }; - } - public async removeTask(): Promise { await this.bufferedTaskStore.remove(this.id); if (this.task?.cleanup) { @@ -599,16 +532,12 @@ export class TaskManagerRunner implements TaskRunner { } private validateResult( - shouldKeepSkipAttempts: boolean, result?: SuccessfulRunResult | FailedRunResult | void ): Result { return isFailedRunResult(result) ? asErr({ ...result, error: result.error }) : asOk({ ...(result || EMPTY_RUN_RESULT), - ...(shouldKeepSkipAttempts - ? { skipAttempts: this.requeueInvalidTasksConfig.max_attempts } - : {}), }); } @@ -646,22 +575,6 @@ export class TaskManagerRunner implements TaskRunner { ): Result => { const { state, error } = failureResult; const { schedule, attempts } = this.instance.task; - const { max_attempts: maxSkipAttempts, enabled, delay } = this.requeueInvalidTasksConfig; - let skipAttempts = this.instance.task.numSkippedRuns ?? 0; - - if (isSkipError(error) && enabled) { - skipAttempts = skipAttempts + 1; - const { taskType, id } = this.instance.task; - this.logger.warn( - `Task Manager has skipped executing the Task (${taskType}/${id}) ${skipAttempts} times as it has invalid params.` - ); - return asOk({ - state: this.instance.task.state, - runAt: moment().add(delay, 'millisecond').toDate(), - attempts: 0, - skipAttempts, - }); - } if (this.shouldTryToScheduleRetry() && !isUnrecoverableError(error)) { // if we're retrying, keep the number of attempts @@ -684,16 +597,11 @@ export class TaskManagerRunner implements TaskRunner { return asOk({ state, attempts, - skipAttempts, ...reschedule, }); } } - if (skipAttempts >= maxSkipAttempts && enabled) { - return asErr({ status: TaskStatus.DeadLetter }); - } - // scheduling a retry isn't possible,mark task as failed return asErr({ status: TaskStatus.Failed }); }; @@ -712,17 +620,8 @@ export class TaskManagerRunner implements TaskRunner { schedule: reschedule, state, attempts = 0, - skipAttempts, }: SuccessfulRunResult & { attempts: number }) => { - const { startedAt, schedule, numSkippedRuns } = this.instance.task; - const { taskRunError } = unwrap(result); - let requeueInvalidTaskAttempts = skipAttempts || numSkippedRuns || 0; - - // Alerting TaskRunner returns SuccessResult even though there is an error - // therefore we use "taskRunError" to be sure that there wasn't any error - if (isUndefined(skipAttempts) && isUndefined(taskRunError)) { - requeueInvalidTaskAttempts = 0; - } + const { startedAt, schedule } = this.instance.task; return asOk({ runAt: @@ -731,7 +630,6 @@ export class TaskManagerRunner implements TaskRunner { schedule: reschedule ?? schedule, attempts, status: TaskStatus.Idle, - numSkippedRuns: requeueInvalidTaskAttempts, }); } ), @@ -890,18 +788,6 @@ export class TaskManagerRunner implements TaskRunner { ? this.definition.maxAttempts : this.defaultMaxAttempts; } - - private hasReachedMaxSkipAttempts(taskInstance: ConcreteTaskInstance) { - const { taskType, id, numSkippedRuns = 0 } = taskInstance; - const { max_attempts: maxAttempts } = this.requeueInvalidTasksConfig; - - if (numSkippedRuns >= maxAttempts) { - this.logger.warn(`Task Manager has reached the max skip attempts for task ${taskType}/${id}`); - return true; - } - - return false; - } } function sanitizeInstance(instance: ConcreteTaskInstance): ConcreteTaskInstance { diff --git a/x-pack/plugins/task_manager/tsconfig.json b/x-pack/plugins/task_manager/tsconfig.json index ef7cab0493a60..d1accb045d526 100644 --- a/x-pack/plugins/task_manager/tsconfig.json +++ b/x-pack/plugins/task_manager/tsconfig.json @@ -21,7 +21,8 @@ "@kbn/apm-utils", "@kbn/core-saved-objects-common", "@kbn/core-saved-objects-utils-server", - "@kbn/core-test-helpers-kbn-server" + "@kbn/core-test-helpers-kbn-server", + "@kbn/core-saved-objects-server" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index e74f263a65d48..80617c4025a3b 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -408,7 +408,7 @@ "controls.controlGroup.management.discard.sub": "Les modifications apportées à ce contrôle seront ignorées. Voulez-vous vraiment continuer ?", "controls.controlGroup.management.discard.title": "Abandonner les modifications ?", "controls.controlGroup.management.flyoutTitle": "Paramètres du contrôle", - "controls.controlGroup.management.hierarchy.subtitle": "Les sélections dans un contrôle diminuent les options disponibles dans le suivant. Les contrôles se suivent de gauche à droite.", + "controls.controlGroup.management.hierarchy.tooltip": "Les sélections dans un contrôle diminuent les options disponibles dans le suivant. Les contrôles se suivent de gauche à droite.", "controls.controlGroup.management.hierarchy.title": "Contrôles à la suite", "controls.controlGroup.management.labelPosition.above": "Au-dessus", "controls.controlGroup.management.labelPosition.designSwitchLegend": "Modifier la position de l'étiquette entre Aligné et Au-dessus", @@ -419,7 +419,7 @@ "controls.controlGroup.management.layout.large": "Large", "controls.controlGroup.management.layout.medium": "Moyenne", "controls.controlGroup.management.layout.small": "Petite", - "controls.controlGroup.management.validate.subtitle": "Ignorez automatiquement toutes les sélections de contrôle qui ne donneraient aucune donnée.", + "controls.controlGroup.management.validate.tooltip": "Ignorez automatiquement toutes les sélections de contrôle qui ne donneraient aucune donnée.", "controls.controlGroup.management.validate.title": "Valider les sélections utilisateur", "controls.controlGroup.timeSlider.title": "Curseur temporel", "controls.controlGroup.title": "Groupe de contrôle", @@ -3116,7 +3116,6 @@ "grouping.eventsTab.unit": "{totalCount, plural, =1 {événement} one {événements} many {événements} other {événements}}", "grouping.groupByPanelTitle": "Sélectionner jusqu'à {groupingLevelsCount} regroupements", "grouping.nullGroup.title": "Le groupe par champ sélectionné, {selectedGroup}, a une valeur manquante de {unit} pour ce groupe.", - "grouping.total.unit": "{totalCount, plural, =1 {regrouper} one {des groupes} many {groupes} other {groupes}}", "grouping.additionalActions.takeAction": "Entreprendre des actions", "grouping.alerts.label": "Regrouper les alertes par", "grouping.customGroupByOptionName": "Champ personnalisé", @@ -12426,13 +12425,6 @@ "xpack.elasticAssistant.assistant.conversationSelector.nextConversationTitle": "Conversation suivante", "xpack.elasticAssistant.assistant.conversationSelector.placeholderTitle": "Sélectionnez ou saisissez pour créer une nouvelle...", "xpack.elasticAssistant.assistant.conversationSelector.previousConversationTitle": "Conversation précédente", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.ariaLabel": "Sélecteur de conversation", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.CustomOptionTextTitle": "Créer une nouvelle conversation :", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.defaultConversationTitle": "Conversations", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.deleteConversationTitle": "Supprimer la conversation", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.nextConversationTitle": "Conversation suivante", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.placeholderTitle": "Sélectionnez ou saisissez pour créer une nouvelle...", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.previousConversationTitle": "Conversation précédente", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allActionsTooltip": "Toutes les actions", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowAction": "Autoriser", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowByDefaultAction": "Permettre par défaut", @@ -12462,7 +12454,7 @@ "xpack.elasticAssistant.assistant.firstPromptEditor.selectASystemPromptPlaceholder": "Sélectionner une invite système", "xpack.elasticAssistant.assistant.firstPromptEditor.youLabel": "Vous", "xpack.elasticAssistant.assistant.newChat.newChatButton": "Chat", - "xpack.elasticAssistant.assistant.newChatById.newChatByIdButton": "Chat", + "xpack.elasticAssistant.assistant.newChatByTitle.newChatByTitleButton": "Chat", "xpack.elasticAssistant.assistant.overlay.CancelButton": "Annuler", "xpack.elasticAssistant.assistant.promptEditor.selectedPromotContexts.removeContextTooltip": "Retirer le contexte", "xpack.elasticAssistant.assistant.promptEditor.systemPrompt.settings.defaultConversationsHelpText": "Conversations devant utiliser cette invite système par défaut", @@ -12698,7 +12690,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.delete.description": "La suppression de cet index supprimera également toutes ses données et sa configuration {ingestionMethod}. Les applications de recherche associées ne pourront plus accéder à aucune donnée stockée dans cet index.", "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "Cette action ne peut pas être annulée. Veuillez saisir {indexName} pour confirmer.", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "Voulez-vous vraiment supprimer {indexName} ?", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "Les index optimisés pour la recherche sont précédés du préfixe {code}. Ils sont gérés par des mécanismes d'ingestion tels que des robots d'indexation, des connecteurs ou des API d'ingestion.", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "Voulez-vous vraiment supprimer le domaine \"{domainUrl}\" et tous ses paramètres ?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "Le point d'entrée du robot d'indexation a été défini sur {entryPointValue}", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "Cliquer sur {addAuthenticationButtonLabel} afin de fournir les informations d'identification nécessaires pour indexer le contenu protégé", @@ -14350,7 +14341,6 @@ "xpack.enterpriseSearch.content.searchIndices.name.columnTitle": "Nom de l'index", "xpack.enterpriseSearch.content.searchIndices.searchIndices.breadcrumb": "Index Elasticsearch", "xpack.enterpriseSearch.content.searchIndices.searchIndices.includeHidden.label": "Afficher les index masqués", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.label": "Afficher uniquement les index optimisés pour la recherche", "xpack.enterpriseSearch.content.searchIndices.searchIndices.pageTitle": "Index Elasticsearch", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "Filtrer les index Elasticsearch", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "Filtrer les index Elasticsearch", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 640738487be89..d97f16d80c147 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -408,7 +408,7 @@ "controls.controlGroup.management.discard.sub": "このコントロールの変更は破棄されます。続行しますか?", "controls.controlGroup.management.discard.title": "変更を破棄しますか?", "controls.controlGroup.management.flyoutTitle": "設定をコントロールします", - "controls.controlGroup.management.hierarchy.subtitle": "1つのコントロールで項目を選択すると、次で使用可能なオプションが絞り込まれます。コントロールは左から右に連鎖されます。", + "controls.controlGroup.management.hierarchy.tooltip": "1つのコントロールで項目を選択すると、次で使用可能なオプションが絞り込まれます。コントロールは左から右に連鎖されます。", "controls.controlGroup.management.hierarchy.title": "コントロールの連鎖", "controls.controlGroup.management.labelPosition.above": "上", "controls.controlGroup.management.labelPosition.designSwitchLegend": "インラインと上記との間でラベル位置を切り替える", @@ -419,7 +419,7 @@ "controls.controlGroup.management.layout.large": "大", "controls.controlGroup.management.layout.medium": "中", "controls.controlGroup.management.layout.small": "小", - "controls.controlGroup.management.validate.subtitle": "データがないコントロール選択は自動的に無視されます。", + "controls.controlGroup.management.validate.tooltip": "データがないコントロール選択は自動的に無視されます。", "controls.controlGroup.management.validate.title": "ユーザー選択を検証", "controls.controlGroup.timeSlider.title": "時間スライダー", "controls.controlGroup.title": "コントロールグループ", @@ -3130,7 +3130,6 @@ "grouping.eventsTab.unit": "{totalCount, plural, =1 {イベント} other {イベント}}", "grouping.groupByPanelTitle": "最大{groupingLevelsCount}個のグループ分けを選択してください", "grouping.nullGroup.title": "選択されたグループ分けフィールド\"{selectedGroup}\"には、このグループ\"{unit}\"の値がありません。", - "grouping.total.unit": "{totalCount, plural, =1 {グループ} other {グループ}}", "grouping.additionalActions.takeAction": "アクションを実行", "grouping.alerts.label": "アラートのグループ化条件", "grouping.customGroupByOptionName": "カスタムフィールド", @@ -12439,13 +12438,6 @@ "xpack.elasticAssistant.assistant.conversationSelector.nextConversationTitle": "次の会話", "xpack.elasticAssistant.assistant.conversationSelector.placeholderTitle": "選択するか、入力して新規作成...", "xpack.elasticAssistant.assistant.conversationSelector.previousConversationTitle": "前の会話", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.ariaLabel": "会話セレクター", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.CustomOptionTextTitle": "新しい会話を作成:", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.defaultConversationTitle": "会話", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.deleteConversationTitle": "会話を削除", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.nextConversationTitle": "次の会話", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.placeholderTitle": "選択するか、入力して新規作成...", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.previousConversationTitle": "前の会話", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allActionsTooltip": "すべてのアクション", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowAction": "許可", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowByDefaultAction": "デフォルトで許可", @@ -12475,7 +12467,7 @@ "xpack.elasticAssistant.assistant.firstPromptEditor.selectASystemPromptPlaceholder": "システムプロンプトを選択", "xpack.elasticAssistant.assistant.firstPromptEditor.youLabel": "あなた", "xpack.elasticAssistant.assistant.newChat.newChatButton": "チャット", - "xpack.elasticAssistant.assistant.newChatById.newChatByIdButton": "チャット", + "xpack.elasticAssistant.assistant.newChatByTitle.newChatByTitleButton": "チャット", "xpack.elasticAssistant.assistant.overlay.CancelButton": "キャンセル", "xpack.elasticAssistant.assistant.promptEditor.selectedPromotContexts.removeContextTooltip": "コンテキストを削除", "xpack.elasticAssistant.assistant.promptEditor.systemPrompt.settings.defaultConversationsHelpText": "デフォルトでこのシステムプロンプトを使用する会話", @@ -12711,7 +12703,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.delete.description": "このインデックスを削除すると、すべてのデータと{ingestionMethod}構成も削除されます。すべての関連付けられた検索アプリケーションは、このインデックスに格納されたどのデータにもアクセスできなくなります。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "この操作は元に戻すことができません。確認するには{indexName}を入力してください。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "{indexName}を削除しますか?", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "検索用に最適化されたインデックスには、{code}がプレフィックスとして付けられます。これらは、クローラー、コネクター、インジェストAPIなどのインジェストメカニズムによって管理されます。", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "ドメイン\"{domainUrl}\"とすべての設定を削除しますか?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "Webクローラーエントリポイントが{entryPointValue}として設定されました", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "{addAuthenticationButtonLabel}をクリックすると、保護されたコンテンツのクローリングに必要な資格情報を提供します", @@ -14363,7 +14354,6 @@ "xpack.enterpriseSearch.content.searchIndices.name.columnTitle": "インデックス名", "xpack.enterpriseSearch.content.searchIndices.searchIndices.breadcrumb": "デフォルトのインデックス", "xpack.enterpriseSearch.content.searchIndices.searchIndices.includeHidden.label": "非表示のインデックスを表示", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.label": "検索用に最適化されたインデックスのみを表示", "xpack.enterpriseSearch.content.searchIndices.searchIndices.pageTitle": "デフォルトのインデックス", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "Elasticsearchインデックスをフィルター", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "Elasticsearchインデックスをフィルター", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 1c268e25c7861..3ac57ca2847a3 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -408,7 +408,7 @@ "controls.controlGroup.management.discard.sub": "将放弃您对此控件所做的更改,是否确定要继续?", "controls.controlGroup.management.discard.title": "放弃更改?", "controls.controlGroup.management.flyoutTitle": "控制设置", - "controls.controlGroup.management.hierarchy.subtitle": "在一个控件中选择的内容会缩小下一个控件中可用选项的范围。控件将从左至右串接在一起。", + "controls.controlGroup.management.hierarchy.tooltip": "在一个控件中选择的内容会缩小下一个控件中可用选项的范围。控件将从左至右串接在一起。", "controls.controlGroup.management.hierarchy.title": "串接控件", "controls.controlGroup.management.labelPosition.above": "之上", "controls.controlGroup.management.labelPosition.designSwitchLegend": "在内联与之上之间切换标签位置", @@ -419,7 +419,7 @@ "controls.controlGroup.management.layout.large": "大", "controls.controlGroup.management.layout.medium": "中", "controls.controlGroup.management.layout.small": "小", - "controls.controlGroup.management.validate.subtitle": "自动忽略所有不会生成数据的控件选择。", + "controls.controlGroup.management.validate.tooltip": "自动忽略所有不会生成数据的控件选择。", "controls.controlGroup.management.validate.title": "验证用户选择", "controls.controlGroup.timeSlider.title": "时间滑块", "controls.controlGroup.title": "控件组", @@ -3129,7 +3129,6 @@ "grouping.eventsTab.unit": "{totalCount, plural, =1 {事件} other {事件}}", "grouping.groupByPanelTitle": "最多选择 {groupingLevelsCount} 个分组", "grouping.nullGroup.title": "选定分组依据字段 {selectedGroup} 缺少此 {unit} 组的值。", - "grouping.total.unit": "{totalCount, plural, =1 {组} other {组}}", "grouping.additionalActions.takeAction": "采取操作", "grouping.alerts.label": "告警分组依据", "grouping.customGroupByOptionName": "定制字段", @@ -12533,13 +12532,6 @@ "xpack.elasticAssistant.assistant.conversationSelector.nextConversationTitle": "下一个对话", "xpack.elasticAssistant.assistant.conversationSelector.placeholderTitle": "选择或键入以新建……", "xpack.elasticAssistant.assistant.conversationSelector.previousConversationTitle": "上一个对话", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.ariaLabel": "对话选择器", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.CustomOptionTextTitle": "创建新对话:", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.defaultConversationTitle": "对话", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.deleteConversationTitle": "删除对话", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.nextConversationTitle": "下一个对话", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.placeholderTitle": "选择或键入以新建……", - "xpack.elasticAssistant.assistant.conversationSelectorSettings.previousConversationTitle": "上一个对话", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allActionsTooltip": "所有操作", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowAction": "允许", "xpack.elasticAssistant.assistant.dataAnonymizationEditor.contextEditor.allowByDefaultAction": "默认允许", @@ -12569,7 +12561,7 @@ "xpack.elasticAssistant.assistant.firstPromptEditor.selectASystemPromptPlaceholder": "选择系统提示", "xpack.elasticAssistant.assistant.firstPromptEditor.youLabel": "您", "xpack.elasticAssistant.assistant.newChat.newChatButton": "聊天", - "xpack.elasticAssistant.assistant.newChatById.newChatByIdButton": "聊天", + "xpack.elasticAssistant.assistant.newChatByTitle.newChatByTitleButton": "聊天", "xpack.elasticAssistant.assistant.overlay.CancelButton": "取消", "xpack.elasticAssistant.assistant.promptEditor.selectedPromotContexts.removeContextTooltip": "删除上下文", "xpack.elasticAssistant.assistant.promptEditor.systemPrompt.settings.defaultConversationsHelpText": "应默认使用此系统提示的对话", @@ -12805,7 +12797,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.delete.description": "删除此索引还会删除它的所有数据及其 {ingestionMethod} 配置。任何关联的搜索应用程序将无法再访问此索引中存储的任何数据。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "此操作无法撤消。请键入 {indexName} 以确认。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "是否确定要删除 {indexName}", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "搜索优化索引以 {code} 为前缀。它们由网络爬虫、连接器或采集 API 等采集机制进行管理。", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "确定要移除域“{domainUrl}”及其所有设置?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "网络爬虫入口点已设置为 {entryPointValue}", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "单击 {addAuthenticationButtonLabel} 以提供爬网受保护内容所需的凭据", @@ -14457,7 +14448,6 @@ "xpack.enterpriseSearch.content.searchIndices.name.columnTitle": "索引名称", "xpack.enterpriseSearch.content.searchIndices.searchIndices.breadcrumb": "Elasticsearch 索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.includeHidden.label": "显示隐藏的索引", - "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.label": "仅显示搜索优化的索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.pageTitle": "Elasticsearch 索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "筛选 Elasticsearch 索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "筛选 Elasticsearch 索引", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_alert_data_view.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_alert_data_view.test.tsx index c4c5dfd67fa8b..b12d0454b997c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_alert_data_view.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_alert_data_view.test.tsx @@ -8,10 +8,11 @@ import { AlertConsumers } from '@kbn/rule-data-utils'; import { createStartServicesMock } from '../../common/lib/kibana/kibana_react.mock'; import type { ValidFeatureId } from '@kbn/rule-data-utils'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react-hooks/dom'; import { useAlertDataViews } from './use_alert_data_view'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import React from 'react'; +import { waitFor } from '@testing-library/react'; const mockUseKibanaReturnValue = createStartServicesMock(); @@ -45,8 +46,7 @@ const wrapper = ({ children }: { children: Node }) => ( {children} ); -// FLAKY: https://github.com/elastic/kibana/issues/177250 -describe.skip('useAlertDataView', () => { +describe('useAlertDataView', () => { const observabilityAlertFeatureIds: ValidFeatureId[] = [ AlertConsumers.APM, AlertConsumers.INFRASTRUCTURE, @@ -70,94 +70,66 @@ describe.skip('useAlertDataView', () => { }); it('initially is loading and does not have data', async () => { - await act(async () => { - const mockedAsyncDataView = { - loading: true, - dataview: undefined, - }; - - const { result, waitForNextUpdate } = renderHook( - () => useAlertDataViews(observabilityAlertFeatureIds), - { - wrapper, - } - ); + const mockedAsyncDataView = { + loading: true, + dataview: undefined, + }; - await waitForNextUpdate(); - - expect(result.current).toEqual(mockedAsyncDataView); + const { result } = renderHook(() => useAlertDataViews(observabilityAlertFeatureIds), { + wrapper, }); + + await waitFor(() => expect(result.current).toEqual(mockedAsyncDataView)); }); it('fetch index names + fields for the provided o11y featureIds', async () => { - await act(async () => { - const { waitForNextUpdate } = renderHook( - () => useAlertDataViews(observabilityAlertFeatureIds), - { - wrapper, - } - ); - - await waitForNextUpdate(); - await waitForNextUpdate(); - - expect(fetchAlertIndexNames).toHaveBeenCalledTimes(1); - expect(fetchAlertFields).toHaveBeenCalledTimes(1); + renderHook(() => useAlertDataViews(observabilityAlertFeatureIds), { + wrapper, }); + + await waitFor(() => expect(fetchAlertIndexNames).toHaveBeenCalledTimes(1)); + expect(fetchAlertFields).toHaveBeenCalledTimes(1); }); it('only fetch index names for security featureId', async () => { - await act(async () => { - const { waitForNextUpdate } = renderHook(() => useAlertDataViews([AlertConsumers.SIEM]), { - wrapper, - }); - - await waitForNextUpdate(); - await waitForNextUpdate(); - - expect(fetchAlertIndexNames).toHaveBeenCalledTimes(1); - expect(fetchAlertFields).toHaveBeenCalledTimes(0); + renderHook(() => useAlertDataViews([AlertConsumers.SIEM]), { + wrapper, }); - }); - it('Do not fetch anything if security and o11y featureIds are mix together', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => useAlertDataViews([AlertConsumers.SIEM, AlertConsumers.LOGS]), - { - wrapper, - } - ); + await waitFor(() => expect(fetchAlertIndexNames).toHaveBeenCalledTimes(1)); + expect(fetchAlertFields).toHaveBeenCalledTimes(0); + }); - await waitForNextUpdate(); + it('Do not fetch anything if security and o11y featureIds are mixed together', async () => { + const { result } = renderHook( + () => useAlertDataViews([AlertConsumers.SIEM, AlertConsumers.LOGS]), + { + wrapper, + } + ); - expect(fetchAlertIndexNames).toHaveBeenCalledTimes(0); - expect(fetchAlertFields).toHaveBeenCalledTimes(0); + await waitFor(() => expect(result.current).toEqual({ loading: false, dataview: undefined, - }); - }); + }) + ); + expect(fetchAlertIndexNames).toHaveBeenCalledTimes(0); + expect(fetchAlertFields).toHaveBeenCalledTimes(0); }); - it('if fetch throw error return no data', async () => { + it('if fetch throws error return no data', async () => { fetchAlertIndexNames.mockRejectedValue('error'); - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => useAlertDataViews(observabilityAlertFeatureIds), - { - wrapper, - } - ); - - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useAlertDataViews(observabilityAlertFeatureIds), { + wrapper, + }); + await waitFor(() => expect(result.current).toEqual({ loading: false, dataview: undefined, - }); - }); + }) + ); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts index 075f5a61a1d02..04ecb66e1692e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.test.ts @@ -69,6 +69,10 @@ const expectedTransformResult = [ 'A flag on the alert that indicates whether the alert status is changing repeatedly.', name: 'alert.flapping', }, + { + description: 'The number of consecutive runs that meet the rule conditions.', + name: 'alert.consecutiveMatches', + }, { description: 'The configured server.publicBaseUrl value or empty string if not configured.', name: 'kibanaBaseUrl', diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts index 50323690d5eed..4385db7521e22 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts @@ -76,6 +76,7 @@ export enum AlertProvidedActionVariables { alertActionSubgroup = 'alert.actionSubgroup', alertFlapping = 'alert.flapping', kibanaBaseUrl = 'kibanaBaseUrl', + alertConsecutiveMatches = 'alert.consecutiveMatches', } export enum LegacyAlertProvidedActionVariables { @@ -224,6 +225,16 @@ function getAlwaysProvidedActionVariables(): ActionVariable[] { }), }); + result.push({ + name: AlertProvidedActionVariables.alertConsecutiveMatches, + description: i18n.translate( + 'xpack.triggersActionsUI.actionVariables.alertConsecutiveMatchesLabel', + { + defaultMessage: 'The number of consecutive runs that meet the rule conditions.', + } + ), + }); + result.push(AlertProvidedActionVariableDescriptions[AlertProvidedActionVariables.kibanaBaseUrl]); result.push({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.tsx index 3f2b5a111566b..5eae23e396721 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.tsx @@ -48,6 +48,11 @@ export const AlertSummaryWidgetFullSize = ({ }, }, ]; + const chartData = activeAlerts.map((alert) => alert.doc_count); + const domain = { + max: Math.max(...chartData) * 1.1, // add 10% headroom + min: Math.min(...chartData) * 0.9, // add 10% floor + }; return ( = ({ id="xpack.triggersActionsUI.sections.rulesList.removeAllSnoozeSchedules" defaultMessage="Remove {count, plural, one {schedule} other {# schedules}}?" values={{ - count: scheduledSnoozes.length, + count: scheduledSnoozes.filter((s) => s.id).length, }} /> } diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 88f3cce226a70..950300eb3f4de 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -347,7 +347,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) : []), '--notifications.connectors.default.email=notification-email', '--xpack.task_manager.allow_reading_invalid_state=false', - '--xpack.task_manager.requeue_invalid_tasks.enabled=true', '--xpack.actions.queued.max=500', `--xpack.stack_connectors.enableExperimental=${JSON.stringify(experimentalFeatures)}`, ], diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/bedrock.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/bedrock.ts index fc0ca3378d8c0..3b1cdeffde74e 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/bedrock.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/bedrock.ts @@ -16,6 +16,10 @@ import { PassThrough } from 'stream'; import { EventStreamCodec } from '@smithy/eventstream-codec'; import { fromUtf8, toUtf8 } from '@smithy/util-utf8'; import { TaskErrorSource } from '@kbn/task-manager-plugin/common'; +import { + ELASTIC_HTTP_VERSION_HEADER, + X_ELASTIC_INTERNAL_ORIGIN_REQUEST, +} from '@kbn/core-http-common'; import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib'; @@ -423,21 +427,16 @@ export default function bedrockTest({ getService }: FtrProviderContext) { supertest .post(`/internal/elastic_assistant/actions/connector/${bedrockActionId}/_execute`) .set('kbn-xsrf', 'foo') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .on('error', reject) .send({ - params: { - subAction: 'invokeStream', - subActionParams: { - messages: [ - { - role: 'user', - content: 'Hello world', - }, - ], - }, - }, + subAction: 'invokeStream', + message: 'Hello world', isEnabledKnowledgeBase: false, isEnabledRAGAlerts: false, + llmType: 'bedrock', + replacements: [], }) .pipe(passThrough); const responseBuffer: Uint8Array[] = []; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/alerts.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/alerts.ts index bf6811b4ad175..ab3c9ad93d54f 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/alerts.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/alerts.ts @@ -1506,6 +1506,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: 1, duration: { us: 0 }, time_range: { gte: expectExpect.any(String) }, instance: { id: '1' }, @@ -1542,6 +1543,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: 1, duration: { us: 0 }, time_range: { gte: expectExpect.any(String) }, instance: { id: '2' }, @@ -1594,6 +1596,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: expectExpect.any(Number), duration: { us: expectExpect.any(Number) }, time_range: { gte: expectExpect.any(String) }, instance: { id: '1' }, @@ -1630,6 +1633,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: expectExpect.any(Number), duration: { us: expectExpect.any(Number) }, time_range: { gte: expectExpect.any(String) }, instance: { id: '2' }, @@ -1730,6 +1734,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: 1, duration: { us: 0 }, time_range: { gte: expectExpect.any(String) }, instance: { id: '1' }, @@ -1766,6 +1771,7 @@ instanceStateValue: true uuid: expectExpect.any(String), tags: ['tag-A', 'tag-B'], }, + consecutive_matches: 1, duration: { us: 0 }, time_range: { gte: expectExpect.any(String) }, instance: { id: '2' }, diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts index c900a08311add..991ed513ee984 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_alert_delay.ts @@ -31,6 +31,7 @@ import { EVENT_ACTION, EVENT_KIND, SPACE_IDS, + ALERT_CONSECUTIVE_MATCHES, } from '@kbn/rule-data-utils'; import { RuleNotifyWhen } from '@kbn/alerting-plugin/common'; import { ES_TEST_INDEX_NAME, ESTestIndexTool } from '@kbn/alerting-api-integration-helpers'; @@ -248,6 +249,8 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ expect(source[EVENT_KIND]).to.equal('signal'); // tags should equal rule tags because rule type doesn't set any tags expect(source.tags).to.eql(['foo']); + // alert consecutive matches should match the active count + expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(3); // -------------------------- // RUN 4 - 1 active alert @@ -300,6 +303,8 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ expect(source[EVENT_KIND]).to.eql(run3Source[EVENT_KIND]); expect(source[ALERT_WORKFLOW_STATUS]).to.eql(run3Source[ALERT_WORKFLOW_STATUS]); expect(source[ALERT_TIME_RANGE]?.gte).to.equal(run3Source[ALERT_TIME_RANGE]?.gte); + // alert consecutive matches should match the active count + expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(4); // -------------------------- // RUN 5 - 1 recovered alert @@ -357,6 +362,8 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ expect(source[ALERT_TIME_RANGE]?.gte).to.equal(run3Source[ALERT_TIME_RANGE]?.gte); // time_range.lte should be set to end time expect(source[ALERT_TIME_RANGE]?.lte).to.equal(source[ALERT_END]); + // alert consecutive matches should match the active count + expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(0); // -------------------------- // RUN 6 - 0 new alerts @@ -548,6 +555,8 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ expect(source[EVENT_KIND]).to.equal('signal'); // tags should equal rule tags because rule type doesn't set any tags expect(source.tags).to.eql(['foo']); + // alert consecutive matches should match the active count + expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(3); // -------------------------- // RUN 4 - 1 active alert @@ -608,6 +617,8 @@ export default function createAlertsAsDataAlertDelayInstallResourcesTest({ expect(source[EVENT_KIND]).to.eql(run3Source[EVENT_KIND]); expect(source[ALERT_WORKFLOW_STATUS]).to.eql(run3Source[ALERT_WORKFLOW_STATUS]); expect(source[ALERT_TIME_RANGE]?.gte).to.equal(run3Source[ALERT_TIME_RANGE]?.gte); + // alert consecutive matches should match the active count + expect(source[ALERT_CONSECUTIVE_MATCHES]).to.equal(4); }); }); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_conflicts.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_conflicts.ts index ea53cbe33c98f..d13d321280aae 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_conflicts.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/alerts_as_data_conflicts.ts @@ -20,6 +20,7 @@ import { ALERT_STATUS, ALERT_WORKFLOW_STATUS, ALERT_WORKFLOW_TAGS, + ALERT_CONSECUTIVE_MATCHES, } from '@kbn/rule-data-utils'; import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; import { Spaces } from '../../../../scenarios'; @@ -238,6 +239,9 @@ function compareAlertDocs( expect(get(updatedAlert, 'kibana.alert.workflow_status')).to.eql( get(DocUpdate, 'kibana.alert.workflow_status') ); + expect(get(updatedAlert, 'kibana.alert.consecutive_matches')).to.eql( + get(DocUpdate, 'kibana.alert.consecutive_matches') + 1 + ); expect(get(initialAlert, 'kibana.alert.status')).to.be('active'); expect(get(updatedAlert, 'kibana.alert.status')).to.be('untracked'); @@ -264,6 +268,7 @@ const DocUpdate = { [ALERT_WORKFLOW_TAGS]: ['fee', 'fi', 'fo', 'fum'], [ALERT_CASE_IDS]: ['123', '456', '789'], [ALERT_STATUS]: 'untracked', + [ALERT_CONSECUTIVE_MATCHES]: 1, }; const SkipFields = [ @@ -280,6 +285,7 @@ const SkipFields = [ 'kibana.alert.case_ids', 'kibana.alert.workflow_tags', 'kibana.alert.workflow_status', + 'kibana.alert.consecutive_matches', ]; function log(message: string) { diff --git a/x-pack/test/api_integration/apis/management/index_management/lib/templates.helpers.ts b/x-pack/test/api_integration/apis/management/index_management/lib/templates.helpers.ts index 2ea61cd79cb57..c64198ae3adcc 100644 --- a/x-pack/test/api_integration/apis/management/index_management/lib/templates.helpers.ts +++ b/x-pack/test/api_integration/apis/management/index_management/lib/templates.helpers.ts @@ -51,6 +51,7 @@ export function templatesHelpers(getService: FtrProviderContext['getService']) { type: 'default', hasDatastream: false, }, + allowAutoCreate: 'NO_OVERWRITE', }; if (isLegacy) { diff --git a/x-pack/test/api_integration/apis/management/index_management/templates.ts b/x-pack/test/api_integration/apis/management/index_management/templates.ts index 23fbee0a94465..66d6f34baa644 100644 --- a/x-pack/test/api_integration/apis/management/index_management/templates.ts +++ b/x-pack/test/api_integration/apis/management/index_management/templates.ts @@ -99,6 +99,7 @@ export default function ({ getService }: FtrProviderContext) { 'ignoreMissingComponentTemplates', 'version', '_kbnMeta', + 'allowAutoCreate', ].sort(); expect(Object.keys(indexTemplateFound).sort()).to.eql(expectedKeys); @@ -119,6 +120,7 @@ export default function ({ getService }: FtrProviderContext) { 'order', 'version', '_kbnMeta', + 'allowAutoCreate', 'composedOf', 'ignoreMissingComponentTemplates', ].sort(); @@ -145,6 +147,7 @@ export default function ({ getService }: FtrProviderContext) { 'dataStream', 'version', '_kbnMeta', + 'allowAutoCreate', ].sort(); expect(Object.keys(templateWithDSL).sort()).to.eql(expectedWithDSLKeys); @@ -168,6 +171,7 @@ export default function ({ getService }: FtrProviderContext) { 'ignoreMissingComponentTemplates', 'version', '_kbnMeta', + 'allowAutoCreate', ].sort(); expect(Object.keys(templateWithILM).sort()).to.eql(expectedWithILMKeys); @@ -191,6 +195,7 @@ export default function ({ getService }: FtrProviderContext) { 'priority', 'version', '_kbnMeta', + 'allowAutoCreate', ].sort(); const expectedTemplateKeys = ['aliases', 'mappings', 'settings'].sort(); @@ -211,6 +216,7 @@ export default function ({ getService }: FtrProviderContext) { 'order', 'version', '_kbnMeta', + 'allowAutoCreate', 'composedOf', 'ignoreMissingComponentTemplates', ].sort(); @@ -370,6 +376,7 @@ export default function ({ getService }: FtrProviderContext) { indexPatterns: [getRandomString()], template: {}, deprecated: true, + allowAutoCreate: 'TRUE', }; await createTemplate(indexTemplate).expect(200); diff --git a/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts index a4edfd1d5ab00..bceea736f553e 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts @@ -107,7 +107,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { } ); - registry.when( + // FLAKY: https://github.com/elastic/kibana/issues/175855 + registry.when.skip( 'correlations latency with data and opbeans-node args', { config: 'trial', archives: ['8.0.0'] }, () => { diff --git a/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts index 42a9fdadbb480..466e166078d8a 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts @@ -53,7 +53,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - registry.when( + // FLAKY: https://github.com/elastic/kibana/issues/175911 + registry.when.skip( 'p values with data and default args', { config: 'trial', archives: ['8.0.0'] }, () => { diff --git a/x-pack/test/cloud_security_posture_functional/pages/findings_grouping.ts b/x-pack/test/cloud_security_posture_functional/pages/findings_grouping.ts index f0434c37b7118..09f200913773e 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/findings_grouping.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/findings_grouping.ts @@ -139,7 +139,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Findings Page - Grouping', function () { this.tags(['cloud_security_posture_findings_grouping']); let findings: typeof pageObjects.findings; - // let groupSelector: ReturnType; before(async () => { await kibanaServer.savedObjects.clean({ @@ -219,7 +218,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('3 groups'); + expect(groupCount).to.be('3 resources'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('4 findings'); @@ -234,7 +233,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('4 groups'); + expect(groupCount).to.be('4 rules'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('4 findings'); @@ -293,7 +292,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('3 groups'); + expect(groupCount).to.be('2 cloud accounts'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('4 findings'); @@ -350,7 +349,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('3 groups'); + expect(groupCount).to.be('2 kubernetes clusters'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('4 findings'); @@ -413,7 +412,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await groupRow.getVisibleText()).to.contain(data[0].resource.name); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('1 group'); + expect(groupCount).to.be('1 resource'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('1 finding'); @@ -426,7 +425,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('3 groups'); + expect(groupCount).to.be('3 resources'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('4 findings'); @@ -442,7 +441,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await groupRow.getVisibleText()).to.contain(data[0].resource.name); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('1 group'); + expect(groupCount).to.be('1 resource'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('1 finding'); @@ -450,7 +449,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await queryBar.setQuery(''); await queryBar.submitQuery(); - expect(await grouping.getGroupCount()).to.be('3 groups'); + expect(await grouping.getGroupCount()).to.be('3 resources'); expect(await grouping.getUnitCount()).to.be('4 findings'); }); }); @@ -507,7 +506,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be(`${resourceGroupCount + 1} groups`); + expect(groupCount).to.be(`${resourceGroupCount + 1} resources`); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be(`${findingsCount + 1} findings`); @@ -534,7 +533,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.header.waitUntilLoadingHasFinished(); const groupCountAfterMute = await grouping.getGroupCount(); - expect(groupCountAfterMute).to.be(`${resourceGroupCount} groups`); + expect(groupCountAfterMute).to.be(`${resourceGroupCount} resources`); const unitCountAfterMute = await grouping.getUnitCount(); expect(unitCountAfterMute).to.be(`${findingsCount} findings`); diff --git a/x-pack/test/cloud_security_posture_functional/pages/vulnerabilities_grouping.ts b/x-pack/test/cloud_security_posture_functional/pages/vulnerabilities_grouping.ts index aa9ece3bbf9af..e56178cbf2fb7 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/vulnerabilities_grouping.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/vulnerabilities_grouping.ts @@ -84,7 +84,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('2 groups'); + expect(groupCount).to.be('2 cloud accounts'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('2 vulnerabilities'); @@ -124,7 +124,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('2 groups'); + expect(groupCount).to.be('2 CVEs'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('2 vulnerabilities'); @@ -165,7 +165,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('2 groups'); + expect(groupCount).to.be('2 resources'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('2 vulnerabilities'); @@ -194,7 +194,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await groupRow.getVisibleText()).to.contain(resourceName1); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('1 group'); + expect(groupCount).to.be('1 resource'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('1 vulnerability'); @@ -207,7 +207,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const grouping = await findings.findingsGrouping(); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('2 groups'); + expect(groupCount).to.be('2 resources'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('2 vulnerabilities'); @@ -223,7 +223,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await groupRow.getVisibleText()).to.contain(resourceName1); const groupCount = await grouping.getGroupCount(); - expect(groupCount).to.be('1 group'); + expect(groupCount).to.be('1 resource'); const unitCount = await grouping.getUnitCount(); expect(unitCount).to.be('1 vulnerability'); @@ -231,7 +231,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await queryBar.setQuery(''); await queryBar.submitQuery(); - expect(await grouping.getGroupCount()).to.be('2 groups'); + expect(await grouping.getGroupCount()).to.be('2 resources'); expect(await grouping.getUnitCount()).to.be('2 vulnerabilities'); }); }); diff --git a/x-pack/test/fleet_api_integration/apis/agents/list.ts b/x-pack/test/fleet_api_integration/apis/agents/list.ts index 72c333753bdec..c6fd4a0a1024a 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/list.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/list.ts @@ -46,13 +46,27 @@ export default function ({ getService }: FtrProviderContext) { }); }); - it.skip('should return a 200 if a user with the fleet all try to access the list', async () => { - await supertest + it('should return a 200 if a user with the fleet all try to access the list', async () => { + await supertestWithoutAuth .get(`/api/fleet/agents`) .auth(testUsers.fleet_all_only.username, testUsers.fleet_all_only.password) .expect(200); }); + it('should return a 200 if a user with the fleet read try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agents`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .expect(200); + }); + + it('should return a 200 if a user with the fleet agents read try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agents`) + .auth(testUsers.fleet_agents_read_only.username, testUsers.fleet_agents_read_only.password) + .expect(200); + }); + it('should not return the list of agents when requesting as a user without fleet permissions', async () => { await supertestWithoutAuth .get(`/api/fleet/agents`) @@ -67,12 +81,6 @@ export default function ({ getService }: FtrProviderContext) { expect(apiResponse.total).to.eql(4); }); - it('should return the list of agents when requesting as a user with fleet read permissions', async () => { - const { body: apiResponse } = await supertest.get(`/api/fleet/agents`).expect(200); - expect(apiResponse).to.have.keys('page', 'total', 'items', 'list'); - expect(apiResponse.total).to.eql(4); - }); - it('should return 200 if the passed kuery is valid', async () => { await supertest .get(`/api/fleet/agent_status?kuery=fleet-agents.local_metadata.host.hostname:test`) diff --git a/x-pack/test/fleet_api_integration/apis/download_sources/crud.ts b/x-pack/test/fleet_api_integration/apis/download_sources/crud.ts index 8b0e5ca8c4e77..0a7ab7b8bcf9e 100644 --- a/x-pack/test/fleet_api_integration/apis/download_sources/crud.ts +++ b/x-pack/test/fleet_api_integration/apis/download_sources/crud.ts @@ -9,10 +9,13 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -56,6 +59,40 @@ export default function (providerContext: FtrProviderContext) { host: 'https://artifacts.elastic.co/downloads/', }); }); + + it('should return a 200 if a user with the fleet all try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agent_download_sources`) + .auth(testUsers.fleet_all_only.username, testUsers.fleet_all_only.password) + .expect(200); + }); + + it('should return a 200 if a user with the fleet read try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agent_download_sources`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .expect(200); + }); + + it('should return a 200 if a user with the fleet settings read try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agent_download_sources`) + .auth( + testUsers.fleet_settings_read_only.username, + testUsers.fleet_settings_read_only.password + ) + .expect(200); + }); + + it('should return a 403 if a user without the fleet settings read try to access the list', async () => { + await supertestWithoutAuth + .get(`/api/fleet/agent_download_sources`) + .auth( + testUsers.fleet_minimal_all_only.username, + testUsers.fleet_minimal_all_only.password + ) + .expect(403); + }); }); describe('GET /agent_download_sources/{sourceId}', () => { diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_custom.ts b/x-pack/test/fleet_api_integration/apis/epm/install_custom.ts index 63dfd7690e887..0a8290549f06c 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_custom.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_custom.ts @@ -17,6 +17,7 @@ export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); const kibanaServer = getService('kibanaServer'); + const esClient = getService('es'); const uninstallPackage = async () => { await supertest @@ -99,6 +100,413 @@ export default function (providerContext: FtrProviderContext) { expect(installation.attributes.install_status).to.be('installed'); }); + it('Correctly sets up index templates to create an ECS compliant mapping', async () => { + await supertest + .post(`/api/fleet/epm/custom_integrations`) + .set('kbn-xsrf', 'xxxx') + .type('application/json') + .send({ + force: true, + integrationName: INTEGRATION_NAME, + datasets: [{ name: `${INTEGRATION_NAME}.access`, type: 'logs' }], + }) + .expect(200); + + const indexName = `logs-${INTEGRATION_NAME}.access-000001`; + + // Actually index data to see if the mapping comes out as expected based on the component template stack + await esClient.index({ + index: indexName, + document: { + 'cloud.account.id': 'xyz', + 'cloud.availability_zone': 'xyz', + 'cloud.instance.id': 'xyz', + 'cloud.instance.name': 'xyz', + 'cloud.machine.type': 'xyz', + 'cloud.provider': 'xyz', + 'cloud.region': 'xyz', + 'cloud.project.id': 'xyz', + 'cloud.image.id': 'xyz', + 'container.id': 'xyz', + 'container.image.name': 'xyz', + 'container.labels': { foo_id: 'beef42' }, + 'container.name': 'xyz', + 'host.architecture': 'xyz', + 'host.domain': 'xyz', + 'host.hostname': 'xyz', + 'host.id': 'xyz', + 'host.ip': '1.1.1.1', + 'host.mac': 'xyz', + 'host.name': 'xyz', + 'host.os.family': 'xyz', + 'host.os.kernel': 'xyz', + 'host.os.name': 'xyz', + 'host.os.platform': 'xyz', + 'host.os.version': 'xyz', + 'host.os.type': 'xyz', + 'host.os.containerized': true, + 'host.os.build': 'xyz', + 'host.os.codename': 'xyz', + 'input.type': 'xyz', + 'log.offset': 123, + 'data_stream.type': 'logs', + }, + }); + const response = await esClient.indices.getMapping({ index: indexName }); + + expect(Object.values(response)[0].mappings).to.eql({ + subobjects: false, + _meta: { + managed_by: 'fleet', + managed: true, + package: { + name: 'my_nginx', + }, + }, + _data_stream_timestamp: { + enabled: true, + }, + dynamic_templates: [ + { + ecs_timestamp: { + match: '@timestamp', + mapping: { + ignore_malformed: false, + type: 'date', + }, + }, + }, + { + ecs_message_match_only_text: { + path_match: ['message', '*.message'], + unmatch_mapping_type: 'object', + mapping: { + type: 'match_only_text', + }, + }, + }, + { + ecs_ip: { + path_match: ['ip', '*.ip', '*_ip'], + match_mapping_type: 'string', + mapping: { + type: 'ip', + }, + }, + }, + { + ecs_wildcard: { + path_match: ['*.io.text', '*.message_id', '*registry.data.strings', '*url.path'], + unmatch_mapping_type: 'object', + mapping: { + type: 'wildcard', + }, + }, + }, + { + ecs_path_match_wildcard_and_match_only_text: { + path_match: ['*.body.content', '*url.full', '*url.original'], + unmatch_mapping_type: 'object', + mapping: { + fields: { + text: { + type: 'match_only_text', + }, + }, + type: 'wildcard', + }, + }, + }, + { + ecs_match_wildcard_and_match_only_text: { + match: ['*command_line', '*stack_trace'], + unmatch_mapping_type: 'object', + mapping: { + fields: { + text: { + type: 'match_only_text', + }, + }, + type: 'wildcard', + }, + }, + }, + { + ecs_path_match_keyword_and_match_only_text: { + path_match: [ + '*.title', + '*.executable', + '*.name', + '*.working_directory', + '*.full_name', + '*file.path', + '*file.target_path', + '*os.full', + 'email.subject', + 'vulnerability.description', + 'user_agent.original', + ], + unmatch_mapping_type: 'object', + mapping: { + fields: { + text: { + type: 'match_only_text', + }, + }, + type: 'keyword', + }, + }, + }, + { + ecs_date: { + path_match: [ + '*.timestamp', + '*_timestamp', + '*.not_after', + '*.not_before', + '*.accessed', + 'created', + '*.created', + '*.installed', + '*.creation_date', + '*.ctime', + '*.mtime', + 'ingested', + '*.ingested', + '*.start', + '*.end', + ], + unmatch_mapping_type: 'object', + mapping: { + type: 'date', + }, + }, + }, + { + ecs_path_match_float: { + path_match: ['*.score.*', '*_score*'], + path_unmatch: '*.version', + unmatch_mapping_type: 'object', + mapping: { + type: 'float', + }, + }, + }, + { + ecs_usage_double_scaled_float: { + path_match: '*.usage', + match_mapping_type: ['double', 'long', 'string'], + mapping: { + scaling_factor: 1000, + type: 'scaled_float', + }, + }, + }, + { + ecs_geo_point: { + path_match: ['location', '*.location'], + mapping: { + type: 'geo_point', + }, + }, + }, + { + ecs_flattened: { + path_match: ['*structured_data', '*exports', '*imports'], + match_mapping_type: 'object', + mapping: { + type: 'flattened', + }, + }, + }, + { + all_strings_to_keywords: { + match_mapping_type: 'string', + mapping: { + ignore_above: 1024, + type: 'keyword', + }, + }, + }, + { + strings_as_keyword: { + match_mapping_type: 'string', + mapping: { + ignore_above: 1024, + type: 'keyword', + }, + }, + }, + ], + date_detection: false, + properties: { + '@timestamp': { + type: 'date', + ignore_malformed: false, + }, + 'cloud.account.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.availability_zone': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.image.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.instance.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.instance.name': { + type: 'keyword', + fields: { + text: { + type: 'match_only_text', + }, + }, + }, + 'cloud.machine.type': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.project.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.provider': { + type: 'keyword', + ignore_above: 1024, + }, + 'cloud.region': { + type: 'keyword', + ignore_above: 1024, + }, + 'container.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'container.image.name': { + type: 'keyword', + fields: { + text: { + type: 'match_only_text', + }, + }, + }, + 'container.labels.foo_id': { + type: 'keyword', + ignore_above: 1024, + }, + 'container.name': { + type: 'keyword', + fields: { + text: { + type: 'match_only_text', + }, + }, + }, + 'data_stream.dataset': { + type: 'constant_keyword', + }, + 'data_stream.namespace': { + type: 'constant_keyword', + }, + 'data_stream.type': { + type: 'constant_keyword', + value: 'logs', + }, + 'event.agent_id_status': { + type: 'keyword', + ignore_above: 1024, + }, + 'event.ingested': { + type: 'date', + format: 'strict_date_time_no_millis||strict_date_optional_time||epoch_millis', + }, + 'host.architecture': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.domain': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.hostname': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.id': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.ip': { + type: 'ip', + }, + 'host.mac': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.name': { + type: 'keyword', + fields: { + text: { + type: 'match_only_text', + }, + }, + }, + 'host.os.build': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.codename': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.containerized': { + type: 'boolean', + }, + 'host.os.family': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.kernel': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.name': { + type: 'keyword', + fields: { + text: { + type: 'match_only_text', + }, + }, + }, + 'host.os.platform': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.type': { + type: 'keyword', + ignore_above: 1024, + }, + 'host.os.version': { + type: 'keyword', + ignore_above: 1024, + }, + 'input.type': { + type: 'keyword', + ignore_above: 1024, + }, + 'log.offset': { + type: 'long', + }, + }, + }); + }); + it('Throws an error when there is a naming collision with a current package installation', async () => { await supertest .post(`/api/fleet/epm/custom_integrations`) diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts b/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts index 1e5f5cafc578c..61d71b63f40f5 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts @@ -127,7 +127,7 @@ export default function (providerContext: FtrProviderContext) { }, mapping: { total_fields: { - limit: '10000', + limit: '1000', }, }, number_of_shards: '3', diff --git a/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts b/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts index 8b1b81d1839a4..cd3898a58c6a7 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts @@ -223,12 +223,9 @@ export default function (providerContext: FtrProviderContext) { }, mapping: { total_fields: { - limit: '10000', + limit: '1000', }, }, - query: { - default_field: ['logs_test_name', 'new_field_name'], - }, }, }); expect(resPackage.body.component_templates[0].component_template.template.mappings).eql({ diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts index 9223c7a2118d3..4af8764e4709a 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/create.ts @@ -222,7 +222,7 @@ export default function (providerContext: FtrProviderContext) { package: { name: 'endpoint', title: 'Endpoint', - version: '1.4.1', + version: '8.4.0', }, force: true, }) @@ -240,7 +240,7 @@ export default function (providerContext: FtrProviderContext) { package: { name: 'endpoint', title: 'Endpoint', - version: '1.5.0', + version: '8.5.0', }, }) .expect(400); diff --git a/x-pack/test/fleet_api_integration/apis/test_users.ts b/x-pack/test/fleet_api_integration/apis/test_users.ts index d8800003bda04..b5546d149eb98 100644 --- a/x-pack/test/fleet_api_integration/apis/test_users.ts +++ b/x-pack/test/fleet_api_integration/apis/test_users.ts @@ -21,6 +21,46 @@ export const testUsers: { username: 'fleet_all_int_all', password: 'changeme', }, + fleet_read_only: { + permissions: { + feature: { + fleetv2: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_read_only', + password: 'changeme', + }, + fleet_minimal_all_only: { + permissions: { + feature: { + fleetv2: ['minimal_all'], + }, + spaces: ['*'], + }, + username: 'fleet_minimal_all_only', + password: 'changeme', + }, + fleet_agents_read_only: { + permissions: { + feature: { + fleetv2: ['agents_read'], + }, + spaces: ['*'], + }, + username: 'fleet_agents_read_only', + password: 'changeme', + }, + fleet_settings_read_only: { + permissions: { + feature: { + fleetv2: ['settings_read'], + }, + spaces: ['*'], + }, + username: 'fleet_settings_read_only', + password: 'changeme', + }, setup: { permissions: { feature: { diff --git a/x-pack/test/fleet_api_integration/config.base.ts b/x-pack/test/fleet_api_integration/config.base.ts index ccdf9d03ba3ae..5626ee4d85d6e 100644 --- a/x-pack/test/fleet_api_integration/config.base.ts +++ b/x-pack/test/fleet_api_integration/config.base.ts @@ -75,6 +75,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { 'outputSecretsStorage', 'agentTamperProtectionEnabled', 'enableStrictKQLValidation', + 'subfeaturePrivileges', ])}`, `--logging.loggers=${JSON.stringify([ ...getKibanaCliLoggers(xPackAPITestsConfig.get('kbnTestServer.serverArgs')), diff --git a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts index a8dd8c7aaa769..a29b61fec5609 100644 --- a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts +++ b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts @@ -313,8 +313,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboardControls.rangeSliderWaitForLoading(rangeSliderControl); // wait for range slider to respond to options list selections before proceeding await PageObjects.dashboardControls.rangeSliderSetLowerBound(rangeSliderControl, '1000'); await PageObjects.dashboardControls.rangeSliderSetUpperBound(rangeSliderControl, '15000'); - await PageObjects.dashboard.clickQuickSave(); await PageObjects.dashboard.waitForRenderComplete(); + await PageObjects.dashboard.clickQuickSave(); + await PageObjects.header.waitUntilLoadingHasFinished(); /** Destination Dashboard */ await createControls(dashboardDrilldownsManage.DASHBOARD_WITH_AREA_CHART_NAME, [ diff --git a/x-pack/test/functional/apps/dataset_quality/config.ts b/x-pack/test/functional/apps/dataset_quality/config.ts new file mode 100644 index 0000000000000..c7e72325d6c07 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/config.ts @@ -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 { FtrConfigProviderContext, GenericFtrProviderContext } from '@kbn/test'; +import { createLogger, LogLevel, LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default async function createTestConfig({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); + const services = functionalConfig.get('services'); + const pageObjects = functionalConfig.get('pageObjects'); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + services: { + ...services, + logSynthtraceEsClient: (context: FtrProviderContext) => { + return new LogsSynthtraceEsClient({ + client: context.getService('es'), + logger: createLogger(LogLevel.info), + refreshAfterIndex: true, + }); + }, + }, + pageObjects, + }; +} + +export type CreateTestConfig = Awaited>; + +export type DatasetQualityServices = CreateTestConfig['services']; +export type DatasetQualityPageObject = CreateTestConfig['pageObjects']; + +export type DatasetQualityFtrProviderContext = GenericFtrProviderContext< + DatasetQualityServices, + DatasetQualityPageObject +>; diff --git a/x-pack/test/functional/apps/dataset_quality/data/index.ts b/x-pack/test/functional/apps/dataset_quality/data/index.ts new file mode 100644 index 0000000000000..68b59f317407d --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/data/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 * from './logs_data'; diff --git a/x-pack/test/functional/apps/dataset_quality/data/logs_data.ts b/x-pack/test/functional/apps/dataset_quality/data/logs_data.ts new file mode 100644 index 0000000000000..3c9b7596feb64 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/data/logs_data.ts @@ -0,0 +1,162 @@ +/* + * 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 { generateLongId, generateShortId, log, timerange } from '@kbn/apm-synthtrace-client'; +import moment from 'moment'; + +enum LogLevel { + INFO = 'info', + DEBUG = 'debug', + ERROR = 'error', +} +interface MessageWithLevel { + message: string; + level: LogLevel; +} +interface Cluster { + clusterId: string; + clusterName: string; +} + +export function getLogsForDataset({ + dataset, + to, + count = 1, + isMalformed = false, + namespace = defaultNamespace, +}: { + dataset: string; + to: moment.MomentInput; + count?: number; + isMalformed?: boolean; + namespace?: string; +}) { + return timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(count) + .fill(0) + .flatMap((_, index) => [ + createLogRecord( + timestamp, + dataset, + MESSAGE_LOG_LEVELS[index % MESSAGE_LOG_LEVELS.length], + SERVICE_NAMES[index % SERVICE_NAMES.length], + CLUSTER[index % CLUSTER.length], + CLOUD_PROVIDERS[index % CLOUD_PROVIDERS.length], + CLOUD_REGION[index % CLOUD_REGION.length], + isMalformed, + namespace + ), + ]); + }); +} + +export function getInitialTestLogs({ to, count = 1 }: { to: string; count?: number }) { + return timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(count) + .fill(0) + .flatMap((_, index) => [ + createLogRecord( + timestamp, + datasetNames[0], + MESSAGE_LOG_LEVELS[0], + SERVICE_NAMES[0], + CLUSTER[0], + CLOUD_PROVIDERS[0], + CLOUD_REGION[0], + false + ), + createLogRecord( + timestamp, + datasetNames[1], + MESSAGE_LOG_LEVELS[1], + SERVICE_NAMES[1], + CLUSTER[1], + CLOUD_PROVIDERS[1], + CLOUD_REGION[1], + false + ), + createLogRecord( + timestamp, + datasetNames[2], + MESSAGE_LOG_LEVELS[2], + SERVICE_NAMES[2], + CLUSTER[2], + CLOUD_PROVIDERS[2], + CLOUD_REGION[2], + false + ), + ]); + }); +} + +export function createLogRecord( + timestamp: number, + dataset: string, + msg: MessageWithLevel, + serviceName: string, + cluster: Cluster, + cloudProvider: string, + cloudRegion: string, + isMalformed = false, + namespace = defaultNamespace +): ReturnType { + return log + .create() + .dataset(dataset) + .message(msg.message) + .logLevel(isMalformed ? MORE_THAN_1024_CHARS : msg.level) + .service(serviceName) + .namespace(namespace) + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'synth-agent', + 'orchestrator.cluster.name': cluster.clusterName, + 'orchestrator.cluster.id': cluster.clusterId, + 'orchestrator.resource.id': generateShortId(), + 'cloud.provider': cloudProvider, + 'cloud.region': cloudRegion, + 'cloud.availability_zone': isMalformed + ? MORE_THAN_1024_CHARS // "ignore_above": 1024 in mapping + : `${cloudRegion}a`, + 'cloud.project.id': generateShortId(), + 'cloud.instance.id': generateShortId(), + 'log.file.path': `/logs/${generateLongId()}/error.txt`, + }) + .timestamp(timestamp); +} + +export const datasetNames = ['synth.1', 'synth.2', 'synth.3']; +export const defaultNamespace = 'default'; + +// Logs Data logic +const MESSAGE_LOG_LEVELS: MessageWithLevel[] = [ + { message: 'A simple log', level: LogLevel.INFO }, + { + message: 'Another log message', + level: LogLevel.DEBUG, + }, + { message: 'Error with certificate: "ca_trusted_fingerprint"', level: LogLevel.ERROR }, +]; +const CLOUD_PROVIDERS = ['gcp', 'aws', 'azure']; +const CLOUD_REGION = ['eu-central-1', 'us-east-1', 'area-51']; + +const CLUSTER = [ + { clusterId: generateShortId(), clusterName: 'synth-cluster-1' }, + { clusterId: generateShortId(), clusterName: 'synth-cluster-2' }, + { clusterId: generateShortId(), clusterName: 'synth-cluster-3' }, +]; + +const SERVICE_NAMES = [`synth-service-0`, `synth-service-1`, `synth-service-2`]; + +const MORE_THAN_1024_CHARS = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?'; diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts new file mode 100644 index 0000000000000..b458574273e18 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts @@ -0,0 +1,113 @@ +/* + * 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 expect from '@kbn/expect'; +import { DatasetQualityFtrProviderContext } from './config'; +import { datasetNames, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + ]); + const testSubjects = getService('testSubjects'); + const synthtrace = getService('logSynthtraceEsClient'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality flyout', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('opens the flyout for the right dataset', async () => { + const testDatasetName = datasetNames[1]; + + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + await testSubjects.existOrFail( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFlyoutTitle + ); + }); + + it('shows the correct last activity', async () => { + const testDatasetName = datasetNames[0]; + + // Update last activity for the dataset + await PageObjects.datasetQuality.closeFlyout(); + await synthtrace.index( + getLogsForDataset({ to: new Date().toISOString(), count: 1, dataset: testDatasetName }) + ); + await PageObjects.datasetQuality.refreshTable(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const testDatasetRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === testDatasetName + ); + + const lastActivityText = (await cols['Last Activity'].getCellTexts())[testDatasetRowIndex]; + + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + const lastActivityTextExists = await PageObjects.datasetQuality.doestTextExistInFlyout( + lastActivityText, + `[data-test-subj=${PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFlyoutFieldValue}]` + ); + expect(lastActivityTextExists).to.eql(true); + }); + + it('shows the integration details', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + const apacheIntegrationId = 'apache'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); + + const integrationNameElements = await PageObjects.datasetQuality.getFlyoutElementsByText( + '[data-test-subj=datasetQualityFlyoutFieldValue]', + apacheIntegrationId + ); + + expect(integrationNameElements.length).to.eql(1); + }); + + it('goes to log explorer page when open button is clicked', async () => { + const testDatasetName = datasetNames[2]; + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + await (await PageObjects.datasetQuality.getFlyoutLogsExplorerButton()).click(); + + // Confirm dataset selector text in observability logs explorer + const datasetSelectorText = + await PageObjects.observabilityLogsExplorer.getDataSourceSelectorButtonText(); + expect(datasetSelectorText).to.eql(testDatasetName); + }); + }); +} diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_summary.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_summary.ts new file mode 100644 index 0000000000000..1a072e622f62c --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_summary.ts @@ -0,0 +1,133 @@ +/* + * 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 expect from '@kbn/expect'; +import { DatasetQualityFtrProviderContext } from './config'; +import { datasetNames, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + ]); + const synthtrace = getService('logSynthtraceEsClient'); + const browser = getService('browser'); + const retry = getService('retry'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality summary', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + }); + + it('shows poor, degraded and good count', async () => { + const summary = await PageObjects.datasetQuality.parseSummaryPanel(); + expect(summary).to.eql({ + datasetHealthPoor: '0', + datasetHealthDegraded: '0', + datasetHealthGood: '3', + activeDatasets: '0 of 3', + estimatedData: '0 Bytes', + }); + }); + + it('updates the poor count when degraded docs are ingested', async () => { + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[2], + isMalformed: true, + }) + ); + + await browser.refresh(); + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const summary = await PageObjects.datasetQuality.parseSummaryPanel(); + const { estimatedData, ...restOfSummary } = summary; + expect(restOfSummary).to.eql({ + datasetHealthPoor: '1', + datasetHealthDegraded: '0', + datasetHealthGood: '2', + activeDatasets: '1 of 3', + }); + }); + }); + + it('updates the degraded count when degraded docs are ingested', async () => { + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[1], + isMalformed: true, + }) + ); + + // Index healthy documents + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 10, + dataset: datasetNames[1], + isMalformed: false, + }) + ); + + await browser.refresh(); + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const { estimatedData, ...restOfSummary } = + await PageObjects.datasetQuality.parseSummaryPanel(); + expect(restOfSummary).to.eql({ + datasetHealthPoor: '1', + datasetHealthDegraded: '1', + datasetHealthGood: '1', + activeDatasets: '2 of 3', + }); + }); + }); + + it('updates active datasets and estimated data KPIs', async () => { + const { estimatedData: existingEstimatedData } = + await PageObjects.datasetQuality.parseSummaryPanel(); + + // Index document at current time to mark dataset as active + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 4, + dataset: datasetNames[0], + isMalformed: false, + }) + ); + + await browser.refresh(); // Summary panel doesn't update reactively + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const { activeDatasets: updatedActiveDatasets, estimatedData: updatedEstimatedData } = + await PageObjects.datasetQuality.parseSummaryPanel(); + + expect(updatedActiveDatasets).to.eql('3 of 3'); + expect(updatedEstimatedData).to.not.eql(existingEstimatedData); + }); + }); + }); +} diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts new file mode 100644 index 0000000000000..ceaeaaf576ed6 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts @@ -0,0 +1,238 @@ +/* + * 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 expect from '@kbn/expect'; +import { DatasetQualityFtrProviderContext } from './config'; +import { datasetNames, defaultNamespace, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + ]); + const synthtrace = getService('logSynthtraceEsClient'); + const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality table', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('shows the right number of rows in correct order', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('descending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql([...datasetNames].reverse()); + + const namespaceCol = cols.Namespace; + const namespaceColCellTexts = await namespaceCol.getCellTexts(); + expect(namespaceColCellTexts).to.eql([defaultNamespace, defaultNamespace, defaultNamespace]); + + const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); + + const lastActivityCol = cols['Last Activity']; + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(lastActivityColCellTexts).to.eql([ + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + ]); + }); + + it('shows degraded docs percentage', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('ascending'); + + const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); + + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[2], + isMalformed: true, + }) + ); + + // Set time range to Last 5 minute + const filtersContainer = await testSubjects.find( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFiltersContainer + ); + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 5, 'm'); + + const updatedDegradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(updatedDegradedDocsColCellTexts[2]).to.not.eql('0%'); + }); + + it('shows the updated size of the index', async () => { + const testDatasetIndex = 2; + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('ascending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const datasetToUpdateRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === datasetNames[testDatasetIndex] + ); + + const sizeColCellTexts = await cols.Size.getCellTexts(); + const beforeSize = sizeColCellTexts[datasetToUpdateRowIndex]; + + // Index documents with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 4, + dataset: datasetNames[testDatasetIndex], + isMalformed: false, + }) + ); + + const colsAfterUpdate = await PageObjects.datasetQuality.parseDatasetTable(); + + // Assert that size has changed + await retry.tryForTime(15000, async () => { + // Refresh the table + await PageObjects.datasetQuality.refreshTable(); + const updatedSizeColCellTexts = await colsAfterUpdate.Size.getCellTexts(); + expect(updatedSizeColCellTexts[datasetToUpdateRowIndex]).to.not.eql(beforeSize); + }); + }); + + it('sorts by dataset name', async () => { + // const header = await PageObjects.datasetQuality.getDatasetTableHeader('Dataset Name'); + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + expect(Object.keys(cols).length).to.eql(7); + + const datasetNameCol = cols['Dataset Name']; + + // Sort ascending + await datasetNameCol.sort('ascending'); + const cellTexts = await datasetNameCol.getCellTexts(); + + const datasetNamesAsc = [...datasetNames].sort(); + + expect(cellTexts).to.eql(datasetNamesAsc); + }); + + it('shows dataset from integration', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + + // Sort ascending + await datasetNameCol.sort('ascending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const datasetNamesAsc = [...datasetNames, apacheAccessDatasetHumanName].sort(); + + // Assert there are 4 rows + expect(datasetNameColCellTexts.length).to.eql(4); + + expect(datasetNameColCellTexts).to.eql(datasetNamesAsc); + }); + + it('goes to log explorer page when opened', async () => { + const rowIndexToOpen = 1; + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const actionsCol = cols.Actions; + + const datasetName = (await datasetNameCol.getCellTexts())[rowIndexToOpen]; + await (await actionsCol.getCellChildren('a'))[rowIndexToOpen].click(); // Click "Open" + + // Confirm dataset selector text in observability logs explorer + const datasetSelectorText = + await PageObjects.observabilityLogsExplorer.getDataSourceSelectorButtonText(); + expect(datasetSelectorText).to.eql(datasetName); + }); + + it('shows the last activity when in time range', async () => { + await PageObjects.datasetQuality.navigateTo(); + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const lastActivityCol = cols['Last Activity']; + const datasetNameCol = cols['Dataset Name']; + + // Set time range to Last 1 minute + const filtersContainer = await testSubjects.find( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFiltersContainer + ); + + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 1, 's'); + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(lastActivityColCellTexts).to.eql([ + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + ]); + + const datasetToUpdate = datasetNames[0]; + await synthtrace.index( + getLogsForDataset({ to: new Date().toISOString(), count: 1, dataset: datasetToUpdate }) + ); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + const datasetToUpdateRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === datasetToUpdate + ); + + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 1, 'h'); + + await retry.tryForTime(5000, async () => { + const updatedLastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(updatedLastActivityColCellTexts[datasetToUpdateRowIndex]).to.not.eql( + PageObjects.datasetQuality.texts.noActivityText + ); + }); + }); + + it('hides inactive datasets', async () => { + // Get number of rows with Last Activity not equal to "No activity in the selected timeframe" + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const lastActivityCol = cols['Last Activity']; + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + const activeDatasets = lastActivityColCellTexts.filter( + (activity: string) => activity !== PageObjects.datasetQuality.texts.noActivityText + ); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + const rows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(rows.length).to.eql(activeDatasets.length); + }); + }); +} diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts new file mode 100644 index 0000000000000..eee4cefeb1017 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts @@ -0,0 +1,156 @@ +/* + * 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 expect from '@kbn/expect'; +import { DatasetQualityFtrProviderContext } from './config'; +import { datasetNames, defaultNamespace, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + ]); + const synthtrace = getService('logSynthtraceEsClient'); + const testSubjects = getService('testSubjects'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality table filters', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('hides inactive datasets when toggled', async () => { + const initialRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(initialRows.length).to.eql(3); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + + const afterToggleRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(afterToggleRows.length).to.eql(1); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + + const afterReToggleRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(afterReToggleRows.length).to.eql(3); + }); + + it('shows full dataset names when toggled', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql(datasetNames); + + await PageObjects.datasetQuality.toggleShowFullDatasetNames(); + + const datasetNameColCellTextsAfterToggle = await datasetNameCol.getCellTexts(); + const duplicateNames = datasetNames.map((name) => `${name}\n${name}`); + expect(datasetNameColCellTextsAfterToggle).to.eql(duplicateNames); + + await PageObjects.datasetQuality.toggleShowFullDatasetNames(); + const datasetNameColCellTextsAfterReToggle = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTextsAfterReToggle).to.eql(datasetNames); + }); + + it('searches the datasets', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql(datasetNames); + + // Search for a dataset + await testSubjects.setValue( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFilterBarFieldSearch, + datasetNames[2] + ); + + const colsAfterSearch = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameColAfterSearch = colsAfterSearch['Dataset Name']; + const datasetNameColCellTextsAfterSearch = await datasetNameColAfterSearch.getCellTexts(); + expect(datasetNameColCellTextsAfterSearch).to.eql([datasetNames[2]]); + await testSubjects.setValue( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFilterBarFieldSearch, + '' + ); + }); + + it('filters for integration', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + const apacheIntegrationName = 'Apache HTTP Server'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql([apacheAccessDatasetHumanName, ...datasetNames]); + + // Filter for integration + await PageObjects.datasetQuality.filterForIntegrations([apacheIntegrationName]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameColAfterFilter = colsAfterFilter['Dataset Name']; + const datasetNameColCellTextsAfterFilter = await datasetNameColAfterFilter.getCellTexts(); + expect(datasetNameColCellTextsAfterFilter).to.eql([apacheAccessDatasetHumanName]); + }); + + it('filters for namespace', async () => { + const apacheAccessDatasetName = 'apache.access'; + const datasetNamespace = 'prod'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ + to, + count: 10, + dataset: apacheAccessDatasetName, + namespace: datasetNamespace, + }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + // Get default namespaces + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const namespaceCol = cols.Namespace; + const namespaceColCellTexts = await namespaceCol.getCellTexts(); + expect(namespaceColCellTexts).to.contain(defaultNamespace); + + // Filter for prod namespace + await PageObjects.datasetQuality.filterForNamespaces([datasetNamespace]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const namespaceColAfterFilter = colsAfterFilter.Namespace; + const namespaceColCellTextsAfterFilter = await namespaceColAfterFilter.getCellTexts(); + + expect(namespaceColCellTextsAfterFilter).to.eql([datasetNamespace]); + }); + }); +} diff --git a/x-pack/test/functional/apps/dataset_quality/home.ts b/x-pack/test/functional/apps/dataset_quality/home.ts new file mode 100644 index 0000000000000..7940333470137 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/home.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 { DatasetQualityFtrProviderContext } from './config'; + +export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + ]); + + const testSubjects = getService('testSubjects'); + + describe('Dataset quality home', () => { + it('dataset quality table exists', async () => { + await PageObjects.datasetQuality.navigateTo(); + await testSubjects.existOrFail( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityTable + ); + }); + }); +} diff --git a/x-pack/test/functional/apps/dataset_quality/index.ts b/x-pack/test/functional/apps/dataset_quality/index.ts new file mode 100644 index 0000000000000..453d3673e7ef5 --- /dev/null +++ b/x-pack/test/functional/apps/dataset_quality/index.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 { DatasetQualityFtrProviderContext } from './config'; + +export default function ({ loadTestFile }: DatasetQualityFtrProviderContext) { + describe('Dataset Quality', function () { + loadTestFile(require.resolve('./home')); + loadTestFile(require.resolve('./dataset_quality_summary')); + loadTestFile(require.resolve('./dataset_quality_table')); + loadTestFile(require.resolve('./dataset_quality_table_filters')); + loadTestFile(require.resolve('./dataset_quality_flyout')); + }); +} diff --git a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts index e51f78796da75..761278e69025c 100644 --- a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts @@ -60,8 +60,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.switchToEditMode(); await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); - + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.lens.createLayer('annotations'); + await PageObjects.lens.waitForVisualization('xyVisChart'); + await PageObjects.lens.createLayer('referenceLine'); await PageObjects.lens.save('Embedded Visualization', false); diff --git a/x-pack/test/functional/apps/lens/group6/workspace_size.ts b/x-pack/test/functional/apps/lens/group6/workspace_size.ts index 165b429b03733..9f3706203abb5 100644 --- a/x-pack/test/functional/apps/lens/group6/workspace_size.ts +++ b/x-pack/test/functional/apps/lens/group6/workspace_size.ts @@ -15,7 +15,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); - describe('lens workspace size', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('lens workspace size', () => { let originalWindowSize: { height: number; width: number; diff --git a/x-pack/test/functional/apps/maps/group1/documents_source/search_hits.js b/x-pack/test/functional/apps/maps/group1/documents_source/search_hits.js index 0273441f3543e..6c91ec958ddfc 100644 --- a/x-pack/test/functional/apps/maps/group1/documents_source/search_hits.js +++ b/x-pack/test/functional/apps/maps/group1/documents_source/search_hits.js @@ -12,7 +12,8 @@ export default function ({ getPageObjects, getService }) { const inspector = getService('inspector'); const security = getService('security'); - describe('search hits', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('search hits', () => { before(async () => { await security.testUser.setRoles( [ diff --git a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js index 49c31f951d3d3..7ee28e468cd4c 100644 --- a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js +++ b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js @@ -13,7 +13,8 @@ export default function ({ getPageObjects, getService }) { const DOC_COUNT_PROP_NAME = 'doc_count'; const security = getService('security'); - describe('geojson vector layer - es geo grid source', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('geojson vector layer - es geo grid source', () => { const DATA_CENTER_LON = -98; const DATA_CENTER_LAT = 38; diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts index 4d9fd0bbead81..c1c4887ccc99b 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts @@ -359,7 +359,8 @@ export default function ({ getService }: FtrProviderContext) { }, ]; - describe('aggregated or scripted job', function () { + // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/178562 + describe.skip('aggregated or scripted job', function () { this.tags(['ml']); before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); diff --git a/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts b/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts index a3ef0eddef6c4..f7f2f669bc202 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts @@ -85,7 +85,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await ml.dataDrift.runAnalysis(); } - describe('data drift', async function () { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('data drift', async function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ihp_outlier'); await ml.testResources.createDataViewIfNeeded('ft_ihp_outlier'); diff --git a/x-pack/test/functional/apps/ml/data_visualizer/esql_data_visualizer.ts b/x-pack/test/functional/apps/ml/data_visualizer/esql_data_visualizer.ts new file mode 100644 index 0000000000000..167dc03510797 --- /dev/null +++ b/x-pack/test/functional/apps/ml/data_visualizer/esql_data_visualizer.ts @@ -0,0 +1,321 @@ +/* + * 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 { ML_JOB_FIELD_TYPES } from '@kbn/ml-anomaly-utils'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { MetricFieldVisConfig, NonMetricFieldVisConfig } from './types'; +/* + * 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 interface TestData { + suiteTitle: string; + query: string; + rowsPerPage?: 10 | 25 | 50; + sourceIndexOrSavedSearch?: string; + expected: { + hasDocCountChart: boolean; + initialLimitSize?: string; + totalDocCountFormatted: string; + metricFields?: MetricFieldVisConfig[]; + nonMetricFields?: NonMetricFieldVisConfig[]; + emptyFields: string[]; + visibleMetricFieldsCount: number; + totalMetricFieldsCount: number; + populatedFieldsCount: number; + totalFieldsCount: number; + }; +} + +const esqlFarequoteData = { + suiteTitle: 'ES|QL farequote', + query: 'from `ft_farequote`', + sourceIndexOrSavedSearch: 'ft_farequote', + expected: { + hasDocCountChart: true, + initialLimitSize: '10,000 (100%)', + totalDocCountFormatted: '86,274', + metricFields: [ + { + fieldName: 'responsetime', + type: ML_JOB_FIELD_TYPES.NUMBER, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '86,274 (100%)', + statsMaxDecimalPlaces: 3, + topValuesCount: 11, + viewableInLens: false, + }, + ], + nonMetricFields: [ + { + fieldName: '@timestamp', + type: ML_JOB_FIELD_TYPES.DATE, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '86,274 (100%)', + exampleCount: 2, + viewableInLens: false, + }, + { + fieldName: '@version', + type: ML_JOB_FIELD_TYPES.TEXT, + existsInDocs: true, + aggregatable: false, + loading: false, + exampleCount: 1, + docCountFormatted: '86,274 (100%)', + viewableInLens: false, + }, + { + fieldName: '@version.keyword', + type: ML_JOB_FIELD_TYPES.KEYWORD, + existsInDocs: true, + aggregatable: true, + loading: false, + exampleCount: 1, + docCountFormatted: '86,274 (100%)', + viewableInLens: false, + }, + { + fieldName: 'airline', + type: ML_JOB_FIELD_TYPES.KEYWORD, + existsInDocs: true, + aggregatable: true, + loading: false, + exampleCount: 11, + docCountFormatted: '86,274 (100%)', + viewableInLens: false, + }, + { + fieldName: 'type', + type: ML_JOB_FIELD_TYPES.TEXT, + existsInDocs: true, + aggregatable: false, + loading: false, + exampleCount: 1, + docCountFormatted: '86,274 (100%)', + viewableInLens: false, + }, + { + fieldName: 'type.keyword', + type: ML_JOB_FIELD_TYPES.KEYWORD, + existsInDocs: true, + aggregatable: true, + loading: false, + exampleCount: 1, + docCountFormatted: '86,274 (100%)', + viewableInLens: false, + }, + ], + emptyFields: ['sourcetype'], + visibleMetricFieldsCount: 1, + totalMetricFieldsCount: 1, + populatedFieldsCount: 7, + totalFieldsCount: 8, + }, +}; +const esqlSampleLogData: TestData = { + suiteTitle: 'ES|QL module_sample_logs', + query: `from ft_module_sample_logs +| where bytes > 7000 and response.keyword == "200" +| eval bytes_kb = bytes/1000 +| stats max_bytes_kb = max(bytes_kb), min_machine_ram = min(machine.ram) by clientip, geo.coordinates`, + sourceIndexOrSavedSearch: 'ft_module_sample_logs', + expected: { + hasDocCountChart: false, + totalDocCountFormatted: '149', + metricFields: [ + { + fieldName: 'max_bytes_kb', + type: ML_JOB_FIELD_TYPES.NUMBER, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '143 (95.97%)', + statsMaxDecimalPlaces: 3, + topValuesCount: 12, + viewableInLens: false, + }, + { + fieldName: 'min_machine_ram', + type: ML_JOB_FIELD_TYPES.NUMBER, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '143 (95.97%)', + statsMaxDecimalPlaces: 3, + topValuesCount: 20, + viewableInLens: false, + }, + ], + nonMetricFields: [ + { + fieldName: 'geo.coordinates', + type: ML_JOB_FIELD_TYPES.GEO_POINT, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '143 (95.97%)', + exampleCount: 10, + viewableInLens: false, + }, + { + fieldName: 'clientip', + type: ML_JOB_FIELD_TYPES.KEYWORD, + existsInDocs: true, + aggregatable: true, + loading: false, + docCountFormatted: '143 (95.97%)', + exampleCount: 11, + viewableInLens: false, + }, + ], + emptyFields: [], + visibleMetricFieldsCount: 2, + totalMetricFieldsCount: 2, + populatedFieldsCount: 4, + totalFieldsCount: 4, + }, +}; + +export default function ({ getPageObject, getService }: FtrProviderContext) { + const headerPage = getPageObject('header'); + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + + function runTests(testData: TestData) { + it(`${testData.suiteTitle} loads the ES|QL data visualizer page`, async () => { + // Start navigation from the base of the ML app. + await ml.navigation.navigateToMl(); + await ml.navigation.navigateToDataESQLDataVisualizer(); + }); + + it('should show the ES|QL editor and top panels', async () => { + await ml.dataVisualizerIndexBased.assertTimeRangeSelectorSectionExists(); + }); + + it(`${testData.suiteTitle} displays index details`, async () => { + await ml.dataVisualizer.setESQLQuery(testData.query); + + await ml.dataVisualizerTable.assertTableRowCount(0); + + await ml.testExecution.logTestStep(`${testData.suiteTitle} loads data for full time range`); + await ml.dataVisualizerIndexBased.clickUseFullDataButton( + testData.expected.totalDocCountFormatted, + 'none' + ); + await headerPage.waitUntilLoadingHasFinished(); + + await ml.dataVisualizerIndexBased.assertTotalDocCountHeaderExist(); + + if (testData.expected.hasDocCountChart) { + await ml.dataVisualizerIndexBased.assertTotalDocCountChartExist(); + } + + await ml.testExecution.logTestStep( + `${testData.suiteTitle} displays elements in the data visualizer table correctly` + ); + await ml.dataVisualizerIndexBased.assertDataVisualizerTableExist(); + + if (testData.rowsPerPage) { + await ml.dataVisualizerTable.ensureNumRowsPerPage(testData.rowsPerPage); + } + + await ml.dataVisualizerIndexBased.assertFieldCountPanelExist(); + await ml.dataVisualizerIndexBased.assertMetricFieldsSummaryExist(); + await ml.dataVisualizerIndexBased.assertFieldsSummaryExist(); + await ml.dataVisualizerIndexBased.assertVisibleMetricFieldsCount( + testData.expected.visibleMetricFieldsCount + ); + await ml.dataVisualizerIndexBased.assertTotalMetricFieldsCount( + testData.expected.totalMetricFieldsCount + ); + await ml.dataVisualizerIndexBased.assertVisibleFieldsCount( + testData.expected.populatedFieldsCount + ); + await ml.dataVisualizerIndexBased.assertTotalFieldsCount(testData.expected.totalFieldsCount); + + await ml.testExecution.logTestStep('displays unpopulated fields correctly'); + await ml.dataVisualizerTable.setShowEmptyFieldsSwitchState( + true, + testData.expected.emptyFields + ); + }); + + it(`${testData.suiteTitle} updates data when limit size changes`, async () => { + if (testData.expected.initialLimitSize !== undefined) { + await ml.testExecution.logTestStep('shows analysis for 10,000 rows by default'); + for (const fieldRow of testData.expected.metricFields as Array< + Required + >) { + await ml.dataVisualizerTable.assertNumberFieldContents( + fieldRow.fieldName, + testData.expected.initialLimitSize, + undefined, + false, + false, + true + ); + } + } + + await ml.testExecution.logTestStep('sets limit size to Analyze all'); + await ml.dataVisualizer.setLimitSize('none'); + + await ml.testExecution.logTestStep('updates table with newly set limit size'); + for (const fieldRow of testData.expected.metricFields as Array< + Required + >) { + await ml.dataVisualizerTable.assertNumberFieldContents( + fieldRow.fieldName, + fieldRow.docCountFormatted, + undefined, + false, + false, + true + ); + } + + for (const fieldRow of testData.expected.nonMetricFields!) { + await ml.dataVisualizerTable.assertNonMetricFieldContents( + fieldRow.type, + fieldRow.fieldName!, + fieldRow.docCountFormatted, + fieldRow.exampleCount, + false, + false, + undefined + ); + } + }); + } + + describe('esql', function () { + this.tags(['ml']); + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/module_sample_logs'); + + await ml.testResources.setKibanaTimeZoneToUTC(); + + await ml.securityUI.loginAsMlPowerUser(); + }); + + describe('with farequote', function () { + runTests(esqlFarequoteData); + }); + + describe('with module_sample_logs ', function () { + runTests(esqlSampleLogData); + }); + }); +} diff --git a/x-pack/test/functional/apps/ml/data_visualizer/index.ts b/x-pack/test/functional/apps/ml/data_visualizer/index.ts index 2145267edcc39..e5b1cbab24809 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/index.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/index.ts @@ -31,7 +31,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { await ml.testResources.resetKibanaTimeZone(); }); - loadTestFile(require.resolve('./index_data_visualizer')); loadTestFile(require.resolve('./index_data_visualizer_random_sampler')); loadTestFile(require.resolve('./index_data_visualizer_filters')); @@ -41,5 +40,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./index_data_visualizer_data_view_management')); loadTestFile(require.resolve('./file_data_visualizer')); loadTestFile(require.resolve('./data_drift')); + loadTestFile(require.resolve('./esql_data_visualizer')); }); } diff --git a/x-pack/test/functional/apps/ml/data_visualizer/types.ts b/x-pack/test/functional/apps/ml/data_visualizer/types.ts index 3c243be210860..b5ff416706a6e 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/types.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/types.ts @@ -36,7 +36,9 @@ export interface TestData { size: number; expected: { field: string; docCountFormatted: string }; }>; + query?: string; expected: { + initialLimitSize?: string; filters?: Array<{ key: string; value: string; diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts new file mode 100644 index 0000000000000..2c917ba03ac12 --- /dev/null +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -0,0 +1,394 @@ +/* + * 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 querystring from 'querystring'; +import rison from '@kbn/rison'; +import expect from '@kbn/expect'; +import { TimeUnitId } from '@elastic/eui'; +import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; +import { + OBSERVABILITY_DATASET_QUALITY_URL_STATE_KEY, + datasetQualityUrlSchemaV1, +} from '@kbn/observability-logs-explorer-plugin/common'; +import { FtrProviderContext } from '../ftr_provider_context'; + +const defaultPageState: datasetQualityUrlSchemaV1.UrlSchema = { + v: 1, + table: { + page: 0, + }, + filters: {}, + flyout: {}, +}; + +type SummaryPanelKpi = Record< + | 'datasetHealthPoor' + | 'datasetHealthDegraded' + | 'datasetHealthGood' + | 'activeDatasets' + | 'estimatedData', + string +>; + +export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProviderContext) { + const PageObjects = getPageObjects(['common']); + const testSubjects = getService('testSubjects'); + const euiSelectable = getService('selectable'); + const retry = getService('retry'); + const find = getService('find'); + const browser = getService('browser'); + + const selectors = { + datasetQualityTable: '[data-test-subj="datasetQualityTable"]', + datasetQualityTableColumn: (column: number) => + `[data-test-subj="datasetQualityTable"] .euiTableRowCell:nth-child(${column})`, + datasetSearchInput: '[placeholder="Filter datasets"]', + showFullDatasetNamesSwitch: 'button[aria-label="Show full dataset names"]', + showInactiveDatasetsNamesSwitch: 'button[aria-label="Show inactive datasets"]', + }; + + const testSubjectSelectors = { + datasetQualityTable: 'datasetQualityTable', + datasetQualityFiltersContainer: 'datasetQualityFiltersContainer', + datasetQualityExpandButton: 'datasetQualityExpandButton', + datasetQualityFlyout: 'datasetQualityFlyout', + datasetQualityFlyoutBody: 'datasetQualityFlyoutBody', + datasetQualityFlyoutTitle: 'datasetQualityFlyoutTitle', + datasetQualityHeaderButton: 'datasetQualityHeaderButton', + datasetQualityFlyoutFieldValue: 'datasetQualityFlyoutFieldValue', + datasetQualityFilterBarFieldSearch: 'datasetQualityFilterBarFieldSearch', + datasetQualityIntegrationsSelectable: 'datasetQualityIntegrationsSelectable', + datasetQualityIntegrationsSelectableButton: 'datasetQualityIntegrationsSelectableButton', + datasetQualityNamespacesSelectable: 'datasetQualityNamespacesSelectable', + datasetQualityNamespacesSelectableButton: 'datasetQualityNamespacesSelectableButton', + datasetQualityDatasetHealthKpi: 'datasetQualityDatasetHealthKpi', + + superDatePickerToggleQuickMenuButton: 'superDatePickerToggleQuickMenuButton', + superDatePickerApplyTimeButton: 'superDatePickerApplyTimeButton', + superDatePickerQuickMenu: 'superDatePickerQuickMenu', + euiFlyoutCloseButton: 'euiFlyoutCloseButton', + }; + + return { + selectors, + testSubjectSelectors, + texts, + + async navigateTo({ + pageState, + }: { + pageState?: datasetQualityUrlSchemaV1.UrlSchema; + } = {}) { + const queryStringParams = querystring.stringify({ + [OBSERVABILITY_DATASET_QUALITY_URL_STATE_KEY]: rison.encode( + datasetQualityUrlSchemaV1.urlSchemaRT.encode({ + ...defaultPageState, + ...pageState, + }) + ), + }); + + return PageObjects.common.navigateToUrlWithBrowserHistory( + 'observabilityLogsExplorer', + '/dataset-quality', + queryStringParams, + { + // the check sometimes is too slow for the page so it misses the point + // in time before the app rewrites the URL + ensureCurrentUrl: false, + } + ); + }, + + async waitUntilSummaryPanelLoaded() { + await testSubjects.missingOrFail(`datasetQuality-${texts.activeDatasets}-loading`); + await testSubjects.missingOrFail(`datasetQuality-${texts.estimatedData}-loading`); + }, + + async parseSummaryPanel(): Promise { + const kpiTitleAndKeys = [ + { title: texts.datasetHealthPoor, key: 'datasetHealthPoor' }, + { title: texts.datasetHealthDegraded, key: 'datasetHealthDegraded' }, + { title: texts.datasetHealthGood, key: 'datasetHealthGood' }, + { title: texts.activeDatasets, key: 'activeDatasets' }, + { title: texts.estimatedData, key: 'estimatedData' }, + ]; + + const kpiTexts = await Promise.all( + kpiTitleAndKeys.map(async ({ title, key }) => ({ + key, + value: await testSubjects.getVisibleText( + `${testSubjectSelectors.datasetQualityDatasetHealthKpi}-${title}` + ), + })) + ); + + return kpiTexts.reduce( + (acc, { key, value }) => ({ + ...acc, + [key]: value, + }), + {} as SummaryPanelKpi + ); + }, + + getDatasetsTable(): Promise { + return testSubjects.find(testSubjectSelectors.datasetQualityTable); + }, + + async refreshTable() { + const filtersContainer = await testSubjects.find( + testSubjectSelectors.datasetQualityFiltersContainer + ); + const refreshButton = await filtersContainer.findByTestSubject( + testSubjectSelectors.superDatePickerApplyTimeButton + ); + return refreshButton.click(); + }, + + async getDatasetTableRows(): Promise { + const table = await testSubjects.find(testSubjectSelectors.datasetQualityTable); + const tBody = await table.findByTagName('tbody'); + return tBody.findAllByTagName('tr'); + }, + + async parseDatasetTable() { + const table = await this.getDatasetsTable(); + return parseDatasetTable(table, [ + '0', + 'Dataset Name', + 'Namespace', + 'Size', + 'Degraded Docs', + 'Last Activity', + 'Actions', + ]); + }, + + async filterForIntegrations(integrations: string[]) { + return euiSelectable.selectOnlyOptionsWithText( + testSubjectSelectors.datasetQualityIntegrationsSelectableButton, + testSubjectSelectors.datasetQualityIntegrationsSelectable, + integrations + ); + }, + + async filterForNamespaces(namespaces: string[]) { + return euiSelectable.selectOnlyOptionsWithText( + testSubjectSelectors.datasetQualityNamespacesSelectableButton, + testSubjectSelectors.datasetQualityNamespacesSelectable, + namespaces + ); + }, + + async toggleShowInactiveDatasets() { + return find.clickByCssSelector(selectors.showInactiveDatasetsNamesSwitch); + }, + + async toggleShowFullDatasetNames() { + return find.clickByCssSelector(selectors.showFullDatasetNamesSwitch); + }, + + async openDatasetFlyout(datasetName: string) { + const cols = await this.parseDatasetTable(); + + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const testDatasetRowIndex = datasetNameColCellTexts.findIndex( + (dName) => dName === datasetName + ); + + const expanderColumn = cols['0']; + let expanderButtons: WebElementWrapper[]; + + await retry.try(async () => { + expanderButtons = await expanderColumn.getCellChildren( + `[data-test-subj=${testSubjectSelectors.datasetQualityExpandButton}]` + ); + expect(expanderButtons.length).to.be.greaterThan(0); + + await expanderButtons[testDatasetRowIndex].click(); // Click "Open" + }); + }, + + async closeFlyout() { + return testSubjects.click(testSubjectSelectors.euiFlyoutCloseButton); + }, + + async getFlyoutElementsByText(selector: string, text: string) { + const flyoutContainer: WebElementWrapper = await testSubjects.find( + testSubjectSelectors.datasetQualityFlyout + ); + + return getAllByText(flyoutContainer, selector, text); + }, + + getFlyoutLogsExplorerButton() { + return testSubjects.find(testSubjectSelectors.datasetQualityHeaderButton); + }, + + async doestTextExistInFlyout(text: string, elementSelector: string) { + const flyoutContainer: WebElementWrapper = await testSubjects.find( + testSubjectSelectors.datasetQualityFlyoutBody + ); + + const elements = await getAllByText(flyoutContainer, elementSelector, text); + return elements.length > 0; + }, + + async setDatePickerLastXUnits( + container: WebElementWrapper, + timeValue: number, + unit: TimeUnitId + ) { + await testSubjects.click(testSubjectSelectors.superDatePickerToggleQuickMenuButton); + const datePickerQuickMenu = await testSubjects.find( + testSubjectSelectors.superDatePickerQuickMenu + ); + + const timeTenseSelect = await datePickerQuickMenu.findByCssSelector( + `select[aria-label="Time tense"]` + ); + const timeValueInput = await datePickerQuickMenu.findByCssSelector( + `input[aria-label="Time value"]` + ); + const timeUnitSelect = await datePickerQuickMenu.findByCssSelector( + `select[aria-label="Time unit"]` + ); + + await timeTenseSelect.focus(); + await timeTenseSelect.type('Last'); + + await timeValueInput.focus(); + await timeValueInput.clearValue(); + await timeValueInput.type(timeValue.toString()); + + await timeUnitSelect.focus(); + await timeUnitSelect.type(unit); + + await browser.pressKeys(browser.keys.ENTER); + + // Close the date picker quick menu + return testSubjects.click(testSubjectSelectors.superDatePickerToggleQuickMenuButton); + }, + }; +} + +async function parseDatasetTable(tableWrapper: WebElementWrapper, columnNamesOrIndexes: string[]) { + const headerElementWrappers = await tableWrapper.findAllByCssSelector('thead th, thead td'); + + const result: Record< + string, + { + columnNameOrIndex: string; + sortDirection?: 'ascending' | 'descending'; + headerElement: WebElementWrapper; + cellElements: WebElementWrapper[]; + cellContentElements: WebElementWrapper[]; + getSortDirection: () => Promise<'ascending' | 'descending' | undefined>; + sort: (sortDirection: 'ascending' | 'descending') => Promise; + getCellTexts: (selector?: string) => Promise; + getCellChildren: (selector: string) => Promise; + } + > = {}; + + for (let i = 0; i < headerElementWrappers.length; i++) { + const tdSelector = `table > tbody > tr td:nth-child(${i + 1})`; + const cellContentSelector = `${tdSelector} .euiTableCellContent`; + const thWrapper = headerElementWrappers[i]; + const columnName = await thWrapper.getVisibleText(); + const columnIndex = `${i}`; + const columnNameOrIndex = columnNamesOrIndexes.includes(columnName) + ? columnName + : columnNamesOrIndexes.includes(columnIndex) + ? columnIndex + : undefined; + + if (columnNameOrIndex) { + const headerElement = thWrapper; + + const tdWrappers = await tableWrapper.findAllByCssSelector(tdSelector); + const cellContentWrappers = await tableWrapper.findAllByCssSelector(cellContentSelector); + + const getSortDirection = () => + headerElement.getAttribute('aria-sort') as Promise<'ascending' | 'descending' | undefined>; + + result[columnNameOrIndex] = { + columnNameOrIndex, + headerElement, + cellElements: tdWrappers, + cellContentElements: cellContentWrappers, + getSortDirection, + sort: async (sortDirection: 'ascending' | 'descending') => { + if ((await getSortDirection()) !== sortDirection) { + await headerElement.click(); + } + + // Sorting twice if the sort was in neutral state + if ((await getSortDirection()) !== sortDirection) { + await headerElement.click(); + } + }, + getCellTexts: async (textContainerSelector?: string) => { + const cellContentContainerWrappers = textContainerSelector + ? await tableWrapper.findAllByCssSelector(`${tdSelector} ${textContainerSelector}`) + : cellContentWrappers; + + const cellContentContainerWrapperTexts: string[] = []; + for (let j = 0; j < cellContentContainerWrappers.length; j++) { + const cellContentContainerWrapper = cellContentContainerWrappers[j]; + const cellContentContainerWrapperText = + await cellContentContainerWrapper.getVisibleText(); + cellContentContainerWrapperTexts.push(cellContentContainerWrapperText); + } + + return cellContentContainerWrapperTexts; + }, + getCellChildren: (childSelector: string) => { + return tableWrapper.findAllByCssSelector(`${cellContentSelector} ${childSelector}`); + }, + }; + } + } + + return result; +} + +/** + * Get all elements matching the given selector and text + * @example + * const container = await testSubjects.find('myContainer'); + * const elements = await getAllByText(container, 'button', 'Click me'); + * + * @param container { WebElementWrapper } The container to search within + * @param selector { string } The selector to search for (or filter elements by) + * @param text { string } The text to search for within the filtered elements + */ +export async function getAllByText(container: WebElementWrapper, selector: string, text: string) { + const elements = await container.findAllByCssSelector(selector); + const matchingElements: WebElementWrapper[] = []; + + for (let i = 0; i < elements.length; i++) { + const element = elements[i]; + const elementText = await element.getVisibleText(); + if (elementText === text) { + matchingElements.push(element); + } + } + + return matchingElements; +} + +const texts = { + noActivityText: 'No activity in the selected timeframe', + datasetHealthPoor: 'Poor', + datasetHealthDegraded: 'Degraded', + datasetHealthGood: 'Good', + activeDatasets: 'Active Datasets', + estimatedData: 'Estimated Data', +}; diff --git a/x-pack/test/functional/page_objects/index.ts b/x-pack/test/functional/page_objects/index.ts index 6fe511d8c622d..80b7b74095ab9 100644 --- a/x-pack/test/functional/page_objects/index.ts +++ b/x-pack/test/functional/page_objects/index.ts @@ -34,6 +34,7 @@ import { MaintenanceWindowsPageProvider } from './maintenance_windows_page'; import { MonitoringPageObject } from './monitoring_page'; import { NavigationalSearchPageObject } from './navigational_search'; import { ObservabilityLogsExplorerPageObject } from './observability_logs_explorer'; +import { DatasetQualityPageObject } from './dataset_quality'; import { ObservabilityPageProvider } from './observability_page'; import { RemoteClustersPageProvider } from './remote_clusters_page'; import { ReportingPageObject } from './reporting_page'; @@ -83,6 +84,7 @@ export const pageObjects = { monitoring: MonitoringPageObject, navigationalSearch: NavigationalSearchPageObject, observabilityLogsExplorer: ObservabilityLogsExplorerPageObject, + datasetQuality: DatasetQualityPageObject, observability: ObservabilityPageProvider, remoteClusters: RemoteClustersPageProvider, reporting: ReportingPageObject, diff --git a/x-pack/test/functional/page_objects/ingest_pipelines_page.ts b/x-pack/test/functional/page_objects/ingest_pipelines_page.ts index c4800b55aa77c..d7a2e32f302d2 100644 --- a/x-pack/test/functional/page_objects/ingest_pipelines_page.ts +++ b/x-pack/test/functional/page_objects/ingest_pipelines_page.ts @@ -56,7 +56,11 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP await pageObjects.header.waitUntilLoadingHasFinished(); }, - async getPipelinesList() { + async getPipelinesList(options?: { searchFor?: string }) { + if (options?.searchFor) { + await this.searchPipelineList(options.searchFor); + } + const pipelines = await testSubjects.findAll('pipelineTableRow'); const getPipelineName = async (pipeline: WebElementWrapper) => { @@ -67,6 +71,11 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP return await Promise.all(pipelines.map((pipeline) => getPipelineName(pipeline))); }, + async searchPipelineList(searchTerm: string) { + await pageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.setValue('pipelineTableSearch', searchTerm); + }, + async clickPipelineLink(index: number) { const links = await testSubjects.findAll('pipelineDetailsLink'); await links.at(index)?.click(); diff --git a/x-pack/test/functional/services/ml/data_visualizer.ts b/x-pack/test/functional/services/ml/data_visualizer.ts index cccdeaf07e4fc..560e189aaf576 100644 --- a/x-pack/test/functional/services/ml/data_visualizer.ts +++ b/x-pack/test/functional/services/ml/data_visualizer.ts @@ -11,6 +11,9 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export function MachineLearningDataVisualizerProvider({ getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); + const find = getService('find'); + const retry = getService('retry'); + const browser = getService('browser'); return { async assertDataVisualizerImportDataCardExists() { @@ -54,6 +57,10 @@ export function MachineLearningDataVisualizerProvider({ getService }: FtrProvide }')` ); }, + async navigateToESQLVisualizer() { + await testSubjects.click('mlDataVisualizerSelectESQLButton'); + await testSubjects.existOrFail('dataVisualizerIndexPage'); + }, async navigateToDataViewSelection() { await testSubjects.click('mlDataVisualizerSelectIndexButton'); @@ -64,5 +71,49 @@ export function MachineLearningDataVisualizerProvider({ getService }: FtrProvide await testSubjects.click('mlDataVisualizerUploadFileButton'); await testSubjects.existOrFail('dataVisualizerPageFileUpload'); }, + + async setESQLQuery( + query: string, + refreshOrUpdateBtnSelector: + | 'superDatePickerApplyTimeButton' + | 'mlDatePickerRefreshPageButton loaded' = 'mlDatePickerRefreshPageButton loaded' + ) { + await retry.tryForTime(5000, async () => { + await testSubjects.existOrFail(refreshOrUpdateBtnSelector); + const visibleText = await testSubjects.getVisibleText(refreshOrUpdateBtnSelector); + + expect(visibleText).to.eql('Refresh'); + + await testSubjects.existOrFail('kibanaCodeEditor'); + await find.setValueByClass('kibanaCodeEditor', query); + + const updatedVisibleText = await testSubjects.getVisibleText(refreshOrUpdateBtnSelector); + + expect(updatedVisibleText).to.eql('Update'); + + await testSubjects.click(refreshOrUpdateBtnSelector); + }); + }, + + async assertLimitSize(size: 5000 | 10000 | 100000 | 1000000 | 'none') { + await testSubjects.existOrFail(`dvESQLLimitSize-${size}`, { timeout: 1000 }); + }, + + async setLimitSize(size: 5000 | 10000 | 100000 | 1000000 | 'none') { + await retry.tryForTime(5000, async () => { + // escape popover + await browser.pressKeys(browser.keys.ESCAPE); + + // Once clicked, show list of options + await testSubjects.clickWhenNotDisabled('dvESQLLimitSizeSelect'); + for (const option of [5000, 10000, 100000, 1000000, 'none']) { + await testSubjects.existOrFail(`dvESQLLimitSize-${option}`, { timeout: 1000 }); + } + + // Once option selected, assert if limit size is updated + await testSubjects.click(`dvESQLLimitSize-${size}`); + await this.assertLimitSize(size); + }); + }, }; } diff --git a/x-pack/test/functional/services/ml/data_visualizer_index_based.ts b/x-pack/test/functional/services/ml/data_visualizer_index_based.ts index 09566d96f12b6..f8e6a7aeea844 100644 --- a/x-pack/test/functional/services/ml/data_visualizer_index_based.ts +++ b/x-pack/test/functional/services/ml/data_visualizer_index_based.ts @@ -22,7 +22,8 @@ export function MachineLearningDataVisualizerIndexBasedProvider({ type RandomSamplerOption = | 'dvRandomSamplerOptionOnAutomatic' | 'dvRandomSamplerOptionOnManual' - | 'dvRandomSamplerOptionOff'; + | 'dvRandomSamplerOptionOff' + | 'none'; return { async assertTimeRangeSelectorSectionExists() { @@ -47,7 +48,9 @@ export function MachineLearningDataVisualizerIndexBasedProvider({ await testSubjects.clickWhenNotDisabledWithoutRetry('mlDatePickerButtonUseFullData'); await testSubjects.clickWhenNotDisabledWithoutRetry('superDatePickerApplyTimeButton'); await PageObjects.header.waitUntilLoadingHasFinished(); - await this.setRandomSamplingOption(randomSamplerOption); + if (randomSamplerOption !== 'none') { + await this.setRandomSamplingOption(randomSamplerOption); + } await await this.assertTotalDocumentCount(expectedFormattedTotalDocCount); }); }, diff --git a/x-pack/test/functional/services/ml/data_visualizer_table.ts b/x-pack/test/functional/services/ml/data_visualizer_table.ts index 1ad3efd90aa51..d0d56da9091d0 100644 --- a/x-pack/test/functional/services/ml/data_visualizer_table.ts +++ b/x-pack/test/functional/services/ml/data_visualizer_table.ts @@ -388,8 +388,8 @@ export function MachineLearningDataVisualizerTableProvider( public async assertNumberFieldContents( fieldName: string, docCountFormatted: string, - topValuesCount: number, - viewableInLens: boolean, + topValuesCount?: number, + viewableInLens?: boolean, hasActionMenu = false, checkDistributionPreviewExist = true ) { @@ -402,10 +402,12 @@ export function MachineLearningDataVisualizerTableProvider( this.detailsSelector(fieldName, 'dataVisualizerNumberSummaryTable') ); - await testSubjects.existOrFail( - this.detailsSelector(fieldName, 'dataVisualizerFieldDataTopValues') - ); - await this.assertTopValuesCount(fieldName, topValuesCount); + if (topValuesCount !== undefined) { + await testSubjects.existOrFail( + this.detailsSelector(fieldName, 'dataVisualizerFieldDataTopValues') + ); + await this.assertTopValuesCount(fieldName, topValuesCount); + } if (checkDistributionPreviewExist) { await this.assertDistributionPreviewExist(fieldName); diff --git a/x-pack/test/functional/services/ml/navigation.ts b/x-pack/test/functional/services/ml/navigation.ts index e0136a7c311a2..b1f46923efc48 100644 --- a/x-pack/test/functional/services/ml/navigation.ts +++ b/x-pack/test/functional/services/ml/navigation.ts @@ -200,6 +200,10 @@ export function MachineLearningNavigationProvider({ await this.navigateToArea('~mlMainTab & ~dataVisualizer', 'mlPageDataVisualizerSelector'); }, + async navigateToDataESQLDataVisualizer() { + await this.navigateToArea('~mlMainTab & ~esqlDataVisualizer', 'dataVisualizerIndexPage'); + }, + async navigateToDataDrift() { await this.navigateToArea('~mlMainTab & ~dataDrift', 'mlPageDataDrift'); }, diff --git a/x-pack/test/functional_execution_context/tests/browser.ts b/x-pack/test/functional_execution_context/tests/browser.ts index 63f575b798b93..f7d265316decb 100644 --- a/x-pack/test/functional_execution_context/tests/browser.ts +++ b/x-pack/test/functional_execution_context/tests/browser.ts @@ -12,8 +12,7 @@ import { assertLogContains, isExecutionContextLog, readLogFile } from '../test_u export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'home', 'timePicker']); - // FLAKY: https://github.com/elastic/kibana/issues/112103 - describe.skip('Browser apps', () => { + describe('Browser apps', () => { let logs: Ecs[]; const retry = getService('retry'); diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts index 9c1c5395f667a..a8949fc849812 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts @@ -262,7 +262,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); }); - describe('Modal', () => { + // FLAKY: https://github.com/elastic/kibana/issues/178690 + describe.skip('Modal', () => { const createdCases = new Map(); const openModal = async () => { diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group2/configure.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group2/configure.ts index 7f016ee919a3f..29eb8c991952a 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group2/configure.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group2/configure.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { CustomFieldTypes } from '@kbn/cases-plugin/common/types/domain'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; @@ -57,6 +58,27 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); describe('Custom fields', function () { + before(async () => { + await cases.api.createConfigWithCustomFields({ + customFields: [ + { + key: 'o11y_custom_field', + label: 'My o11y field', + type: CustomFieldTypes.TOGGLE, + required: false, + }, + ], + owner: 'observability', + }); + }); + + it('existing configurations do not interfere', async () => { + // A configuration created in o11y should not be visible in stack + expect(await testSubjects.getVisibleText('empty-custom-fields')).to.be( + 'You do not have any fields yet' + ); + }); + it('adds a custom field', async () => { await testSubjects.existOrFail('custom-fields-form-group'); await common.clickAndValidate('add-custom-field', 'custom-field-flyout'); diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts index c4913ce3e41d2..14b6dc11c6437 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts @@ -6,7 +6,7 @@ */ import { Response } from 'supertest'; import { MessageRole, type Message } from '@kbn/observability-ai-assistant-plugin/common'; -import { omit } from 'lodash'; +import { omit, pick } from 'lodash'; import { PassThrough } from 'stream'; import expect from '@kbn/expect'; import { @@ -17,7 +17,8 @@ import { StreamingChatResponseEventType, } from '@kbn/observability-ai-assistant-plugin/common/conversation_complete'; import type OpenAI from 'openai'; -import { createLlmProxy, LlmProxy } from '../../common/create_llm_proxy'; +import { ObservabilityAIAssistantScreenContextRequest } from '@kbn/observability-ai-assistant-plugin/common/types'; +import { createLlmProxy, LlmProxy, LlmResponseSimulator } from '../../common/create_llm_proxy'; import { createOpenAiChunk } from '../../common/create_openai_chunk'; import { FtrProviderContext } from '../../common/ftr_provider_context'; @@ -48,6 +49,66 @@ export default function ApiTest({ getService }: FtrProviderContext) { let proxy: LlmProxy; let connectorId: string; + async function getEvents( + params: { screenContexts?: ObservabilityAIAssistantScreenContextRequest[] }, + cb: (conversationSimulator: LlmResponseSimulator) => Promise + ) { + const titleInterceptor = proxy.intercept( + 'title', + (body) => + (JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming).functions?.find( + (fn) => fn.name === 'title_conversation' + ) !== undefined + ); + + const conversationInterceptor = proxy.intercept( + 'conversation', + (body) => + (JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming).functions?.find( + (fn) => fn.name === 'title_conversation' + ) === undefined + ); + + const responsePromise = new Promise((resolve, reject) => { + supertest + .post(COMPLETE_API_URL) + .set('kbn-xsrf', 'foo') + .send({ + messages, + connectorId, + persist: true, + screenContexts: params.screenContexts || [], + }) + .end((err, response) => { + if (err) { + return reject(err); + } + return resolve(response); + }); + }); + + const [conversationSimulator, titleSimulator] = await Promise.all([ + conversationInterceptor.waitForIntercept(), + titleInterceptor.waitForIntercept(), + ]); + + await titleSimulator.status(200); + await titleSimulator.next('My generated title'); + await titleSimulator.complete(); + + await conversationSimulator.status(200); + await cb(conversationSimulator); + + const response = await responsePromise; + + return String(response.body) + .split('\n') + .map((line) => line.trim()) + .filter(Boolean) + .map((line) => JSON.parse(line) as StreamingChatResponseEvent) + .slice(2); // ignore context request/response, we're testing this elsewhere + } + before(async () => { proxy = await createLlmProxy(); @@ -185,80 +246,30 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); describe('when creating a new conversation', async () => { - let lines: StreamingChatResponseEvent[]; - before(async () => { - const titleInterceptor = proxy.intercept( - 'title', - (body) => - ( - JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming - ).functions?.find((fn) => fn.name === 'title_conversation') !== undefined - ); + let events: StreamingChatResponseEvent[]; - const conversationInterceptor = proxy.intercept( - 'conversation', - (body) => - ( - JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming - ).functions?.find((fn) => fn.name === 'title_conversation') === undefined - ); - - const responsePromise = new Promise((resolve, reject) => { - supertest - .post(COMPLETE_API_URL) - .set('kbn-xsrf', 'foo') - .send({ - messages, - connectorId, - persist: true, - screenContexts: [], - }) - .end((err, response) => { - if (err) { - return reject(err); - } - return resolve(response); - }); + before(async () => { + events = await getEvents({}, async (conversationSimulator) => { + await conversationSimulator.next('Hello'); + await conversationSimulator.next(' again'); + await conversationSimulator.complete(); }); - - const [conversationSimulator, titleSimulator] = await Promise.all([ - conversationInterceptor.waitForIntercept(), - titleInterceptor.waitForIntercept(), - ]); - - await titleSimulator.status(200); - await titleSimulator.next('My generated title'); - await titleSimulator.complete(); - - await conversationSimulator.status(200); - await conversationSimulator.next('Hello'); - await conversationSimulator.next(' again'); - await conversationSimulator.complete(); - - const response = await responsePromise; - - lines = String(response.body) - .split('\n') - .map((line) => line.trim()) - .filter(Boolean) - .map((line) => JSON.parse(line) as StreamingChatResponseEvent) - .slice(2); // ignore context request/response, we're testing this elsewhere }); it('creates a new conversation', async () => { - expect(omit(lines[0], 'id')).to.eql({ + expect(omit(events[0], 'id')).to.eql({ type: StreamingChatResponseEventType.ChatCompletionChunk, message: { content: 'Hello', }, }); - expect(omit(lines[1], 'id')).to.eql({ + expect(omit(events[1], 'id')).to.eql({ type: StreamingChatResponseEventType.ChatCompletionChunk, message: { content: ' again', }, }); - expect(omit(lines[2], 'id', 'message.@timestamp')).to.eql({ + expect(omit(events[2], 'id', 'message.@timestamp')).to.eql({ type: StreamingChatResponseEventType.MessageAdd, message: { message: { @@ -272,7 +283,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }, }, }); - expect(omit(lines[3], 'conversation.id', 'conversation.last_updated')).to.eql({ + expect(omit(events[3], 'conversation.id', 'conversation.last_updated')).to.eql({ type: StreamingChatResponseEventType.ConversationCreate, conversation: { title: 'My generated title', @@ -281,7 +292,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); after(async () => { - const createdConversationId = lines.filter( + const createdConversationId = events.filter( (line): line is ConversationCreateEvent => line.type === StreamingChatResponseEventType.ConversationCreate )[0]?.conversation.id; @@ -299,6 +310,79 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); + describe('after executing a screen context action', async () => { + let events: StreamingChatResponseEvent[]; + + before(async () => { + events = await getEvents( + { + screenContexts: [ + { + actions: [ + { + name: 'my_action', + description: 'My action', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + }, + }, + ], + }, + ], + }, + async (conversationSimulator) => { + await conversationSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }); + await conversationSimulator.complete(); + } + ); + }); + + it('closes the stream without persisting the conversation', () => { + expect( + pick( + events[events.length - 1], + 'message.message.content', + 'message.message.function_call', + 'message.message.role' + ) + ).to.eql({ + message: { + message: { + content: '', + function_call: { + name: 'my_action', + arguments: JSON.stringify({ foo: 'bar' }), + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }, + }); + }); + + it('does not store the conversation', async () => { + expect( + events.filter((event) => event.type === StreamingChatResponseEventType.ConversationCreate) + .length + ).to.eql(0); + + const conversations = await observabilityAIAssistantAPIClient + .writeUser({ + endpoint: 'POST /internal/observability_ai_assistant/conversations', + }) + .expect(200); + + expect(conversations.body.conversations.length).to.be(0); + }); + }); + // todo it.skip('updates an existing conversation', async () => {}); diff --git a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts index 5c33cd1891d24..1d4553d1f36cd 100644 --- a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts +++ b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts @@ -212,10 +212,11 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte arguments: JSON.stringify({ queries: [], categories: [] }), }); - expect(pick(contextResponse, 'name', 'content')).to.eql({ - name: 'context', - content: JSON.stringify({ screen_description: '', learnings: [] }), - }); + expect(contextResponse.name).to.eql('context'); + + const parsedContext = JSON.parse(contextResponse.content || ''); + + expect(parsedContext.screen_description).to.contain('The user is looking at'); expect(pick(assistantResponse, 'role', 'content')).to.eql({ role: 'assistant', @@ -275,10 +276,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte arguments: JSON.stringify({ queries: [], categories: [] }), }); - expect(pick(contextResponse, 'name', 'content')).to.eql({ - name: 'context', - content: JSON.stringify({ screen_description: '', learnings: [] }), - }); + expect(contextResponse.name).to.eql('context'); expect(pick(assistantResponse, 'role', 'content')).to.eql({ role: 'assistant', diff --git a/x-pack/test/plugin_api_integration/config.ts b/x-pack/test/plugin_api_integration/config.ts index eafb2b3f20ea5..a3f424f9e90e2 100644 --- a/x-pack/test/plugin_api_integration/config.ts +++ b/x-pack/test/plugin_api_integration/config.ts @@ -36,9 +36,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '--xpack.task_manager.monitored_aggregated_stats_refresh_rate=5000', '--xpack.task_manager.ephemeral_tasks.enabled=false', '--xpack.task_manager.ephemeral_tasks.request_capacity=100', - '--xpack.task_manager.requeue_invalid_tasks.enabled=true', - '--xpack.task_manager.requeue_invalid_tasks.delay=1000', - '--xpack.task_manager.requeue_invalid_tasks.max_attempts=2', ...findTestPluginPaths(path.resolve(__dirname, 'plugins')), ], }, diff --git a/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/plugin.ts b/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/plugin.ts index 52c747d0ec786..0f14b6f10fef0 100644 --- a/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/plugin.ts +++ b/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/plugin.ts @@ -219,52 +219,6 @@ export class SampleTaskManagerFixturePlugin }, }), }, - sampleRecurringTaskWithInvalidIndirectParam: { - title: 'Sample Recurring Task that has invalid indirect params', - description: 'A sample task that returns invalid params in loadIndirectParams all the time', - maxAttempts: 1, - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { baz: 'foo' } } }; // invalid - }, - async run() { - return { state: {}, schedule: { interval: '1s' }, hasError: true }; - }, - }), - indirectParamsSchema: schema.object({ - param: schema.string(), - }), - }, - sampleOneTimeTaskWithInvalidIndirectParam: { - title: 'Sample One Time Task that has invalid indirect params', - description: - 'A sample task that returns invalid params in loadIndirectParams all the time and throws error in the run method', - maxAttempts: 1, - createTaskRunner: () => ({ - async loadIndirectParams() { - return { data: { indirectParams: { baz: 'foo' } } }; // invalid - }, - async run() { - throwRetryableError(new Error('Retry'), true); - }, - }), - indirectParamsSchema: schema.object({ - param: schema.string(), - }), - }, - sampleTaskWithParamsSchema: { - title: 'Sample Task That has paramsSchema', - description: 'A sample task that has paramsSchema to validate params', - maxAttempts: 1, - paramsSchema: schema.object({ - param: schema.string(), - }), - createTaskRunner: () => ({ - async run() { - throwRetryableError(new Error('Retry'), true); - }, - }), - }, taskToDisable: { title: 'Task used for testing it being disabled', description: '', diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts index e5d5e8fbd6fb7..c826ef8910ca3 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts @@ -33,9 +33,6 @@ export default function ({ getService }: FtrProviderContext) { 'timedTask', 'timedTaskWithLimitedConcurrency', 'timedTaskWithSingleConcurrency', - 'sampleRecurringTaskWithInvalidIndirectParam', - 'sampleOneTimeTaskWithInvalidIndirectParam', - 'sampleTaskWithParamsSchema', 'taskToDisable', ]; diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/index.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/index.ts index 1480d5f371a77..14b720bc68a55 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/index.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/index.ts @@ -17,7 +17,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./task_management_scheduled_at')); loadTestFile(require.resolve('./task_management_removed_types')); loadTestFile(require.resolve('./check_registered_task_types')); - loadTestFile(require.resolve('./skip')); loadTestFile(require.resolve('./migrations')); }); diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts deleted file mode 100644 index 6c5f4239436a4..0000000000000 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts +++ /dev/null @@ -1,144 +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 { SerializedConcreteTaskInstance, TaskStatus } from '@kbn/task-manager-plugin/server/task'; -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const log = getService('log'); - const retry = getService('retry'); - - describe('Skip invalid tasks', () => { - function currentTask(task: string): Promise { - return supertest - .get(`/api/sample_tasks/task/${task}`) - .send({ task }) - .expect((response) => { - expect(response.status).to.eql(200); - expect(typeof JSON.parse(response.text).id).to.eql(`string`); - }) - .then((response) => response.body); - } - - after(async () => { - // clean up after last test - return await supertest.delete('/api/sample_tasks').set('kbn-xsrf', 'xxx').expect(200); - }); - - it('Skips recurring tasks that has invalid indirect param', async () => { - const createdTask = await supertest - .post('/api/sample_tasks/schedule') - .set('kbn-xsrf', 'xxx') - .send({ - task: { - taskType: 'sampleRecurringTaskWithInvalidIndirectParam', - params: {}, - }, - }) - .expect(200) - .then((response: { body: SerializedConcreteTaskInstance }) => { - log.debug(`Task Scheduled: ${response.body.id}`); - return response.body; - }); - - let lastRunAt: string; - await retry.try(async () => { - const task = await currentTask(createdTask.id); - lastRunAt = task.runAt; - // skips 2 times - expect(task.numSkippedRuns).to.eql(2); - }); - - let newLastRun: string; - await retry.try(async () => { - const task = await currentTask(createdTask.id); - expect(task.attempts).to.eql(0); - expect(task.retryAt).to.eql(null); - // skip attempts remains as it is - expect(task.numSkippedRuns).to.eql(2); - // keeps rescheduling after skips - expect(new Date(task.runAt).getTime()).to.greaterThan(new Date(lastRunAt).getTime()); - newLastRun = task.runAt; - }); - - // should keep running the rule after 2 skips and 1 successful run - await retry.try(async () => { - const task = await currentTask(createdTask.id); - expect(task.attempts).to.eql(0); - expect(task.retryAt).to.eql(null); - // skip attempts remains as it is - expect(task.numSkippedRuns).to.eql(2); - // keeps rescheduling after skips - expect(new Date(task.runAt).getTime()).to.greaterThan(new Date(newLastRun).getTime()); - }); - }); - - it('Skips non-recurring tasks that have invalid indirect params and sets status as "dead_letter" after 1 reschedule attempt', async () => { - const createdTask = await supertest - .post('/api/sample_tasks/schedule') - .set('kbn-xsrf', 'xxx') - .send({ - task: { - taskType: 'sampleOneTimeTaskWithInvalidIndirectParam', - params: {}, - }, - }) - .expect(200) - .then((response: { body: SerializedConcreteTaskInstance }) => { - log.debug(`Task Scheduled: ${response.body.id}`); - return response.body; - }); - - await retry.try(async () => { - const task = await currentTask(createdTask.id); - // skips 2 times - expect(task.numSkippedRuns).to.eql(2); - }); - - await retry.try(async () => { - const task = await currentTask(createdTask.id); - // reschedules 1 more time and set the status as 'dead_letter' - expect(task.attempts).to.eql(1); - expect(task.status).to.eql(TaskStatus.DeadLetter); - expect(task.numSkippedRuns).to.eql(2); - }); - }); - - it('Skips the tasks with invalid params and sets status as "dead_letter" after 1 reschedule attempt', async () => { - const createdTask = await supertest - .post('/api/sample_tasks/schedule') - .set('kbn-xsrf', 'xxx') - .send({ - task: { - taskType: 'sampleTaskWithParamsSchema', - params: { foo: 'bar' }, // invalid params - }, - }) - .expect(200) - .then((response: { body: SerializedConcreteTaskInstance }) => { - log.debug(`Task Scheduled: ${response.body.id}`); - return response.body; - }); - - await retry.try(async () => { - const task = await currentTask(createdTask.id); - // skips 2 times - expect(task.numSkippedRuns).to.eql(2); - }); - - await retry.try(async () => { - const task = await currentTask(createdTask.id); - // reschedules 1 more time and set the status as 'dead_letter' as the task throws an error - expect(task.attempts).to.eql(1); - expect(task.status).to.eql(TaskStatus.DeadLetter); - expect(task.numSkippedRuns).to.eql(2); - }); - }); - }); -} diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap b/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap index bc4b903dee43e..54ad6fe9f9847 100644 --- a/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap +++ b/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap @@ -8,6 +8,9 @@ Object { "event.kind": Array [ "signal", ], + "kibana.alert.consecutive_matches": Array [ + 1, + ], "kibana.alert.duration.us": Array [ 0, ], @@ -97,6 +100,9 @@ Object { "event.kind": Array [ "signal", ], + "kibana.alert.consecutive_matches": Array [ + 0, + ], "kibana.alert.evaluation.threshold": Array [ 30, ], diff --git a/x-pack/test/scalability/config.ts b/x-pack/test/scalability/config.ts index 865be503c7665..ebfa91d4ce1e2 100644 --- a/x-pack/test/scalability/config.ts +++ b/x-pack/test/scalability/config.ts @@ -42,7 +42,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { } const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8')); - const configPath = journey.configPath ?? 'x-pack/performance/journeys/login.ts'; + const configPath = journey.configPath ?? 'x-pack/performance/journeys_e2e/login.ts'; const baseConfig = (await readConfigFile(path.resolve(REPO_ROOT, configPath))).getAll(); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts index 1cd8ae736afbc..0359ad270654a 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts @@ -25,7 +25,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'cases-add-custom-field', screenshotDirectories, 1400, - 600 + 700 ); await testSubjects.setValue('custom-field-label-input', 'my-field'); await testSubjects.click('custom-field-flyout-save'); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/security_cases/custom_fields.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/security_cases/custom_fields.ts index 412f102353cc0..6320f7a09d958 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/security_cases/custom_fields.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/security_cases/custom_fields.ts @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'cases-add-custom-field', screenshotDirectories, 1400, - 600 + 700 ); await testSubjects.setValue('custom-field-label-input', 'my-field'); await testSubjects.click('custom-field-flyout-save'); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts index ef41d15fcd6e3..10392e3c45f88 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/es_query_rule.ts @@ -101,10 +101,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // Edit the rule that was created as part of startup await testSubjects.setValue('ruleSearchField', esQueryRuleName); await browser.pressKeys(browser.keys.ENTER); - const actionPanel = await testSubjects.find('collapsedItemActions'); - await actionPanel.click(); - const editRuleMenu = await testSubjects.find('editRule'); - await editRuleMenu.click(); + const rulesList = await testSubjects.find('rulesList'); + const alertRule = await rulesList.findByCssSelector(`[title="${esQueryRuleName}"]`); + await alertRule.click(); + const editRule = await testSubjects.find('openEditRuleFlyoutButton'); + await editRule.click(); await pageObjects.header.waitUntilLoadingHasFinished(); await commonScreenshots.takeScreenshot( 'es-query-rule-conditions', diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_cases/custom_fields.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_cases/custom_fields.ts index 1c82037274222..774bc6fd5c06a 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_cases/custom_fields.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_cases/custom_fields.ts @@ -23,7 +23,7 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { 'cases-custom-fields-add', screenshotDirectories, 1400, - 600 + 700 ); await testSubjects.setValue('custom-field-label-input', 'my-field'); await testSubjects.click('custom-field-flyout-save'); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/xmatters_connector.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/xmatters_connector.ts index 709d9bdfae76e..61210b5f4b779 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/xmatters_connector.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/xmatters_connector.ts @@ -26,11 +26,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await actions.common.openNewConnectorForm('xmatters'); await testSubjects.setValue('nameInput', 'xMatters test connector'); await commonScreenshots.takeScreenshot('xmatters-connector-basic', screenshotDirectories); - const authentication = await testSubjects.find('button-group'); - // a radio button consists of a div tag that contains an input, a div, and a label - // we can't click the input directly, need to click the label - const label = await authentication.findByCssSelector('label[title="URL Authentication"]'); - await label.click(); + const auth = await testSubjects.find('URL Authentication'); + await auth.click(); await commonScreenshots.takeScreenshot('xmatters-connector-url', screenshotDirectories); await testSubjects.setValue('secrets.secretsUrl', 'https://example.com'); await testSubjects.click('create-connector-flyout-save-test-btn'); diff --git a/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts b/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts index e5485423a9308..0b6b70a6e174b 100644 --- a/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts +++ b/x-pack/test/screenshot_creation/apps/transform_docs/transform_alerts.ts @@ -61,6 +61,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.click('.server-log-alerting-ActionTypeSelectOption'); await transform.alerting.openAddRuleVariable(); await commonScreenshots.takeScreenshot('transform-alert-actions', screenshotDirectories); + await transform.testExecution.logTestStep('set summary action frequency and take screenshot'); + const actionFrequency = await testSubjects.find('summaryOrPerRuleSelect'); + await actionFrequency.click(); + const actionSummary = await testSubjects.find('actionNotifyWhen-option-summary'); + await actionSummary.click(); + await commonScreenshots.takeScreenshot( + 'transform-alert-summary-actions', + screenshotDirectories + ); await transform.alerting.clickCancelSaveRuleButton(); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/eql.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/eql.ts index d702295bf1f2d..4181abce0c5e2 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/eql.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/eql.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { v4 as uuidv4 } from 'uuid'; import expect from '@kbn/expect'; import { ALERT_REASON, @@ -35,6 +36,7 @@ import { getOpenAlerts, getPreviewAlerts, previewRule, + dataGeneratorFactory, } from '../../../../utils'; import { createRule, @@ -65,11 +67,18 @@ export default ({ getService }: FtrProviderContext) => { const auditPath = dataPathBuilder.getPath('auditbeat/hosts'); describe('@ess @serverless EQL type rules', () => { + const { indexListOfDocuments } = dataGeneratorFactory({ + es, + index: 'ecs_compliant', + log, + }); + before(async () => { await esArchiver.load(auditPath); await esArchiver.load( 'x-pack/test/functional/es_archives/security_solution/timestamp_override_6' ); + await esArchiver.load('x-pack/test/functional/es_archives/security_solution/ecs_compliant'); }); after(async () => { @@ -77,6 +86,7 @@ export default ({ getService }: FtrProviderContext) => { await esArchiver.unload( 'x-pack/test/functional/es_archives/security_solution/timestamp_override_6' ); + await esArchiver.unload('x-pack/test/functional/es_archives/security_solution/ecs_compliant'); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); }); @@ -532,6 +542,85 @@ export default ({ getService }: FtrProviderContext) => { }); }); + it('ensures common fields are present in generated shell alert', async () => { + const id = uuidv4(); + const doc1 = { + id, + agent: { + name: 'agent-1', + type: 'auditbeat', + version: '8.13.0', + }, + client: { + ip: ['127.0.0.1', '127.0.0.2'], + }, + 'host.name': 'host-0', + }; + + const doc2 = { + id, + agent: { + name: 'agent-0', + type: 'auditbeat', + version: '8.13.0', + }, + client: { + ip: ['127.0.0.1', '127.0.0.3'], + }, + 'host.name': 'host-0', + }; + + await indexListOfDocuments([ + { '@timestamp': '2020-10-28T06:15:00.000Z', ...doc1 }, + { '@timestamp': '2020-10-28T06:16:00.000Z', ...doc2 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: `sequence [any where id == "${id}" ] [any where true]`, + from: 'now-35m', + interval: '30m', + }; + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T06:30:00.000Z'), + }); + + const previewAlerts = await getPreviewAlerts({ es, previewId, sort: ['agent.name'] }); + + expect(previewAlerts).to.have.length(3); + + const buildingBlockAlerts = previewAlerts.filter( + (alert) => alert._source?.['kibana.alert.building_block_type'] + ); + const shellAlert = previewAlerts.filter( + (alert) => !alert._source?.['kibana.alert.building_block_type'] + )[0]; + + // check building block alert retains all fields from source documents + // alerts sorted by agent.name, so we assert it against agent-0 document + expect(buildingBlockAlerts[0]._source).eql({ + ...buildingBlockAlerts[0]._source, + ...doc2, + }); + + expect(buildingBlockAlerts[1]._source).eql({ + ...buildingBlockAlerts[1]._source, + ...doc1, + }); + + // shell alert should have only common properties from building block alerts + expect(shellAlert._source?.agent).eql({ + type: 'auditbeat', + version: '8.13.0', + // agent name is absent as this field is not common + }); + // only common values in array are present + expect(shellAlert._source?.client).eql({ ip: ['127.0.0.1'] }); + expect(shellAlert._source?.['host.name']).be('host-0'); + }); + it('generates up to max_alerts with an EQL rule', async () => { const maxAlerts = 200; const rule: EqlRuleCreateProps = { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/user_roles/trial_license_complete_tier/read_privileges.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/user_roles/trial_license_complete_tier/read_privileges.ts index dd906aebdd180..d13f4e2e4dd0a 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/user_roles/trial_license_complete_tier/read_privileges.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/user_roles/trial_license_complete_tier/read_privileges.ts @@ -28,38 +28,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: true, cluster: { monitor_ml: true, - manage_ccr: true, manage_index_templates: true, - monitor_watcher: true, monitor_transform: true, - read_ilm: true, manage_api_key: true, manage_security: true, manage_own_api_key: true, - manage_saml: true, all: true, - manage_ilm: true, - manage_ingest_pipelines: true, - read_ccr: true, - manage_rollup: true, monitor: true, - manage_watcher: true, manage: true, manage_transform: true, - manage_token: true, manage_ml: true, manage_pipeline: true, - monitor_rollup: true, - transport_client: true, - create_snapshot: true, }, index: { '.alerts-security.alerts-default': { all: true, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: true, index: true, monitor: true, delete: true, @@ -68,8 +53,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, maintenance: true, write: true, }, @@ -92,38 +75,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: false, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: false, read: true, create_index: false, - read_cross_cluster: false, index: true, monitor: false, delete: true, @@ -132,8 +100,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: false, create: true, - manage_follow_index: false, - manage_leader_index: false, maintenance: true, write: true, }, @@ -157,38 +123,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: false, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: false, read: true, create_index: false, - read_cross_cluster: false, index: true, monitor: false, delete: true, @@ -197,8 +148,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: false, create: true, - manage_follow_index: false, - manage_leader_index: false, maintenance: true, write: true, }, @@ -222,38 +171,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: false, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: false, read: true, create_index: false, - read_cross_cluster: false, index: true, monitor: false, delete: true, @@ -262,8 +196,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: false, create: true, - manage_follow_index: false, - manage_leader_index: false, maintenance: false, write: true, }, @@ -287,38 +219,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: false, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: false, read: true, create_index: false, - read_cross_cluster: false, index: true, monitor: false, delete: true, @@ -327,8 +244,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: false, - manage_leader_index: false, maintenance: true, write: true, }, @@ -352,38 +267,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: false, - manage_ccr: false, manage_index_templates: false, - monitor_watcher: false, monitor_transform: false, - read_ilm: false, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: false, - manage_ingest_pipelines: false, - read_ccr: false, - manage_rollup: false, monitor: false, - manage_watcher: false, manage: false, manage_transform: false, - manage_token: false, manage_ml: false, manage_pipeline: false, - monitor_rollup: false, - transport_client: false, - create_snapshot: false, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: false, index: true, monitor: true, delete: true, @@ -392,8 +292,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, maintenance: true, write: true, }, @@ -417,38 +315,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: true, - manage_ccr: false, manage_index_templates: true, - monitor_watcher: true, monitor_transform: true, - read_ilm: true, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: true, - manage_ingest_pipelines: true, - read_ccr: false, - manage_rollup: true, monitor: true, - manage_watcher: true, manage: true, manage_transform: true, - manage_token: false, manage_ml: true, manage_pipeline: true, - monitor_rollup: true, - transport_client: true, - create_snapshot: true, }, index: { '.alerts-security.alerts-default': { all: true, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: true, index: true, monitor: true, delete: true, @@ -457,8 +340,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, maintenance: true, write: true, }, @@ -482,38 +363,23 @@ export default ({ getService }: FtrProviderContext) => { has_all_requested: false, cluster: { monitor_ml: true, - manage_ccr: false, manage_index_templates: true, - monitor_watcher: true, monitor_transform: true, - read_ilm: true, manage_api_key: false, manage_security: false, manage_own_api_key: false, - manage_saml: false, all: false, - manage_ilm: true, - manage_ingest_pipelines: true, - read_ccr: false, - manage_rollup: true, monitor: true, - manage_watcher: true, manage: true, manage_transform: true, - manage_token: false, manage_ml: true, manage_pipeline: true, - monitor_rollup: true, - transport_client: true, - create_snapshot: true, }, index: { '.alerts-security.alerts-default': { all: false, - manage_ilm: true, read: true, create_index: true, - read_cross_cluster: false, index: true, monitor: true, delete: true, @@ -522,8 +388,6 @@ export default ({ getService }: FtrProviderContext) => { create_doc: true, view_index_metadata: true, create: true, - manage_follow_index: true, - manage_leader_index: true, maintenance: true, write: true, }, diff --git a/x-pack/test/security_solution_api_integration/test_suites/genai/invoke_ai/trial_license_complete_tier/basic.ts b/x-pack/test/security_solution_api_integration/test_suites/genai/invoke_ai/trial_license_complete_tier/basic.ts index bcac95217c280..7c83853d5d40a 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/genai/invoke_ai/trial_license_complete_tier/basic.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/genai/invoke_ai/trial_license_complete_tier/basic.ts @@ -15,28 +15,12 @@ import { ObjectRemover } from '../utils/object_remover'; import { createConnector } from '../utils/create_connector'; const mockRequest = { - params: { - subActionParams: { - messages: [ - { role: 'user', content: '\\n\\n\\n\\nWhat is my name?' }, - { - role: 'assistant', - content: - "I'm sorry, but I don't have the information about your name. You can tell me your name if you'd like, and we can continue our conversation from there.", - }, - { role: 'user', content: '\\n\\nMy name is Andrew' }, - { - role: 'assistant', - content: "Hello, Andrew! It's nice to meet you. What would you like to talk about today?", - }, - { role: 'user', content: '\\n\\nDo you know my name?' }, - ], - }, - subAction: 'invokeAI', - }, + message: 'Do you know my name?', + subAction: 'invokeAI', isEnabledKnowledgeBase: false, isEnabledRAGAlerts: false, llmType: 'bedrock', + replacements: [], }; export default ({ getService }: FtrProviderContext) => { diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 51f2365e199be..ed8fe3793d60b 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -233,6 +233,21 @@ Note that the command will create the folder if it does not exist. Task [cypress/support/es_archiver.ts](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts) provides helpers such as `esArchiverLoad` and `esArchiverUnload` by means of `es_archiver`'s CLI. +Archives used only for Cypress tests purposes are stored in `x-pack/test/security_solution_cypress/es_archives` and are used as follow on the tests. + +```typescript +cy.task('esArchiverLoad', { archiveName: 'overview' }); +cy.task('esArchiverUnload', { archiveName: 'overview'}); + +``` + +You can also use archives stored in `kibana/x-pack/test/functional/es_archives`. In order to do sow uste it on the tests as follow. + +```typescript +cy.task('esArchiverLoad', { archiveName: 'security_solution/alias' }, type: 'ftr'); +cy.task('esArchiverUnload', { archiveName: 'security_solution/alias', type:'ftr'}); +``` + ## Serverless Note that we use tags in order to select which tests we want to execute, if you want a test to be executed on serverless you need to add @serverless tag to it. diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts index 12173369c896b..022f1ba4fd72a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts @@ -45,7 +45,7 @@ describe('Alert user assignment - ESS & Serverless', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts index 169a2824167db..9b0768e1d798a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts @@ -24,7 +24,7 @@ describe('Alert user assignment - ESS', { tags: ['@ess'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts index c4ed1aa385eb7..ccd5b402ed7ea 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts @@ -39,7 +39,7 @@ describe('Alert user assignment - Basic License', { tags: ['@ess'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts index 47f7b2c2dd570..b8a70ce7b13e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts @@ -43,8 +43,8 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator'); - cy.task('esArchiverUnload', 'suspicious_source_event'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator' }); + cy.task('esArchiverUnload', { archiveName: 'suspicious_source_event' }); }); beforeEach(() => { @@ -165,7 +165,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator2'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator2' }); }); it('Displays matched fields from both indicator match rules and investigation time enrichments on Threat Intel tab', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts index eed6577a73029..911168362c946 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts @@ -44,7 +44,7 @@ describe.skip('Changing alert status', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Opening alerts', { tags: ['@ess', '@serverless'] }, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts index 99d4e8d314cc8..bd65420da35c2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts @@ -32,8 +32,8 @@ describe('Alert tagging', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts index ceea266456acb..34fa454e7a641 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts @@ -50,7 +50,7 @@ describe.skip( const ADDITIONAL_ENTRY = 'host.hostname'; beforeEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); login(); deleteAlertsAndRules(); @@ -62,7 +62,7 @@ describe.skip( }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); }); it('Should be able to create and close single Endpoint exception from overflow menu', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts index 520ab19e9e5e8..788907e461526 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts @@ -47,7 +47,7 @@ describe.skip( const ADDITIONAL_ENTRY = 'host.hostname'; beforeEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); cy.task('esArchiverLoad', { archiveName: 'endpoint' }); login(); createRule(getEndpointRule()).then((rule) => visitRuleDetailsPage(rule.body.id)); @@ -55,11 +55,11 @@ describe.skip( waitForAlertsToPopulate(); }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); deleteAlertsAndRules(); }); afterEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); }); it('Should create a Rule exception item from alert actions overflow menu and auto populate the conditions using alert Highlighted fields', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts index ffba394c407d4..6806ad1c776c1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts @@ -32,7 +32,7 @@ describe('Close matching Alerts ', { tags: ['@ess', '@serverless', '@skipInServe const ITEM_NAME = 'Sample Exception Item'; beforeEach(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'exceptions' }); @@ -50,7 +50,7 @@ describe('Close matching Alerts ', { tags: ['@ess', '@serverless', '@skipInServe waitForAlertsToPopulate(); }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); // TODO: https://github.com/elastic/kibana/issues/161539 diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts index b7bb1317ef2b7..0bde78a14be55 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts @@ -100,7 +100,7 @@ describe.skip('Exceptions flyout', { tags: ['@ess', '@serverless', '@skipInServe }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); it('Validates empty entry values correctly', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts index 3a5b5c6cd98c9..d9afe7d5a25ce 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts @@ -53,7 +53,7 @@ describe('Exceptions match_any', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); it('Creates exception item', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts index f8fb728dbf79a..4f7f1a2d68652 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts @@ -45,7 +45,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); const exceptionName = 'My item name'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts index 34aee1bf8f0ea..c1679c43f85f7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts @@ -54,7 +54,7 @@ describe.skip('Use Value list in exception entry', { tags: ['@ess', '@serverless }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index eef28b77e7ac5..66065e039b916 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -61,7 +61,7 @@ describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts index b1115b5833bd0..bca260aebaed3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts @@ -72,7 +72,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { @@ -263,7 +263,7 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'exceptions_2'); + cy.task('esArchiverUnload', { archiveName: 'exceptions_2' }); }); it('Cannot create an item to add to rule but not shared list as rule has no lists attached', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts index 18c75ce25cbfa..b986fc59deb23 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts @@ -56,7 +56,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { @@ -74,7 +74,7 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'exceptions_2'); + cy.task('esArchiverUnload', { archiveName: 'exceptions_2' }); }); it('Creates an exception item and close all matching alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts index 4db690e282f4a..65cd15dbce8fe 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts @@ -48,7 +48,7 @@ describe.skip('CTI Link Panel', { tags: ['@ess', '@serverless', '@skipInServerle }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator' }); }); it('renders disabled dashboard module as expected when there are no events in the selected time period', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts index f02ec20ffd685..a2261d129d452 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts @@ -148,7 +148,7 @@ describe('EQL rules', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); it('Creates and enables a new EQL rule with a sequence', function () { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/sourcerer/sourcerer_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/sourcerer/sourcerer_timeline.cy.ts index e6f26a744ad9e..f720d11689d1a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/sourcerer/sourcerer_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/sourcerer/sourcerer_timeline.cy.ts @@ -58,7 +58,8 @@ describe('Timeline scope', { tags: ['@ess', '@serverless', '@brokenInServerless' isNotSourcererOption(`${DEFAULT_ALERTS_INDEX}-default`); }); - describe('Modified badge', () => { + // FLAKY: https://github.com/elastic/kibana/issues/173854 + describe.skip('Modified badge', () => { it('Selecting new data view does not add a modified badge', () => { openTimelineUsingToggle(); cy.get(SOURCERER.badgeModified).should(`not.exist`); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts index 56c0264d00ee8..4919fe8557986 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts @@ -70,7 +70,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); describe('legacy risk score', () => { @@ -101,8 +101,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts_no_data'); - cy.task('esArchiverUnload', 'risk_users_no_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_no_data' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users_no_data' }); }); it('shows no data detected prompt for host risk score module', () => { @@ -126,8 +126,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts_legacy_data'); - cy.task('esArchiverUnload', 'risk_users_legacy_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_legacy_data' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users_legacy_data' }); }); it('shows enable host risk button', () => { @@ -150,7 +150,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders donut chart', () => { @@ -235,7 +235,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); it('renders donut chart', () => { @@ -338,7 +338,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new_no_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_no_data' }); }); it('shows no data detected prompt for host and user risk scores', () => { @@ -353,7 +353,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders donut chart', () => { @@ -446,7 +446,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders donut chart', () => { @@ -546,7 +546,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); it('should enable a job and renders the table with pagination', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts index 0da6597450126..410239309aeb1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts @@ -54,8 +54,8 @@ describe('Upgrade risk scores', { tags: ['@ess', '@serverless'] }, () => { afterEach(() => { deleteRiskScore({ riskScoreEntity: RiskScoreEntity.host, spaceId }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.user, spaceId }); - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); it('shows upgrade panel', () => { @@ -77,8 +77,8 @@ describe('Upgrade risk scores', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.host, spaceId }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.user, spaceId }); deleteRiskEngineConfiguration(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts index 5a6fdc2f05532..3bd09ee00000f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts @@ -36,13 +36,13 @@ const ORIGINAL_HOST_RISK_LEVEL = 'Original host risk level'; describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); - cy.task('esArchiverUnload', 'risk_scores_new_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_updated' }); cy.task('esArchiverLoad', { archiveName: 'risk_users' }); }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); describe('Custom query rule', () => { @@ -59,8 +59,8 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_hosts_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_updated' }); }); it('Should has enrichment fields from legacy risk', function () { @@ -78,7 +78,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { cy.get(ENRICHED_DATA_ROW).contains(ORIGINAL_HOST_RISK_LEVEL).should('not.exist'); closeAlertFlyout(); - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); cy.task('esArchiverLoad', { archiveName: 'risk_hosts_updated' }); expandFirstAlert(); cy.get(ENRICHED_DATA_ROW).contains('Critical'); @@ -99,8 +99,8 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); - cy.task('esArchiverUnload', 'risk_scores_new_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_updated' }); }); it('Should has enrichment fields from legacy risk', function () { @@ -118,7 +118,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { cy.get(ENRICHED_DATA_ROW).contains(ORIGINAL_HOST_RISK_LEVEL).should('not.exist'); closeAlertFlyout(); - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); cy.task('esArchiverLoad', { archiveName: 'risk_scores_new_updated' }); expandFirstAlert(); cy.get(ENRICHED_DATA_ROW).contains('Low'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index 24d13322f7d9d..f23480e52d0d1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -56,7 +56,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'all_users'); + cy.task('esArchiverUnload', { archiveName: 'all_users' }); }); it('renders page as expected', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts index 90eb208f7d710..426fa29b7ac26 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts @@ -74,8 +74,8 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_scores_new_complete_data'); - cy.task('esArchiverUnload', 'user_managed_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_complete_data' }); + cy.task('esArchiverUnload', { archiveName: 'user_managed_data' }); deleteAlertsAndRules(); // esArchiverUnload doesn't work properly when using with `useCreate` and `docsOnly` flags deleteCriticality({ idField: 'host.name', idValue: SIEM_KIBANA_HOST_NAME }); deleteCriticality({ idField: 'user.name', idValue: USER_NAME }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts index 86303a84455a9..d4fbb0dafb9f4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts @@ -8,7 +8,6 @@ import { login } from '../../../tasks/login'; import { visitHostDetailsPage } from '../../../tasks/navigation'; -import { waitForTableToLoad } from '../../../tasks/common'; import { TABLE_CELL, TABLE_ROWS } from '../../../screens/alerts_details'; import { deleteRiskEngineConfiguration } from '../../../tasks/api_calls/risk_engine'; import { openRiskInformationFlyout, mockRiskEngineEnabled } from '../../../tasks/entity_analytics'; @@ -18,26 +17,20 @@ import { navigateToHostRiskDetailTab } from '../../../tasks/host_risk'; import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { - // FLAKY: https://github.com/elastic/kibana/issues/169033 - // FLAKY: https://github.com/elastic/kibana/issues/169034 - describe.skip('with legacy risk score', () => { - before(() => { - cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); - }); - + describe('with legacy risk score', () => { beforeEach(() => { + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); login(); deleteRiskEngineConfiguration(); }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders risk tab', () => { visitHostDetailsPage('siem-kibana'); navigateToHostRiskDetailTab(); - waitForTableToLoad(); cy.get('[data-test-subj="topRiskScoreContributors"]') .find(TABLE_ROWS) @@ -49,7 +42,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { it('shows risk information overlay when button is clicked', () => { visitHostDetailsPage('siem-kibana'); navigateToHostRiskDetailTab(); - waitForTableToLoad(); openRiskInformationFlyout(); @@ -57,8 +49,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/177964 - describe.skip('with new risk score', () => { + describe('with new risk score', () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'risk_scores_new_complete_data' }); cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); @@ -70,7 +61,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new_complete_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_complete_data' }); deleteAlertsAndRules(); // esArchiverUnload doesn't work properly when using with `useCreate` and `docsOnly` flags deleteRiskEngineConfiguration(); }); @@ -78,7 +69,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { it('renders risk tab', () => { visitHostDetailsPage('Host-fwarau82er'); navigateToHostRiskDetailTab(); - waitForTableToLoad(); cy.get(ALERTS_COUNT).should('have.text', '1 alert'); cy.get(ALERT_GRID_CELL).contains('Endpoint Security'); @@ -87,7 +77,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { it('shows risk information overlay when button is clicked', () => { visitHostDetailsPage('siem-kibana'); navigateToHostRiskDetailTab(); - waitForTableToLoad(); openRiskInformationFlyout(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts index 88a5b55efe9eb..6986580d689b6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts @@ -23,8 +23,7 @@ import { kqlSearch } from '../../../tasks/security_header'; import { mockRiskEngineEnabled } from '../../../tasks/entity_analytics'; describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { - // FLAKY: https://github.com/elastic/kibana/issues/174859 - describe.skip('with legacy risk score', () => { + describe('with legacy risk score', () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); @@ -36,15 +35,11 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { // this fix wait until we fave host in all host table, and then we go to risk tab cy.contains('siem-kibana'); - // Sometimes it doesn't navigate to the risk tab an causes flakiness - // Curiously the "renders the table" test doesn't fail - // https://github.com/elastic/kibana/issues/174860 - // https://github.com/elastic/kibana/issues/174859 navigateToHostRiskDetailTab(); }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders the table', () => { @@ -55,8 +50,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { cy.get(HOST_BY_RISK_TABLE_CELL).eq(7).should('have.text', 'Low'); }); - // Flaky - it.skip('filters the table', () => { + it('filters the table', () => { openRiskTableFilterAndSelectTheCriticalOption(); cy.get(HOST_BY_RISK_TABLE_CELL).eq(3).should('not.have.text', 'siem-kibana'); @@ -64,8 +58,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { removeCriticalFilterAndCloseRiskTableFilter(); }); - // Flaky - it.skip('should be able to change items count per page', () => { + it('should be able to change items count per page', () => { selectFiveItemsPerPageOption(); cy.get(HOST_BY_RISK_TABLE_HOSTNAME_CELL).should('have.length', 5); @@ -93,7 +86,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders the table', () => { @@ -104,8 +97,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { cy.get(HOST_BY_RISK_TABLE_CELL).eq(7).should('have.text', 'Critical'); }); - // Flaky - it.skip('filters the table', () => { + it('filters the table', () => { openRiskTableFilterAndSelectTheCriticalOption(); cy.get(HOST_BY_RISK_TABLE_CELL).eq(3).should('not.have.text', 'siem-kibana'); @@ -113,8 +105,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { removeCriticalFilterAndCloseRiskTableFilter(); }); - // Flaky - it.skip('should be able to change items count per page', () => { + it('should be able to change items count per page', () => { selectFiveItemsPerPageOption(); cy.get(HOST_BY_RISK_TABLE_HOSTNAME_CELL).should('have.length', 5); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts index dfbb017efe0d2..5c9288bf4bb4f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts @@ -24,7 +24,7 @@ describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('it renders risk column', () => { @@ -47,7 +47,7 @@ describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('it renders risk column', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts index f61cf9943f5ee..bb44394c460ff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts @@ -53,7 +53,7 @@ describe('Events Viewer', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Fields rendering', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts index 3deabd6afa169..fbe1f5fe8c33a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts @@ -40,8 +40,8 @@ describe.skip( }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); INSPECT_BUTTONS_IN_SECURITY.forEach(({ pageName, url, lensVisualizations, tables }) => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts index f926007482ad3..7d6ab6abdb8be 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts @@ -36,7 +36,7 @@ describe('Hover actions', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts index 297f47ddaafa4..aafe4cf469e76 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts @@ -44,7 +44,7 @@ describe('Overflow items', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); it('Shows more items in the popover', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts index b0b1a11bc69e0..28c7d49c6d1e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts @@ -27,7 +27,7 @@ describe('Overview Page', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'overview'); + cy.task('esArchiverUnload', { archiveName: 'overview' }); }); it('Host stats render with correct values', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts index a590cfc9383b1..37da9553b02a0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts @@ -35,7 +35,7 @@ describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'host_uncommon_processes'); + cy.task('esArchiverUnload', { archiveName: 'host_uncommon_processes' }); }); it('pagination updates results and page number', () => { @@ -109,7 +109,7 @@ describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'all_users'); + cy.task('esArchiverUnload', { archiveName: 'all_users' }); }); it(`reset all Hosts pagination when sorting column`, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts index f80453e809832..83321290917cd 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts @@ -33,8 +33,8 @@ describe('Users stats and tables', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'users'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'users' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); describe('Users page tabs', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts index b8e31186a1366..b6c9e8f7b443d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts @@ -31,7 +31,7 @@ describe.skip('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, ( }); after(() => { - cy.task('esArchiverUnload', 'process_ancestry'); + cy.task('esArchiverUnload', { archiveName: 'process_ancestry' }); }); it('should have session viewer button visible & open session viewer on click', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts index 0f24575d8a2a2..99c56ca845bd7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts @@ -79,7 +79,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'unmapped_fields'); + cy.task('esArchiverUnload', { archiveName: 'unmapped_fields' }); }); it.skip('should display user and system defined highlighted fields', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts index 718feeca31533..1cede221c3632 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts @@ -23,7 +23,7 @@ describe('Alerts generated by building block rules', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts index 8a49b4eb02065..f173e78988638 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts @@ -46,7 +46,7 @@ describe('Changing alert status', { tags: ['@ess', '@brokenInServerless'] }, () }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Opening alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts index c8da8308b76a4..a225d08780166 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts @@ -26,7 +26,7 @@ describe('Ransomware Detection Alerts', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'ransomware_detection'); + cy.task('esArchiverUnload', { archiveName: 'ransomware_detection' }); }); describe('Ransomware in Alerts Page', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts index 099f2e751458d..abc00b14c466a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts @@ -26,7 +26,7 @@ describe('Ransomware Prevention Alerts', { tags: ['@ess', '@serverless'] }, () = }); after(() => { - cy.task('esArchiverUnload', 'ransomware_prevention'); + cy.task('esArchiverUnload', { archiveName: 'ransomware_prevention' }); }); describe('Ransomware in Alerts Page', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts index 0518326e4ca32..2ef234a3a5f89 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts @@ -29,7 +29,7 @@ describe('Bulk Investigate in Timeline', { tags: ['@ess', '@serverless'] }, () = }); after(() => { - cy.task('esArchiverUnload', 'bulk_process'); + cy.task('esArchiverUnload', { archiveName: 'bulk_process' }); }); context('Alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts index 4c64f23167578..d1d1bdb84bc23 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts @@ -35,7 +35,7 @@ describe('Timeline Pagination', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'timeline'); + cy.task('esArchiverUnload', { archiveName: 'timeline' }); }); it(`should paginate records correctly`, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts index 083b30b12ae51..63ae27669c320 100644 --- a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts +++ b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts @@ -54,10 +54,34 @@ export const esArchiver = ( baseDir: '../es_archives', }); + const ftrEsArchiverInstance = new EsArchiver({ + log, + client, + kbnClient, + baseDir: '../../functional/es_archives/security_solution', + }); + on('task', { - esArchiverLoad: async ({ archiveName, ...options }) => - esArchiverInstance.load(archiveName, options), - esArchiverUnload: async (archiveName) => esArchiverInstance.unload(archiveName), + esArchiverLoad: async ({ archiveName, type = 'cypress', ...options }) => { + if (type === 'cypress') { + return esArchiverInstance.load(archiveName, options); + } else if (type === 'ftr') { + return ftrEsArchiverInstance.load(archiveName, options); + } else { + throw new Error( + `Unable to load the specified archive: ${JSON.stringify({ archiveName, type, options })}` + ); + } + }, + esArchiverUnload: async ({ archiveName, type = 'cypress' }) => { + if (type === 'cypress') { + return esArchiverInstance.unload(archiveName); + } else if (type === 'ftr') { + return ftrEsArchiverInstance.unload(archiveName); + } else { + throw new Error('It is not possible to unload the archive.'); + } + }, }); return esArchiverInstance; diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/host_risk.ts b/x-pack/test/security_solution_cypress/cypress/tasks/host_risk.ts index ebf95a1d6aeca..cda0889724666 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/host_risk.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/host_risk.ts @@ -15,9 +15,22 @@ import { RISK_DETAILS_NAV, } from '../screens/hosts/host_risk'; -export const navigateToHostRiskDetailTab = () => { +export const navigateToHostRiskDetailTab = (attempts = 3) => { + // this was causing flakiness + // on very rare occasions the tab is not navigated to, so we now retry + if (attempts === 0) { + throw new Error('navigateToHostRiskDetailTab failed after 3 attempts'); + } + cy.get(LOADING_SPINNER).should('not.exist'); cy.get(RISK_DETAILS_NAV).click(); cy.get(LOADING_SPINNER).should('not.exist'); + cy.get(RISK_DETAILS_NAV).then(($tab) => { + if ($tab.hasClass('euiTab-isSelected')) { + return; + } else if (attempts > 0) { + navigateToHostRiskDetailTab(attempts - 1); + } + }); }; export const openRiskTableFilterAndSelectTheCriticalOption = () => { diff --git a/x-pack/test_serverless/api_integration/test_suites/common/alerting/alert_documents.ts b/x-pack/test_serverless/api_integration/test_suites/common/alerting/alert_documents.ts index e8ee1743dc94e..2297e65d4824a 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/alerting/alert_documents.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/alerting/alert_documents.ts @@ -36,6 +36,7 @@ import { SPACE_IDS, TAGS, VERSION, + ALERT_CONSECUTIVE_MATCHES, } from '@kbn/rule-data-utils'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { createEsQueryRule } from './helpers/alerting_api_helper'; @@ -113,6 +114,7 @@ export default function ({ getService }: FtrProviderContext) { expect(typeof hits1[ALERT_UUID]).to.be('string'); expect(typeof hits1[ALERT_URL]).to.be('string'); expect(typeof hits1[VERSION]).to.be('string'); + expect(typeof hits1[ALERT_CONSECUTIVE_MATCHES]).to.be('number'); // remove fields we aren't going to compare directly const fields = [ @@ -129,6 +131,7 @@ export default function ({ getService }: FtrProviderContext) { 'kibana.alert.uuid', 'kibana.alert.url', 'kibana.version', + 'kibana.alert.consecutive_matches', ]; for (const field of fields) { @@ -240,6 +243,7 @@ export default function ({ getService }: FtrProviderContext) { expect(hits2[EVENT_ACTION]).to.be('active'); expect(hits1[ALERT_DURATION]).to.not.be.lessThan(0); expect(hits2[ALERT_DURATION]).not.to.be(0); + expect(hits2[ALERT_CONSECUTIVE_MATCHES]).to.be.greaterThan(hits1[ALERT_CONSECUTIVE_MATCHES]); // remove fields we know will be different const fields = [ @@ -249,6 +253,7 @@ export default function ({ getService }: FtrProviderContext) { 'kibana.alert.flapping_history', 'kibana.alert.reason', 'kibana.alert.rule.execution.uuid', + 'kibana.alert.consecutive_matches', ]; for (const field of fields) { diff --git a/x-pack/test_serverless/api_integration/test_suites/common/alerting/summary_actions.ts b/x-pack/test_serverless/api_integration/test_suites/common/alerting/summary_actions.ts index fcda3e0c62cb8..e104a7d255204 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/alerting/summary_actions.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/alerting/summary_actions.ts @@ -60,6 +60,7 @@ export default function ({ getService }: FtrProviderContext) { 'kibana.alert.uuid', 'kibana.alert.url', 'kibana.version', + 'kibana.alert.consecutive_matches', ]; afterEach(async () => { diff --git a/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts b/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts index fe0ff5343bfb7..0bf90bee5ddde 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts @@ -20,7 +20,7 @@ export async function expectDefaultFleetServer({ getService }: FtrProviderContex const { body, status } = await supertest.get( `/api/fleet/fleet_server_hosts/${defaultFleetServerHostId}` ); - if (status === 200 && body.item.host_urls.includes(defaultFleetServerHostUrl)) { + if (status === 200 && body.item.host_urls.length > 0) { return true; } else { throw new Error(`Expected default Fleet Server id ${defaultFleetServerHostId} to exist`); @@ -36,7 +36,7 @@ export async function expectDefaultElasticsearchOutput({ getService }: FtrProvid const { body, status } = await supertest.get( `/api/fleet/outputs/${defaultElasticsearchOutputId}` ); - if (status === 200 && body.item.hosts.includes(defaultElasticsearchOutputHostUrl)) { + if (status === 200 && body.item.hosts.length > 0) { return true; } else { throw new Error( diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts index 82fd6dd057ae5..1ec1cdc31b7c3 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts @@ -103,6 +103,7 @@ export default function ({ getService }: FtrProviderContext) { 'hasAliases', 'hasMappings', '_kbnMeta', + 'allowAutoCreate', 'composedOf', 'ignoreMissingComponentTemplates', ].sort(); @@ -124,6 +125,7 @@ export default function ({ getService }: FtrProviderContext) { 'indexPatterns', 'template', '_kbnMeta', + 'allowAutoCreate', 'composedOf', 'ignoreMissingComponentTemplates', ].sort(); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/response_headers.ts b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/response_headers.ts index 2db41e48db098..75413907fbd30 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/response_headers.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/response_headers.ts @@ -6,6 +6,7 @@ */ import expect from 'expect'; +import cspParser from 'content-security-policy-parser'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { @@ -13,7 +14,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); describe('security/response_headers', function () { - const defaultCSP = `script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'; frame-ancestors 'self'`; + const baseCSP = `script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'; frame-ancestors 'self'`; const defaultCOOP = 'same-origin'; const defaultPermissionsPolicy = 'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()'; @@ -29,7 +30,7 @@ export default function ({ getService }: FtrProviderContext) { .expect(200); expect(header).toBeDefined(); - expect(header['content-security-policy']).toEqual(defaultCSP); + expectMatchesCSP(baseCSP, header['content-security-policy'] ?? ''); expect(header['cross-origin-opener-policy']).toEqual(defaultCOOP); expect(header['permissions-policy']).toEqual(defaultPermissionsPolicy); expect(header['strict-transport-security']).toEqual(defaultStrictTransportSecurity); @@ -45,7 +46,7 @@ export default function ({ getService }: FtrProviderContext) { .expect(200); expect(header).toBeDefined(); - expect(header['content-security-policy']).toEqual(defaultCSP); + expectMatchesCSP(baseCSP, header['content-security-policy'] ?? ''); expect(header['cross-origin-opener-policy']).toEqual(defaultCOOP); expect(header['permissions-policy']).toEqual(defaultPermissionsPolicy); expect(header['strict-transport-security']).toEqual(defaultStrictTransportSecurity); @@ -55,3 +56,19 @@ export default function ({ getService }: FtrProviderContext) { }); }); } + +/** + * + * @param expectedCSP The minimum set of directives and values we expect to see + * @param actualCSP The actual set of directives and values + */ +function expectMatchesCSP(expectedCSP: string, actualCSP: string) { + const expectedCSPMap = cspParser(expectedCSP); + const actualCSPMap = cspParser(actualCSP); + for (const [expectedDirective, expectedValues] of expectedCSPMap) { + expect(actualCSPMap.has(expectedDirective)).toBe(true); + for (const expectedValue of expectedValues) { + expect(actualCSPMap.get(expectedDirective)).toContain(expectedValue); + } + } +} diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts b/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts index 913c0667895c3..07f1c8d6445c6 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts @@ -16,7 +16,30 @@ export default function (ctx: FtrProviderContext) { const svlCommonApi = ctx.getService('svlCommonApi'); const supertest = ctx.getService('supertest'); - describe('fleet', function () { + // FLAKY: https://github.com/elastic/kibana/issues/178780 + describe.skip('fleet', function () { + let defaultFleetServerHostUrl: string = ''; + let defaultEsOutputUrl: string = ''; + before(async () => { + const { body, status } = await supertest + .get('/api/fleet/fleet_server_hosts') + .set(svlCommonApi.getInternalRequestHeader()); + + expect(status).toBe(200); + + defaultFleetServerHostUrl = + body.items.find((item: any) => item.is_default)?.host_urls?.[0] ?? ''; + expect(defaultFleetServerHostUrl).not.toBe(''); + }); + before(async () => { + const { body, status } = await supertest + .get('/api/fleet/outputs') + .set(svlCommonApi.getInternalRequestHeader()); + + expect(status).toBe(200); + defaultEsOutputUrl = body.items.find((item: any) => item.is_default)?.hosts?.[0] ?? ''; + expect(defaultEsOutputUrl).not.toBe(''); + }); it('rejects request to create a new fleet server hosts if host url is different from default', async () => { await expectDefaultFleetServer(ctx); @@ -32,7 +55,7 @@ export default function (ctx: FtrProviderContext) { expect(body).toEqual({ statusCode: 403, error: 'Forbidden', - message: 'Fleet server host must have default URL in serverless: https://localhost:8220', + message: `Fleet server host must have default URL in serverless: ${defaultFleetServerHostUrl}`, }); expect(status).toBe(403); }); @@ -45,13 +68,13 @@ export default function (ctx: FtrProviderContext) { .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }), }); expect(status).toBe(200); @@ -68,13 +91,11 @@ export default function (ctx: FtrProviderContext) { type: 'elasticsearch', hosts: ['https://localhost:9201'], }); - // in a non-serverless environment this would succeed with a 200 expect(body).toEqual({ statusCode: 400, error: 'Bad Request', - message: - 'Elasticsearch output host must have default URL in serverless: https://localhost:9200', + message: `Elasticsearch output host must have default URL in serverless: ${defaultEsOutputUrl}`, }); expect(status).toBe(400); }); @@ -88,13 +109,13 @@ export default function (ctx: FtrProviderContext) { .send({ name: 'Test output', type: 'elasticsearch', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test output', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }), }); expect(status).toBe(200); diff --git a/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts b/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts index 913c0667895c3..524c05b831ac4 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts @@ -16,7 +16,30 @@ export default function (ctx: FtrProviderContext) { const svlCommonApi = ctx.getService('svlCommonApi'); const supertest = ctx.getService('supertest'); - describe('fleet', function () { + // FLAKY: https://github.com/elastic/kibana/issues/178779 + describe.skip('fleet', function () { + let defaultFleetServerHostUrl: string = ''; + let defaultEsOutputUrl: string = ''; + before(async () => { + const { body, status } = await supertest + .get('/api/fleet/fleet_server_hosts') + .set(svlCommonApi.getInternalRequestHeader()); + + expect(status).toBe(200); + + defaultFleetServerHostUrl = + body.items.find((item: any) => item.is_default)?.host_urls?.[0] ?? ''; + expect(defaultFleetServerHostUrl).not.toBe(''); + }); + before(async () => { + const { body, status } = await supertest + .get('/api/fleet/outputs') + .set(svlCommonApi.getInternalRequestHeader()); + + expect(status).toBe(200); + defaultEsOutputUrl = body.items.find((item: any) => item.is_default)?.hosts?.[0] ?? ''; + expect(defaultEsOutputUrl).not.toBe(''); + }); it('rejects request to create a new fleet server hosts if host url is different from default', async () => { await expectDefaultFleetServer(ctx); @@ -32,7 +55,7 @@ export default function (ctx: FtrProviderContext) { expect(body).toEqual({ statusCode: 403, error: 'Forbidden', - message: 'Fleet server host must have default URL in serverless: https://localhost:8220', + message: `Fleet server host must have default URL in serverless: ${defaultFleetServerHostUrl}`, }); expect(status).toBe(403); }); @@ -45,13 +68,13 @@ export default function (ctx: FtrProviderContext) { .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }), }); expect(status).toBe(200); @@ -68,13 +91,11 @@ export default function (ctx: FtrProviderContext) { type: 'elasticsearch', hosts: ['https://localhost:9201'], }); - // in a non-serverless environment this would succeed with a 200 expect(body).toEqual({ statusCode: 400, error: 'Bad Request', - message: - 'Elasticsearch output host must have default URL in serverless: https://localhost:9200', + message: `Elasticsearch output host must have default URL in serverless: ${defaultEsOutputUrl}`, }); expect(status).toBe(400); }); @@ -88,13 +109,13 @@ export default function (ctx: FtrProviderContext) { .send({ name: 'Test output', type: 'elasticsearch', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test output', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }), }); expect(status).toBe(200); diff --git a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts index d453101e55e2d..32349e5919847 100644 --- a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts +++ b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts @@ -23,6 +23,7 @@ const deploymentAgnosticFunctionalServices = _.pick(functionalServices, [ 'canvasElement', 'cases', 'comboBox', + 'selectable', 'dashboardAddPanel', 'dashboardBadgeActions', 'dashboardCustomizePanel', diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover.ts index a5274115cfbaf..ffc9b434ebe32 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover.ts @@ -31,7 +31,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { defaultIndex: 'logstash-*', }; - describe('discover test', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('discover test', function describeIndexTests() { before(async function () { log.debug('load kibana index with default index pattern'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover_histogram.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover_histogram.ts index 88de8194db3e0..a02365ed056e8 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover_histogram.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group1/_discover_histogram.ts @@ -32,7 +32,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const queryBar = getService('queryBar'); - describe('discover histogram', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('discover histogram', function describeIndexTests() { before(async () => { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await esArchiver.load('test/functional/fixtures/es_archiver/long_window_logstash'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts b/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts index 1a82e4b73b2be..9c654b518d6f2 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts @@ -341,7 +341,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await titleElem.getAttribute('value')).to.equal(dataView); }; - describe('Search source Alert', () => { + // Failing: See https://github.com/elastic/kibana/issues/176882 + describe.skip('Search source Alert', () => { before(async () => { await security.testUser.setRoles(['discover_alert']); await PageObjects.svlCommonPage.loginAsAdmin(); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_index_pattern_filter.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_index_pattern_filter.ts index 9b8a51feac10f..029c3a302efd6 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_index_pattern_filter.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_index_pattern_filter.ts @@ -16,6 +16,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const es = getService('es'); describe('index pattern filter', function describeIndexTests() { + // https://github.com/elastic/kibana/issues/178733 + this.tags('failsOnMKI'); before(async function () { await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.uiSettings.replace({}); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts index 5657b1aebfee5..ccc0ae5e8a173 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts @@ -16,8 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['settings', 'common']); const testSubjects = getService('testSubjects'); - // Failing: See https://github.com/elastic/kibana/issues/173558 - describe.skip('runtime fields', function () { + describe('runtime fields', function () { before(async function () { await browser.setWindowSize(1200, 800); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); @@ -64,6 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('flyoutTitle'); }); await PageObjects.settings.setFieldType('Long'); + await new Promise((r) => setTimeout(r, 500)); await PageObjects.settings.setFieldScriptWithoutToggle('emit(6);'); await PageObjects.settings.toggleRow('formatRow'); await PageObjects.settings.setFieldFormat('bytes'); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts b/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts index 5a7c13c6a4b56..3b0c9b01907da 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts @@ -59,7 +59,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('Displays the test pipeline in the list of pipelines', async () => { log.debug('Checking that the test pipeline is in the pipelines list.'); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelines = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelines = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); expect(pipelines).to.contain(TEST_PIPELINE_NAME); }); @@ -83,7 +85,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.ingestPipelines.closePipelineDetailsFlyout(); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); const newPipelineExists = Boolean( pipelinesList.find((pipelineName) => pipelineName === PIPELINE.name) ); @@ -96,7 +100,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.ingestPipelines.closePipelineDetailsFlyout(); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); const newPipelineExists = Boolean( pipelinesList.find((pipelineName) => pipelineName === PIPELINE.name) ); diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/index.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/index.ts new file mode 100644 index 0000000000000..68b59f317407d --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/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 * from './logs_data'; diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts new file mode 100644 index 0000000000000..0d635bcb2b0e4 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts @@ -0,0 +1,162 @@ +/* + * 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 { generateLongId, generateShortId, log, timerange } from '@kbn/apm-synthtrace-client'; +import moment from 'moment'; + +enum LogLevel { + INFO = 'info', + DEBUG = 'debug', + ERROR = 'error', +} +interface MessageWithLevel { + message: string; + level: LogLevel; +} +interface Cluster { + clusterId: string; + clusterName: string; +} + +export function getLogsForDataset({ + dataset, + to, + count = 1, + isMalformed = false, + namespace = defaultNamespace, +}: { + dataset: string; + to: moment.MomentInput; + count?: number; + isMalformed?: boolean; + namespace?: string; +}) { + return timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(count) + .fill(0) + .flatMap((_, index) => [ + createLogRecord( + timestamp, + dataset, + MESSAGE_LOG_LEVELS[index % MESSAGE_LOG_LEVELS.length], + SERVICE_NAMES[index % SERVICE_NAMES.length], + CLUSTER[index % CLUSTER.length], + CLOUD_PROVIDERS[index % CLOUD_PROVIDERS.length], + CLOUD_REGION[index % CLOUD_REGION.length], + isMalformed, + namespace + ), + ]); + }); +} + +export function getInitialTestLogs({ to, count = 1 }: { to: string; count?: number }) { + return timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(count) + .fill(0) + .flatMap((_, index) => [ + createLogRecord( + timestamp, + datasetNames[0], + MESSAGE_LOG_LEVELS[0], + SERVICE_NAMES[0], + CLUSTER[0], + CLOUD_PROVIDERS[0], + CLOUD_REGION[0], + false + ), + createLogRecord( + timestamp, + datasetNames[1], + MESSAGE_LOG_LEVELS[1], + SERVICE_NAMES[1], + CLUSTER[1], + CLOUD_PROVIDERS[1], + CLOUD_REGION[1], + false + ), + createLogRecord( + timestamp, + datasetNames[2], + MESSAGE_LOG_LEVELS[2], + SERVICE_NAMES[2], + CLUSTER[2], + CLOUD_PROVIDERS[2], + CLOUD_REGION[2], + false + ), + ]); + }); +} + +export function createLogRecord( + timestamp: number, + dataset: string, + msg: MessageWithLevel, + serviceName: string, + cluster: Cluster, + cloudProvider: string, + cloudRegion: string, + isMalformed = false, + namespace: string = defaultNamespace +): ReturnType { + return log + .create() + .dataset(dataset) + .message(msg.message) + .logLevel(isMalformed ? MORE_THAN_1024_CHARS : msg.level) + .service(serviceName) + .namespace(namespace) + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'synth-agent', + 'orchestrator.cluster.name': cluster.clusterName, + 'orchestrator.cluster.id': cluster.clusterId, + 'orchestrator.resource.id': generateShortId(), + 'cloud.provider': cloudProvider, + 'cloud.region': cloudRegion, + 'cloud.availability_zone': isMalformed + ? MORE_THAN_1024_CHARS // "ignore_above": 1024 in mapping + : `${cloudRegion}a`, + 'cloud.project.id': generateShortId(), + 'cloud.instance.id': generateShortId(), + 'log.file.path': `/logs/${generateLongId()}/error.txt`, + }) + .timestamp(timestamp); +} + +export const datasetNames = ['synth.1', 'synth.2', 'synth.3']; +export const defaultNamespace = 'default'; + +// Logs Data logic +const MESSAGE_LOG_LEVELS: MessageWithLevel[] = [ + { message: 'A simple log', level: LogLevel.INFO }, + { + message: 'Another log message', + level: LogLevel.DEBUG, + }, + { message: 'Error with certificate: "ca_trusted_fingerprint"', level: LogLevel.ERROR }, +]; +const CLOUD_PROVIDERS = ['gcp', 'aws', 'azure']; +const CLOUD_REGION = ['eu-central-1', 'us-east-1', 'area-51']; + +const CLUSTER = [ + { clusterId: generateShortId(), clusterName: 'synth-cluster-1' }, + { clusterId: generateShortId(), clusterName: 'synth-cluster-2' }, + { clusterId: generateShortId(), clusterName: 'synth-cluster-3' }, +]; + +const SERVICE_NAMES = [`synth-service-0`, `synth-service-1`, `synth-service-2`]; + +const MORE_THAN_1024_CHARS = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?'; diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts new file mode 100644 index 0000000000000..068e0b04088a1 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { datasetNames, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + 'svlCommonNavigation', + 'svlCommonPage', + ]); + const testSubjects = getService('testSubjects'); + const synthtrace = getService('svlLogsSynthtraceClient'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality flyout', () => { + before(async () => { + await PageObjects.svlCommonPage.loginWithRole('admin'); + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('opens the flyout for the right dataset', async () => { + const testDatasetName = datasetNames[1]; + + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + await testSubjects.existOrFail( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFlyoutTitle + ); + }); + + // Fails on Serverless. TODO: Need to update the UI as well as the test + it.skip('shows the correct last activity', async () => { + const testDatasetName = datasetNames[0]; + + // Update last activity for the dataset + await PageObjects.datasetQuality.closeFlyout(); + await synthtrace.index( + getLogsForDataset({ to: new Date().toISOString(), count: 1, dataset: testDatasetName }) + ); + await PageObjects.datasetQuality.refreshTable(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const testDatasetRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === testDatasetName + ); + + const lastActivityText = (await cols['Last Activity'].getCellTexts())[testDatasetRowIndex]; + + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + const lastActivityTextExists = await PageObjects.datasetQuality.doestTextExistInFlyout( + lastActivityText, + `[data-test-subj=${PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFlyoutFieldValue}]` + ); + expect(lastActivityTextExists).to.eql(true); + }); + + it('shows the integration details', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + const apacheIntegrationId = 'apache'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); + + const integrationNameElements = await PageObjects.datasetQuality.getFlyoutElementsByText( + '[data-test-subj=datasetQualityFlyoutFieldValue]', + apacheIntegrationId + ); + + expect(integrationNameElements.length).to.eql(1); + }); + + it('goes to log explorer page when open button is clicked', async () => { + const testDatasetName = datasetNames[2]; + await PageObjects.datasetQuality.openDatasetFlyout(testDatasetName); + + await (await PageObjects.datasetQuality.getFlyoutLogsExplorerButton()).click(); + + // Confirm dataset selector text in observability logs explorer + const datasetSelectorText = + await PageObjects.observabilityLogsExplorer.getDataSourceSelectorButtonText(); + expect(datasetSelectorText).to.eql(testDatasetName); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts new file mode 100644 index 0000000000000..c4de6141d6d10 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts @@ -0,0 +1,136 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { datasetNames, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'datasetQuality', + 'svlCommonNavigation', + 'svlCommonPage', + ]); + const synthtrace = getService('svlLogsSynthtraceClient'); + const browser = getService('browser'); + const retry = getService('retry'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality summary', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.svlCommonPage.loginWithRole('admin'); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + }); + + it('shows poor, degraded and good count', async () => { + const summary = await PageObjects.datasetQuality.parseSummaryPanel(); + expect(summary).to.eql({ + datasetHealthPoor: '0', + datasetHealthDegraded: '0', + datasetHealthGood: '3', + activeDatasets: '0 of 3', + estimatedData: '0 Bytes', + }); + }); + + it('updates the poor count when degraded docs are ingested', async () => { + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[2], + isMalformed: true, + }) + ); + + await browser.refresh(); + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const summary = await PageObjects.datasetQuality.parseSummaryPanel(); + const { estimatedData, ...restOfSummary } = summary; + expect(restOfSummary).to.eql({ + datasetHealthPoor: '1', + datasetHealthDegraded: '0', + datasetHealthGood: '2', + activeDatasets: '1 of 3', + }); + }); + }); + + it('updates the degraded count when degraded docs are ingested', async () => { + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[1], + isMalformed: true, + }) + ); + + // Index healthy documents + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 10, + dataset: datasetNames[1], + isMalformed: false, + }) + ); + + await browser.refresh(); + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const { estimatedData, ...restOfSummary } = + await PageObjects.datasetQuality.parseSummaryPanel(); + expect(restOfSummary).to.eql({ + datasetHealthPoor: '1', + datasetHealthDegraded: '1', + datasetHealthGood: '1', + activeDatasets: '2 of 3', + }); + }); + }); + + it('updates active datasets and estimated data KPIs', async () => { + const { estimatedData: _existingEstimatedData } = + await PageObjects.datasetQuality.parseSummaryPanel(); + + // Index document at current time to mark dataset as active + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 4, + dataset: datasetNames[0], + isMalformed: false, + }) + ); + + await browser.refresh(); // Summary panel doesn't update reactively + await PageObjects.datasetQuality.waitUntilSummaryPanelLoaded(); + + await retry.try(async () => { + const { activeDatasets: updatedActiveDatasets, estimatedData: _updatedEstimatedData } = + await PageObjects.datasetQuality.parseSummaryPanel(); + + expect(updatedActiveDatasets).to.eql('3 of 3'); + + // TODO: Investigate. This fails on Serverless. + // expect(_updatedEstimatedData).to.not.eql(_existingEstimatedData); + }); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts new file mode 100644 index 0000000000000..61db9caeb05fc --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts @@ -0,0 +1,241 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { datasetNames, defaultNamespace, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'navigationalSearch', + 'observabilityLogsExplorer', + 'datasetQuality', + 'svlCommonNavigation', + 'svlCommonPage', + ]); + const synthtrace = getService('svlLogsSynthtraceClient'); + const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + const to = '2024-01-01T12:00:00.000Z'; + + describe('Dataset quality table', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.svlCommonPage.loginWithRole('admin'); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('shows the right number of rows in correct order', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('descending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql([...datasetNames].reverse()); + + const namespaceCol = cols.Namespace; + const namespaceColCellTexts = await namespaceCol.getCellTexts(); + expect(namespaceColCellTexts).to.eql([defaultNamespace, defaultNamespace, defaultNamespace]); + + const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); + + const lastActivityCol = cols['Last Activity']; + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(lastActivityColCellTexts).to.eql([ + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + ]); + }); + + it('shows degraded docs percentage', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('ascending'); + + const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); + + // Index malformed document with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 1, + dataset: datasetNames[2], + isMalformed: true, + }) + ); + + // Set time range to Last 5 minute + const filtersContainer = await testSubjects.find( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFiltersContainer + ); + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 5, 'm'); + + const updatedDegradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); + expect(updatedDegradedDocsColCellTexts[2]).to.not.eql('0%'); + }); + + it('shows the updated size of the index', async () => { + const testDatasetIndex = 2; + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + await datasetNameCol.sort('ascending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const datasetToUpdateRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === datasetNames[testDatasetIndex] + ); + + const sizeColCellTexts = await cols.Size.getCellTexts(); + const beforeSize = sizeColCellTexts[datasetToUpdateRowIndex]; + + // Index documents with current timestamp + await synthtrace.index( + getLogsForDataset({ + to: Date.now(), + count: 4, + dataset: datasetNames[testDatasetIndex], + isMalformed: false, + }) + ); + + const colsAfterUpdate = await PageObjects.datasetQuality.parseDatasetTable(); + + // Assert that size has changed + await retry.tryForTime(15000, async () => { + // Refresh the table + await PageObjects.datasetQuality.refreshTable(); + const updatedSizeColCellTexts = await colsAfterUpdate.Size.getCellTexts(); + expect(updatedSizeColCellTexts[datasetToUpdateRowIndex]).to.not.eql(beforeSize); + }); + }); + + it('sorts by dataset name', async () => { + // const header = await PageObjects.datasetQuality.getDatasetTableHeader('Dataset Name'); + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + expect(Object.keys(cols).length).to.eql(7); + + const datasetNameCol = cols['Dataset Name']; + + // Sort ascending + await datasetNameCol.sort('ascending'); + const cellTexts = await datasetNameCol.getCellTexts(); + + const datasetNamesAsc = [...datasetNames].sort(); + + expect(cellTexts).to.eql(datasetNamesAsc); + }); + + it('shows dataset from integration', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + + // Sort ascending + await datasetNameCol.sort('ascending'); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + + const datasetNamesAsc = [...datasetNames, apacheAccessDatasetHumanName].sort(); + + // Assert there are 4 rows + expect(datasetNameColCellTexts.length).to.eql(4); + + expect(datasetNameColCellTexts).to.eql(datasetNamesAsc); + }); + + it('goes to log explorer page when opened', async () => { + const rowIndexToOpen = 1; + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const actionsCol = cols.Actions; + + const datasetName = (await datasetNameCol.getCellTexts())[rowIndexToOpen]; + await (await actionsCol.getCellChildren('a'))[rowIndexToOpen].click(); // Click "Open" + + // Confirm dataset selector text in observability logs explorer + const datasetSelectorText = + await PageObjects.observabilityLogsExplorer.getDataSourceSelectorButtonText(); + expect(datasetSelectorText).to.eql(datasetName); + }); + + it('shows the last activity when in time range', async () => { + await PageObjects.datasetQuality.navigateTo(); + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const lastActivityCol = cols['Last Activity']; + const datasetNameCol = cols['Dataset Name']; + + // Set time range to Last 1 minute + const filtersContainer = await testSubjects.find( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFiltersContainer + ); + + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 1, 's'); + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(lastActivityColCellTexts).to.eql([ + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + PageObjects.datasetQuality.texts.noActivityText, + ]); + + const datasetToUpdate = datasetNames[0]; + await synthtrace.index( + getLogsForDataset({ to: new Date().toISOString(), count: 1, dataset: datasetToUpdate }) + ); + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + const datasetToUpdateRowIndex = datasetNameColCellTexts.findIndex( + (dName: string) => dName === datasetToUpdate + ); + + await PageObjects.datasetQuality.setDatePickerLastXUnits(filtersContainer, 1, 'h'); + + await retry.tryForTime(5000, async () => { + const updatedLastActivityColCellTexts = await lastActivityCol.getCellTexts(); + expect(updatedLastActivityColCellTexts[datasetToUpdateRowIndex]).to.not.eql( + PageObjects.datasetQuality.texts.noActivityText + ); + }); + }); + + it('hides inactive datasets', async () => { + // Get number of rows with Last Activity not equal to "No activity in the selected timeframe" + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const lastActivityCol = cols['Last Activity']; + const lastActivityColCellTexts = await lastActivityCol.getCellTexts(); + const activeDatasets = lastActivityColCellTexts.filter( + (activity) => activity !== PageObjects.datasetQuality.texts.noActivityText + ); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + const rows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(rows.length).to.eql(activeDatasets.length); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts new file mode 100644 index 0000000000000..5ed86ab3c711a --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts @@ -0,0 +1,159 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { datasetNames, defaultNamespace, getInitialTestLogs, getLogsForDataset } from './data'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'observabilityLogsExplorer', + 'datasetQuality', + 'svlCommonNavigation', + 'svlCommonPage', + ]); + const synthtrace = getService('svlLogsSynthtraceClient'); + const testSubjects = getService('testSubjects'); + const to = '2024-01-01T12:00:00.000Z'; + + // FLAKY: https://github.com/elastic/kibana/issues/178652 + describe.skip('Dataset quality table filters', () => { + before(async () => { + await synthtrace.index(getInitialTestLogs({ to, count: 4 })); + await PageObjects.svlCommonPage.loginWithRole('admin'); + await PageObjects.datasetQuality.navigateTo(); + }); + + after(async () => { + await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); + }); + + it('hides inactive datasets when toggled', async () => { + const initialRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(initialRows.length).to.eql(3); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + + const afterToggleRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(afterToggleRows.length).to.eql(1); + + await PageObjects.datasetQuality.toggleShowInactiveDatasets(); + + const afterReToggleRows = await PageObjects.datasetQuality.getDatasetTableRows(); + expect(afterReToggleRows.length).to.eql(3); + }); + + it('shows full dataset names when toggled', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql(datasetNames); + + await PageObjects.datasetQuality.toggleShowFullDatasetNames(); + + const datasetNameColCellTextsAfterToggle = await datasetNameCol.getCellTexts(); + const duplicateNames = datasetNames.map((name) => `${name}\n${name}`); + expect(datasetNameColCellTextsAfterToggle).to.eql(duplicateNames); + + await PageObjects.datasetQuality.toggleShowFullDatasetNames(); + const datasetNameColCellTextsAfterReToggle = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTextsAfterReToggle).to.eql(datasetNames); + }); + + it('searches the datasets', async () => { + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql(datasetNames); + + // Search for a dataset + await testSubjects.setValue( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFilterBarFieldSearch, + datasetNames[2] + ); + + const colsAfterSearch = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameColAfterSearch = colsAfterSearch['Dataset Name']; + const datasetNameColCellTextsAfterSearch = await datasetNameColAfterSearch.getCellTexts(); + expect(datasetNameColCellTextsAfterSearch).to.eql([datasetNames[2]]); + await testSubjects.setValue( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityFilterBarFieldSearch, + '' + ); + }); + + it('filters for integration', async () => { + const apacheAccessDatasetName = 'apache.access'; + const apacheAccessDatasetHumanName = 'Apache access logs'; + const apacheIntegrationName = 'Apache HTTP Server'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ to, count: 10, dataset: apacheAccessDatasetName }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameCol = cols['Dataset Name']; + const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); + expect(datasetNameColCellTexts).to.eql([apacheAccessDatasetHumanName, ...datasetNames]); + + // Filter for integration + await PageObjects.datasetQuality.filterForIntegrations([apacheIntegrationName]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetNameColAfterFilter = colsAfterFilter['Dataset Name']; + const datasetNameColCellTextsAfterFilter = await datasetNameColAfterFilter.getCellTexts(); + expect(datasetNameColCellTextsAfterFilter).to.eql([apacheAccessDatasetHumanName]); + }); + + it('filters for namespace', async () => { + const apacheAccessDatasetName = 'apache.access'; + const datasetNamespace = 'prod'; + + await PageObjects.observabilityLogsExplorer.navigateTo(); + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ + to, + count: 10, + dataset: apacheAccessDatasetName, + namespace: datasetNamespace, + }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + // Get default namespaces + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const namespaceCol = cols.Namespace; + const namespaceColCellTexts = await namespaceCol.getCellTexts(); + expect(namespaceColCellTexts).to.contain(defaultNamespace); + + // Filter for prod namespace + await PageObjects.datasetQuality.filterForNamespaces([datasetNamespace]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const namespaceColAfterFilter = colsAfterFilter.Namespace; + const namespaceColCellTextsAfterFilter = await namespaceColAfterFilter.getCellTexts(); + + expect(namespaceColCellTextsAfterFilter).to.eql([datasetNamespace]); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts new file mode 100644 index 0000000000000..cb3e2605925b5 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts @@ -0,0 +1,32 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'datasetQuality', + 'observabilityLogsExplorer', + 'svlCommonNavigation', + 'svlCommonPage', + ]); + + const testSubjects = getService('testSubjects'); + + describe('Dataset quality home', () => { + before(async () => { + await PageObjects.svlCommonPage.loginWithRole('admin'); + }); + + it('dataset quality table exists', async () => { + await PageObjects.datasetQuality.navigateTo(); + await testSubjects.existOrFail( + PageObjects.datasetQuality.testSubjectSelectors.datasetQualityTable + ); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts new file mode 100644 index 0000000000000..0706610dd475c --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('Dataset Quality', function () { + loadTestFile(require.resolve('./home')); + loadTestFile(require.resolve('./dataset_quality_summary')); + loadTestFile(require.resolve('./dataset_quality_table')); + loadTestFile(require.resolve('./dataset_quality_table_filters')); + loadTestFile(require.resolve('./dataset_quality_flyout')); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/index.ts b/x-pack/test_serverless/functional/test_suites/observability/index.ts index c8e82d6017636..0e93bd7c0ddd7 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/index.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/index.ts @@ -12,6 +12,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./landing_page')); loadTestFile(require.resolve('./navigation')); loadTestFile(require.resolve('./observability_logs_explorer')); + loadTestFile(require.resolve('./dataset_quality')); loadTestFile(require.resolve('./rules/rules_list')); loadTestFile(require.resolve('./cases')); loadTestFile(require.resolve('./advanced_settings')); diff --git a/yarn.lock b/yarn.lock index 2617b1e773e03..3c8aae5d3d04a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,10 +124,10 @@ dependencies: tslib "^2.3.1" -"@babel/cli@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.23.4.tgz#f5cc90487278065fa0c3b1267cf0c1d44ddf85a7" - integrity sha512-j3luA9xGKCXVyCa5R7lJvOMM+Kc2JEnAEIgz2ggtjQ/j5YUVgfsg/WsG95bbsgq7YLHuiCOzMnoSasuY16qiCw== +"@babel/cli@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.23.9.tgz#06b3e76376ee53f14ac8ac422c884950c69e1b9e" + integrity sha512-vB1UXmGDNEhcf1jNAHKT9IlYk1R+hehVTLFlCLHBi8gfuHQGP6uRjgXVYU0EVlI/qwAWpstqkBdf2aez3/z/5Q== dependencies: "@jridgewell/trace-mapping" "^0.3.17" commander "^4.0.1" @@ -148,7 +148,7 @@ "@babel/highlight" "^7.23.4" chalk "^2.4.2" -"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": +"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== @@ -175,31 +175,31 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.23.6", "@babel/core@^7.7.5": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.6.tgz#8be77cd77c55baadcc1eae1c33df90ab6d2151d4" - integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== +"@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.24.0", "@babel/core@^7.7.5": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.0.tgz#56cbda6b185ae9d9bed369816a8f4423c5f2ff1b" + integrity sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" "@babel/helper-compilation-targets" "^7.23.6" "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.6" - "@babel/parser" "^7.23.6" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" - "@babel/types" "^7.23.6" + "@babel/helpers" "^7.24.0" + "@babel/parser" "^7.24.0" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.0" + "@babel/types" "^7.24.0" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/eslint-parser@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz#7bf0db1c53b54da0c8a12627373554a0828479ca" - integrity sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw== +"@babel/eslint-parser@^7.23.10": + version "7.23.10" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.10.tgz#2d4164842d6db798873b40e0c4238827084667a2" + integrity sha512-3wSYDPZVnhseRnxRJH6ZVTNknBz76AEnyC+AYYhasjP3Yy23qz0ERR7Fcd2SHmYuSFJ2kY9gaaDd3vyqU09eSw== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" eslint-visitor-keys "^2.1.0" @@ -285,10 +285,21 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-define-polyfill-provider@^0.4.4": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz#64df615451cb30e94b59a9696022cffac9a10088" - integrity sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA== +"@babel/helper-define-polyfill-provider@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz#465805b7361f461e86c680f1de21eaf88c25901b" + integrity sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + +"@babel/helper-define-polyfill-provider@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.0.tgz#4d1a8b898c8299a2fcf295d7d356d2648471ab31" + integrity sha512-efwOM90nCG6YeT8o3PCyBVSxRfmILxCNL+TNI8CGQl7a62M0Wd9VkV+XHwIlkOz1r4b+lxu6gBjdWiOMdUCrCQ== dependencies: "@babel/helper-compilation-targets" "^7.22.6" "@babel/helper-plugin-utils" "^7.22.5" @@ -353,10 +364,10 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" + integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== "@babel/helper-remap-async-to-generator@^7.22.20": version "7.22.20" @@ -421,14 +432,14 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" -"@babel/helpers@^7.12.5", "@babel/helpers@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.6.tgz#d03af2ee5fb34691eec0cda90f5ecbb4d4da145a" - integrity sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA== +"@babel/helpers@^7.12.5", "@babel/helpers@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.0.tgz#a3dd462b41769c95db8091e49cfe019389a9409b" + integrity sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA== dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" - "@babel/types" "^7.23.6" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.0" + "@babel/types" "^7.24.0" "@babel/highlight@^7.23.4": version "7.23.4" @@ -439,10 +450,10 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.3", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.8", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0", "@babel/parser@^7.23.6": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" - integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== +"@babel/parser@^7.1.0", "@babel/parser@^7.10.3", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.8", "@babel/parser@^7.23.0", "@babel/parser@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.0.tgz#26a3d1ff49031c53a97d03b604375f028746a9ac" + integrity sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" @@ -460,10 +471,10 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-transform-optional-chaining" "^7.23.3" -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz#20c60d4639d18f7da8602548512e9d3a4c8d7098" - integrity sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz#516462a95d10a9618f197d39ad291a9b47ae1d7b" + integrity sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw== dependencies: "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" @@ -745,10 +756,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-async-generator-functions@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz#93ac8e3531f347fba519b4703f9ff2a75c6ae27a" - integrity sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw== +"@babel/plugin-transform-async-generator-functions@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz#9adaeb66fc9634a586c5df139c6240d41ed801ce" + integrity sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ== dependencies: "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" @@ -795,16 +806,15 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.12.1", "@babel/plugin-transform-classes@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz#e7a75f815e0c534cc4c9a39c56636c84fc0d64f2" - integrity sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg== +"@babel/plugin-transform-classes@^7.12.1", "@babel/plugin-transform-classes@^7.23.8": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz#d08ae096c240347badd68cdf1b6d1624a6435d92" + integrity sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-compilation-targets" "^7.23.6" "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-function-name" "^7.23.0" - "@babel/helper-optimise-call-expression" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-replace-supers" "^7.22.20" "@babel/helper-split-export-declaration" "^7.22.6" @@ -936,10 +946,10 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-modules-systemjs@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz#fa7e62248931cb15b9404f8052581c302dd9de81" - integrity sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ== +"@babel/plugin-transform-modules-systemjs@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz#105d3ed46e4a21d257f83a2f9e2ee4203ceda6be" + integrity sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw== dependencies: "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-module-transforms" "^7.23.3" @@ -985,14 +995,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-object-rest-spread@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" - integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== +"@babel/plugin-transform-object-rest-spread@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz#7b836ad0088fdded2420ce96d4e1d3ed78b71df1" + integrity sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w== dependencies: - "@babel/compat-data" "^7.23.3" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.23.3" @@ -1101,16 +1111,16 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-runtime@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.6.tgz#bf853cd0a675c16ee33e6ba2a63b536e75e5d754" - integrity sha512-kF1Zg62aPseQ11orDhFRw+aPG/eynNQtI+TyY+m33qJa2cJ5EEvza2P2BNTIA9E5MyqFABHEyY6CPHwgdy9aNg== +"@babel/plugin-transform-runtime@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.0.tgz#e308fe27d08b74027d42547081eefaf4f2ffbcc9" + integrity sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA== dependencies: "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" - babel-plugin-polyfill-corejs2 "^0.4.6" - babel-plugin-polyfill-corejs3 "^0.8.5" - babel-plugin-polyfill-regenerator "^0.5.3" + "@babel/helper-plugin-utils" "^7.24.0" + babel-plugin-polyfill-corejs2 "^0.4.8" + babel-plugin-polyfill-corejs3 "^0.9.0" + babel-plugin-polyfill-regenerator "^0.5.5" semver "^6.3.1" "@babel/plugin-transform-shorthand-properties@^7.12.1", "@babel/plugin-transform-shorthand-properties@^7.23.3": @@ -1190,18 +1200,18 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/preset-env@^7.12.11", "@babel/preset-env@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.6.tgz#ad0ea799d5a3c07db5b9a172819bbd444092187a" - integrity sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ== +"@babel/preset-env@^7.12.11", "@babel/preset-env@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.0.tgz#11536a7f4b977294f0bdfad780f01a8ac8e183fc" + integrity sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA== dependencies: "@babel/compat-data" "^7.23.5" "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/helper-validator-option" "^7.23.5" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.7" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -1222,13 +1232,13 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.23.3" - "@babel/plugin-transform-async-generator-functions" "^7.23.4" + "@babel/plugin-transform-async-generator-functions" "^7.23.9" "@babel/plugin-transform-async-to-generator" "^7.23.3" "@babel/plugin-transform-block-scoped-functions" "^7.23.3" "@babel/plugin-transform-block-scoping" "^7.23.4" "@babel/plugin-transform-class-properties" "^7.23.3" "@babel/plugin-transform-class-static-block" "^7.23.4" - "@babel/plugin-transform-classes" "^7.23.5" + "@babel/plugin-transform-classes" "^7.23.8" "@babel/plugin-transform-computed-properties" "^7.23.3" "@babel/plugin-transform-destructuring" "^7.23.3" "@babel/plugin-transform-dotall-regex" "^7.23.3" @@ -1244,13 +1254,13 @@ "@babel/plugin-transform-member-expression-literals" "^7.23.3" "@babel/plugin-transform-modules-amd" "^7.23.3" "@babel/plugin-transform-modules-commonjs" "^7.23.3" - "@babel/plugin-transform-modules-systemjs" "^7.23.3" + "@babel/plugin-transform-modules-systemjs" "^7.23.9" "@babel/plugin-transform-modules-umd" "^7.23.3" "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" "@babel/plugin-transform-new-target" "^7.23.3" "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" "@babel/plugin-transform-numeric-separator" "^7.23.4" - "@babel/plugin-transform-object-rest-spread" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.24.0" "@babel/plugin-transform-object-super" "^7.23.3" "@babel/plugin-transform-optional-catch-binding" "^7.23.4" "@babel/plugin-transform-optional-chaining" "^7.23.4" @@ -1270,9 +1280,9 @@ "@babel/plugin-transform-unicode-regex" "^7.23.3" "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" "@babel/preset-modules" "0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2 "^0.4.6" - babel-plugin-polyfill-corejs3 "^0.8.5" - babel-plugin-polyfill-regenerator "^0.5.3" + babel-plugin-polyfill-corejs2 "^0.4.8" + babel-plugin-polyfill-corejs3 "^0.9.0" + babel-plugin-polyfill-regenerator "^0.5.5" core-js-compat "^3.31.0" semver "^6.3.1" @@ -1317,15 +1327,15 @@ "@babel/plugin-transform-modules-commonjs" "^7.23.3" "@babel/plugin-transform-typescript" "^7.23.3" -"@babel/register@^7.12.1", "@babel/register@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.22.15.tgz#c2c294a361d59f5fa7bcc8b97ef7319c32ecaec7" - integrity sha512-V3Q3EqoQdn65RCgTLwauZaTfd1ShhwPmbBv+1dkZV/HpCGMKVyn6oFcRlI7RaKqiDQjX2Qd3AuoEguBgdjIKlg== +"@babel/register@^7.12.1", "@babel/register@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.23.7.tgz#485a5e7951939d21304cae4af1719fdb887bc038" + integrity sha512-EjJeB6+kvpk+Y5DAkEAmbOBEFkh9OASx0huoEkqYTFxAZHzOAX2Oh5uwAUuL2rUddqfM0SA+KPXV2TbzoZ2kvQ== dependencies: clone-deep "^4.0.1" find-cache-dir "^2.0.0" make-dir "^2.1.0" - pirates "^4.0.5" + pirates "^4.0.6" source-map-support "^0.5.16" "@babel/regjsgen@^0.8.0": @@ -1333,26 +1343,26 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7", "@babel/runtime@^7.23.6", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" - integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.24.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.0.tgz#584c450063ffda59697021430cb47101b085951e" + integrity sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.12.7", "@babel/template@^7.22.15", "@babel/template@^7.3.3": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== +"@babel/template@^7.12.7", "@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" + integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" -"@babel/traverse@^7.10.3", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.23.6", "@babel/traverse@^7.4.5": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" - integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== +"@babel/traverse@^7.10.3", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.24.0", "@babel/traverse@^7.4.5": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.0.tgz#4a408fbf364ff73135c714a2ab46a5eab2831b1e" + integrity sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw== dependencies: "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" @@ -1360,12 +1370,12 @@ "@babel/helper-function-name" "^7.23.0" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.6" - "@babel/types" "^7.23.6" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.10.3", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.20.7", "@babel/types@^7.21.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@7.21.2", "@babel/types@^7.0.0", "@babel/types@^7.10.3", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1" integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw== @@ -1392,6 +1402,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" + integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1543,20 +1562,6 @@ tunnel-agent "^0.6.0" uuid "^8.3.2" -"@cypress/snapshot@^2.1.7": - version "2.1.7" - resolved "https://registry.yarnpkg.com/@cypress/snapshot/-/snapshot-2.1.7.tgz#e7360eb628b062f28f03036382619ec72cfb1831" - integrity sha512-f8AcfIg7wOOHSdBODlIwCJE/rG5Yb+kUY+WVTKynB2pLLoDy9nc8CtcazqX19q2Lh++nTJLNRihpbbWvk33mbg== - dependencies: - "@wildpeaks/snapshot-dom" "1.6.0" - am-i-a-dependency "1.1.2" - check-more-types "2.24.0" - its-name "1.0.0" - js-beautify "1.10.3" - lazy-ass "1.6.0" - snap-shot-compare "2.8.3" - snap-shot-store "1.2.3" - "@cypress/webpack-preprocessor@^6.0.0", "@cypress/webpack-preprocessor@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@cypress/webpack-preprocessor/-/webpack-preprocessor-6.0.1.tgz#5369527c063b2f4718a125ddbd163c5775086e06" @@ -1743,10 +1748,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@93.2.0": - version "93.2.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-93.2.0.tgz#ebe74c4aefcf78cd72a8db7332666a7aa0681954" - integrity sha512-YPJM+hs1Ouv7Fc04JZiEOT5nCNBMFKsQwKmmGqzEwpMDsXpx6NKT0s0AlRO43JabTWBHL9yIRE4aORhAzH6pBQ== +"@elastic/eui@93.3.0": + version "93.3.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-93.3.0.tgz#3fc1052aa4b0192deadbee9c9ac48409d7df2cf4" + integrity sha512-0JNaioZISY8GGt3G+piER4U+e82jQ41cvE2Wz7WotuWiRYJEWVoJrtERWE/DCXubAj95XVCLSetWuQce3EGzmw== dependencies: "@hello-pangea/dnd" "^16.3.0" "@types/lodash" "^4.14.198" @@ -2400,25 +2405,6 @@ protobufjs "^7.0.0" yargs "^17.7.2" -"@gulp-sourcemaps/identity-map@1.X": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9" - integrity sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ== - dependencies: - acorn "^5.0.3" - css "^2.2.1" - normalize-path "^2.1.1" - source-map "^0.6.0" - through2 "^2.0.3" - -"@gulp-sourcemaps/map-sources@1.X": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" - integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= - dependencies: - normalize-path "^2.0.1" - through2 "^2.0.3" - "@gulpjs/to-absolute-glob@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@gulpjs/to-absolute-glob/-/to-absolute-glob-4.0.0.tgz#1fc2460d3953e1d9b9f2dfdb4bcc99da4710c021" @@ -2740,11 +2726,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@icons/material@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8" - integrity sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw== - "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -4160,6 +4141,34 @@ version "0.0.0" uid "" +"@kbn/core-security-browser-internal@link:packages/core/security/core-security-browser-internal": + version "0.0.0" + uid "" + +"@kbn/core-security-browser-mocks@link:packages/core/security/core-security-browser-mocks": + version "0.0.0" + uid "" + +"@kbn/core-security-browser@link:packages/core/security/core-security-browser": + version "0.0.0" + uid "" + +"@kbn/core-security-common@link:packages/core/security/core-security-common": + version "0.0.0" + uid "" + +"@kbn/core-security-server-internal@link:packages/core/security/core-security-server-internal": + version "0.0.0" + uid "" + +"@kbn/core-security-server-mocks@link:packages/core/security/core-security-server-mocks": + version "0.0.0" + uid "" + +"@kbn/core-security-server@link:packages/core/security/core-security-server": + version "0.0.0" + uid "" + "@kbn/core-status-common-internal@link:packages/core/status/core-status-common-internal": version "0.0.0" uid "" @@ -5008,6 +5017,10 @@ version "0.0.0" uid "" +"@kbn/lens-config-builder-example-plugin@link:x-pack/examples/lens_config_builder_example": + version "0.0.0" + uid "" + "@kbn/lens-embeddable-utils@link:packages/kbn-lens-embeddable-utils": version "0.0.0" uid "" @@ -6160,6 +6173,14 @@ version "0.0.0" uid "" +"@kbn/solution-nav-es@link:packages/solution-nav/es": + version "0.0.0" + uid "" + +"@kbn/solution-nav-oblt@link:packages/solution-nav/oblt": + version "0.0.0" + uid "" + "@kbn/some-dev-log@link:packages/kbn-some-dev-log": version "0.0.0" uid "" @@ -6852,11 +6873,6 @@ resolved "https://registry.yarnpkg.com/@math.gl/types/-/types-3.6.3.tgz#9fa9866feabcbb76de107d78ff3a89c0243ac374" integrity sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA== -"@mattiasbuelens/web-streams-adapter@~0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@mattiasbuelens/web-streams-adapter/-/web-streams-adapter-0.1.0.tgz#607b5a25682f4ae2741da7ba6df39302505336b3" - integrity sha512-oV4PyZfwJNtmFWhvlJLqYIX1Nn22ML8FZpS16ZUKv0hg7414xV1fjsGqxQzLT2dyK92TKxsJSwMOd7VNHAtPmA== - "@mdx-js/mdx@^1.6.22": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.6.22.tgz#8a723157bf90e78f17dc0f27995398e6c731f1ba" @@ -7228,14 +7244,6 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@openpgp/web-stream-tools@^0.0.10": - version "0.0.10" - resolved "https://registry.yarnpkg.com/@openpgp/web-stream-tools/-/web-stream-tools-0.0.10.tgz#4496390da9715c9bfc581ad144f9fb8a36a37775" - integrity sha512-1ONZADML0fb0RJR5UiGYPnRf9VaYBYUBc1gF9jyq57sHkr58cp5/BQHS+ivrqbRw21Sb70FKTssmJbRe71V+kw== - dependencies: - "@mattiasbuelens/web-streams-adapter" "~0.1.0" - web-streams-polyfill "~3.0.3" - "@opentelemetry/api-metrics@0.31.0", "@opentelemetry/api-metrics@^0.31.0": version "0.31.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.31.0.tgz#0ed4cf4d7c731f968721c2b303eaf5e9fd42f736" @@ -7910,7 +7918,7 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-controls@6.5.16", "@storybook/addon-controls@^6.5.16": +"@storybook/addon-controls@6.5.16": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.16.tgz#5017805b8ca413edf6e9d87b90a9436e79eb5e59" integrity sha512-kShSGjq1MjmmyL3l8i+uPz6yddtf82mzys0l82VKtcuyjrr5944wYFJ5NTXMfZxrO/U6FeFsfuFZE/k6ex3EMg== @@ -9331,11 +9339,6 @@ resolved "https://registry.yarnpkg.com/@types/deep-freeze-strict/-/deep-freeze-strict-1.1.0.tgz#447a6a2576191344aa42310131dd3df5c41492c4" integrity sha1-RHpqJXYZE0SqQjEBMd099cQUksQ= -"@types/delete-empty@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/delete-empty/-/delete-empty-2.0.0.tgz#1647ae9e68f708a6ba778531af667ec55bc61964" - integrity sha512-sq+kwx8zA9BSugT9N+Jr8/uWjbHMZ+N/meJEzRyT3gmLq/WMtx/iSIpvdpmBUi/cvXl6Kzpvve8G2ESkabFwmg== - "@types/diff@^5.0.8": version "5.0.8" resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.8.tgz#28dc501cc3e7c62d4c5d096afe20755170acf276" @@ -9461,13 +9464,6 @@ resolved "https://registry.yarnpkg.com/@types/fnv-plus/-/fnv-plus-1.3.0.tgz#0f43f0b7e7b4b24de3a1cab69bfa009508f4c084" integrity sha512-ijls8MsO6Q9JUSd5w1v4y2ijM6S4D/nmOyI/FwcepvrZfym0wZhLdYGFD5TJID7tga0O3I7SmtK69RzpSJ1Fcw== -"@types/fs-extra@^9.0.13": - version "9.0.13" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" - integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== - dependencies: - "@types/node" "*" - "@types/geojson@*", "@types/geojson@^7946.0.10", "@types/geojson@^7946.0.7": version "7946.0.10" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" @@ -9486,7 +9482,7 @@ "@types/glob" "*" "@types/node" "*" -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3", "@types/glob@^7.2.0": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== @@ -10177,6 +10173,13 @@ "@types/prop-types" "*" "@types/react" "*" +"@types/react-recompose@^0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@types/react-recompose/-/react-recompose-0.33.4.tgz#bf47388b644c3b0a30226870e216d78564a41624" + integrity sha512-66LAtWIrfT5yvw01xB4jFNeYuP6b4QTdFrrkvD6OlfGaLGqMNGXSia5VJa/wV4dH4z0gU8KnveQl/4Oi2e/vIg== + dependencies: + "@types/react" "*" + "@types/react-redux@^7.1.20": version "7.1.24" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.24.tgz#6caaff1603aba17b27d20f8ad073e4c077e975c0" @@ -10258,13 +10261,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/recompose@^0.30.10": - version "0.30.10" - resolved "https://registry.yarnpkg.com/@types/recompose/-/recompose-0.30.10.tgz#b6ab1743c279f463f2b62ccb90b82433dcea63c5" - integrity sha512-oF1ulwi5Tz7L9jZE870CCyD6n/nvCLNaGMp/oMEnm4gd7doc67rSHtypM6MFDiI6BKjTXoR87CwhET5JJInDFQ== - dependencies: - "@types/react" "*" - "@types/redux-actions@^2.6.1": version "2.6.1" resolved "https://registry.yarnpkg.com/@types/redux-actions/-/redux-actions-2.6.1.tgz#0940e97fa35ad3004316bddb391d8e01d2efa605" @@ -10435,11 +10431,6 @@ "@types/node" "*" minipass "^4.0.0" -"@types/tempy@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@types/tempy/-/tempy-0.2.0.tgz#8b7a93f6912aef25cc0b8d8a80ff974151478685" - integrity sha512-YaX74QljqR45Xu7dd22wMvzTS+ItUiSyDl9XJl6WTgYNE09r2TF+mV2FDjWRM5Sdzf9C9dXRTUdz9J5SoEYxXg== - "@types/testing-library__jest-dom@^5.14.7", "@types/testing-library__jest-dom@^5.9.1": version "5.14.7" resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.7.tgz#fff92bed2a32c58a9224a85603e731519c0a9037" @@ -10613,7 +10604,7 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^17.0.10", "@types/yargs@^17.0.8": +"@types/yargs@^17.0.8": version "17.0.24" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== @@ -10723,10 +10714,10 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@wdio/logger@^8.24.12": - version "8.24.12" - resolved "https://registry.yarnpkg.com/@wdio/logger/-/logger-8.24.12.tgz#03cb8bb7ce7ee443e1dcd200a3b44270ae16a1f9" - integrity sha512-QisOiVIWKTUCf1H7S+DOtC+gruhlpimQrUXfWMTeeh672PvAJYnTpOJDWA+BtXfsikkUYFAzAaq8SeMJk8rqKg== +"@wdio/logger@^8.28.0": + version "8.28.0" + resolved "https://registry.yarnpkg.com/@wdio/logger/-/logger-8.28.0.tgz#ab97ee1a9f6a30305e1a07ff2b67fa23e1281e73" + integrity sha512-/s6zNCqwy1hoc+K4SJypis0Ud0dlJ+urOelJFO1x0G0rwDRWyFiUP6ijTaCcFxAm29jYEcEPWijl2xkVIHwOyA== dependencies: chalk "^5.1.2" loglevel "^1.6.0" @@ -11016,11 +11007,6 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== -"@wildpeaks/snapshot-dom@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@wildpeaks/snapshot-dom/-/snapshot-dom-1.6.0.tgz#83297612bf93b97983beafbe6ae71672642ac884" - integrity sha512-fCM5tYK6VZ1nhbk3Q11lkf6UOJlOCRU0oScQ8NV8OYBPC58wQmQaOF9g+rk+yhNYf3beybOBr+ZuiNen3B0Bxw== - "@wojtekmaj/enzyme-adapter-react-17@^0.6.7": version "0.6.7" resolved "https://registry.yarnpkg.com/@wojtekmaj/enzyme-adapter-react-17/-/enzyme-adapter-react-17-0.6.7.tgz#7784bd32f518b186218cebb26c98c852676f30b0" @@ -11081,14 +11067,6 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -JSONStream@1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - abab@^2.0.4, abab@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" @@ -11156,11 +11134,6 @@ acorn-walk@^8.0.0, acorn-walk@^8.0.2, acorn-walk@^8.1.1, acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@5.X, acorn@^5.0.3: - version "5.7.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" - integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== - acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -11296,11 +11269,6 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -am-i-a-dependency@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/am-i-a-dependency/-/am-i-a-dependency-1.1.2.tgz#f9d3422304d6f642f821e4c407565035f6167f1f" - integrity sha1-+dNCIwTW9kL4IeTEB1ZQNfYWfx8= - amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -11349,13 +11317,6 @@ ansi-gray@^0.1.1: dependencies: ansi-wrap "0.1.0" -ansi-green@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-green/-/ansi-green-0.1.1.tgz#8a5d9a979e458d57c40e33580b37390b8e10d0f7" - integrity sha1-il2al55FjVfEDjNYCzc5C44Q0Pc= - dependencies: - ansi-wrap "0.1.0" - ansi-html-community@0.0.8, ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" @@ -11371,11 +11332,6 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -11386,7 +11342,7 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^2.0.1, ansi-styles@^2.2.1: +ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= @@ -11758,7 +11714,7 @@ arrify@^2.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asap@^2.0.0, asap@~2.0.3: +asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -11967,7 +11923,7 @@ axe-core@^4.8.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.8.2.tgz#2f6f3cde40935825cf4465e3c1c9e77b240ff6ae" integrity sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g== -axios@1.6.3, axios@^1.0.0, axios@^1.3.4, axios@^1.6.0, axios@^1.6.5: +axios@1.6.3, axios@^1.0.0, axios@^1.3.4, axios@^1.6.0, axios@^1.6.7: version "1.6.3" resolved "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz#7f50f23b3aa246eff43c54834272346c396613f4" integrity sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww== @@ -12091,13 +12047,13 @@ babel-plugin-macros@^3.0.1, babel-plugin-macros@^3.1.0: cosmiconfig "^7.0.0" resolve "^1.19.0" -babel-plugin-polyfill-corejs2@^0.4.6: - version "0.4.7" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.7.tgz#679d1b94bf3360f7682e11f2cb2708828a24fe8c" - integrity sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ== +babel-plugin-polyfill-corejs2@^0.4.8: + version "0.4.9" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.9.tgz#15a285f681e1c5495093d85f1cf72bd1cbed41ce" + integrity sha512-BXIWIaO3MewbXWdJdIGDWZurv5OGJlFNo7oy20DpB3kWDVJLcY2NRypRsRUbRe5KMqSNLuOGnWTFQQtY5MAsRw== dependencies: "@babel/compat-data" "^7.22.6" - "@babel/helper-define-polyfill-provider" "^0.4.4" + "@babel/helper-define-polyfill-provider" "^0.6.0" semver "^6.3.1" babel-plugin-polyfill-corejs3@^0.1.0: @@ -12108,20 +12064,20 @@ babel-plugin-polyfill-corejs3@^0.1.0: "@babel/helper-define-polyfill-provider" "^0.1.5" core-js-compat "^3.8.1" -babel-plugin-polyfill-corejs3@^0.8.5: - version "0.8.7" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz#941855aa7fdaac06ed24c730a93450d2b2b76d04" - integrity sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA== +babel-plugin-polyfill-corejs3@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz#9eea32349d94556c2ad3ab9b82ebb27d4bf04a81" + integrity sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.4" - core-js-compat "^3.33.1" + "@babel/helper-define-polyfill-provider" "^0.5.0" + core-js-compat "^3.34.0" -babel-plugin-polyfill-regenerator@^0.5.3: - version "0.5.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.4.tgz#c6fc8eab610d3a11eb475391e52584bacfc020f4" - integrity sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg== +babel-plugin-polyfill-regenerator@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz#8b0c8fc6434239e5d7b8a9d1f832bb2b0310f06a" + integrity sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.4" + "@babel/helper-define-polyfill-provider" "^0.5.0" babel-plugin-react-docgen@^4.2.1: version "4.2.1" @@ -12692,13 +12648,13 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.22.2: - version "4.22.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" - integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.22.2, browserslist@^4.22.3: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001565" - electron-to-chromium "^1.4.601" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" node-releases "^2.0.14" update-browserslist-db "^1.0.13" @@ -12856,7 +12812,7 @@ cacache@^12.0.2: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^15.0.4, cacache@^15.0.5: +cacache@^15.0.5: version "15.3.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== @@ -13053,10 +13009,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001565: - version "1.0.30001572" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz#1ccf7dc92d2ee2f92ed3a54e11b7b4a3041acfa0" - integrity sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001587: + version "1.0.30001597" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz#8be94a8c1d679de23b22fbd944232aa1321639e6" + integrity sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w== canvg@^3.0.9: version "3.0.9" @@ -13147,7 +13103,7 @@ chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1. ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -13176,7 +13132,7 @@ chance@1.0.18: resolved "https://registry.yarnpkg.com/chance/-/chance-1.0.18.tgz#79788fe6fca4c338bf404321c347eecc80f969ee" integrity sha512-g9YLQVHVZS/3F+zIicfB58vjcxopvYQRp7xHzvyDFDhXH1aRZI/JhwSAO0X5qYiQluoGnaNAU6wByD2KTxJN1A== -change-emitter@^0.1.2: +change-emitter@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" integrity sha1-6LL+PX8at9aaMhma/5HqaTFAlRU= @@ -13216,7 +13172,7 @@ charenc@0.0.2: resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= -check-more-types@2.24.0, check-more-types@^2.24.0: +check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= @@ -13283,16 +13239,16 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^121.0.0: - version "121.0.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-121.0.0.tgz#f8d11dce8e5ce4b6ad75e2b84eed17a0eecabfb9" - integrity sha512-ZIKEdZrQAfuzT/RRofjl8/EZR99ghbdBXNTOcgJMKGP6N/UL6lHUX4n6ONWBV18pDvDFfQJ0x58h5AdOaXIOMw== +chromedriver@^122.0.5: + version "122.0.5" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-122.0.5.tgz#7edb2bcd47f7b6afd8f44e680a77b115d5eb6040" + integrity sha512-5WkCY4ioJZ1Qna6KWqPSrIz1MwGh6tHW7F67XTSbZn/GaMJrpiuy6b5c1BetrddSax+NX8u4tg4l3Wy1THecLQ== dependencies: "@testim/chrome-version" "^1.1.4" - axios "^1.6.5" + axios "^1.6.7" compare-versions "^6.1.0" extract-zip "^2.0.1" - https-proxy-agent "^5.0.1" + proxy-agent "^6.4.0" proxy-from-env "^1.1.0" tcp-port-used "^1.0.2" @@ -13794,7 +13750,7 @@ concaveman@*: robust-predicates "^2.0.4" tinyqueue "^2.0.3" -config-chain@^1.1.11, config-chain@^1.1.12: +config-chain@^1.1.11: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== @@ -13859,12 +13815,17 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" +content-security-policy-parser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/content-security-policy-parser/-/content-security-policy-parser-0.6.0.tgz#b361d8587dee0e92def19d308cb23e8d32cc26f6" + integrity sha512-wejtC/p+HLNQ7uaWgg1o3CKHhE8QXC9fJ2GCY0X82L5HUNtZSq1dmUvNSHHEb6R7LS02fpmRBq/vP8i4/+9KCg== + content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@1.X, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -13932,49 +13893,27 @@ copy-to-clipboard@^3.0.8, copy-to-clipboard@^3.2.0, copy-to-clipboard@^3.3.1: dependencies: toggle-selection "^1.0.6" -copy-webpack-plugin@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.0.2.tgz#10efc6ad219a61acbf2f5fb50af83da38431bc34" - integrity sha512-9Gm8X0c6eXlKnmltMPFCBeGOKjtcRIyTt4VaO3k1TkNgVTe5Ov2lYsYVuyLp0kp8DItO3apewflM+1GYgh6V2Q== +core-js-compat@^3.31.0, core-js-compat@^3.34.0, core-js-compat@^3.8.1: + version "3.36.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.36.0.tgz#087679119bc2fdbdefad0d45d8e5d307d45ba190" + integrity sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw== dependencies: - cacache "^15.0.4" - fast-glob "^3.2.2" - find-cache-dir "^3.3.1" - glob-parent "^5.1.1" - globby "^11.0.1" - loader-utils "^2.0.0" - normalize-path "^3.0.0" - p-limit "^2.3.0" - schema-utils "^2.7.0" - serialize-javascript "^3.1.0" - webpack-sources "^1.4.3" - -core-js-compat@^3.31.0, core-js-compat@^3.33.1, core-js-compat@^3.8.1: - version "3.34.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.34.0.tgz#61a4931a13c52f8f08d924522bba65f8c94a5f17" - integrity sha512-4ZIyeNbW/Cn1wkMMDy+mvrRUxrwFNjKwbhCfQpDd+eLgYipDqp8oGFGtLmhh18EDPKA0g3VUBYOxQGGwvWLVpA== - dependencies: - browserslist "^4.22.2" + browserslist "^4.22.3" core-js-pure@^3.8.1: version "3.26.0" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.26.0.tgz#7ad8a5dd7d910756f3124374b50026e23265ca9a" integrity sha512-LiN6fylpVBVwT8twhhluD9TzXmZQQsr2I2eIKtWNbZI1XMfBT7CV18itaN6RA7EtQd/SDdRx/wzvAShX2HvhQA== -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= - core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== -core-js@^3.0.4, core-js@^3.32.1, core-js@^3.34.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: - version "3.35.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.35.0.tgz#58e651688484f83c34196ca13f099574ee53d6b4" - integrity sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg== +core-js@^3.0.4, core-js@^3.32.1, core-js@^3.36.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: + version "3.36.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.36.0.tgz#e752fa0b0b462a0787d56e9d73f80b0f7c0dde68" + integrity sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw== core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -14149,11 +14088,6 @@ crypto-js@^4.0.0: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= - crypto-random-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" @@ -14259,7 +14193,7 @@ css.escape@^1.5.1: resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== -css@2.X, css@^2.2.1, css@^2.2.4: +css@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== @@ -14808,15 +14742,6 @@ dayjs@1.11.10, dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== -debug-fabulous@1.X: - version "1.1.0" - resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e" - integrity sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg== - dependencies: - debug "3.X" - memoizee "0.4.X" - object-assign "4.X" - debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -14824,20 +14749,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@3.X, debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -14845,13 +14756,6 @@ debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, de dependencies: ms "2.1.2" -debug@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - debug@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -14859,6 +14763,13 @@ debug@4.3.1: dependencies: ms "2.1.2" +debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -15117,15 +15028,6 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -delete-empty@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/delete-empty/-/delete-empty-2.0.0.tgz#dcf7c4f93a98445119acd57b137d13e7af78fa39" - integrity sha512-voZ8OiMkVR9MOTTHZ5P0DaMDtIW6xEbXZeADp6U8uwxIJFhs2hRwyIlUZIs5hR4YIp9VYBURqZrV6Yz0ozhVpg== - dependencies: - log-ok "^0.1.1" - relative "^3.0.2" - rimraf "^2.6.2" - depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -15196,11 +15098,6 @@ detect-libc@^2.0.0, detect-libc@^2.0.1, detect-libc@^2.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== -detect-newline@2.X: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - detect-newline@3.1.0, detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -15353,11 +15250,6 @@ diff@5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -diff@^1.3.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8= - diff@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -15409,14 +15301,6 @@ discontinuous-range@1.0.0: resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= -disparity@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/disparity/-/disparity-2.0.0.tgz#57ddacb47324ae5f58d2cc0da886db4ce9eeb718" - integrity sha1-V92stHMkrl9Y0swNqIbbTOnutxg= - dependencies: - ansi-styles "^2.0.1" - diff "^1.3.2" - dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -15594,22 +15478,6 @@ downshift@^3.2.10: prop-types "^15.7.2" react-is "^16.9.0" -dpdm@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/dpdm/-/dpdm-3.9.0.tgz#48d8236d7a054ee84cf13423ecf300f64da1393b" - integrity sha512-k6VpCyjVUMFVBa6w+TO9bYQdbYkAx6oivUC857757EUtri9CFsj2VpLPkOLrbbLggwRFqLbNHHL3XGPYRovULg== - dependencies: - "@types/fs-extra" "^9.0.13" - "@types/glob" "^7.2.0" - "@types/yargs" "^17.0.10" - chalk "^4.1.2" - fs-extra "^10.0.1" - glob "^7.2.0" - ora "^5.4.1" - tslib "^2.3.1" - typescript "^4.6.3" - yargs "^17.4.0" - duplexer2@^0.1.2, duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -15664,16 +15532,6 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -editorconfig@^0.15.3: - version "0.15.3" - resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" - integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== - dependencies: - commander "^2.19.0" - lru-cache "^4.1.5" - semver "^5.6.0" - sigmund "^1.0.1" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -15793,10 +15651,10 @@ elasticsearch@^16.4.0: chalk "^1.0.0" lodash "^4.17.10" -electron-to-chromium@^1.4.601: - version "1.4.614" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz#2fe789d61fa09cb875569f37c309d0c2701f91c0" - integrity sha512-X4ze/9Sc3QWs6h92yerwqv7aB/uU8vCjZcrMjA8N9R1pjMFRe44dLsck5FzLilOYvcXuDn93B+bpGYyufc70gQ== +electron-to-chromium@^1.4.668: + version "1.4.701" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz#7335e5761331774b4dea54cd24a1b84861d45cdf" + integrity sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA== elegant-spinner@^1.0.1: version "1.0.1" @@ -16123,7 +15981,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: +es5-ext@^0.10.35, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: version "0.10.64" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== @@ -16143,7 +16001,7 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.1: +es6-iterator@^2.0.3, es6-iterator@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= @@ -16206,16 +16064,6 @@ es6-symbol@^3.1.1, es6-symbol@^3.1.3, es6-symbol@~3.1.1: d "^1.0.2" ext "^1.7.0" -es6-weak-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - integrity sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8= - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - esbuild@^0.18.11: version "0.18.20" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" @@ -17022,7 +16870,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.9, fast-glob@^3.3.2: +fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -17108,19 +16956,6 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.1: - version "0.8.17" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -17420,16 +17255,6 @@ focus-lock@^0.11.6: dependencies: tslib "^2.0.3" -folktale@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/folktale/-/folktale-2.0.1.tgz#6dc26a65565aefdef9520223e022dddf5b8d8462" - integrity sha512-3kDSWVkSlErHIt/dC73vu+5zRqbW1mlnL46s2QfYN7Ps0JcS9MVtuLCrDQOBa7sanA+d9Fd8F+bn0VcyNe68Jw== - -folktale@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/folktale/-/folktale-2.3.2.tgz#38231b039e5ef36989920cbf805bf6b227bf4fd4" - integrity sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ== - follow-redirects@1.15.2, follow-redirects@^1.0.0, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" @@ -17652,7 +17477,7 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^10.0.0, fs-extra@^10.0.1: +fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== @@ -17800,17 +17625,17 @@ gauge@^3.0.0: strip-ansi "^6.0.1" wide-align "^1.1.2" -geckodriver@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/geckodriver/-/geckodriver-4.3.0.tgz#8586e80ddd23e5d5cd47382d9f6897051ca12ea3" - integrity sha512-QfpvxFsMORwKpvnLslkHCr3NTCczHAvkte6+pQGsiUZXKBe6mO4TTb727b+9KMVSK6XZqhR6ZwImKdP+F5vS6A== +geckodriver@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/geckodriver/-/geckodriver-4.3.3.tgz#c74cce91acdc1e057f4dfc6bb3ae069a7f910411" + integrity sha512-we2c2COgxFkLVuoknJNx+ioP+7VDq0sr6SCqWHTzlA4kzIbzR0EQ1Pps34s8WrsOnQqPC8a4sZV9dRPROOrkSg== dependencies: - "@wdio/logger" "^8.24.12" + "@wdio/logger" "^8.28.0" decamelize "^6.0.0" - http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.2" + http-proxy-agent "^7.0.2" + https-proxy-agent "^7.0.4" node-fetch "^3.3.2" - tar-fs "^3.0.4" + tar-fs "^3.0.5" unzipper "^0.10.14" which "^4.0.0" @@ -18001,7 +17826,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -18277,7 +18102,7 @@ graceful-fs@4.2.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@4.X, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.8, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.8, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -18324,23 +18149,6 @@ gulp-postcss@^9.0.1: postcss-load-config "^3.0.0" vinyl-sourcemaps-apply "^0.2.1" -gulp-sourcemaps@2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz#a3f002d87346d2c0f3aec36af7eb873f23de8ae6" - integrity sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg== - dependencies: - "@gulp-sourcemaps/identity-map" "1.X" - "@gulp-sourcemaps/map-sources" "1.X" - acorn "5.X" - convert-source-map "1.X" - css "2.X" - debug-fabulous "1.X" - detect-newline "2.X" - graceful-fs "4.X" - source-map "~0.6.0" - strip-bom-string "1.X" - through2 "2.X" - gulp-terser@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/gulp-terser/-/gulp-terser-2.1.0.tgz#149b693a1adbde922807b60b844bb7351dafbde1" @@ -18647,14 +18455,6 @@ hat@0.0.3: resolved "https://registry.yarnpkg.com/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" integrity sha1-uwFKnmSzeIrtgAWRdBPU/z1QLYo= -hdr-histogram-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hdr-histogram-js/-/hdr-histogram-js-1.2.0.tgz#1213c0b317f39b9c05bc4f208cb7931dbbc192ae" - integrity sha512-h0YToJ3ewqsaZ3nFTTa6dLOD7sqx+EgdC4+OcJ9Ou7zZDlT0sXSPHHr3cyenQsPqqbVHGn/oFY6zjfEKXGvzmQ== - dependencies: - base64-js "^1.2.0" - pako "^1.0.3" - hdr-histogram-js@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz#0b860534655722b6e3f3e7dca7b78867cf43dcb5" @@ -18722,7 +18522,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.5, hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: +hoist-non-react-statics@^2.5.5, hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -18933,7 +18733,7 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1, http-proxy-agent@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== @@ -19004,7 +18804,7 @@ https-proxy-agent@^5.0.1: agent-base "6" debug "4" -https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.2, https-proxy-agent@^7.0.3: +https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.2, https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== @@ -19812,7 +19612,7 @@ is-primitive@^3.0.1: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-3.0.1.tgz#98c4db1abff185485a657fc2905052b940524d05" integrity sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w== -is-promise@^2.1, is-promise@^2.1.0: +is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= @@ -20047,14 +19847,6 @@ isobject@^4.0.0: resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - isomorphic-unfetch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" @@ -20153,11 +19945,6 @@ iterate-value@^1.0.0: es-get-iterator "^1.0.2" iterate-iterator "^1.0.1" -its-name@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/its-name/-/its-name-1.0.0.tgz#2065f1883ecb568c65f7112ddbf123401fae4af0" - integrity sha1-IGXxiD7LVoxl9xEt2/EjQB+uSvA= - jackspeak@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" @@ -20770,17 +20557,6 @@ jquery@^3.5.0: resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470" integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw== -js-beautify@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.10.3.tgz#c73fa10cf69d3dfa52d8ed624f23c64c0a6a94c1" - integrity sha512-wfk/IAWobz1TfApSdivH5PJ0miIHgDoYb1ugSqHcODPmaYu46rYe5FVuIEkhjg8IQiv6rDNPyhsqbsohI/C2vQ== - dependencies: - config-chain "^1.1.12" - editorconfig "^0.15.3" - glob "^7.1.3" - mkdirp "~0.5.1" - nopt "~4.0.1" - js-cookie@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" @@ -21023,11 +20799,6 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - jsonpointer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" @@ -21298,7 +21069,7 @@ launchdarkly-node-server-sdk@^7.0.3: tunnel "0.0.6" uuid "^8.3.2" -lazy-ass@1.6.0, lazy-ass@^1.6.0: +lazy-ass@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= @@ -21709,19 +21480,11 @@ lodash.uniq@4.5.0, lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@>4.17.4, lodash@^4.0.1, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-ok@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" - integrity sha1-vqPdNqzQuKckDXhza1uXxlREozQ= - dependencies: - ansi-green "^0.1.1" - success-symbol "^0.1.0" - log-symbols@4.1.0, log-symbols@^4.0.0, log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -21883,13 +21646,6 @@ lru-cache@^7.14.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -lru-queue@0.1: - version "0.1.0" - resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" - integrity sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= - dependencies: - es5-ext "~0.10.2" - lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -21900,11 +21656,6 @@ luxon@^1.25.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.1.tgz#528cdf3624a54506d710290a2341aa8e6e6c61b0" integrity sha512-gYHAa180mKrNIUJCbwpmD0aTu9kV0dREDrwNnuyFAsO1Wt0EVYSZelPnJlbj9HplzXX/YWXHFTL45kvZ53M0pw== -luxon@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-2.5.2.tgz#17ed497f0277e72d58a4756d6a9abee4681457b6" - integrity sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA== - lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -22085,11 +21836,6 @@ marked@^4.0.15: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== -material-colors@^1.2.1: - version "1.2.5" - resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.5.tgz#5292593e6754cb1bcc2b98030e4e0d6a3afc9ea1" - integrity sha1-UpJZPmdUyxvMK5gDDk4Najr8nqE= - mathml-tag-names@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" @@ -22300,20 +22046,6 @@ memoize-one@^6.0.0: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== -memoizee@0.4.X: - version "0.4.14" - resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57" - integrity sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg== - dependencies: - d "1" - es5-ext "^0.10.45" - es6-weak-map "^2.0.2" - event-emitter "^0.3.5" - is-promise "^2.1" - lru-queue "0.1" - next-tick "1" - timers-ext "^0.1.5" - memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -22802,14 +22534,6 @@ mocha-junit-reporter@^2.0.2: strip-ansi "^6.0.1" xml "^1.0.0" -mocha-multi-reporters@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz#c73486bed5519e1d59c9ce39ac7a9792600e5676" - integrity sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg== - dependencies: - debug "^4.1.1" - lodash "^4.17.15" - mocha@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" @@ -22920,7 +22644,7 @@ moment-timezone@^0.5.43: dependencies: moment "^2.29.4" -moment@>=1.6.0, moment@>=2.14.0, moment@^2.10.6, moment@^2.29.4: +moment@>=2.14.0, moment@^2.10.6, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -23223,7 +22947,7 @@ next-line@^1.1.0: resolved "https://registry.yarnpkg.com/next-line/-/next-line-1.1.0.tgz#fcae57853052b6a9bae8208e40dd7d3c2d304603" integrity sha1-/K5XhTBStqm66CCOQN19PC0wRgM= -next-tick@1, next-tick@^1.1.0: +next-tick@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== @@ -23320,7 +23044,7 @@ node-fetch-h2@^2.3.0: dependencies: http2-client "^1.2.5" -node-fetch@^1.0.1, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -23459,7 +23183,7 @@ nodemailer@^6.6.2: resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.6.2.tgz#e184c9ed5bee245a3e0bcabc7255866385757114" integrity sha512-YSzu7TLbI+bsjCis/TZlAXBoM4y93HhlIgo0P5oiA2ua9Z4k+E2Fod//ybIzdJxOlXGRcHIh/WaeCBehvxZb/Q== -nopt@^4.0.1, nopt@~4.0.1: +nopt@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== @@ -23499,7 +23223,7 @@ normalize-path@3.0.0, normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= @@ -23676,7 +23400,7 @@ oas-validator@^5.0.8: should "^13.2.1" yaml "^1.10.0" -object-assign@4.X, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -24104,7 +23828,7 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2, p-limit@^2.3.0: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -24636,10 +24360,10 @@ pino@^8.15.0: sonic-boom "^3.1.0" thread-stream "^2.0.0" -pirates@^4.0.1, pirates@^4.0.4, pirates@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== +pirates@^4.0.1, pirates@^4.0.4, pirates@^4.0.5, pirates@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== piscina@^3.2.0: version "3.2.0" @@ -24735,11 +24459,6 @@ plur@^4.0.0: dependencies: irregular-plurals "^3.2.0" -pluralize@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-3.1.0.tgz#84213d0a12356069daa84060c559242633161368" - integrity sha1-hCE9ChI1YGnaqEBgxVkkJjMWE2g= - pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" @@ -25352,13 +25071,6 @@ promise.prototype.finally@^3.1.0: es-abstract "^1.9.0" function-bind "^1.1.1" -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - prompts@^2.0.1, prompts@^2.4.0, prompts@~2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -25367,7 +25079,7 @@ prompts@^2.0.1, prompts@^2.4.0, prompts@~2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.0, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.0, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -25443,7 +25155,7 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-agent@6.4.0: +proxy-agent@6.4.0, proxy-agent@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== @@ -25694,11 +25406,6 @@ rambda@^7.1.0: resolved "https://registry.yarnpkg.com/rambda/-/rambda-7.1.4.tgz#7faa9665a54c5d81773975532a942b3113bb4a56" integrity sha512-bPK8sSiVHIC7CqdWga8R+hRi5hfc4hK6S01lZW4KrLwSNryQoKaCOJA9GNiF20J7Nbe1vejRfR37/ASQXFL5EA== -ramda@0.25.0: - version "0.25.0" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" - integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ== - ramda@^0.21.0: version "0.21.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35" @@ -25822,18 +25529,6 @@ react-clientside-effect@^1.2.6: dependencies: "@babel/runtime" "^7.12.13" -react-color@^2.13.8: - version "2.17.0" - resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.17.0.tgz#e14b8a11f4e89163f65a34c8b43faf93f7f02aaa" - integrity sha512-kJfE5tSaFe6GzalXOHksVjqwCPAsTl+nzS9/BWfP7j3EXbQ4IiLAF9sZGNzk3uq7HfofGYgjmcUgh0JP7xAQ0w== - dependencies: - "@icons/material" "^0.2.4" - lodash ">4.17.4" - material-colors "^1.2.1" - prop-types "^15.5.10" - reactcss "^1.2.0" - tinycolor2 "^1.4.1" - react-colorful@^5.1.2: version "5.5.1" resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784" @@ -26030,7 +25725,7 @@ react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -26054,13 +25749,6 @@ react-markdown@^6.0.3: unist-util-visit "^2.0.0" vfile "^4.0.0" -react-moment-proptypes@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/react-moment-proptypes/-/react-moment-proptypes-1.7.0.tgz#89881479840a76c13574a86e3bb214c4ba564e7a" - integrity sha512-ZbOn/P4u469WEGAw5hgkS/E+g1YZqdves2BjYsLluJobzUZCtManhjHiZKjniBVT7MSHM6D/iKtRVzlXVv3ikA== - dependencies: - moment ">=1.6.0" - react-monaco-editor@^0.54.0: version "0.54.0" resolved "https://registry.yarnpkg.com/react-monaco-editor/-/react-monaco-editor-0.54.0.tgz#ec9293249a991b08264be723c1ec0ca3a6d480d8" @@ -26085,6 +25773,17 @@ react-popper@^2.2.4: react-fast-compare "^3.0.1" warning "^4.0.2" +react-recompose@^0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/react-recompose/-/react-recompose-0.33.0.tgz#f6946ffc1e576815cd855b18eb2440e0a7d9f019" + integrity sha512-Z5Pzfg3jBGboS2bFtFeZNJplTQ8xqmIeUXo0suTFgZDdb+H7l75GPwjrOndtHzoFsmDMGNHnullX3r9mc0aUqA== + dependencies: + "@babel/runtime" "^7.21.0" + change-emitter "^0.1.6" + hoist-non-react-statics "^2.5.5" + react-lifecycles-compat "^3.0.4" + symbol-observable "^4.0.0" + react-redux@^7.1.0, react-redux@^7.2.8: version "7.2.8" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" @@ -26291,15 +25990,6 @@ react-tabs@^4.3.0: react-shallow-renderer "^16.13.1" scheduler "^0.20.2" -react-textarea-autosize@^8.3.4: - version "8.3.4" - resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz#270a343de7ad350534141b02c9cb78903e553524" - integrity sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ== - dependencies: - "@babel/runtime" "^7.10.2" - use-composed-ref "^1.3.0" - use-latest "^1.2.1" - react-transition-group@^4.3.0: version "4.4.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" @@ -26375,13 +26065,6 @@ react@^17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" -reactcss@^1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/reactcss/-/reactcss-1.2.3.tgz#c00013875e557b1cf0dfd9a368a1c3dab3b548dd" - integrity sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A== - dependencies: - lodash "^4.0.1" - read-installed@~4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" @@ -26541,18 +26224,6 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" -recompose@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.30.0.tgz#82773641b3927e8c7d24a0d87d65aeeba18aabd0" - integrity sha512-ZTrzzUDa9AqUIhRk4KmVFihH0rapdCSMFXjhHbNrjAWxBuUD/guYlyysMnuHjlZC/KRiOKRtB4jf96yYSkKE8w== - dependencies: - "@babel/runtime" "^7.0.0" - change-emitter "^0.1.2" - fbjs "^0.8.1" - hoist-non-react-statics "^2.3.1" - react-lifecycles-compat "^3.0.2" - symbol-observable "^1.0.4" - redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -26803,13 +26474,6 @@ relative-microtime@^2.0.0: resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" integrity sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA== -relative@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" - integrity sha1-Dc2OxUpdNaPBXhBFA9ZTdbWlNn8= - dependencies: - isobject "^2.0.0" - release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -27043,10 +26707,10 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-in-the-middle@^7.0.1, require-in-the-middle@^7.1.1, require-in-the-middle@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-7.2.0.tgz#b539de8f00955444dc8aed95e17c69b0a4f10fcf" - integrity sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw== +require-in-the-middle@^7.0.1, require-in-the-middle@^7.1.1, require-in-the-middle@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-7.2.1.tgz#0d1f5e86a69aa14322f5951b924f02ad75f70b6b" + integrity sha512-u5XngygsJ+XV2dBV/Pl4SrcNpUXQfmYmXtuFeHDXfzk4i4NnGnret6xKWkkJHjMHS/16yMV9pEAlAunqmjllkA== dependencies: debug "^4.1.1" module-details-from-path "^1.0.3" @@ -27236,7 +26900,7 @@ rgbcolor@^1.0.1: resolved "https://registry.yarnpkg.com/rgbcolor/-/rgbcolor-1.0.1.tgz#d6505ecdb304a6595da26fa4b43307306775945d" integrity sha1-1lBezbMEplldom+ktDMHMGd1lF0= -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -27435,90 +27099,90 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sass-embedded-android-arm64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.70.0.tgz#3bdc0591239a0c4c45313e949883a87bb37e07a2" - integrity sha512-vMr7fruLUv/VvF7CPVF1z7Bc28a8K9Ps5nyN3UatOj+irxN1LbZIbeQua6neX2eFUsXvcg7hLZwvV3+T96Fhrw== - -sass-embedded-android-arm@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-android-arm/-/sass-embedded-android-arm-1.70.0.tgz#e003444e41e1ac2f85cbaa662a7e39df510286e6" - integrity sha512-Vog4Z+tsDYGv7m9sZisr/P6KvqDioCMu0cinexdnXhHXReo+X6CFe79yv/zA/Xfq5HtAAmFjGD6CO/nTjoydtw== - -sass-embedded-android-ia32@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.70.0.tgz#3051a973b902be3ec66a2b24549273e23484b08f" - integrity sha512-RWEJ7sBGBCd101oSBPuePPU8yXb1iB/ME4sRhgI5xjjyIsldiuvX48saW25u1ZqCo2AVA0BTXfWpNJnhKB3b4Q== - -sass-embedded-android-x64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-android-x64/-/sass-embedded-android-x64-1.70.0.tgz#86f4e7d1c91d35443cb9c06566e9a61efb4cf6e1" - integrity sha512-u+ijV6AQR/84kjjGb3mp0aibPiXkFKqfmHxqYBMN7h2xV7EM70Yz054nVifaBr8nfC0E8aT/DurSI4nkkQ6Uvg== - -sass-embedded-darwin-arm64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.70.0.tgz#6fca5c9925e70b85ae2008b5cb9d5359c7f0b80d" - integrity sha512-qMs08h0nwRA1B/Ieakcg/Y6lcCEnuBnPTNEkFkBlnfj3PFVPTb50wQvDr9JLpcjXWznlBxyFrz1nZM+pXDix7Q== - -sass-embedded-darwin-x64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.70.0.tgz#c618be025ddc47515f4cb7e25c71ac1cb21551c2" - integrity sha512-Vf8UQY3IBmsaz9L5DeJDjn19N//1n3rTquH69x29zPCd3zF2gnay38atxIZ+6h7VsZT3C6evm0y58JUJDWN1CA== - -sass-embedded-linux-arm64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.70.0.tgz#24ca8d8ed74611cb9f9efbf76ecd65908387a99e" - integrity sha512-PzhBg5xlyXcZ8FgyjqAcVtfaq462l3KeEid2OxrsOzBQgdgJb0La1tAEOpP9jz7YOOTr9A96vm609W9fRLI2Iw== - -sass-embedded-linux-arm@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.70.0.tgz#017085c42a2060e36f629c22f9daaa5491dd866f" - integrity sha512-U9e+k0XHwubeSIwsBYTNrTVH+0zF/ErSfuHfgTfuvlcKlhoGtFgAb7W8Qfe9FDF6TYTt0fJAJhSV2MdoExsgRA== - -sass-embedded-linux-ia32@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.70.0.tgz#cf6bc32beda3c8fc8c6886fb1b796de925c5f201" - integrity sha512-UOxTJywQRC/HzFQthlyNWJ07MX8EzKuTgH0N5T3XyXQTNuGeJQ8EPWY9fv1weLCjydVOEwm853F3djtUNmkCtg== - -sass-embedded-linux-musl-arm64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.70.0.tgz#cc81f56d2e14cdf412133a5ae2ed9d62f5b1dcac" - integrity sha512-DJl1AV9W7T3SHzXFqAtyjPZy4O2g4AC6QctY5/aM42DTY/xpWOmwUBgsDzDoRbNqP7qDl+GtHLlggrLWCBP9fg== - -sass-embedded-linux-musl-arm@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.70.0.tgz#4e22f7dc127b6920a784b0acb9a59efb465f1d1f" - integrity sha512-8zudDFpAoNrQDujNYBKkq8nwl4i0jMmXcysO9Ou0llrzdY7Keok2z1aS3IbZy7AvUXtGaeYSHUi5lXdOalJ/QQ== - -sass-embedded-linux-musl-ia32@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.70.0.tgz#c0a7278d542870a8114134b9bd1829d6fd16828e" - integrity sha512-CcAvT3KPc7cCJfTu1E0HzsAjE/dPQsKaXQD/nsBXNZo081R+lLR2u22wpXM2pnzMNJETRV/pDwozHoYEcPkPqQ== - -sass-embedded-linux-musl-x64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.70.0.tgz#5c0710733cf98b309e72f82b6b17bf53f3c9b230" - integrity sha512-g3i9PKmqTxuyrM1Yeju1s4Fj6fzAGyyfzw/LiZZtq0ZZGhJXJMVvEDog/OxQ37eYxWqq9XHFTW2PphMvukVK0g== - -sass-embedded-linux-x64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.70.0.tgz#1ceae4677f7dc9052727d08aa6f54dee2cf6c0b2" - integrity sha512-F9F2CA7C6z/ROfF0U/jtYWknbDe9S/TJoCJ5TlHafwS+SrZE1A+Czf2MWJ+8mc2NFiRjYzYxt4Ad29cuc6rrhw== - -sass-embedded-win32-ia32@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.70.0.tgz#b67e4a66548deca91eb75a9c467d40b1ad080e95" - integrity sha512-TITx2QwJouhMwA0CAjCmnTNeCDL9g2fkLe9z+5rf39OdmcX9CEBrY4CNaO5REnMpgoa+o82u272ZR3oWrsUs8Q== - -sass-embedded-win32-x64@1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.70.0.tgz#5a07423cf1370c302e6d44105358f6591b675b1e" - integrity sha512-rPe8WUdARhlfgIhGcCTGbTNgd6OppcmjtBrxUNoGs3AENSREQCpaNv5d+HBOMhGUfYgXIHUSiipilFUhLWpsrQ== - -sass-embedded@^1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass-embedded/-/sass-embedded-1.70.0.tgz#558f5e9776c6e4b91d9859a4dd325ac7c2b91391" - integrity sha512-1sVSh5MlSdktkwC2zG9WuaVR6j7AlDxadPmZBN0wP4GhznMQTvpwNIAFhAqgjwJYhwdWFOKEdIHSQK4V8K434Q== +sass-embedded-android-arm64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.71.1.tgz#9967153e36ec2e605d6679bd03356a1f222071c6" + integrity sha512-a7wJ1MM6sBwcM/8vIvvnwc9spoeNimNeXZpN9baSV4Ylthmr4GkTYYtf96Z/XYLdG5KBgYlxMs5T3OgqafdUMg== + +sass-embedded-android-arm@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-android-arm/-/sass-embedded-android-arm-1.71.1.tgz#3fdcdd7abad4e3605a8cd9def2e3a2224b582b6a" + integrity sha512-Pq6TlRg9lIYsZDo9XNQZnSg6grQKzBG3ssdv0W1SnYS1BzGKwbg8XnlUA/pVxK76BKEm8i+0DA4y8cZ8A3tmpw== + +sass-embedded-android-ia32@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.71.1.tgz#c4d132a8315394c1246e7561edec20d4b5084598" + integrity sha512-tn3WZNdKQtr/DSzl4cQIDZkTO3JuuMxPvM/T+U7gBFyhU62NyF5wvwBnuh+BN3iaMowfkSknzCZCjyJDwnkDjw== + +sass-embedded-android-x64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-android-x64/-/sass-embedded-android-x64-1.71.1.tgz#e46c58622e74146d789f2e7241f2d22276aa46aa" + integrity sha512-l72Pqxfb/pArpOLyWsuL9s8ODWupRGATWTPwUT/GjVdSQJO/lQL5DopXb55Cwh2T7t2G10e+uXTEMKz0qngoWQ== + +sass-embedded-darwin-arm64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.71.1.tgz#613836f73fe646df26577154295561d17b05f958" + integrity sha512-3eZDAcJBwoG0Kyasa/EbaKt1Jn2y0GHvCd0Oas/VtMsYL+/6abiCO1l8YltdxER4jvuHUKE2Ow7J6T6sC+vVQQ== + +sass-embedded-darwin-x64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.71.1.tgz#7b4aea4597f5cfc106998f1154f873bcb349c3da" + integrity sha512-/9FtMPVdQalhsRCD9opNIlZqJKe7veCjWsdj0J9utbc2bNCTYswXNQtC/jWJTjE9/gQ0+w5zwg9+fQzltdYh1w== + +sass-embedded-linux-arm64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.71.1.tgz#fbeebfbeb3594a6b1e085bd3c9d07156a35264f1" + integrity sha512-zUSmqeqcgTb3VjZggk9a9xB2ZGaAe/TYAi/vYRPNLY/f7dZSrsa9Ejo+LUm2aNl6V8hFzMz7BpoKsaRQJnb9GQ== + +sass-embedded-linux-arm@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.71.1.tgz#2381c077785d5977031e90e5d983e33e6a8c52b4" + integrity sha512-l7NEn0gji6GTN+p00DP2zZl9SE501Zy5obTA3beiD6+vQy7lCEC6vpNi/ZrlC6eRmgY2OKSBB2lfW7KSej9Hkg== + +sass-embedded-linux-ia32@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.71.1.tgz#7651382b8ec406de6408c1ff8d54fb20e79c9a54" + integrity sha512-NvzSljfc/Kw9/0CSn91AsINV2nh8vxhFe2cKexPMwvAqv/etU84dJMfJejxPJ39PmMqT1KvC4G+Qt2+6Mpe7oQ== + +sass-embedded-linux-musl-arm64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.71.1.tgz#0eac007de358cc4a6de6deed102c76a2b50fd938" + integrity sha512-Agtf6BcYQ0mt+jVDcRcN7bDPrMAQOWMeX15NTlQH1rO8voObLo6ThVl2NUkiZyyVmu7a6YOrCxpGBVAK1cLGOg== + +sass-embedded-linux-musl-arm@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.71.1.tgz#95af523da89e9713d915b3a8cab539fe360174e7" + integrity sha512-1O37K5EgSeQjCBizIF9xdZJw3mh5XYHOnsB4+65CLZg4ac84ragjFv9d9rYhwGs9QSgg1MoOv7VWnEIxQ8Pp9Q== + +sass-embedded-linux-musl-ia32@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.71.1.tgz#e40f3e5a98efb197523c6c8e060aaa7f4c55c683" + integrity sha512-Cd5sJkt70bSlYEXUSj9mPMKZLzDL8LGcBKUIfQRrcBKjmzD2Va2eLq4Zati9Xzt54unuDp4bAUUTyvQmjLzFmA== + +sass-embedded-linux-musl-x64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.71.1.tgz#3f21a68cb3e059f2eeae57cd3ff2b68e8f6bb1d6" + integrity sha512-uVfYms/lf4QVSvtQXkSm+Bq3wVsvkRMI30ca82rRwpwebxSaTbUr+uLnskh8QvbyfsbMyrzZQU0SCrO3uCua1A== + +sass-embedded-linux-x64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.71.1.tgz#664c1d81506c36f87bc0dbdf2fe9ee9a457f6c95" + integrity sha512-7BXniYic16+MQx0InyH8OXburLPGMRYRWf0l/t/fRkNkUHWFl7NQPAX0yvj73c/PKOdaYEUY6isNB4OGUGtZHQ== + +sass-embedded-win32-ia32@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.71.1.tgz#60ea5d4b54f4c6f1a073c1af60cff091459fbda9" + integrity sha512-ZDhL6hvekeKDkZ1wUj6wN0thrB/7wOO8HaQoagk+pKaHoa0Py7OLR/m9mQM8S13mZpUQduNsznmXV1fOss4GOg== + +sass-embedded-win32-x64@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.71.1.tgz#ee18bb830303e28f4d0db284f7a87656de3d2610" + integrity sha512-ecWP1TFUA9ujOuOTJfWC1iZsSZOdQy5OxIEHqoERxunyjwzkiTxfN8J7Y4bNQ5uwb4K0brxWyIM8Fq+UgDqcZA== + +sass-embedded@^1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass-embedded/-/sass-embedded-1.71.1.tgz#566f800026edbc3a56c5fff9b61f4bc88eacb464" + integrity sha512-nOmqErO1zd1wjvTbDscLZZ3fv5JPeQfaKuo0UCjYm7qPbpQcycp0l3nFZHxovjLjCetJ9IrLOADdznFYKV0f1A== dependencies: "@bufbuild/protobuf" "^1.0.0" buffer-builder "^0.2.0" @@ -27527,22 +27191,22 @@ sass-embedded@^1.70.0: supports-color "^8.1.1" varint "^6.0.0" optionalDependencies: - sass-embedded-android-arm "1.70.0" - sass-embedded-android-arm64 "1.70.0" - sass-embedded-android-ia32 "1.70.0" - sass-embedded-android-x64 "1.70.0" - sass-embedded-darwin-arm64 "1.70.0" - sass-embedded-darwin-x64 "1.70.0" - sass-embedded-linux-arm "1.70.0" - sass-embedded-linux-arm64 "1.70.0" - sass-embedded-linux-ia32 "1.70.0" - sass-embedded-linux-musl-arm "1.70.0" - sass-embedded-linux-musl-arm64 "1.70.0" - sass-embedded-linux-musl-ia32 "1.70.0" - sass-embedded-linux-musl-x64 "1.70.0" - sass-embedded-linux-x64 "1.70.0" - sass-embedded-win32-ia32 "1.70.0" - sass-embedded-win32-x64 "1.70.0" + sass-embedded-android-arm "1.71.1" + sass-embedded-android-arm64 "1.71.1" + sass-embedded-android-ia32 "1.71.1" + sass-embedded-android-x64 "1.71.1" + sass-embedded-darwin-arm64 "1.71.1" + sass-embedded-darwin-x64 "1.71.1" + sass-embedded-linux-arm "1.71.1" + sass-embedded-linux-arm64 "1.71.1" + sass-embedded-linux-ia32 "1.71.1" + sass-embedded-linux-musl-arm "1.71.1" + sass-embedded-linux-musl-arm64 "1.71.1" + sass-embedded-linux-musl-ia32 "1.71.1" + sass-embedded-linux-musl-x64 "1.71.1" + sass-embedded-linux-x64 "1.71.1" + sass-embedded-win32-ia32 "1.71.1" + sass-embedded-win32-x64 "1.71.1" sass-loader@^10.5.1: version "10.5.1" @@ -27745,13 +27409,6 @@ serialize-javascript@6.0.0, serialize-javascript@^6.0.0: dependencies: randombytes "^2.1.0" -serialize-javascript@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.1.0.tgz#8bf3a9170712664ef2561b44b691eafe399214ea" - integrity sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg== - dependencies: - randombytes "^2.1.0" - serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -28005,11 +27662,6 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -sigmund@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= - signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -28162,30 +27814,6 @@ snakecase-keys@^4.0.1: map-obj "^4.1.0" snake-case "^3.0.4" -snap-shot-compare@2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/snap-shot-compare/-/snap-shot-compare-2.8.3.tgz#b4982fb7b4e9cd4fa0b03a40a100b5f005b2d515" - integrity sha512-dznYMQAYMcQ4crFduIX5sST/Ex35l414hVCL6sXFi84OPuwG5eXgRBfBqbgz7mi3rC/r7VWDn2ADF8FTV/wbCw== - dependencies: - check-more-types "2.24.0" - debug "4.1.1" - disparity "2.0.0" - folktale "2.3.2" - lazy-ass "1.6.0" - strip-ansi "5.2.0" - variable-diff "1.1.0" - -snap-shot-store@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/snap-shot-store/-/snap-shot-store-1.2.3.tgz#4aab0b95ec24cb68eddf90b1c478617ded85f2d2" - integrity sha512-KLSUkdXvSfoPGPSo5Qk97jYEpME96WECOuIOpW91OGYt/fX2g2xOvXA35EJziI32PlDbRfi36JxzUcSsh59Ykw== - dependencies: - check-more-types "2.24.0" - debug "3.1.0" - folktale "2.0.1" - lazy-ass "1.6.0" - ramda "0.25.0" - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -28491,7 +28119,7 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -spec-change@^1.10.0, spec-change@^1.7.1: +spec-change@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/spec-change/-/spec-change-1.10.0.tgz#09770b40402a06d0aac8cdb550ecaade38590d05" integrity sha512-IMhfPFDbpLBBT/bjSVPLmRxPcCd43XH1MuSGgd3BxBeOLYIVvaca65C3T6cR5ouB+xKOERwsk3Y1RF46JmaquA== @@ -28921,13 +28549,6 @@ stringify-object@^3.2.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -28949,11 +28570,6 @@ strip-ansi@^7.0.1, strip-ansi@^7.1.0: dependencies: ansi-regex "^6.0.1" -strip-bom-string@1.X: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" - integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -29143,11 +28759,6 @@ stylus-lookup@^5.0.1: dependencies: commander "^10.0.1" -success-symbol@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" - integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= - superagent@^8.0.5, superagent@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/superagent/-/superagent-8.1.2.tgz#03cb7da3ec8b32472c9d20f6c2a57c7f3765f30b" @@ -29272,11 +28883,16 @@ swagger2openapi@^7.0.6: yaml "^1.10.0" yargs "^17.0.1" -symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0: +symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== +symbol-observable@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" + integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -29343,7 +28959,7 @@ tape@^5.0.1: string.prototype.trim "^1.2.1" through "^2.3.8" -tar-fs@3.0.5, tar-fs@^3.0.4: +tar-fs@3.0.5, tar-fs@^3.0.4, tar-fs@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.5.tgz#f954d77767e4e6edf973384e1eb95f8f81d64ed9" integrity sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg== @@ -29437,20 +29053,6 @@ telejson@^6.0.8: lodash "^4.17.21" memoizerific "^1.11.3" -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -tempy@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.3.0.tgz#6f6c5b295695a16130996ad5ab01a8bd726e8bf8" - integrity sha512-WrH/pui8YCwmeiAoxV+lpRH9HpRtgBhSR2ViBPgpGb/wnYDzp21R4MN45fsCGvLROvY67o3byhJRYRONJyImVQ== - dependencies: - temp-dir "^1.0.0" - type-fest "^0.3.1" - unique-string "^1.0.0" - terminal-link@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -29509,10 +29111,10 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.14.1, terser@^5.26.0, terser@^5.3.4, terser@^5.9.0: - version "5.26.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.26.0.tgz#ee9f05d929f4189a9c28a0feb889d96d50126fe1" - integrity sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ== +terser@^5.14.1, terser@^5.29.1, terser@^5.3.4, terser@^5.9.0: + version "5.29.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.29.1.tgz#44e58045b70c09792ba14bfb7b4e14ca8755b9fa" + integrity sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -29570,14 +29172,6 @@ throttleit@^1.0.0: resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= -through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - through2@^0.6.3: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -29586,6 +29180,14 @@ through2@^0.6.3: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +through2@^2.0.0, through2@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + through2@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" @@ -29608,7 +29210,7 @@ through2@~0.4.1: readable-stream "~1.0.17" xtend "~2.1.1" -"through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3.4: +through@^2.3.6, through@^2.3.8, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -29630,14 +29232,6 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" -timers-ext@^0.1.5: - version "0.1.7" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" - integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== - dependencies: - es5-ext "~0.10.46" - next-tick "1" - tiny-inflate@^1.0.0, tiny-inflate@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" @@ -29653,7 +29247,7 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinycolor2@1.4.1, tinycolor2@^1.0.0, tinycolor2@^1.4.1: +tinycolor2@1.4.1, tinycolor2@^1.0.0: version "1.4.1" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= @@ -30032,11 +29626,6 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -30150,7 +29739,7 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@4.9.5, typescript@^3.3.3333, typescript@^4.6.3, typescript@^5.0.4: +typescript@4.9.5, typescript@^3.3.3333, typescript@^5.0.4: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -30167,11 +29756,6 @@ typewise@^1.0.3: dependencies: typewise-core "^1.2.0" -ua-parser-js@^0.7.18: - version "0.7.24" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" - integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" @@ -30356,13 +29940,6 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - unique-string@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" @@ -30604,23 +30181,11 @@ use-callback-ref@^1.3.0: dependencies: tslib "^2.0.0" -use-composed-ref@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.3.0.tgz#3d8104db34b7b264030a9d916c5e94fbe280dbda" - integrity sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ== - -use-isomorphic-layout-effect@^1.1.1, use-isomorphic-layout-effect@^1.1.2: +use-isomorphic-layout-effect@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== -use-latest@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.1.tgz#d13dfb4b08c28e3e33991546a2cee53e14038cf2" - integrity sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw== - dependencies: - use-isomorphic-layout-effect "^1.1.1" - use-memo-one@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" @@ -30777,14 +30342,6 @@ value-or-function@^4.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-4.0.0.tgz#70836b6a876a010dc3a2b884e7902e9db064378d" integrity sha512-aeVK81SIuT6aMJfNo9Vte8Dw0/FZINGBV8BfCraGtqVxIeLAEhJyoWs8SmvRVmXfGss2PmmOwZCuBPbZR+IYWg== -variable-diff@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/variable-diff/-/variable-diff-1.1.0.tgz#d2bd5c66db76c13879d96e6a306edc989df978da" - integrity sha1-0r1cZtt2wTh52W5qMG7cmJ35eNo= - dependencies: - chalk "^1.1.1" - object-assign "^4.0.1" - varint@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" @@ -31375,10 +30932,10 @@ web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.2.0, web-streams-polyfill@^ resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== -web-streams-polyfill@~3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.0.3.tgz#f49e487eedeca47a207c1aee41ee5578f884b42f" - integrity sha512-d2H/t0eqRNM4w2WvmTdoeIvzAUSpK7JmATB8Nr2lb7nQ9BTIJVjbQ/TRFVEh2gUH1HwclPdoPtfMoFfetXaZnA== +web-streams-polyfill@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz#74cedf168339ee6e709532f76c49313a8c7acdac" + integrity sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw== webidl-conversions@^3.0.0: version "3.0.1" @@ -31636,7 +31193,7 @@ whatwg-encoding@^2.0.0: dependencies: iconv-lite "0.6.3" -whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: +whatwg-fetch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== @@ -32099,7 +31656,7 @@ yargs@17.0.1: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@17.7.2, yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.4.0, yargs@^17.7.1, yargs@^17.7.2: +yargs@17.7.2, yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.7.1, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==