diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index b17a63170f907..b792825bd9dcf 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -322,6 +322,7 @@ enabled: - x-pack/test/functional/apps/security/config.ts - x-pack/test/functional/apps/snapshot_restore/config.ts - x-pack/test/functional/apps/spaces/config.ts + - x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts - x-pack/test/functional/apps/status_page/config.ts - x-pack/test/functional/apps/transform/creation/index_pattern/config.ts - x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts diff --git a/.buildkite/pipeline-resource-definitions/kibana-api-docs.yml b/.buildkite/pipeline-resource-definitions/kibana-api-docs.yml new file mode 100644 index 0000000000000..5368b60314e47 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-api-docs.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-api-docs-daily + description: Builds api_docs daily and creates a PR with the changes + links: + - url: 'https://buildkite.com/elastic/kibana-api-docs-daily' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / api-docs / daily + description: Builds api_docs daily and creates a PR with the changes + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: true + branch_configuration: main + cancel_intermediate_builds: true + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/build_api_docs.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: false + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + schedules: + Daily build: + cronline: 0 0 * * * America/New_York + message: Daily build + branch: main diff --git a/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml new file mode 100644 index 0000000000000..32f78b24e8d23 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-fips-daily + description: Run Kibana FIPS smoke tests + links: + - title: Pipeline link + url: https://buildkite.com/elastic/kibana-fips +spec: + type: buildkite-pipeline + owner: group:kibana-operations + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / fips + description: Run Kibana FIPS smoke tests + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: "#kibana-operations-alerts" + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true" + repository: elastic/kibana + branch_configuration: main + default_branch: main + pipeline_file: ".buildkite/pipelines/fips.yml" + provider_settings: + trigger_mode: none + schedules: + daily: + branch: main + cronline: 0 9 * * * America/New_York + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY diff --git a/.buildkite/pipeline-resource-definitions/kibana-fleet-packages-daily.yml b/.buildkite/pipeline-resource-definitions/kibana-fleet-packages-daily.yml new file mode 100644 index 0000000000000..8805fef47f914 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-fleet-packages-daily.yml @@ -0,0 +1,49 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-fleet-packages + description: Installs all fleet packages into Kibana to ensure the install step works + links: + - url: 'https://buildkite.com/elastic/kibana-fleet-packages' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / fleet-packages + description: Installs all fleet packages into Kibana to ensure the install step works + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#fleet-notifications' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: true + branch_configuration: main + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/fleet/packages_daily.yml + skip_intermediate_builds: false + provider_settings: + trigger_mode: none + publish_commit_status: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: false + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + fleet: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + schedules: + Single user daily test: + cronline: 0 9 * * * America/New_York + message: Single user daily test + env: {} + branch: main diff --git a/.buildkite/pipeline-resource-definitions/kibana-serverless-security-solution-quality-gate-api-integration.yml b/.buildkite/pipeline-resource-definitions/kibana-serverless-security-solution-quality-gate-api-integration.yml new file mode 100644 index 0000000000000..3e8f53b101626 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-serverless-security-solution-quality-gate-api-integration.yml @@ -0,0 +1,46 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-serverless-secsol-qg-api-integration + description: Runs the serverless security solution api integration tests for the Quality Gate + links: + - url: 'https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-api-integration' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / serverless / security-solution-quality-gate / api-integration + description: Runs the serverless security solution api integration tests for the Quality Gate + spec: + env: {} + allow_rebuilds: true + branch_configuration: '' + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/security_solution/api_integration.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: false + teams: + everyone: + access_level: BUILD_AND_READ + security-engineering-productivity: + access_level: MANAGE_BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml index 00e7c5b8fb91e..2cc1439713e48 100644 --- a/.buildkite/pipeline-resource-definitions/locations.yml +++ b/.buildkite/pipeline-resource-definitions/locations.yml @@ -7,20 +7,24 @@ metadata: spec: type: url targets: - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-flaky.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-on-merge-unsupported-ftrs.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-defend-workflows.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-detection-engine.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-entity-analytics.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-explore.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-gen-ai.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml' - - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml' + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-api-docs.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-flaky.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-fleet-packages-daily.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-on-merge-unsupported-ftrs.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-security-solution-quality-gate-api-integration.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-defend-workflows.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-detection-engine.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-entity-analytics.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-explore.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-gen-ai.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml diff --git a/.buildkite/pipelines/build_api_docs.yml b/.buildkite/pipelines/build_api_docs.yml index b2ab95b701d57..ef1f875861387 100644 --- a/.buildkite/pipelines/build_api_docs.yml +++ b/.buildkite/pipelines/build_api_docs.yml @@ -1,13 +1,46 @@ env: PUBLISH_API_DOCS_CHANGES: 'true' steps: - - command: .buildkite/scripts/steps/build_api_docs.sh + - command: .buildkite/scripts/steps/api_docs/type_check_with_status.sh + label: Run scripts/type_check + key: type_check + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 50 + + - command: .buildkite/scripts/steps/api_docs/build_api_docs.sh label: 'Build API Docs' agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true key: build_api_docs - timeout_in_minutes: 60 + timeout_in_minutes: 50 + retry: + automatic: + - exit_status: '-1' + limit: 3 + + - wait: ~ + + - command: .buildkite/scripts/steps/api_docs/publish_api_docs.sh + label: 'Publish API Docs' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true + key: publish_api_docs + timeout_in_minutes: 50 retry: automatic: - exit_status: '-1' limit: 3 + if: env('PUBLISH_API_DOCS_CHANGES') == 'true' diff --git a/.buildkite/pipelines/fips.yml b/.buildkite/pipelines/fips.yml new file mode 100644 index 0000000000000..44e44ac69d8a4 --- /dev/null +++ b/.buildkite/pipelines/fips.yml @@ -0,0 +1,32 @@ +env: + DISABLE_CI_STATS_SHIPPING: "true" +steps: + - command: .buildkite/scripts/steps/build_kibana.sh + label: Build Kibana Distribution and Plugins + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-16 + preemptible: true + key: build + if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: "-1" + limit: 3 + + - wait + + - command: TEST_PACKAGE=fips .buildkite/scripts/steps/package_testing/test.sh + label: "Smoke testing for FIPS" + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + enableNestedVirtualization: true + localSsds: 1 + localSsdInterface: nvme + machineType: n2-standard-4 + timeout_in_minutes: 600 diff --git a/.buildkite/pipelines/fleet/packages_daily.yml b/.buildkite/pipelines/fleet/packages_daily.yml index cecd88a948ddc..12d7b85f27919 100644 --- a/.buildkite/pipelines/fleet/packages_daily.yml +++ b/.buildkite/pipelines/fleet/packages_daily.yml @@ -3,14 +3,21 @@ steps: label: Pre-Build timeout_in_minutes: 10 agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 - wait - command: .buildkite/scripts/steps/fleet/install_all_packages.sh label: Install All Packages agents: - queue: n2-2 + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + localSsds: 1 + machineType: n2-standard-2 env: # ensure that the FTR logs all output for these tests DISABLE_CI_LOG_OUTPUT_CAPTURE: 'true' @@ -24,4 +31,7 @@ steps: - label: Post-Build command: .buildkite/scripts/lifecycle/post_build.sh agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index c9d755d5d94c8..5a4d7afcaa128 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -91,8 +91,8 @@ steps: - exit_status: '-1' limit: 3 - - command: .buildkite/scripts/steps/build_api_docs.sh - label: 'Check Types and Build API Docs' + - command: .buildkite/scripts/steps/api_docs/build_api_docs.sh + label: 'Build API Docs' agents: queue: n2-4-spot key: build_api_docs diff --git a/.buildkite/pipelines/security_solution/api_integration.yml b/.buildkite/pipelines/security_solution/api_integration.yml index 046d9fafe3873..399a8b996c88b 100644 --- a/.buildkite/pipelines/security_solution/api_integration.yml +++ b/.buildkite/pipelines/security_solution/api_integration.yml @@ -3,7 +3,11 @@ steps: label: 'Upload runtime info' key: upload_runtime_info agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 300 retry: automatic: @@ -13,66 +17,90 @@ steps: - group: 'Execute Tests' key: test_execution steps: - - label: Running exception_workflows:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_workflows:qa:serverless - key: exception_workflows:qa:serverless + - label: Running exception_workflows:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_workflows:essentials:qa:serverless + key: exception_workflows:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: - exit_status: '*' limit: 2 - - label: Running exception_operators_date_numeric_types:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_date_numeric_types:qa:serverless - key: exception_operators_date_numeric_types:qa:serverless + - label: Running exception_operators_date_numeric_types:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_date_numeric_types:essentials:qa:serverless + key: exception_operators_date_numeric_types:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: - exit_status: '*' limit: 2 - - label: Running exception_operators_keyword:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_keyword:qa:serverless - key: exception_operators_keyword:qa:serverless + - label: Running exception_operators_keyword:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_keyword:essentials:qa:serverless + key: exception_operators_keyword:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: - exit_status: '*' limit: 2 - - label: Running exception_operators_ips:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_ips:qa:serverless - key: exception_operators_ips:qa:serverless + - label: Running exception_operators_ips:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_ips:essentials:qa:serverless + key: exception_operators_ips:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: - exit_status: '*' limit: 2 - - label: Running exception_operators_long:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_long:qa:serverless - key: exception_operators_long:qa:serverless + - label: Running exception_operators_long:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_long:essentials:qa:serverless + key: exception_operators_long:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: - exit_status: '1' limit: 2 - - label: Running exception_operators_text:qa:serverless - command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_text:qa:serverless - key: exception_operators_text:qa:serverless + - label: Running exception_operators_text:essentials:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_operators_text:essentials:qa:serverless + key: exception_operators_text:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -83,7 +111,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh alerts:qa:serverless key: alerts:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -94,7 +126,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh alerts:essentials:qa:serverless key: alerts:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -105,7 +141,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh actions:qa:serverless key: actions:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -116,7 +156,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh genai:qa:serverless key: genai:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -127,7 +171,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_execution_logic:qa:serverless key: rule_execution_logic:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -138,7 +186,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_patch:qa:serverless key: rule_patch:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -149,7 +201,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_patch:essentials:qa:serverless key: rule_patch:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -160,7 +216,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_update:qa:serverless key: rule_update:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -171,7 +231,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_update:essentials:qa:serverless key: rule_update:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -182,7 +246,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rules_management:essentials:qa:serverless key: rules_management:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -193,7 +261,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_management:qa:serverless key: prebuilt_rules_management:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -204,7 +276,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless key: prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -215,7 +291,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_large_prebuilt_rules_package:qa:serverless key: prebuilt_rules_large_prebuilt_rules_package:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -226,7 +306,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_update_prebuilt_rules_package:qa:serverless key: prebuilt_rules_update_prebuilt_rules_package:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -237,7 +321,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_bulk_actions:qa:serverless key: rule_bulk_actions:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -248,7 +336,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_read:qa:serverless key: rule_read:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -259,7 +351,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_import_export:essentials:qa:serverless key: rule_import_export:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -270,7 +366,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_import_export:qa:serverless key: rule_import_export:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -282,7 +382,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_management:qa:serverless key: rule_management:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -293,7 +397,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_read:essentials:qa:serverless key: rule_read:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -304,7 +412,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_creation:qa:serverless key: rule_creation:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -315,7 +427,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_creation:essentials:qa:serverless key: rule_creation:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -326,7 +442,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_delete:qa:serverless key: rule_delete:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -337,7 +457,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_delete:essentials:qa:serverless key: rule_delete:essentials:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -348,7 +472,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh exception_lists_items:qa:serverless key: exception_lists_items:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -359,7 +487,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh lists_items:qa:serverless key: lists_items:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -370,7 +502,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh user_roles:qa:serverless key: user_roles:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -381,7 +517,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh telemetry:qa:serverless key: telemetry:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: @@ -391,7 +531,11 @@ steps: command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh entity_analytics:qa:serverless key: entity_analytics:qa:serverless agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_security_solution_defend_workflows.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_security_solution_defend_workflows.yml index 974514f47c101..87906082ec5aa 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_security_solution_defend_workflows.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_security_solution_defend_workflows.yml @@ -14,6 +14,20 @@ steps: - exit_status: "*" limit: 1 - - command: "echo 'Running the defend worklows tests in this step" + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows.sh cypress:dw:qa:serverless:run + label: 'Serverless MKI QA Defend Workflows Cypress Tests on Serverless' key: test_defend_workflows - label: "Serverless MKI QA Defend Workflows - Security Solution Cypress Tests" + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + enableNestedVirtualization: true + localSsds: 1 + localSsdInterface: nvme + machineType: n2-standard-4 + timeout_in_minutes: 300 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh index 8b0ab8dcae33a..6b2706c10067b 100755 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh @@ -17,7 +17,6 @@ set +e # Generate a random 5-digit number random_number=$((10000 + $RANDOM % 90000)) -PROXY_URL="https://cloud-handler-test-r344edqiza-uc.a.run.app" # Check the healthcheck of the proxy service response=$(curl -s -o /dev/null -w "%{http_code}" "$PROXY_URL/healthcheck") echo "Proxy Healthcheck Response code: $response" diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows.sh new file mode 100755 index 0000000000000..fe384fa0a6281 --- /dev/null +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -euo pipefail + +if [ -z "$1" ] + then + echo "No target script from the package.json file, is supplied" + exit 1 +fi + + +source .buildkite/scripts/common/util.sh +source .buildkite/scripts/steps/functional/common_cypress.sh +.buildkite/scripts/bootstrap.sh + +export JOB=kibana-defend-workflows-serverless-cypress + +buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true" + +source .buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh + +cd x-pack/plugins/security_solution +set +e + +export BK_ANALYTICS_API_KEY=$(vault_get security-solution-quality-gate serverless-cypress-defend-workflows) + +echo "--- Running the tests for target $1" +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn $1; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh index 85f361752f6f6..a7f1529e1fb9b 100644 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh @@ -13,6 +13,6 @@ vault_get security-quality-gate/role-users/sec-sol-auto-03 data -format=json > . export CLOUD_QA_API_KEY=$(vault_get security-solution-quality-gate qa_api_key) export QA_CONSOLE_URL=$(vault_get security-solution-quality-gate qa_console_url) # The vault entries relevant to the Proxy service (Cloud Handler) -export PROXY_URL=$(vault_get security-solution-quality-gate-proxy proxy_url_test) +export PROXY_URL=$(vault_get security-solution-quality-gate-proxy proxy_url_prod) export PROXY_CLIENT_ID=$(vault_get security-solution-quality-gate-proxy client_id) export PROXY_SECRET=$(vault_get security-solution-quality-gate-proxy secret) diff --git a/.buildkite/scripts/steps/api_docs/build_api_docs.sh b/.buildkite/scripts/steps/api_docs/build_api_docs.sh new file mode 100755 index 0000000000000..247e6a2079922 --- /dev/null +++ b/.buildkite/scripts/steps/api_docs/build_api_docs.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +.buildkite/scripts/bootstrap.sh + +echo "--- Build API Docs" +node --max-old-space-size=12000 scripts/build_api_docs + +if [[ "${PUBLISH_API_DOCS_CHANGES:-}" == "true" ]]; then + echo "--- Store API Docs changes in Buildkite" + + git diff > api_docs_changes.diff + buildkite-agent artifact upload api_docs_changes.diff + + echo "API Docs changes uploaded" +fi diff --git a/.buildkite/scripts/steps/api_docs/publish_api_docs.sh b/.buildkite/scripts/steps/api_docs/publish_api_docs.sh new file mode 100755 index 0000000000000..77f6fb0888fb3 --- /dev/null +++ b/.buildkite/scripts/steps/api_docs/publish_api_docs.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "--- Publish API Docs" + +buildkite-agent artifact download "api_docs_changes.diff" . + +if [[ -s "api_docs_changes.diff" ]]; then + echo "Changes detected in API Docs" + git apply api_docs_changes.diff + rm api_docs_changes.diff +else + echo "No changes detected in API Docs" + exit 0 +fi + +git config --global user.name kibanamachine +git config --global user.email '42973632+kibanamachine@users.noreply.github.com' + +branch="api_docs_$(date +%F_%H-%M-%S)" +git checkout -b "$branch" +git add ./*.docnav.json +git add api_docs +git commit -m "[api-docs] Daily api_docs build" + +git push origin "$branch" + +prUrl=$(gh pr create --repo elastic/kibana --base main --head "$branch" --title "[api-docs] $(date +%F) Daily api_docs build" --body "Generated by $BUILDKITE_BUILD_URL" --label "release_note:skip" --label "docs") +echo "Opened PR: $prUrl" +gh pr merge --repo elastic/kibana --auto --squash "$prUrl" + +GH_TOKEN="$KIBANA_CI_GITHUB_TOKEN" gh pr review --repo elastic/kibana --approve -b "Automated review from $BUILDKITE_BUILD_URL" "$prUrl" diff --git a/.buildkite/scripts/steps/api_docs/type_check_with_status.sh b/.buildkite/scripts/steps/api_docs/type_check_with_status.sh new file mode 100755 index 0000000000000..188c02dbc525c --- /dev/null +++ b/.buildkite/scripts/steps/api_docs/type_check_with_status.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +.buildkite/scripts/bootstrap.sh + +echo --- Check Types +set +e +node scripts/type_check +TYPE_CHECK_RESULT=$? +echo Type check exited with status $TYPE_CHECK_RESULT +set -e + +if [[ $TYPE_CHECK_RESULT -ne 0 ]]; then + echo "Type check failed - setting status to failure" + buildkite-agent meta-data set "type_check_status" "failure" +else + echo "Type check passed - setting status to success" + buildkite-agent meta-data set "type_check_status" "success" +fi + +exit $TYPE_CHECK_RESULT diff --git a/.buildkite/scripts/steps/artifacts/docker_image.sh b/.buildkite/scripts/steps/artifacts/docker_image.sh index 790c52c212faf..beb6f04e6e9d8 100755 --- a/.buildkite/scripts/steps/artifacts/docker_image.sh +++ b/.buildkite/scripts/steps/artifacts/docker_image.sh @@ -99,16 +99,9 @@ gsutil -m cp -r "$CDN_ASSETS_FOLDER/*" "gs://$GCS_SA_CDN_BUCKET/$GIT_ABBREV_COMM gcloud auth revoke "$GCS_SA_CDN_EMAIL" echo "--- Validate CDN assets" -( - shopt -s globstar - cd $CDN_ASSETS_FOLDER - for CDN_ASSET in **/*; do - if [[ -f "$CDN_ASSET" ]]; then - echo -n "Testing $CDN_ASSET..." - curl --retry 10 --retry-max-time 600 --connect-timeout 120 --max-time 120 -I --write-out '%{http_code}\n' --fail --silent --output /dev/null "$GCS_SA_CDN_URL/$CDN_ASSET" - fi - done -) +ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts" \ + "$GCS_SA_CDN_URL" \ + "$CDN_ASSETS_FOLDER" echo "--- Upload archives" buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-x86_64.tar.gz" diff --git a/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts b/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts new file mode 100644 index 0000000000000..61b2d8774f4ac --- /dev/null +++ b/.buildkite/scripts/steps/artifacts/validate_cdn_assets.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 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 * as glob from 'glob'; +import axios from 'axios'; + +const CDN_URL_PREFIX = process.argv[2]; +const CDN_ASSETS_FOLDER = process.argv[3]; + +async function main() { + const allAssets = glob.sync('**/*', { cwd: CDN_ASSETS_FOLDER, nodir: true }); + const totalAssetCount = allAssets.length; + let assetsProcessed = 0; + let assetsFound = 0; + + const batchSize = 50; + + console.log(`Starting CDN asset validation for ${totalAssetCount} assets...`); + + while (assetsProcessed < totalAssetCount) { + const batch = allAssets.slice(assetsProcessed, assetsProcessed + batchSize); + const results = await Promise.all(batch.map((url) => headAssetUrlWithRetry(url))); + assetsProcessed += results.length; + results.forEach((result) => { + if (result.status === 200) { + console.log(`Testing ${result.assetPath}...${result.status}`); + assetsFound++; + } else { + console.error(`Testing ${result.assetPath}...${result.status} (${result.testUrl})`); + } + }); + } + + return { + totalAssetCount, + assetsProcessed, + assetsFound, + assetsNotFound: totalAssetCount - assetsFound, + }; +} + +async function headAssetUrl(assetPath: string) { + const testUrl = `${CDN_URL_PREFIX}/${assetPath}`; + const response = await axios.head(testUrl, { + timeout: 1000, + }); + return { + status: response.status, + testUrl, + assetPath, + }; +} + +async function headAssetUrlWithRetry( + assetPath: string, + retries = 5 +): Promise<{ + status: number; + testUrl: string; + assetPath: string; +}> { + const result = await headAssetUrl(assetPath); + if (result.status === 200) { + return result; + } else if (retries > 0) { + console.log(`Retrying ${assetPath}...(retries left: ${retries})`); + await new Promise((resolve) => setTimeout(resolve, 1000)); + return headAssetUrlWithRetry(assetPath, retries - 1); + } else { + return { + status: result.status || 0, + testUrl: result.testUrl, + assetPath, + }; + } +} + +main() + .then(({ totalAssetCount, assetsNotFound }) => { + if (assetsNotFound) { + console.error(`Couldn't find ${assetsNotFound} assets on CDN.`); + process.exit(1); + } else { + console.log(`All ${totalAssetCount} found on CDN.`); + process.exit(0); + } + }) + .catch((error) => { + console.error(error.message); + process.exit(1); + }); diff --git a/.buildkite/scripts/steps/build_api_docs.sh b/.buildkite/scripts/steps/build_api_docs.sh deleted file mode 100755 index f86032c902d1a..0000000000000 --- a/.buildkite/scripts/steps/build_api_docs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -.buildkite/scripts/bootstrap.sh - -echo "--- Run scripts/type_check to ensure that all build available" -node scripts/type_check - -echo "--- Build API Docs" -node --max-old-space-size=12000 scripts/build_api_docs - -if [[ "${PUBLISH_API_DOCS_CHANGES:-}" == "true" ]]; then - echo "--- Publish API Docs" - - git config --global user.name kibanamachine - git config --global user.email '42973632+kibanamachine@users.noreply.github.com' - - branch="api_docs_$(date +%F_%H-%M-%S)" - git checkout -b "$branch" - git add ./*.docnav.json - git add api_docs - git commit -m "[api-docs] Daily api_docs build" - - git remote add kibanamachine https://github.com/kibanamachine/kibana.git - git push -u kibanamachine "$branch" - prUrl=$(gh pr create --repo elastic/kibana --title "[api-docs] $(date +%F) Daily api_docs build" --body "Generated by $BUILDKITE_BUILD_URL" --label "release_note:skip" --label "docs") - echo "Opened PR: $prUrl" - gh pr merge --repo elastic/kibana --auto --squash "$prUrl" - - GH_TOKEN="$KIBANA_CI_GITHUB_TOKEN" gh pr review --repo elastic/kibana --approve -b "Automated review from $BUILDKITE_BUILD_URL" "$prUrl" -fi diff --git a/.buildkite/scripts/steps/fips/build.sh b/.buildkite/scripts/steps/fips/build.sh old mode 100644 new mode 100755 diff --git a/.buildkite/scripts/steps/fips/smoke_test.sh b/.buildkite/scripts/steps/fips/smoke_test.sh new file mode 100755 index 0000000000000..7026c7bab941c --- /dev/null +++ b/.buildkite/scripts/steps/fips/smoke_test.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +if [ -z "$KIBANA_BUILD_LOCATION" ]; then + export KIBANA_BUILD_LOCATION="/usr/share/kibana" +fi + +# a FTR failure will result in the script returning an exit code of 10 +exitCode=0 + +configs=( + "x-pack/test/reporting_functional/reporting_and_security.config.ts" + "x-pack/test/saved_object_api_integration/security_and_spaces/config_trial.ts" + "x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts" + "x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts" + "x-pack/test/alerting_api_integration/security_and_spaces/group3/config.ts" + "x-pack/test/alerting_api_integration/security_and_spaces/group4/config.ts" + "x-pack/test/functional/apps/saved_objects_management/config.ts" + "x-pack/test/functional/apps/user_profiles/config.ts" + "x-pack/test/functional/apps/security/config.ts" +) + +cd /home/vagrant/kibana + +for config in "${configs[@]}"; do + set +e + node /home/vagrant/kibana/scripts/functional_tests \ + --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --config="$config" + lastCode=$? + set -e + + if [ $lastCode -ne 0 ]; then + exitCode=10 + echo "FTR exited with code $lastCode" + echo "^^^ +++" + + if [[ "$failedConfigs" ]]; then + failedConfigs="${failedConfigs}"$'\n'"$config" + else + failedConfigs="$config" + fi + fi +done + +if [[ "$failedConfigs" ]]; then + echo "$failedConfigs" >/home/vagrant/ftr_failed_configs +fi + +echo "--- FIPS smoke test complete" + +exit $exitCode diff --git a/.buildkite/scripts/steps/package_testing/test.sh b/.buildkite/scripts/steps/package_testing/test.sh index c16d5cf98b5f5..99750529815c8 100755 --- a/.buildkite/scripts/steps/package_testing/test.sh +++ b/.buildkite/scripts/steps/package_testing/test.sh @@ -21,17 +21,25 @@ elif [[ "$TEST_PACKAGE" == "rpm" ]]; then elif [[ "$TEST_PACKAGE" == "docker" ]]; then download_artifact "kibana-$KIBANA_PKG_VERSION*-docker-image.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" KIBANA_IP_ADDRESS="192.168.56.7" +elif [[ "$TEST_PACKAGE" == "fips" ]]; then + download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" + download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" fi cd .. export VAGRANT_CWD=$PWD/test/package -vagrant up "$TEST_PACKAGE" --no-provision -node scripts/es snapshot \ - -E network.bind_host=127.0.0.1,192.168.56.1 \ - -E discovery.type=single-node \ - --license=trial & -while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done +if [[ "$TEST_PACKAGE" == "fips" ]]; then + vagrant up "$TEST_PACKAGE" +else + vagrant up "$TEST_PACKAGE" --no-provision + + node scripts/es snapshot \ + -E network.bind_host=127.0.0.1,192.168.56.1 \ + -E discovery.type=single-node \ + --license=trial & + while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done +fi function echoKibanaLogs { if [[ "$TEST_PACKAGE" == "deb" ]] || [[ "$TEST_PACKAGE" == "rpm" ]]; then @@ -47,13 +55,25 @@ function echoKibanaLogs { } trap "echoKibanaLogs" EXIT -vagrant provision "$TEST_PACKAGE" +if [[ "$TEST_PACKAGE" == "fips" ]]; then + set +e + vagrant ssh $TEST_PACKAGE -t -c "/home/vagrant/kibana/.buildkite/scripts/steps/fips/smoke_test.sh" + vagrant ssh $TEST_PACKAGE -t -c "cat /home/vagrant/ftr_failed_configs 2>/dev/null" >ftr_failed_configs + set -e + + if [ -s ftr_failed_configs ]; then + buildkite-agent meta-data set "ftr-failed-configs" <./ftr_failed_configs + fi +else + vagrant provision "$TEST_PACKAGE" + + export TEST_BROWSER_HEADLESS=1 + export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601" + export TEST_ES_URL="http://elastic:changeme@192.168.56.1:9200" -export TEST_BROWSER_HEADLESS=1 -export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601" -export TEST_ES_URL="http://elastic:changeme@192.168.56.1:9200" + echo "--- FTR - Reporting" -cd x-pack + cd x-pack -echo "--- FTR - Reporting" -node scripts/functional_test_runner.js --config test/functional/apps/visualize/config.ts --include-tag=smoke --quiet + node scripts/functional_test_runner.js --config test/functional/apps/visualize/config.ts --include-tag=smoke --quiet +fi diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0f58444069968..e85da3abf6ec2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1138,6 +1138,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql /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 /x-pack/test_serverless/functional/test_suites/observability/ @elastic/obs-ux-logs-team +/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview @elastic/obs-ux-logs-team # Observability onboarding tour /x-pack/plugins/observability_solution/observability_shared/public/components/tour @elastic/platform-onboarding diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index 68a00be960c4b..49c2f6dba53b0 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -27,3 +27,9 @@ - 'x-pack/plugins/observability_solution/observability_ai_assistant_*/**/*.*' - 'x-pack/test/observability_ai_assistant_api_integration/**/*.*' - 'x-pack/test/observability_ai_assistant_functional/**/*.*' +- 'ci:project-deploy-observability': + - 'packages/kbn-apm-*/**/*.*' + - 'x-pack/plugins/observability_solution/**/*.*' + - 'x-pack/plugins/serverless_observability/**/*.*' + - 'x-pack/test/apm_api_integration/**/*.*' + - 'x-pack/test/observability_*/**/*.*' diff --git a/.github/workflows/oblt-github-commands.yml b/.github/workflows/oblt-github-commands.yml index 4388901e2fa0e..d3f4bd61b817e 100644 --- a/.github/workflows/oblt-github-commands.yml +++ b/.github/workflows/oblt-github-commands.yml @@ -50,8 +50,7 @@ jobs: Just comment with: - \`/oblt-deploy\` : Deploy a Kibana instance using the Observability test environments. - - \`run\` \`elasticsearch-ci/docs\` : Re-trigger the docs validation. (use unformatted text in the comment!) - + - \`run\` \`docs-build\` : Re-trigger the docs validation. (use unformatted text in the comment!)

`.replace(/ +/g, '') diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 402680307651d..7ba5642e5020b 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-04-25 +date: 2024-04-29 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 bbd25c4d494da..d5827a9796e8d 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 0980bd159eab3..50f210af42c31 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-04-25 +date: 2024-04-29 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 b66931a062e7e..34b84d611cc44 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 73f246b95136b..085b4432f4fac 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -3528,6 +3528,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "alerting", + "id": "def-server.RuleExecutorOptions.startedAtOverridden", + "type": "boolean", + "tags": [], + "label": "startedAtOverridden", + "description": [], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "alerting", "id": "def-server.RuleExecutorOptions.state", @@ -3598,7 +3609,8 @@ "label": "getTimeRange", "description": [], "signature": [ - "(timeWindow?: string | undefined) => { dateStart: string; dateEnd: string; }" + "(timeWindow?: string | undefined) => ", + "GetTimeRangeResult" ], "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, @@ -4859,6 +4871,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-server.API_KEY_PENDING_INVALIDATION_TYPE", + "type": "string", + "tags": [], + "label": "API_KEY_PENDING_INVALIDATION_TYPE", + "description": [], + "signature": [ + "\"api_key_pending_invalidation\"" + ], + "path": "x-pack/plugins/alerting/server/saved_objects/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-server.BulkEditOperation", @@ -5361,7 +5388,7 @@ }, ">, \"id\" | \"snoozeSchedule\">; version?: string | undefined; }) => Promise; unmuteAll: (options: { id: string; }) => Promise; muteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; unmuteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; bulkUntrackAlerts: (options: Readonly<{ indices?: string[] | undefined; alertUuids?: string[] | undefined; query?: any[] | undefined; featureIds?: string[] | undefined; } & { isUsingQuery: boolean; }>) => Promise; runSoon: (options: { id: string; }) => Promise; listRuleTypes: () => Promise>; getSpaceId: () => string | undefined; getAuthorization: () => ", + ">>; scheduleBackfill: (params: Readonly<{ end?: string | undefined; } & { start: string; ruleId: string; }>[]) => Promise<(Readonly<{ end?: string | undefined; } & { id: string; spaceId: string; start: string; rule: Readonly<{ apiKeyCreatedByUser?: boolean | null | undefined; } & { params: Record; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; runAt: string; }>[]; createdAt: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; duration: string; }> | Readonly<{} & { error: Readonly<{} & { error: string; message: string; }>; }>)[]>; getBackfill: (id: string) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; runAt: string; }>[]; createdAt: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; duration: string; }>>; findBackfill: (params: Readonly<{ start?: string | undefined; end?: string | undefined; ruleIds?: string | undefined; sortField?: \"start\" | \"createdAt\" | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; } & { page: number; perPage: number; }>) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; runAt: string; }>[]; createdAt: string; status: \"error\" | \"running\" | \"pending\" | \"timeout\" | \"complete\"; duration: string; }>[]; }>>; deleteBackfill: (id: string) => Promise<{}>; getSpaceId: () => string | undefined; getAuthorization: () => ", { "pluginId": "alerting", "scope": "server", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 22c61c6a424fa..3188d02dc1224 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.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 | |-------------------|-----------|------------------------|-----------------| -| 858 | 1 | 826 | 54 | +| 860 | 1 | 828 | 55 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 7aa5a13fe9ae2..a9a4f6997a632 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-04-25 +date: 2024-04-29 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 799c30aeb48d8..1d98dd937f068 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-04-25 +date: 2024-04-29 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 a2546115ac092..16f33e34d119b 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-04-25 +date: 2024-04-29 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 da1fd40d641d0..848b4ccc81d08 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-04-25 +date: 2024-04-29 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 591d1cf7ed618..39770ff5d13b4 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-04-25 +date: 2024-04-29 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 be15192e54a92..a2342ab430372 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-04-25 +date: 2024-04-29 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 1ef52ddeba9ea..3a76861f897e9 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-04-25 +date: 2024-04-29 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 56c23234daf11..5a048efdba691 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-04-25 +date: 2024-04-29 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 0296f1e59cdb6..fc46eda070f64 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-04-25 +date: 2024-04-29 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 fc2cd78389d53..a907f8c7594c3 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-04-25 +date: 2024-04-29 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 f9d6a4b98d5f2..33e6fd0692d38 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-04-25 +date: 2024-04-29 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 1a8b9f2c7e1a2..191ce1aed9f5b 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-04-25 +date: 2024-04-29 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 8a99427eb3b8d..93972e1656d1a 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-04-25 +date: 2024-04-29 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 294bd4028191f..88cc785c69ee3 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-04-25 +date: 2024-04-29 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 84d86ec893e5f..f785b2fa452a6 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 20e38f524b03b..6c10d4a54174c 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 75dadb42861f3..a9d57d5b5818f 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 2ea00ac0b489c..1f8e3b343d8a0 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-04-25 +date: 2024-04-29 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 9e58ca715c828..74401200a7cb0 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-04-25 +date: 2024-04-29 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 1fdecb67bff7f..2fefa95d756dd 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-04-25 +date: 2024-04-29 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 efe20023ae1f2..154d57be45254 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-04-25 +date: 2024-04-29 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 c30de7972840c..87db29fc54bb8 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -2875,7 +2875,9 @@ "signature": [ "{ search?: string | undefined; page?: number | undefined; filter?: any; aggs?: Record | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", + "> | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ", + "SortOrder", + " | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", @@ -2891,7 +2893,7 @@ "section": "def-common.SavedObjectsFindOptionsReference", "text": "SavedObjectsFindOptionsReference" }, - "[] | undefined; sortField?: string | undefined; preference?: string | undefined; pit?: ", + "[] | undefined; preference?: string | undefined; pit?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", @@ -2899,8 +2901,6 @@ "section": "def-common.SavedObjectsPitParams", "text": "SavedObjectsPitParams" }, - " | undefined; sortOrder?: ", - "SortOrder", " | undefined; searchAfter?: ", "SortResults", " | undefined; rootSearchFields?: string[] | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasNoReference?: ", diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 4861ce9f7f377..2aa2b6ad87e56 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-04-25 +date: 2024-04-29 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 60a8a1721711b..f6218201351f5 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-04-25 +date: 2024-04-29 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 4e5e87ec3e988..a85da339dc7c0 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-04-25 +date: 2024-04-29 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 07e26f8c4182c..0414378833e7d 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-04-25 +date: 2024-04-29 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 6ce0a534b71ef..b9222ab3e98c7 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-04-25 +date: 2024-04-29 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 5ea83a2f85e78..ec6569b2df3a5 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-04-25 +date: 2024-04-29 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 ad4ecc3bd122e..6864e26398d9d 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-04-25 +date: 2024-04-29 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 fdd44f63c849d..f85238824e910 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -17,7 +17,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| | | ml, stackAlerts | - | -| | visualizations, expressionXY, lens, expressionMetricVis, expressionGauge, dashboard, aiops, maps, expressionImage, expressionMetric, expressionError, expressionRevealImage, expressionRepeatImage, expressionShape, dataVisualizer, ml, fleet, devTools, console, crossClusterReplication, graph, grokdebugger, ingestPipelines, metricsDataAccess, osquery, infra, painlessLab, searchprofiler, securitySolution, transform, apm, observabilityOnboarding, filesManagement, visDefaultEditor, expressionHeatmap, expressionLegacyMetricVis, expressionPartitionVis, expressionTagcloud, visTypeTable, visTypeTimelion, visTypeTimeseries, visTypeVega, visTypeVislib | - | | | encryptedSavedObjects, actions, data, ml, logstash, securitySolution, cloudChat | - | | | actions, ml, savedObjectsTagging, enterpriseSearch | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, visualizations, aiops, ml, dataVisualizer, dashboardEnhanced, graph, lens, securitySolution, eventAnnotation, @kbn/core-saved-objects-browser-mocks | - | @@ -28,7 +27,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dashboard, dataVisualizer, stackAlerts, expressionPartitionVis | - | | | stackAlerts, alerting, securitySolution, inputControlVis | - | | | triggersActionsUi | - | -| | triggersActionsUi, reporting | - | +| | triggersActionsUi | - | | | @kbn/core, visualizations, triggersActionsUi | - | | | ruleRegistry, securitySolution, synthetics, uptime, slo | - | | | alerting, discover, securitySolution | - | @@ -36,7 +35,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-import-export-server-internal, @kbn/core-saved-objects-server-internal, fleet, graph, lists, osquery, securitySolution, alerting | - | | | alerting, discover, securitySolution | - | | | securitySolution | - | -| | inspector, data, dataViewEditor, unifiedSearch, embeddable, visualizations, dataViewFieldEditor, lens, dashboard, observabilityShared, maps, @kbn/reporting-public, reporting, timelines, fleet, cloudSecurityPosture, console, runtimeFields, indexManagement, dashboardEnhanced, graph, securitySolution, dataViewManagement, eventAnnotationListing, filesManagement, visTypeVislib | - | | | @kbn/securitysolution-data-table, securitySolution | - | | | @kbn/securitysolution-data-table, securitySolution | - | | | securitySolution | - | @@ -98,6 +96,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-saved-objects-api-server-internal | - | | | @kbn/core-saved-objects-api-server-internal | - | | | @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-migration-server-internal, spaces, data, visualizations, savedSearch, cloudSecurityPosture, dashboard, @kbn/core-test-helpers-so-type-serializer | - | +| | data, visualizations, dashboard, observabilityShared, maps, timelines, fleet, cloudSecurityPosture, console, runtimeFields, indexManagement, graph, eventAnnotationListing, filesManagement | - | +| | maps, expressionImage, expressionMetric, expressionError, expressionRevealImage, expressionRepeatImage, expressionShape, fleet, devTools, console, crossClusterReplication, grokdebugger, ingestPipelines, metricsDataAccess, osquery, infra, painlessLab, searchprofiler, apm, observabilityOnboarding, filesManagement | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement | - | @@ -132,12 +132,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | canvas | - | | | canvas | - | | | spaces, savedObjectsManagement | - | -| | reporting | - | -| | @kbn/reporting-export-types-csv, reporting | - | -| | @kbn/reporting-export-types-csv, reporting | - | -| | reporting | - | -| | reporting | - | -| | @kbn/reporting-export-types-pdf, reporting | - | | | @kbn/core-elasticsearch-server-internal, @kbn/core-plugins-server-internal, enterpriseSearch, observabilityOnboarding, console | - | | | @kbn/content-management-table-list-view, filesManagement | - | | | @kbn/react-kibana-context-styled, kibanaReact | - | @@ -148,6 +142,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-lifecycle-browser-mocks, @kbn/core, @kbn/core-plugins-browser-internal | - | | | @kbn/core | - | | | @kbn/core-plugins-server-internal | - | +| | reporting | - | +| | @kbn/reporting-export-types-csv, reporting | - | +| | @kbn/reporting-export-types-csv, reporting | - | +| | reporting | - | +| | reporting | - | +| | @kbn/reporting-export-types-pdf, reporting | - | | | @kbn/reporting-csv-share-panel | - | | | security, aiops, licenseManagement, ml, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher, profiling, apm, slo | 8.8.0 | | | spaces, security, actions, alerting, aiops, ml, remoteClusters, graph, indexLifecycleManagement, mapsEms, osquery, securitySolution, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | 8.8.0 | @@ -155,7 +155,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | fleet, apm, security, securitySolution | 8.8.0 | | | spaces, security, alerting, cases | 8.8.0 | | | embeddable, presentationUtil, lens, dashboard, discover, graph, links | 8.8.0 | -| | @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks, management, fleet, searchPlayground, security, kibanaOverview, @kbn/core | 8.8.0 | +| | @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks, management, fleet, security, kibanaOverview, @kbn/core | 8.8.0 | | | security | 8.8.0 | | | apm | 8.8.0 | | | mapsEms | 8.8.0 | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index fbb240b4802ad..49f22d7443409 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -365,14 +365,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## @kbn/reporting-public - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [reporting_panel_content.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx#:~:text=toMountPoint), [reporting_panel_content.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx#:~:text=toMountPoint) | - | - - - ## @kbn/securitysolution-data-table | Deprecated API | Reference location(s) | Remove By | @@ -412,7 +404,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [embeddable_change_point_chart.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx#:~:text=KibanaThemeProvider), [embeddable_change_point_chart.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx#:~:text=KibanaThemeProvider), [embeddable_change_point_chart.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/plugin.tsx#:~:text=license%24) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [search_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/application/utils/search_utils.ts#:~:text=SimpleSavedObject), [search_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/application/utils/search_utils.ts#:~:text=SimpleSavedObject) | - | @@ -507,7 +498,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - | -| | [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint) | - | +| | [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint) | - | | | [csp_benchmark_rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_benchmark_rule.ts#:~:text=migrations) | - | | | [csp_benchmark_rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_benchmark_rule.ts#:~:text=schemas), [csp_settings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_settings.ts#:~:text=schemas) | - | @@ -545,8 +536,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/types.ts#:~:text=fieldFormats), [data_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/data_service.ts#:~:text=fieldFormats) | - | -| | [show_settings.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/show_settings.tsx#:~:text=toMountPoint), [show_settings.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/show_settings.tsx#:~:text=toMountPoint), [confirm_overlays.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx#:~:text=toMountPoint), [confirm_overlays.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx#:~:text=toMountPoint), [dashboard_no_match.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_no_match.tsx#:~:text=toMountPoint), [dashboard_no_match.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_no_match.tsx#:~:text=toMountPoint), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx#:~:text=toMountPoint), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx#:~:text=toMountPoint), [dashboard_listing_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing_table.tsx#:~:text=toMountPoint), [dashboard_listing_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing_table.tsx#:~:text=toMountPoint) | - | -| | [dashboard_container.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx#:~:text=KibanaThemeProvider), [dashboard_container.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx#:~:text=KibanaThemeProvider), [dashboard_container.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx#:~:text=KibanaThemeProvider), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx#:~:text=KibanaThemeProvider), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx#:~:text=KibanaThemeProvider), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx#:~:text=KibanaThemeProvider) | - | +| | [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx#:~:text=toMountPoint), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx#:~:text=toMountPoint), [dashboard_listing_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing_table.tsx#:~:text=toMountPoint), [dashboard_listing_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_listing/dashboard_listing_table.tsx#:~:text=toMountPoint) | - | | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal), [add_to_library_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx#:~:text=SavedObjectSaveModal), [add_to_library_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/add_to_library_action.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [duplicate_dashboard_panel.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.ts#:~:text=savedObjects), [duplicate_dashboard_panel.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.ts#:~:text=savedObjects) | - | | | [duplicate_dashboard_panel.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.ts#:~:text=create) | - | @@ -565,7 +555,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [flyout_create_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx#:~:text=toMountPoint), [flyout_create_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx#:~:text=toMountPoint), [flyout_edit_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx#:~:text=toMountPoint), [flyout_edit_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx#:~:text=toMountPoint) | - | | | [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=savedObjects), [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=savedObjects) | - | | | [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=find) | - | | | [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=get) | - | @@ -578,7 +567,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [search_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_service.ts#:~:text=toMountPoint), [search_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_service.ts#:~:text=toMountPoint)+ 4 more | - | +| | [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [search_interceptor.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_interceptor/search_interceptor.ts#:~:text=toMountPoint), [search_interceptor.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_interceptor/search_interceptor.ts#:~:text=toMountPoint)+ 2 more | - | | | [session_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/search/session/session_service.ts#:~:text=authc) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | | | [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference) | - | @@ -588,22 +577,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## dataViewEditor - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/shared_imports.ts#:~:text=toMountPoint) | - | - - - -## dataViewFieldEditor - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_field_editor/public/shared_imports.ts#:~:text=toMountPoint), [open_delete_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_field_editor/public/open_delete_modal.tsx#:~:text=toMountPoint), [open_delete_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_field_editor/public/open_delete_modal.tsx#:~:text=toMountPoint) | - | - - - ## dataViewManagement | Deprecated API | Reference location(s) | Remove By | @@ -617,7 +590,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField) | - | | | [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields) | - | -| | [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx#:~:text=toMountPoint), [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx#:~:text=toMountPoint), [remove_data_view.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx#:~:text=toMountPoint), [remove_data_view.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx#:~:text=toMountPoint) | - | @@ -644,7 +616,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [document_stats.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_row/document_stats.tsx#:~:text=fieldFormats), [distinct_values.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_row/distinct_values.tsx#:~:text=fieldFormats), [top_values.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx#:~:text=fieldFormats), [choropleth_map.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx#:~:text=fieldFormats), [default_value_formatter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/data_drift/charts/default_value_formatter.ts#:~:text=fieldFormats) | - | | | [results_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=indexPatternId), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=indexPatternId) | - | -| | [file_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx#:~:text=KibanaThemeProvider), [file_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx#:~:text=KibanaThemeProvider), [file_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx#:~:text=KibanaThemeProvider), [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx#:~:text=KibanaThemeProvider), [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx#:~:text=KibanaThemeProvider), [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx#:~:text=KibanaThemeProvider), [data_drift_app_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx#:~:text=KibanaThemeProvider), [data_drift_app_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx#:~:text=KibanaThemeProvider), [data_drift_app_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx#:~:text=KibanaThemeProvider), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=KibanaThemeProvider)+ 2 more | - | | | [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx#:~:text=savedObjects) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/common/types/index.ts#:~:text=SimpleSavedObject), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/common/types/index.ts#:~:text=SimpleSavedObject) | - | @@ -676,7 +647,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [open_add_panel_flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx#:~:text=toMountPoint), [open_add_panel_flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx#:~:text=toMountPoint), [contact_card_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx#:~:text=toMountPoint), [contact_card_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx#:~:text=toMountPoint), [contact_card_exportable_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx#:~:text=toMountPoint), [contact_card_exportable_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx#:~:text=toMountPoint) | - | | | [attribute_service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal), [attribute_service.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [helpers.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/tests/helpers.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [explicit_input.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/tests/explicit_input.test.ts#:~:text=executeTriggerActions) | - | | | [default_embeddable_factory_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/embeddables/default_embeddable_factory_provider.ts#:~:text=SavedObjectAttributes), [default_embeddable_factory_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/lib/embeddables/default_embeddable_factory_provider.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/embeddable/public/types.ts#:~:text=SavedObjectAttributes) | - | @@ -748,22 +718,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## expressionGauge - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [gauge_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx#:~:text=KibanaThemeProvider), [gauge_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx#:~:text=KibanaThemeProvider), [gauge_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - -## expressionHeatmap - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [heatmap_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx#:~:text=KibanaThemeProvider), [heatmap_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx#:~:text=KibanaThemeProvider), [heatmap_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## expressionImage | Deprecated API | Reference location(s) | Remove By | @@ -772,14 +726,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## expressionLegacyMetricVis - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider), [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider), [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## expressionMetric | Deprecated API | Reference location(s) | Remove By | @@ -788,20 +734,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## expressionMetricVis - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider), [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider), [metric_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## expressionPartitionVis | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats), [get_color.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.test.ts#:~:text=fieldFormats) | - | -| | [partition_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx#:~:text=KibanaThemeProvider), [partition_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx#:~:text=KibanaThemeProvider), [partition_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | @@ -829,22 +766,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## expressionTagcloud - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [tagcloud_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx#:~:text=KibanaThemeProvider), [tagcloud_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx#:~:text=KibanaThemeProvider), [tagcloud_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - -## expressionXY - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [xy_chart_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx#:~:text=KibanaThemeProvider), [xy_chart_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx#:~:text=KibanaThemeProvider), [xy_chart_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## expressions | Deprecated API | Reference location(s) | Remove By | @@ -905,8 +826,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | -| | [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=toMountPoint), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=toMountPoint) | - | -| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=KibanaThemeProvider) | - | +| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=toMountPoint), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/application.tsx#:~:text=toMountPoint) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [source_picker.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/components/source_picker.tsx#:~:text=includeFields) | - | | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | @@ -990,14 +910,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## inspector - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/inspector/public/plugin.tsx#:~:text=toMountPoint), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/inspector/public/plugin.tsx#:~:text=toMountPoint) | - | - - - ## kibanaOverview | Deprecated API | Reference location(s) | Remove By | @@ -1027,14 +939,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/plugin.ts#:~:text=registerSavedObjectToPanelMethod), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/plugin.ts#:~:text=registerSavedObjectToPanelMethod) | - | -| | [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [remove_layer_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx#:~:text=toMountPoint), [remove_layer_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx#:~:text=toMountPoint), [revert_changes_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx#:~:text=toMountPoint), [revert_changes_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx#:~:text=toMountPoint), [edit_action_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts#:~:text=toMountPoint), [edit_action_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts#:~:text=toMountPoint), [in_app_embeddable_edit_action_helpers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx#:~:text=toMountPoint), [in_app_embeddable_edit_action_helpers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx#:~:text=toMountPoint) | - | -| | [help_popover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx#:~:text=KibanaThemeProvider), [help_popover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx#:~:text=KibanaThemeProvider), [help_popover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx#:~:text=KibanaThemeProvider), [expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx#:~:text=KibanaThemeProvider), [expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx#:~:text=KibanaThemeProvider), [expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx#:~:text=KibanaThemeProvider), [save_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx#:~:text=KibanaThemeProvider), [save_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx#:~:text=KibanaThemeProvider), [save_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx#:~:text=KibanaThemeProvider), [settings_menu.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx#:~:text=KibanaThemeProvider)+ 15 more | - | | | [save_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx#:~:text=SavedObjectSaveModal), [save_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract) | - | | | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SimpleSavedObject), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=SimpleSavedObject) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/types.ts#:~:text=ResolvedSimpleSavedObject) | - | | | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_objects_utils/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock) | - | -| | [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference)+ 51 more | - | +| | [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [saved_object_store.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/persistence/saved_object_store.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [selectors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/state_management/selectors.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference), [state_helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts#:~:text=SavedObjectReference)+ 52 more | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/server/saved_objects.ts#:~:text=migrations) | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/server/saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -1137,7 +1047,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [register_ml_alerts.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/alerting/register_ml_alerts.ts#:~:text=registerNavigation) | - | -| | [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=KibanaThemeProvider), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=KibanaThemeProvider), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=KibanaThemeProvider), [single_metric_viewer_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx#:~:text=KibanaThemeProvider), [single_metric_viewer_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx#:~:text=KibanaThemeProvider), [single_metric_viewer_embeddable.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/app.tsx#:~:text=KibanaThemeProvider), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=KibanaThemeProvider)+ 2 more | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [annotations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/routes/annotations.ts#:~:text=authc) | - | @@ -1223,8 +1132,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint)+ 7 more | - | -| | [mount_management_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/management/mount_management_section.tsx#:~:text=theme%24) | - | | | [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType), [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType) | - | | | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV) | - | | | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE) | - | @@ -1325,14 +1232,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## searchPlayground - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/search_playground/public/application.tsx#:~:text=appBasePath) | 8.8.0 | - - - ## searchprofiler | Deprecated API | Reference location(s) | Remove By | @@ -1378,8 +1277,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts#:~:text=options) | - | -| | [use_update_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx#:~:text=toMountPoint), [use_update_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx#:~:text=toMountPoint), [use_update_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx#:~:text=toMountPoint), [ingest_pipelines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts#:~:text=toMountPoint), [ingest_pipelines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts#:~:text=toMountPoint), [ingest_pipelines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts#:~:text=toMountPoint), [stored_scripts.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts#:~:text=toMountPoint), [stored_scripts.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts#:~:text=toMountPoint), [stored_scripts.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts#:~:text=toMountPoint), [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts#:~:text=toMountPoint)+ 3 more | - | -| | [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider) | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [get_is_alert_suppression_active.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts#:~:text=license%24), [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24) | 8.8.0 | @@ -1494,7 +1391,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/app.tsx#:~:text=KibanaThemeProvider) | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | 8.8.0 | | | [mount_management_section.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/mount_management_section.ts#:~:text=savedObjects) | - | | | [app_dependencies.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/app_dependencies.tsx#:~:text=SavedObjectsStart), [app_dependencies.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/app_dependencies.tsx#:~:text=SavedObjectsStart) | - | @@ -1525,7 +1421,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | ---------------|-----------|-----------| | | [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=getFieldByName), [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=getFieldByName), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=getFieldByName), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=getFieldByName) | - | | | [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=findIndexPatternById), [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=findIndexPatternById), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=findIndexPatternById), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=findIndexPatternById) | - | -| | [query_string_input.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/query_string_input.tsx#:~:text=toMountPoint), [query_string_input.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/query_string_input.tsx#:~:text=toMountPoint), [apply_filter_action.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/actions/apply_filter_action.ts#:~:text=toMountPoint), [apply_filter_action.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/actions/apply_filter_action.ts#:~:text=toMountPoint) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/types.ts#:~:text=savedObjects), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/types.ts#:~:text=savedObjects) | - | @@ -1548,14 +1443,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ -## visDefaultEditor - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [default_editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/default_editor_controller.tsx#:~:text=KibanaThemeProvider), [default_editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/default_editor_controller.tsx#:~:text=KibanaThemeProvider), [default_editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/default_editor_controller.tsx#:~:text=KibanaThemeProvider) | - | - - - ## visTypeGauge | Deprecated API | Reference location(s) | Remove By | @@ -1573,22 +1460,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ -## visTypeTable - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [table_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/table/public/table_vis_renderer.tsx#:~:text=KibanaThemeProvider), [table_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/table/public/table_vis_renderer.tsx#:~:text=KibanaThemeProvider), [table_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/table/public/table_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - -## visTypeTimelion - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=KibanaThemeProvider), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=KibanaThemeProvider), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## visTypeTimeseries | Deprecated API | Reference location(s) | Remove By | @@ -1596,35 +1467,16 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | -| | [editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx#:~:text=KibanaThemeProvider), [editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx#:~:text=KibanaThemeProvider), [editor_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx#:~:text=KibanaThemeProvider), [timeseries_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx#:~:text=KibanaThemeProvider), [timeseries_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx#:~:text=KibanaThemeProvider), [timeseries_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | | | [query_input_bar_context.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/contexts/query_input_bar_context.ts#:~:text=SavedObjectsClientContract), [query_input_bar_context.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/contexts/query_input_bar_context.ts#:~:text=SavedObjectsClientContract) | - | -## visTypeVega - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [vega_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx#:~:text=KibanaThemeProvider), [vega_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx#:~:text=KibanaThemeProvider), [vega_vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - -## visTypeVislib - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [vis_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vis_controller.tsx#:~:text=toMountPoint), [vis_controller.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vis_controller.tsx#:~:text=toMountPoint) | - | -| | [touchdown_template.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx#:~:text=KibanaThemeProvider), [touchdown_template.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx#:~:text=KibanaThemeProvider), [touchdown_template.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx#:~:text=KibanaThemeProvider), [vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vis_renderer.tsx#:~:text=KibanaThemeProvider), [vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vis_renderer.tsx#:~:text=KibanaThemeProvider), [vis_renderer.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vislib/public/vis_renderer.tsx#:~:text=KibanaThemeProvider) | - | - - - ## visualizations | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/plugin.ts#:~:text=registerSavedObjectToPanelMethod), [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/plugin.ts#:~:text=registerSavedObjectToPanelMethod) | - | -| | [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [confirm_modal_promise.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx#:~:text=toMountPoint), [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx#:~:text=toMountPoint), [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx#:~:text=toMountPoint), [visualize_no_match.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx#:~:text=toMountPoint), [visualize_no_match.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx#:~:text=toMountPoint), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=toMountPoint), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=toMountPoint) | - | -| | [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx#:~:text=KibanaThemeProvider), [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx#:~:text=KibanaThemeProvider), [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx#:~:text=KibanaThemeProvider), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=KibanaThemeProvider), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=KibanaThemeProvider), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=KibanaThemeProvider), [show_new_vis.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/wizard/show_new_vis.tsx#:~:text=KibanaThemeProvider), [show_new_vis.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/wizard/show_new_vis.tsx#:~:text=KibanaThemeProvider), [show_new_vis.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/wizard/show_new_vis.tsx#:~:text=KibanaThemeProvider), [visualize_no_match.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx#:~:text=KibanaThemeProvider)+ 5 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=toMountPoint), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=toMountPoint) | - | | | [search_selection.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/wizard/search_selection/search_selection.tsx#:~:text=includeFields), [visualize_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx#:~:text=includeFields) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/plugin.ts#:~:text=savedObjects), [visualize_listing.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=savedObjects) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/plugin.ts#:~:text=SavedObjectsClientContract), [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/plugin.ts#:~:text=SavedObjectsClientContract) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 8460fd190f707..5a269f9752a24 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,14 +21,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## @elastic/enterprise-search-frontend - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| -| searchPlayground | | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/search_playground/public/application.tsx#:~:text=appBasePath) | 8.8.0 | - - - ## @elastic/fleet | Plugin | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 4a56a6100718f..2dd8413729e5f 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index f0e9fcc18d422..1517260d5fc9a 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -1661,7 +1661,23 @@ "label": "showInlineTopNav", "description": [], "signature": [ - "(options?: Partial> | undefined) => void" + "() => void" + ], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "discover", + "id": "def-public.DiscoverSetup.configureInlineTopNav", + "type": "Function", + "tags": [], + "label": "configureInlineTopNav", + "description": [], + "signature": [ + "(projectNavId: string, options: { enabled: boolean; showLogsExplorerTabs: boolean; }) => void" ], "path": "src/plugins/discover/public/plugin.tsx", "deprecated": false, @@ -1669,18 +1685,33 @@ "children": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverSetup.showInlineTopNav.$1", + "id": "def-public.DiscoverSetup.configureInlineTopNav.$1", + "type": "string", + "tags": [], + "label": "projectNavId", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "discover", + "id": "def-public.DiscoverSetup.configureInlineTopNav.$2", "type": "Object", "tags": [], "label": "options", "description": [], "signature": [ - "Partial> | undefined" + "{ enabled: boolean; showLogsExplorerTabs: boolean; }" ], "path": "src/plugins/discover/public/plugin.tsx", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index fcec3dbe617cc..962a7c6bfd6e7 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 144 | 0 | 97 | 27 | +| 146 | 0 | 99 | 27 | ## Client diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index c10dc338490b0..315434ed233d3 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-04-25 +date: 2024-04-29 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 cab4f1534dd60..d3aed659a6700 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index b63e71281457c..cc90fb93fa75c 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index 8142a978325a2..e7378b2c80388 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -1500,6 +1500,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "embeddable", + "id": "def-public.Container.untilReactEmbeddableLoaded", + "type": "Function", + "tags": [], + "label": "untilReactEmbeddableLoaded", + "description": [], + "signature": [ + "(id: string) => Promise" + ], + "path": "src/plugins/embeddable/public/lib/containers/container.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.Container.untilReactEmbeddableLoaded.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/embeddable/public/lib/containers/container.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "embeddable", "id": "def-public.Container.getExplicitInputIsEqual", @@ -2237,7 +2269,7 @@ "section": "def-common.ViewMode", "text": "ViewMode" }, - ") => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + ") => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -2465,7 +2497,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -2639,7 +2671,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "dataViews", "scope": "common", @@ -2867,7 +2899,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -3027,7 +3059,7 @@ "section": "def-common.AggregateQuery", "text": "AggregateQuery" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3351,7 +3383,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -3543,7 +3575,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3675,7 +3707,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -3707,7 +3739,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3839,7 +3871,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -3895,7 +3927,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4123,7 +4155,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -4259,7 +4291,7 @@ "section": "def-common.PhaseEvent", "text": "PhaseEvent" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -4487,7 +4519,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -4613,7 +4645,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", + " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => Error | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -4745,7 +4777,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -4832,7 +4864,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -5060,7 +5092,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -5172,7 +5204,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5304,7 +5336,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -5366,7 +5398,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5498,7 +5530,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -5551,7 +5583,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", + " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string[] | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5683,7 +5715,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -5902,7 +5934,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -6034,7 +6066,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 76a9ac9955d20..82c000ee649d5 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-04-25 +date: 2024-04-29 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 | |-------------------|-----------|------------------------|-----------------| -| 575 | 1 | 468 | 8 | +| 577 | 1 | 470 | 8 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index e2d6ea20a7059..b12fdb45c6f93 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-04-25 +date: 2024-04-29 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 c08f05a9e2c43..cc0e3c90323ed 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-04-25 +date: 2024-04-29 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 ac7c14b69ae14..36b7d49965102 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-04-25 +date: 2024-04-29 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 c4463dd987118..e7bd0ddfda1d6 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-04-25 +date: 2024-04-29 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 80240242056ce..259958e7a0da4 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-04-25 +date: 2024-04-29 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 2c262f73ae500..241b368cece88 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json index 326ff5aae0c64..d529e86f4551f 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -1450,7 +1450,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false, @@ -1470,7 +1470,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -1485,7 +1485,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; new?: string | number | undefined; recovered?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; timezone?: string | undefined; duration?: string | number | undefined; category?: string[] | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 39f5f8e8e4482..81762004a75a8 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-04-25 +date: 2024-04-29 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 f8e80fc580e1f..2766a042005f7 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-04-25 +date: 2024-04-29 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 b58e7b9576369..d295c5bf1b34a 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-04-25 +date: 2024-04-29 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 f24befa63232e..8c1dc10f70d45 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-04-25 +date: 2024-04-29 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 953e47f426b30..dbdbafbc8f84c 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-04-25 +date: 2024-04-29 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 34651fe4787e4..f97a575782fb3 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-04-25 +date: 2024-04-29 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 eb8bd795c1532..df05b6c6a68ff 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-04-25 +date: 2024-04-29 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 4ea243f640b03..3be55c25c99ac 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-04-25 +date: 2024-04-29 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 1ba71cccd3aeb..aa3f2e543d959 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.devdocs.json b/api_docs/expression_partition_vis.devdocs.json index 7079babb4610f..d15a7b23d04ea 100644 --- a/api_docs/expression_partition_vis.devdocs.json +++ b/api_docs/expression_partition_vis.devdocs.json @@ -701,13 +701,20 @@ }, { "parentPluginId": "expressionPartitionVis", - "id": "def-common.PartitionVisParams.showValuesInLegend", - "type": "CompoundType", + "id": "def-common.PartitionVisParams.legendStats", + "type": "Array", "tags": [], - "label": "showValuesInLegend", + "label": "legendStats", "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts", "deprecated": false, @@ -996,11 +1003,21 @@ }, { "parentPluginId": "expressionPartitionVis", - "id": "def-common.WaffleVisConfig.showValuesInLegend", - "type": "boolean", + "id": "def-common.WaffleVisConfig.legendStats", + "type": "Array", "tags": [], - "label": "showValuesInLegend", + "label": "legendStats", "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" + ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts", "deprecated": false, "trackAdoption": false diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 63ce175e6a87f..054fb66e7fd9b 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-04-25 +date: 2024-04-29 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 68c193f036416..dfe1c4daea30a 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-04-25 +date: 2024-04-29 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 93e28216efdc4..b34af8dc2c02d 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-04-25 +date: 2024-04-29 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 414f78db402d8..2eec69f792d7c 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-04-25 +date: 2024-04-29 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 558de6400b2e2..fa5f9b7661428 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index c2dd8607c6921..166e10b914e11 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -1044,6 +1044,29 @@ "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "expressionXY", + "id": "def-common.LegendConfig.legendStats", + "type": "Array", + "tags": [], + "label": "legendStats", + "description": [ + "\nmetrics to display in the legend" + ], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" + ], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1618,20 +1641,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "expressionXY", - "id": "def-common.XYArgs.valuesInLegend", - "type": "CompoundType", - "tags": [], - "label": "valuesInLegend", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "expressionXY", "id": "def-common.XYArgs.ariaLabel", diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 27d9dc1bef2be..af9c7526a8894 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 177 | 0 | 167 | 13 | +| 177 | 0 | 166 | 13 | ## Client diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index af36f490fec00..cda84a57498c6 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-04-25 +date: 2024-04-29 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 1fcfa3b9765a5..a3665667fd323 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-04-25 +date: 2024-04-29 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 261899913920d..42091032237ba 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-04-25 +date: 2024-04-29 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 ecead2a85204d..22a38fb69acea 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-04-25 +date: 2024-04-29 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 063e56ea7b542..0248913a2d529 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-04-25 +date: 2024-04-29 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 e038c97293c51..aae1c00daad86 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-04-25 +date: 2024-04-29 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 667fd650cfe8c..53dfff0004370 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -5820,7 +5820,7 @@ "\nList agents" ], "signature": [ - "(options: Readonly<{ page?: number | undefined; perPage?: number | undefined; kuery?: any; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; showUpgradeable?: boolean | undefined; } & {}> & { showInactive: boolean; aggregations?: Record & { showInactive: boolean; aggregations?: Record | undefined; searchAfter?: ", "SortResults", @@ -5848,7 +5848,7 @@ "label": "options", "description": [], "signature": [ - "Readonly<{ page?: number | undefined; perPage?: number | undefined; kuery?: any; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; showUpgradeable?: boolean | undefined; } & {}> & { showInactive: boolean; aggregations?: Record & { showInactive: boolean; aggregations?: Record | undefined; searchAfter?: ", "SortResults", @@ -6003,7 +6003,7 @@ "section": "def-common.SavedObjectsClientContract", "text": "SavedObjectsClientContract" }, - ", options: Readonly<{ page?: number | undefined; perPage?: number | undefined; kuery?: any; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; fields?: string[] | undefined; esClient?: ", + ", options: Readonly<{ page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; kuery?: any; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; fields?: string[] | undefined; esClient?: ", { "pluginId": "@kbn/core-elasticsearch-server", "scope": "common", @@ -6054,7 +6054,7 @@ "label": "options", "description": [], "signature": [ - "Readonly<{ page?: number | undefined; perPage?: number | undefined; kuery?: any; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; fields?: string[] | undefined; esClient?: ", + "Readonly<{ page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; kuery?: any; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; fields?: string[] | undefined; esClient?: ", { "pluginId": "@kbn/core-elasticsearch-server", "scope": "common", @@ -6420,7 +6420,7 @@ "section": "def-common.ListWithKuery", "text": "ListWithKuery" }, - ", \"perPage\" | \"kuery\" | \"sortField\" | \"sortOrder\"> & { fields?: string[] | undefined; }" + ", \"perPage\" | \"sortField\" | \"sortOrder\" | \"kuery\"> & { fields?: string[] | undefined; }" ], "path": "x-pack/plugins/fleet/server/services/agent_policy.ts", "deprecated": false, @@ -9443,7 +9443,7 @@ "section": "def-common.ListWithKuery", "text": "ListWithKuery" }, - " & { withAgentCount?: boolean | undefined; }) => Promise<", + ") => Promise<", { "pluginId": "fleet", "scope": "common", @@ -9489,7 +9489,7 @@ { "parentPluginId": "fleet", "id": "def-server.PackagePolicyClient.list.$2", - "type": "CompoundType", + "type": "Object", "tags": [], "label": "options", "description": [], @@ -9500,8 +9500,7 @@ "docId": "kibFleetPluginApi", "section": "def-common.ListWithKuery", "text": "ListWithKuery" - }, - " & { withAgentCount?: boolean | undefined; }" + } ], "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", "deprecated": false, @@ -11466,7 +11465,7 @@ "label": "ListArtifactsProps", "description": [], "signature": [ - "Pick, \"page\" | \"perPage\" | \"kuery\" | \"sortOrder\"> & { sortField?: string | undefined; }" + "Pick, \"page\" | \"perPage\" | \"sortOrder\" | \"kuery\"> & { sortField?: string | undefined; }" ], "path": "x-pack/plugins/fleet/server/services/artifacts/types.ts", "deprecated": false, @@ -19246,20 +19245,6 @@ "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "fleet", - "id": "def-common.AgentPolicy.keep_monitoring_alive", - "type": "CompoundType", - "tags": [], - "label": "keep_monitoring_alive", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false @@ -22699,6 +22684,20 @@ "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.NewAgentPolicy.keep_monitoring_alive", + "type": "CompoundType", + "tags": [], + "label": "keep_monitoring_alive", + "description": [], + "signature": [ + "boolean | null | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 2ba63ae946304..55d8e0597ef90 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-04-25 +date: 2024-04-29 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 4da24225c73bf..eeac49d0f15c5 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-04-25 +date: 2024-04-29 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 f98b131a40d73..57b69bfdf7b30 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-04-25 +date: 2024-04-29 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 383740a4fb99a..190d5b484fda4 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-04-25 +date: 2024-04-29 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 709255aa807da..ca82ce7261605 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-04-25 +date: 2024-04-29 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 856426e8c6061..b451077117dfc 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 226bdb4ca7744..5d7cf3ea21991 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-04-25 +date: 2024-04-29 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 79930e1f24662..9bb9622117d29 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-04-25 +date: 2024-04-29 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 f9f8e0a9d9cc8..8d89ecc5ae1fe 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.devdocs.json b/api_docs/inspector.devdocs.json index 6ba247d778144..96e973827bd75 100644 --- a/api_docs/inspector.devdocs.json +++ b/api_docs/inspector.devdocs.json @@ -81,7 +81,7 @@ "id": "def-public.InspectorPublicPlugin.Unnamed.$1", "type": "Object", "tags": [], - "label": "initializerContext", + "label": "_initializerContext", "description": [], "signature": [ { @@ -109,7 +109,7 @@ "label": "setup", "description": [], "signature": [ - "(core: ", + "(_core: ", { "pluginId": "@kbn/core-lifecycle-browser", "scope": "common", @@ -138,7 +138,7 @@ "id": "def-public.InspectorPublicPlugin.setup.$1", "type": "Object", "tags": [], - "label": "core", + "label": "_core", "description": [], "signature": [ { diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 8242a197d17e0..364d53f705d09 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-04-25 +date: 2024-04-29 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 23119e877560d..990a518ae3bd3 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-04-25 +date: 2024-04-29 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 f650c73770dae..9d972c1156d90 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-04-25 +date: 2024-04-29 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 dc318f2a464d7..8a43c7da66cce 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-04-25 +date: 2024-04-29 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 e132208359be2..0d565b90cfa55 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index d7f3d5163f034..3827316b51868 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index ac908113505a8..c3f34a4abb18e 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 4db5a5e0664dd..4f4b98510a831 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-04-25 +date: 2024-04-29 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 8e9b75c89fd19..b24ccd854393e 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-04-25 +date: 2024-04-29 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 fbcd8d7c5d913..3af0ac36cf228 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-04-25 +date: 2024-04-29 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 b5bf082f0bbb1..01dc34570dabc 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.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; 'container.id'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'host.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; })" + "({ '@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.timestamp'?: string | number | 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.timestamp'?: string | number | 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; 'container.id'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'host.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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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, @@ -249,7 +249,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.category\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.consumer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.execution.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.name\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.producer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.revision\": { readonly type: \"long\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.rule.rule_type_id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.status\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"event.action\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"event.kind\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.space_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"@timestamp\": { readonly type: \"date\"; readonly required: true; readonly array: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }" + "[]; }; readonly \"kibana.alert.rule.category\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.consumer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.execution.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.name\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.producer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.revision\": { readonly type: \"long\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.rule.rule_type_id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.status\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"event.action\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"event.kind\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.space_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"@timestamp\": { readonly type: \"date\"; readonly required: true; readonly array: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }" ], "path": "packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts", "deprecated": false, @@ -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.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.timestamp'?: string | number | 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.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.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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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; 'container.id'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'host.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; }" + "{} & { 'agent.name'?: string | undefined; 'container.id'?: string | undefined; 'error.grouping_key'?: string | undefined; 'error.grouping_name'?: string | undefined; 'host.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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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.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; '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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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.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; }" + "{ '@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.timestamp'?: string | number | 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.timestamp'?: string | number | 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.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.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.timestamp'?: string | number | 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.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.timestamp'?: string | number | 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, @@ -490,7 +490,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.category\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.consumer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.execution.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.name\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.producer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.revision\": { readonly type: \"long\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.rule.rule_type_id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.status\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"event.action\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"event.kind\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.space_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"@timestamp\": { readonly type: \"date\"; readonly required: true; readonly array: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }" + "[]; }; readonly \"kibana.alert.rule.category\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.consumer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.execution.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.name\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.producer\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.revision\": { readonly type: \"long\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.rule.rule_type_id\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.rule.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.status\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.uuid\": { readonly type: \"keyword\"; readonly array: false; readonly required: true; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"event.action\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"event.kind\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.space_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"@timestamp\": { readonly type: \"date\"; readonly required: true; readonly array: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }" ], "path": "packages/kbn-alerts-as-data-utils/src/field_maps/alert_field_map.ts", "deprecated": false, diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index f254554674d1d..dfc633785cf2b 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-04-25 +date: 2024-04-29 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 6a962a0b0fecf..1a99d8bf0173d 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-04-25 +date: 2024-04-29 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 d82cd14d45c05..521b9b3d86ec9 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.devdocs.json b/api_docs/kbn_analytics_client.devdocs.json index 94ca8c671c147..0a32141a3a8f4 100644 --- a/api_docs/kbn_analytics_client.devdocs.json +++ b/api_docs/kbn_analytics_client.devdocs.json @@ -950,6 +950,10 @@ "plugin": "apm", "path": "x-pack/plugins/observability_solution/apm/public/services/telemetry/telemetry_client.ts" }, + { + "plugin": "observabilityLogsExplorer", + "path": "x-pack/plugins/observability_solution/observability_logs_explorer/public/state_machines/observability_logs_explorer/src/telemetry_events.ts" + }, { "plugin": "observabilityOnboarding", "path": "x-pack/plugins/observability_solution/observability_onboarding/public/hooks/use_flow_progress_telemetry.ts" diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index b3cd5b65e3060..4f2b0b4052577 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-04-25 +date: 2024-04-29 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 fd81f6c2ca845..3e0960d507e4b 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-04-25 +date: 2024-04-29 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 bd97acb37515a..ee36c9d9c9208 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-04-25 +date: 2024-04-29 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 fbeea02ff76d8..b26c5a3b2499b 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-04-25 +date: 2024-04-29 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 f659d90a35502..121be790992d3 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-04-25 +date: 2024-04-29 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 26e8edaeeed28..99305242d3b4b 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-04-25 +date: 2024-04-29 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 fd2c5d156a6bf..41a87e8b5b822 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-04-25 +date: 2024-04-29 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_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 42d2ea3d63be6..35a022bbdd411 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json index 3eb44a004304f..d0025a57d215c 100644 --- a/api_docs/kbn_apm_synthtrace.devdocs.json +++ b/api_docs/kbn_apm_synthtrace.devdocs.json @@ -336,77 +336,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-server.AssetsSynthtraceEsClient", - "type": "Class", - "tags": [], - "label": "AssetsSynthtraceEsClient", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "server", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-server.AssetsSynthtraceEsClient", - "text": "AssetsSynthtraceEsClient" - }, - " extends ", - "SynthtraceEsClient", - "<", - { - "pluginId": "@kbn/apm-synthtrace-client", - "scope": "common", - "docId": "kibKbnApmSynthtraceClientPluginApi", - "section": "def-common.AssetDocument", - "text": "AssetDocument" - }, - ">" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-server.AssetsSynthtraceEsClient.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [], - "signature": [ - "any" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-server.AssetsSynthtraceEsClient.Unnamed.$1", - "type": "CompoundType", - "tags": [], - "label": "options", - "description": [], - "signature": [ - "{ client: ", - "default", - "; logger: ", - "Logger", - "; } & ", - "AssetsSynthtraceEsClientOptions" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/apm-synthtrace", "id": "def-server.InfraSynthtraceEsClient", diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index fe84a395387b1..b5a6d626ed2c3 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 47 | 0 | 47 | 8 | +| 44 | 0 | 44 | 7 | ## Server diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index 1c2fd957f028c..b98eed88a6808 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -2575,14 +2575,7 @@ "label": "AssetDocument", "description": [], "signature": [ - "AssetKindDocument", - "<\"host\"> | ", - "AssetKindDocument", - "<\"pod\"> | ", - "AssetKindDocument", - "<\"container\"> | ", - "AssetKindDocument", - "<\"service\">" + "ServiceAssetDocument" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/assets/index.ts", "deprecated": false, diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index a31f27265e0be..2c16d036766b9 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-04-25 +date: 2024-04-29 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 4de6042d64538..64a2965d14036 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-04-25 +date: 2024-04-29 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 19f291377ebba..0ab228a71b0d2 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-04-25 +date: 2024-04-29 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 92f68f6af305c..3abcb4c1b886b 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-04-25 +date: 2024-04-29 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 ddd7836b8fc27..12f811ae87be2 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-04-25 +date: 2024-04-29 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 b0fa1f57bb34f..44ea5177c04ac 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-04-25 +date: 2024-04-29 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 3ae86fc722a8b..3bb7a9d23fdb7 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-04-25 +date: 2024-04-29 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 20e5fc97861a0..7012649c11db7 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-04-25 +date: 2024-04-29 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 59eec8fa5d1c7..a0f3a8d484777 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-04-25 +date: 2024-04-29 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 bd9d79fba39e4..86ec1427edfce 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-04-25 +date: 2024-04-29 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 fdd7e996d15cf..7d28b4212ed33 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-04-25 +date: 2024-04-29 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 cdeb121499111..72e6e10512090 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-04-25 +date: 2024-04-29 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 20eff5e133cde..460d17c06afb9 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-04-25 +date: 2024-04-29 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 2593a23d5765f..c1e34db380419 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.devdocs.json b/api_docs/kbn_code_editor.devdocs.json index 20081cc83cffa..91c3191a03eca 100644 --- a/api_docs/kbn_code_editor.devdocs.json +++ b/api_docs/kbn_code_editor.devdocs.json @@ -421,6 +421,22 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/code-editor", + "id": "def-common.CodeEditorProps.editorWillUnmount", + "type": "Function", + "tags": [], + "label": "editorWillUnmount", + "description": [], + "signature": [ + "(() => void) | undefined" + ], + "path": "packages/shared-ux/code_editor/impl/code_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/code-editor", "id": "def-common.CodeEditorProps.useDarkTheme", diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 345227f2723a7..e2716111d3fff 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 38 | 0 | 15 | 0 | +| 39 | 0 | 16 | 0 | ## Common diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index 9250fb3d3d470..f09439c871fb7 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-04-25 +date: 2024-04-29 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 bad65611c5464..1dfad4a6e0e51 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-04-25 +date: 2024-04-29 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 770327a230c4d..69aea1d2a2ad8 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-04-25 +date: 2024-04-29 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 4a55c2ad10020..e27fe0d887cc1 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-04-25 +date: 2024-04-29 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 efbe4b8cf3590..0125a6c6a1d0d 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-04-25 +date: 2024-04-29 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 e1b63b1651a09..a9cfa8f6820fb 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-04-25 +date: 2024-04-29 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 7465d3c382a54..931c06db7cc4d 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-04-25 +date: 2024-04-29 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 b72d15d3d8373..73fe7d0eac37c 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-04-25 +date: 2024-04-29 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 50c30159aa29b..6bf7ab3ce8605 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-04-25 +date: 2024-04-29 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 ee30b0e7a29ec..d5213b11ef63d 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-04-25 +date: 2024-04-29 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 20891db53339a..ccdcb731b5853 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-04-25 +date: 2024-04-29 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 f4197f480b7fc..8c63b5c014801 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-04-25 +date: 2024-04-29 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 32d41cb131bd6..afc15f84adc39 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-04-25 +date: 2024-04-29 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 0621639276db2..9574f736b1d09 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-04-25 +date: 2024-04-29 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 57f789a2580d1..cfb8cc4ac090a 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-04-25 +date: 2024-04-29 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 70050fdda9a51..326f495bc4a4d 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-04-25 +date: 2024-04-29 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 1ef15ead54e1d..8058683ba81c6 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-04-25 +date: 2024-04-29 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 8cbab9406c58f..088c2e4f40d47 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.devdocs.json b/api_docs/kbn_core_application_browser.devdocs.json index 9f4981d74adfd..a9eaf1ceaba35 100644 --- a/api_docs/kbn_core_application_browser.devdocs.json +++ b/api_docs/kbn_core_application_browser.devdocs.json @@ -1182,10 +1182,6 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/integrations/index.tsx" }, - { - "plugin": "searchPlayground", - "path": "x-pack/plugins/search_playground/public/application.tsx" - }, { "plugin": "security", "path": "x-pack/plugins/security/public/authentication/logout/logout_app.test.ts" diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 7c4e00b956aec..a1996cc6641c3 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-04-25 +date: 2024-04-29 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 412c63a988776..ffcf51a77a424 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-04-25 +date: 2024-04-29 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 e64f1d6211093..c309bab28abf0 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-04-25 +date: 2024-04-29 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 60519f0bd2482..e9577ca6a1472 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-04-25 +date: 2024-04-29 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 f9d747bf673c6..65d2f1aedcf72 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-04-25 +date: 2024-04-29 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 9f7faadb86aa4..40c2d088a1b82 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-04-25 +date: 2024-04-29 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 fd33e6dcca46b..7359c999ab597 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index a74ee81475e2e..da3f83c97b725 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-04-25 +date: 2024-04-29 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 82d46406d40d0..2adc14f6f61d0 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-04-25 +date: 2024-04-29 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 7b721b10a1ebe..010d32183c398 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-04-25 +date: 2024-04-29 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 157f5f756d5d3..3aa5013d93be1 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-04-25 +date: 2024-04-29 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 e5bc9103fbdf2..62aba089836d6 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-04-25 +date: 2024-04-29 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 132c777ab950b..e67e8f3e6d43b 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-04-25 +date: 2024-04-29 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 fdd6ccf59f0aa..a528464104b64 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-04-25 +date: 2024-04-29 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 da92af24c7935..b6002b4854492 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index 42263bcb126c1..e3cfbf06b12bb 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -2765,6 +2765,26 @@ "trackAdoption": false, "children": [], "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.ChromeStart.getActiveSolutionNavId$", + "type": "Function", + "tags": [], + "label": "getActiveSolutionNavId$", + "description": [ + "\nGet the id of the currently active project navigation or `null` otherwise." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "packages/core/chrome/core-chrome-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false @@ -3696,7 +3716,7 @@ "label": "AppDeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:rules\" | \"observability-overview:alerts\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:ai_insights\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:rules\" | \"observability-overview:alerts\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index ac4872e1738be..7e767a2dc7027 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 204 | 0 | 99 | 0 | +| 205 | 0 | 99 | 0 | ## Common diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 668fc4cd4d81f..3dcfa3d48e490 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-04-25 +date: 2024-04-29 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 ecaacede2eadb..97d267c2518f6 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-04-25 +date: 2024-04-29 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 3ea3d911b27c8..6da1098ce5a9c 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-04-25 +date: 2024-04-29 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 85139f81e2469..39ca9fd3001c9 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-04-25 +date: 2024-04-29 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 8f20709f45de2..e13fe49bc1058 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-04-25 +date: 2024-04-29 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 d8b564b44c262..2cf9b849a5d60 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-04-25 +date: 2024-04-29 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 1fe3f9b6d8a27..ffbf580eb617b 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-04-25 +date: 2024-04-29 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 277306d2ecb94..fe05c6ca27e63 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-04-25 +date: 2024-04-29 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 5f92f460990f3..6d986a911ad8f 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-04-25 +date: 2024-04-29 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 ac4a77426cb93..7e1d3aa33deee 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-04-25 +date: 2024-04-29 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 9937f9c139516..14564d06a5e43 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-04-25 +date: 2024-04-29 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 9d0392306da7b..26f671884a685 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-04-25 +date: 2024-04-29 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 ed0659956f557..0fbafa8e40fc6 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-04-25 +date: 2024-04-29 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 0d15e0b6e4e45..06137599c4136 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-04-25 +date: 2024-04-29 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 a4e5d429f880c..09dba1655a6b0 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-04-25 +date: 2024-04-29 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 8ff2407653647..86711e05810df 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-04-25 +date: 2024-04-29 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 c76ee1714d124..c07f6c3b120d8 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-04-25 +date: 2024-04-29 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 106da94dbeaac..2cfd65d1b1e1a 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-04-25 +date: 2024-04-29 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 4c02cebbeaedc..c03543e284b33 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-04-25 +date: 2024-04-29 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 f84a02d72db4b..82e99aeba2689 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-04-25 +date: 2024-04-29 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 66fab0d4a1db8..d7d71b38cd582 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-04-25 +date: 2024-04-29 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 1922532447bad..7e315d97b4c45 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-04-25 +date: 2024-04-29 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 d22e55d93fb58..d8956976e513d 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-04-25 +date: 2024-04-29 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 b0e6c45ab8856..516bd2d568850 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-04-25 +date: 2024-04-29 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 a33c64433da15..72e6d9a619552 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-04-25 +date: 2024-04-29 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 be8509766cae0..5488cf4769505 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-04-25 +date: 2024-04-29 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 57025ea164db9..f5f9d4b625fc1 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-04-25 +date: 2024-04-29 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 86a38cbf32424..4bedf4028156b 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-04-25 +date: 2024-04-29 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 af9c733be5127..5c74b6fc8f562 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-04-25 +date: 2024-04-29 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 0a5fb58312f2e..43ad4e534f85d 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-04-25 +date: 2024-04-29 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 63672e4a9d95a..acc58d5c17312 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-04-25 +date: 2024-04-29 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 84430a5ad6bbf..778ebb7407735 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-04-25 +date: 2024-04-29 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 bbc9710c234af..a464d3ffcb2bb 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-04-25 +date: 2024-04-29 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 f36a08c127131..1ce56807feacf 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-04-25 +date: 2024-04-29 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 7b9a9aa8f2b26..7984abce35f65 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-04-25 +date: 2024-04-29 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 ca448577617a7..07efb55138aab 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-04-25 +date: 2024-04-29 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 f570f3d5ed690..6a6e8608ffb89 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-04-25 +date: 2024-04-29 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 048d67ace82f2..bd7cbcebfecf0 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-04-25 +date: 2024-04-29 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 15e8e1b5c5798..ae7daa65215cc 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-04-25 +date: 2024-04-29 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 56e3d9b2b22fa..f10f528c17cd9 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-04-25 +date: 2024-04-29 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 41c8c103e4840..4751b7793f8be 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index dda926a819a49..fc11ae2fd0b9d 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 61c1001642e56..3467ffabf4fb8 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-04-25 +date: 2024-04-29 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 2c31a905a362f..0a157f49d2e36 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-04-25 +date: 2024-04-29 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 6bf89115443fc..087eeba3609f9 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-04-25 +date: 2024-04-29 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 356835b2eb03d..d6cb668f075c5 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-04-25 +date: 2024-04-29 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 2e38291128bbe..60c4fdeb2f515 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-04-25 +date: 2024-04-29 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 befd68992b752..11f1e2f2bb752 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -3777,6 +3777,10 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rules_settings/apis/get/get_query_delay_settings.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.ts" + }, { "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/routes/get_alert_by_id.ts" @@ -4521,6 +4525,10 @@ "plugin": "searchNotebooks", "path": "x-pack/plugins/search_notebooks/server/routes/index.ts" }, + { + "plugin": "searchPlayground", + "path": "x-pack/plugins/search_playground/server/routes.ts" + }, { "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/api_key_routes.ts" @@ -5529,6 +5537,18 @@ "plugin": "spaces", "path": "x-pack/plugins/spaces/server/routes/api/internal/get_active_space.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/maintenance_window/apis/find/find_maintenance_windows_route.test.ts" @@ -6411,6 +6431,14 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rules_settings/apis/update/update_query_delay_settings.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts" + }, { "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/routes/update_alert_by_id.ts" @@ -7755,6 +7783,30 @@ "plugin": "spaces", "path": "x-pack/plugins/spaces/server/routes/api/external/update_objects_spaces.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/maintenance_window/apis/archive/archive_maintenance_window_route.test.ts" @@ -9329,6 +9381,10 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/maintenance_window/apis/delete/delete_maintenance_window_route.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.ts" + }, { "plugin": "observability", "path": "x-pack/plugins/observability_solution/observability/server/lib/annotations/register_annotation_apis.ts" @@ -9653,6 +9709,18 @@ "plugin": "spaces", "path": "x-pack/plugins/spaces/server/routes/api/external/delete.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/maintenance_window/apis/delete/delete_maintenance_window_route.test.ts" @@ -15386,7 +15454,7 @@ }, { "plugin": "elasticAssistant", - "path": "x-pack/plugins/elastic_assistant/server/routes/insights/alerts/post_alerts_insights.ts" + "path": "x-pack/plugins/elastic_assistant/server/routes/attack_discovery/post_attack_discovery.ts" }, { "plugin": "elasticAssistant", diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index b98f5c2633110..3b19ccef685a8 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index 934ce3c188daa..c4010593eac4d 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -900,6 +900,22 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.StaticAssets.isUsingCdn", + "type": "Function", + "tags": [], + "label": "isUsingCdn", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/core-http-server-internal", "id": "def-common.StaticAssets.getHrefBase", @@ -1233,6 +1249,24 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.InternalStaticAssets.isUsingCdn", + "type": "Function", + "tags": [], + "label": "isUsingCdn", + "description": [ + "\nReturns true if a CDN has been configured and should be used to serve static assets.\nShould only be used in scenarios where different behavior has to be used when CDN is enabled or not." + ], + "signature": [ + "() => boolean" + ], + "path": "packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/core-http-server-internal", "id": "def-common.InternalStaticAssets.getPluginAssetHref", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 7bb7d38bb6b0d..58dfd56acfc85 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 89 | 0 | 77 | 10 | +| 91 | 0 | 78 | 10 | ## Common diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 491d107f27a35..e87c57930ead4 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-04-25 +date: 2024-04-29 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 31ee7ea249927..8aa5c2be49f83 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-04-25 +date: 2024-04-29 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 1066095b011a6..a7d1af23c077f 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-04-25 +date: 2024-04-29 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 59466ee5221de..d6fbdcb9bd7a3 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_i18n_server_internal.devdocs.json index f7faf82af0bad..efd45c284142f 100644 --- a/api_docs/kbn_core_i18n_server_internal.devdocs.json +++ b/api_docs/kbn_core_i18n_server_internal.devdocs.json @@ -149,7 +149,56 @@ "initialIsOpen": false } ], - "functions": [], + "functions": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-common.getKibanaTranslationFiles", + "type": "Function", + "tags": [], + "label": "getKibanaTranslationFiles", + "description": [], + "signature": [ + "(locale: string, pluginPaths: string[]) => Promise" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-common.getKibanaTranslationFiles.$1", + "type": "string", + "tags": [], + "label": "locale", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-common.getKibanaTranslationFiles.$2", + "type": "Array", + "tags": [], + "label": "pluginPaths", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/get_kibana_translation_files.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [ { "parentPluginId": "@kbn/core-i18n-server-internal", @@ -198,6 +247,23 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-i18n-server-internal", + "id": "def-common.supportedLocale", + "type": "Array", + "tags": [], + "label": "supportedLocale", + "description": [ + "\nList of all locales that are officially supported." + ], + "signature": [ + "string[]" + ], + "path": "packages/core/i18n/core-i18n-server-internal/src/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 94eb016feb788..6fe94a6bd3dd8 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 10 | 0 | 10 | 2 | +| 14 | 0 | 13 | 2 | ## Common +### Functions + + ### Classes diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 3decf3193b8ce..cc6ca875972b6 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-04-25 +date: 2024-04-29 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 9fad69fd40f6e..64c8972ae12df 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-04-25 +date: 2024-04-29 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 e9c1fc0719b14..61767e0553839 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-04-25 +date: 2024-04-29 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 7808876d27711..d769c5e9157ec 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 0b12d1c3aa957..9cddae20c9a8e 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index cc1a569a7ffb5..d209a61708be9 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index e35326e661c62..0e31f11091960 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 8d2b9a6f60ada..adbd6e64569c7 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-04-25 +date: 2024-04-29 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 9ad736706b2a8..e932691acb39a 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-04-25 +date: 2024-04-29 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 6fe2db360086e..73719a86fd277 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-04-25 +date: 2024-04-29 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 7d5119070a897..0f7915157d490 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-04-25 +date: 2024-04-29 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 d34b00143b2c5..3eb30871b8fa3 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-04-25 +date: 2024-04-29 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 c1a3eca53b2e6..0f1ac4a3d0476 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-04-25 +date: 2024-04-29 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 a110b4685b96a..520e86e6be08e 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-04-25 +date: 2024-04-29 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 e7b80e31c5862..69275a44dd5a0 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-04-25 +date: 2024-04-29 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 00caba38947f1..beaec0ca50ed0 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-04-25 +date: 2024-04-29 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 6ac634d36dc96..44d43083e2020 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-04-25 +date: 2024-04-29 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 39de9f04c2a76..3d6b861fee888 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-04-25 +date: 2024-04-29 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 285a229c3339e..2e2bf16b43a1d 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-04-25 +date: 2024-04-29 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 4011565bd186f..26a48b57602f8 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-04-25 +date: 2024-04-29 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 81597a8d6a8aa..291f313edb735 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-04-25 +date: 2024-04-29 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 1816ca3678132..26dcbaf8f0fb0 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-04-25 +date: 2024-04-29 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 99c6823f6d640..41685246d24d3 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-04-25 +date: 2024-04-29 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 e69f7e589f571..cad8079086acf 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-04-25 +date: 2024-04-29 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 2433bd5cd9de1..6c81fc1a078a1 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-04-25 +date: 2024-04-29 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 b2a031c79f87a..5677016cce3d6 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-04-25 +date: 2024-04-29 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 53fc6d4897cae..60fd32ab19d63 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-04-25 +date: 2024-04-29 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 e7ebce711b2fc..07207f298e370 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-04-25 +date: 2024-04-29 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 1739c90b6d082..db15e228da30e 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-04-25 +date: 2024-04-29 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 68f2c62baf86a..909967840cf59 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-04-25 +date: 2024-04-29 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 2f9136c0cf9f9..6427770929708 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-04-25 +date: 2024-04-29 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 f3409e092253e..50c3a20d01b5b 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-04-25 +date: 2024-04-29 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 12b0bfebaf1e0..994b52e57e98a 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-04-25 +date: 2024-04-29 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 5a7e226931ec3..dab25677b5112 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-04-25 +date: 2024-04-29 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 3f75151c5e034..2d9912b3b6573 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-04-25 +date: 2024-04-29 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 e9529cec2e5a1..64a55b0ccf132 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-04-25 +date: 2024-04-29 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 89e004d5f5bac..02d8217be06f0 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-04-25 +date: 2024-04-29 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 38ca5bba8e58f..6d16cb5b98180 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-04-25 +date: 2024-04-29 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 f7c65467f38a5..f4062a6aab982 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-04-25 +date: 2024-04-29 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 729b965436e28..512bf7650bc56 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json index d37ffb442e3c1..20486377759f0 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json +++ b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json @@ -3647,7 +3647,7 @@ "signature": [ "{ type: string | string[]; search?: string | undefined; page?: number | undefined; filter?: any; aggs?: Record | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", + "> | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", @@ -3663,7 +3663,7 @@ "section": "def-common.SavedObjectsFindOptionsReference", "text": "SavedObjectsFindOptionsReference" }, - "[] | undefined; sortField?: string | undefined; preference?: string | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasNoReference?: ", + "[] | undefined; preference?: string | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasNoReference?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index d2c00e94edc09..385dfba9098b2 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_saved_objects_api_server.devdocs.json index 3f524f09e985d..f1c69891356a1 100644 --- a/api_docs/kbn_core_saved_objects_api_server.devdocs.json +++ b/api_docs/kbn_core_saved_objects_api_server.devdocs.json @@ -8230,7 +8230,9 @@ "signature": [ "{ type: string | string[]; search?: string | undefined; filter?: any; aggs?: Record | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", + "> | undefined; namespaces?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ", + "SortOrder", + " | undefined; fields?: string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; hasReference?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", @@ -8246,9 +8248,7 @@ "section": "def-common.SavedObjectsFindOptionsReference", "text": "SavedObjectsFindOptionsReference" }, - "[] | undefined; sortField?: string | undefined; preference?: string | undefined; sortOrder?: ", - "SortOrder", - " | undefined; rootSearchFields?: string[] | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasNoReference?: ", + "[] | undefined; preference?: string | undefined; rootSearchFields?: string[] | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasNoReference?: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "common", diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 3c100e7375ce5..df42bf36a7c8c 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-04-25 +date: 2024-04-29 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 b921a0adb790a..9a55f59b118be 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json index 22752cea44fca..88435de4e3fba 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json @@ -2304,6 +2304,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-saved-objects-base-server-internal", + "id": "def-common.HASH_TO_VERSION_MAP.ad_hoc_run_params6aa8806a2e27d3be492a1da0d7721845", + "type": "string", + "tags": [], + "label": "'ad_hoc_run_params|6aa8806a2e27d3be492a1da0d7721845'", + "description": [], + "path": "packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-saved-objects-base-server-internal", "id": "def-common.HASH_TO_VERSION_MAP.alert96a5a144778243a9f4fece0e71c2197f", 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 38ac1d2ea06a0..b9a9306381618 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 225 | 0 | 182 | 11 | +| 226 | 0 | 183 | 11 | ## Common 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 ba25e456aa785..abbe47d7018fa 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-04-25 +date: 2024-04-29 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 be034f71ee114..bad7bc6fdd550 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-04-25 +date: 2024-04-29 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 9a38b0ba46910..54053c2f4432d 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-04-25 +date: 2024-04-29 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 3b8e4499c5a10..45a6a201e5f08 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_core_saved_objects_common.devdocs.json index 8d0decd21111b..13df50596c7d1 100644 --- a/api_docs/kbn_core_saved_objects_common.devdocs.json +++ b/api_docs/kbn_core_saved_objects_common.devdocs.json @@ -2048,15 +2048,19 @@ }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts" + "path": "x-pack/plugins/lens/public/visualizations/xy/persistence.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts" + "path": "x-pack/plugins/lens/public/visualizations/xy/persistence.ts" }, { "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts" + "path": "x-pack/plugins/lens/public/visualizations/xy/persistence.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/visualizations/xy/persistence.ts" }, { "plugin": "lens", diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index f622ea75d8438..4738ab27741a6 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-04-25 +date: 2024-04-29 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 7d04a14a3bb23..e6acb7bcb0eab 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-04-25 +date: 2024-04-29 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 cf3e8f0aa501f..cdfa4673407b0 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-04-25 +date: 2024-04-29 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 cb1fb22f2453c..98e58d4751bd3 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-04-25 +date: 2024-04-29 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 00bafca6d216e..6e3da0c70ea72 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-04-25 +date: 2024-04-29 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 a7215019a5221..95c1024b2203f 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-04-25 +date: 2024-04-29 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 77878ee2b33c5..867ee37ad76c2 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-04-25 +date: 2024-04-29 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 e9b45c7371753..c5513fbb23fa2 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-04-25 +date: 2024-04-29 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 b2ac1539f0b8e..e94a66350a6e8 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index 695dba2e5caf4..c0630e116f6f6 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index 422c2ad9ad6e2..e885e38bde196 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 20858f069c497..8c648b5189834 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 54e51778e303d..0f352df970561 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index eb7fa5f7533da..8f00cf5924934 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 3e969456dd2b2..4dcc6c79a1f64 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 7aa52fe863350..664f3f792211a 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index d1a4655790ab7..18be947739007 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-04-25 +date: 2024-04-29 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 837c8b1aec08b..27a8748bf27c0 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-04-25 +date: 2024-04-29 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 852b71d92f5de..5ccc193a36f84 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-04-25 +date: 2024-04-29 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 ceb012c59e631..65320edad02bc 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-04-25 +date: 2024-04-29 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 567ed8f7582ea..0e1d95b55e665 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-04-25 +date: 2024-04-29 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 7e551fdfa6b1c..e5dbdcd22da1f 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-04-25 +date: 2024-04-29 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 55c9fdec2fc5e..841ed81099a40 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-04-25 +date: 2024-04-29 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 76fed879d6221..7d3110dfb822b 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 72f86e6b94917..4318dd9c907aa 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-04-25 +date: 2024-04-29 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 7896b309ec675..63fbf22a858b3 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-04-25 +date: 2024-04-29 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 0cd378575ad62..630908945aa85 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-04-25 +date: 2024-04-29 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 47fc81dc09d66..153acd7525056 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-04-25 +date: 2024-04-29 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 283d01494d938..97f3f2210eb96 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-04-25 +date: 2024-04-29 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 e4e868e67aaa7..8ed3e2d6e33b7 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-04-25 +date: 2024-04-29 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 a9d0d99d0e60b..1a665fbfc328b 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-04-25 +date: 2024-04-29 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 312b997a2d880..bc14a8226c3c3 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-04-25 +date: 2024-04-29 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 63af74bf0a86c..a6ce709e0a36b 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-04-25 +date: 2024-04-29 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 3dbdd82ebf6e8..ab86455c5bdb6 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-04-25 +date: 2024-04-29 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 6d8f4df13451b..9c54d99920f60 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-04-25 +date: 2024-04-29 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 180a9e8c935a3..8180cc32aabe8 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-04-25 +date: 2024-04-29 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 10e002e4d13cb..85a625e5dde80 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-04-25 +date: 2024-04-29 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 222a712f8fbd4..8857126a8bccd 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-04-25 +date: 2024-04-29 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 607e1a8c2bb18..cc60f864cd609 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-04-25 +date: 2024-04-29 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_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index b699d583015fe..4e2807b7b629a 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index e7a806110a50b..6ada481eefe48 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 78f37d679d3a6..01e4594661ccf 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 61953bd7f7100..bf757e57c6ed5 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index 7eb1769e245af..208da09c7cd59 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index 7f29ea974b740..1952fc42d42a8 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 3d7bdf6bf9430..070b03346ded3 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_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 7348ac46e5d04..d7f0c29e2f6a3 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-04-25 +date: 2024-04-29 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 73987e63f070a..06bc7dd948347 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-04-25 +date: 2024-04-29 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 ebd8344ab1ab0..de2014d1f6f47 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-04-25 +date: 2024-04-29 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 bbe31e13c96de..1da1a674cdfb4 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-04-25 +date: 2024-04-29 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 a16a71c240b63..effd8b474ed06 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-04-25 +date: 2024-04-29 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 491f9e4577f27..5c5abb9c0a19f 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-04-25 +date: 2024-04-29 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 26a719a599aa9..9095aee75e841 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-04-25 +date: 2024-04-29 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 5853cd5653aa3..57ca82315510b 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-04-25 +date: 2024-04-29 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 ab4cb8f34875f..79baedd33c570 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-04-25 +date: 2024-04-29 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 9e4dc7bee03ba..74696de41c9a6 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-04-25 +date: 2024-04-29 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 7b1c73a8df933..694c248242b18 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-04-25 +date: 2024-04-29 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 b561925f9fdb6..e3a3ae4d95c9a 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-04-25 +date: 2024-04-29 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 a2669155fe2e9..328f872737b7b 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-04-25 +date: 2024-04-29 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 7a8887b6a9cb6..e7e94066fd7be 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-04-25 +date: 2024-04-29 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 fc91dcc365bca..728093f19aa1e 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 583b7d31af2b0..4a0e09fb88124 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index c5b97bfe6eb23..d887ff5fd88ae 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-04-25 +date: 2024-04-29 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 6bcc4c1d749a3..d1effa3a8e1c5 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-04-25 +date: 2024-04-29 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 26a0918c8435a..837135a7d34e6 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.devdocs.json b/api_docs/kbn_deeplinks_search.devdocs.json index b63710ed4d427..6bb61ceeb91a7 100644 --- a/api_docs/kbn_deeplinks_search.devdocs.json +++ b/api_docs/kbn_deeplinks_search.devdocs.json @@ -30,7 +30,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"appSearch\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\"" + "\"appSearch\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\"" ], "path": "packages/deeplinks/search/deep_links.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 5ed70499239fb..2ee36be2b9833 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.devdocs.json b/api_docs/kbn_deeplinks_security.devdocs.json index bc173c4506bfb..247982f4d409f 100644 --- a/api_docs/kbn_deeplinks_security.devdocs.json +++ b/api_docs/kbn_deeplinks_security.devdocs.json @@ -58,7 +58,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:ai_insights\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\"" + "\"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\"" ], "path": "packages/deeplinks/security/index.ts", "deprecated": false, @@ -73,7 +73,7 @@ "label": "LinkId", "description": [], "signature": [ - "\"\" | \"cases\" | \"rules\" | \"alerts\" | \"policy\" | \"overview\" | \"dashboards\" | \"cases_create\" | \"cases_configure\" | \"hosts\" | \"users\" | \"cloud_defend-policies\" | \"cloud_security_posture-dashboard\" | \"cloud_security_posture-findings\" | \"cloud_security_posture-benchmarks\" | \"kubernetes\" | \"network\" | \"explore\" | \"assets\" | \"cloud_defend\" | \"administration\" | \"ai_insights\" | \"blocklist\" | \"cloud_security_posture-rules\" | \"data_quality\" | \"detections\" | \"detection_response\" | \"endpoints\" | \"event_filters\" | \"exceptions\" | \"host_isolation_exceptions\" | \"hosts-all\" | \"hosts-anomalies\" | \"hosts-risk\" | \"hosts-events\" | \"hosts-sessions\" | \"hosts-uncommon_processes\" | \"investigations\" | \"get_started\" | \"machine_learning-landing\" | \"network-anomalies\" | \"network-dns\" | \"network-events\" | \"network-flows\" | \"network-http\" | \"network-tls\" | \"response_actions_history\" | \"rules-add\" | \"rules-create\" | \"rules-landing\" | \"threat_intelligence\" | \"timelines\" | \"timelines-templates\" | \"trusted_apps\" | \"users-all\" | \"users-anomalies\" | \"users-authentications\" | \"users-events\" | \"users-risk\" | \"entity_analytics\" | \"entity_analytics-management\" | \"entity_analytics-asset-classification\" | \"coverage-overview\"" + "\"\" | \"cases\" | \"rules\" | \"alerts\" | \"policy\" | \"overview\" | \"dashboards\" | \"cases_create\" | \"cases_configure\" | \"hosts\" | \"users\" | \"cloud_defend-policies\" | \"cloud_security_posture-dashboard\" | \"cloud_security_posture-findings\" | \"cloud_security_posture-benchmarks\" | \"kubernetes\" | \"network\" | \"explore\" | \"assets\" | \"cloud_defend\" | \"administration\" | \"attack_discovery\" | \"blocklist\" | \"cloud_security_posture-rules\" | \"data_quality\" | \"detections\" | \"detection_response\" | \"endpoints\" | \"event_filters\" | \"exceptions\" | \"host_isolation_exceptions\" | \"hosts-all\" | \"hosts-anomalies\" | \"hosts-risk\" | \"hosts-events\" | \"hosts-sessions\" | \"hosts-uncommon_processes\" | \"investigations\" | \"get_started\" | \"machine_learning-landing\" | \"network-anomalies\" | \"network-dns\" | \"network-events\" | \"network-flows\" | \"network-http\" | \"network-tls\" | \"response_actions_history\" | \"rules-add\" | \"rules-create\" | \"rules-landing\" | \"threat_intelligence\" | \"timelines\" | \"timelines-templates\" | \"trusted_apps\" | \"users-all\" | \"users-anomalies\" | \"users-authentications\" | \"users-events\" | \"users-risk\" | \"entity_analytics\" | \"entity_analytics-management\" | \"entity_analytics-asset-classification\" | \"coverage-overview\"" ], "path": "packages/deeplinks/security/index.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index d0468fda212de..877d5c5103c28 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 93fc6c47ecc17..8188fd4a64134 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 70116d73b84b7..0c86bde8979c3 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-04-25 +date: 2024-04-29 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 ffb22a03e55e7..9dcf5901f7d16 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-04-25 +date: 2024-04-29 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 70319caed9daf..8cfcb6286930f 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-04-25 +date: 2024-04-29 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 bd1a40d518e9d..52bd5f3fadfa8 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-04-25 +date: 2024-04-29 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 f51a24c48e7cb..52233e58472b8 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-04-25 +date: 2024-04-29 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 f37c7c2aaf15c..87bdf9fd05ab4 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-04-25 +date: 2024-04-29 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 29d38ff643602..d8db8113b5d4d 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-04-25 +date: 2024-04-29 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 4ff79e410772a..b185089f27d93 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-04-25 +date: 2024-04-29 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 7ed6667d8f048..fde7d49d89cc0 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index d4f83ac589687..fdfd67aed2807 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -300,7 +300,7 @@ "label": "enterpriseSearch", "description": [], "signature": [ - "{ readonly aiSearchDoc: string; readonly aiSearchHelp: string; readonly apiKeys: string; readonly behavioralAnalytics: string; readonly behavioralAnalyticsCORS: string; readonly behavioralAnalyticsEvents: string; readonly buildConnector: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsClientDeploy: string; readonly connectorsMappings: string; readonly connectorsAzureBlobStorage: string; readonly connectorsBox: string; readonly connectorsClients: string; readonly connectorsConfluence: string; readonly connectorsContentExtraction: string; readonly connectorsDropbox: string; readonly connectorsGithub: string; readonly connectorsGoogleCloudStorage: string; readonly connectorsGoogleDrive: string; readonly connectorsGmail: string; readonly connectorsJira: string; readonly connectorsMicrosoftSQL: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsNative: string; readonly connectorsNetworkDrive: string; readonly connectorsNotion: string; readonly connectorsOneDrive: string; readonly connectorsOracle: string; readonly connectorsOutlook: string; readonly connectorsPostgreSQL: string; readonly connectorsRedis: string; readonly connectorsS3: string; readonly connectorsSalesforce: string; readonly connectorsServiceNow: string; readonly connectorsSharepoint: string; readonly connectorsSharepointOnline: string; readonly connectorsTeams: string; readonly connectorsSlack: string; readonly connectorsZoom: string; readonly crawlerExtractionRules: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly elser: string; readonly engines: string; readonly indexApi: string; readonly ingestionApis: string; readonly ingestPipelines: string; readonly knnSearch: string; readonly knnSearchCombine: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly machineLearningStart: string; readonly playground: string; readonly mailService: string; readonly mlDocumentEnrichment: string; readonly searchApplicationsTemplates: string; readonly searchApplicationsSearchApi: string; readonly searchApplications: string; readonly searchApplicationsSearch: string; readonly searchLabs: string; readonly searchLabsRepo: string; readonly searchTemplates: string; readonly start: string; readonly supportedNlpModels: string; readonly syncRules: string; readonly syncRulesAdvanced: string; readonly trainedModels: string; readonly textEmbedding: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" + "{ readonly aiSearchDoc: string; readonly aiSearchHelp: string; readonly apiKeys: string; readonly behavioralAnalytics: string; readonly behavioralAnalyticsCORS: string; readonly behavioralAnalyticsEvents: string; readonly buildConnector: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsClientDeploy: string; readonly connectorsMappings: string; readonly connectorsAzureBlobStorage: string; readonly connectorsBox: string; readonly connectorsClients: string; readonly connectorsConfluence: string; readonly connectorsContentExtraction: string; readonly connectorsDropbox: string; readonly connectorsGithub: string; readonly connectorsGoogleCloudStorage: string; readonly connectorsGoogleDrive: string; readonly connectorsGmail: string; readonly connectorsJira: string; readonly connectorsMicrosoftSQL: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsNative: string; readonly connectorsNetworkDrive: string; readonly connectorsNotion: string; readonly connectorsOneDrive: string; readonly connectorsOracle: string; readonly connectorsOutlook: string; readonly connectorsPostgreSQL: string; readonly connectorsRedis: string; readonly connectorsS3: string; readonly connectorsSalesforce: string; readonly connectorsServiceNow: string; readonly connectorsSharepoint: string; readonly connectorsSharepointOnline: string; readonly connectorsTeams: string; readonly connectorsSlack: string; readonly connectorsZoom: string; readonly crawlerExtractionRules: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly elser: string; readonly engines: string; readonly indexApi: string; readonly ingestionApis: string; readonly ingestPipelines: string; readonly knnSearch: string; readonly knnSearchCombine: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly machineLearningStart: string; readonly mailService: string; readonly mlDocumentEnrichment: string; readonly searchApplicationsTemplates: string; readonly searchApplicationsSearchApi: string; readonly searchApplications: string; readonly searchApplicationsSearch: string; readonly searchLabs: string; readonly searchLabsRepo: string; readonly searchTemplates: string; readonly start: string; readonly supportedNlpModels: string; readonly syncRules: string; readonly syncRulesAdvanced: string; readonly trainedModels: string; readonly textEmbedding: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, @@ -999,6 +999,20 @@ "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/doc-links", + "id": "def-common.DocLinks.playground", + "type": "Object", + "tags": [], + "label": "playground", + "description": [], + "signature": [ + "{ readonly chatPlayground: string; }" + ], + "path": "packages/kbn-doc-links/src/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 7fef9c29d2c6b..fdf77e2cf3ca4 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/docs](https://github.com/orgs/elastic/teams/docs) for question | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 75 | 0 | 75 | 2 | +| 76 | 0 | 76 | 2 | ## Common diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 4ee1da34c7499..059cf1b664e78 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-04-25 +date: 2024-04-29 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 dff49f8e9d77c..0fa7c5a5d76d6 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-04-25 +date: 2024-04-29 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 83d4906871612..be700b1638668 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-04-25 +date: 2024-04-29 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 d41dba9f77329..82a7175aeeb03 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-04-25 +date: 2024-04-29 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 357482eba004d..b6b497ded18dd 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-04-25 +date: 2024-04-29 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 6d78ad3355487..19c63390e9bb5 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -2468,7 +2468,7 @@ "tags": [], "label": "replacements", "description": [ - "\nReplacements associated with the context, i.e. replacements for an insight provided as context" + "\nReplacements associated with the context, i.e. replacements for an attack discovery provided as context" ], "signature": [ "Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined" @@ -2594,13 +2594,13 @@ "misc": [ { "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.AI_INSIGHTS_STORAGE_KEY", + "id": "def-public.ATTACK_DISCOVERY_STORAGE_KEY", "type": "string", "tags": [], - "label": "AI_INSIGHTS_STORAGE_KEY", + "label": "ATTACK_DISCOVERY_STORAGE_KEY", "description": [], "signature": [ - "\"aiInsights\"" + "\"attackDiscovery\"" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 732eac65b987a..8206ecff89782 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index 52217e8560f9f..2af243d438bd0 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -678,90 +678,88 @@ "misc": [ { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AlertsInsight", + "id": "def-common.ApiConfig", "type": "Type", "tags": [], - "label": "AlertsInsight", - "description": [ - "\nAn insight generated from one or more alerts" - ], + "label": "ApiConfig", + "description": [], "signature": [ - "{ title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }" + "{ connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_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.AlertsInsightsPostRequestBody", + "id": "def-common.AppendConversationMessageRequestBody", "type": "Type", "tags": [], - "label": "AlertsInsightsPostRequestBody", + "label": "AppendConversationMessageRequestBody", "description": [], "signature": [ - "{ connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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/insights/alerts/post_alerts_insights_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.AlertsInsightsPostRequestBodyInput", + "id": "def-common.AppendConversationMessageRequestBodyInput", "type": "Type", "tags": [], - "label": "AlertsInsightsPostRequestBodyInput", + "label": "AppendConversationMessageRequestBodyInput", "description": [], "signature": [ - "{ connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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/insights/alerts/post_alerts_insights_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.AlertsInsightsPostResponse", + "id": "def-common.AppendConversationMessageRequestParams", "type": "Type", "tags": [], - "label": "AlertsInsightsPostResponse", + "label": "AppendConversationMessageRequestParams", "description": [], "signature": [ - "{ connector_id?: string | undefined; insights?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }" + "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_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.ApiConfig", + "id": "def-common.AppendConversationMessageRequestParamsInput", "type": "Type", "tags": [], - "label": "ApiConfig", + "label": "AppendConversationMessageRequestParamsInput", "description": [], "signature": [ - "{ connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }" + "{ id: string; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.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.AppendConversationMessageRequestBody", + "id": "def-common.AppendConversationMessageResponse", "type": "Type", "tags": [], - "label": "AppendConversationMessageRequestBody", + "label": "AppendConversationMessageResponse", "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; }[]; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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, @@ -770,77 +768,79 @@ }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AppendConversationMessageRequestBodyInput", + "id": "def-common.AssistantFeatures", "type": "Type", "tags": [], - "label": "AppendConversationMessageRequestBodyInput", - "description": [], + "label": "AssistantFeatures", + "description": [ + "\nInterface for features available to the elastic assistant" + ], "signature": [ - "{ 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; }[]; }" + "{ readonly assistantModelEvaluation: boolean; readonly attackDiscoveryEnabled: boolean; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_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.AppendConversationMessageRequestParams", + "id": "def-common.AttackDiscovery", "type": "Type", "tags": [], - "label": "AppendConversationMessageRequestParams", - "description": [], + "label": "AttackDiscovery", + "description": [ + "\nAn attack discovery generated from one or more alerts" + ], "signature": [ - "{ id: string; }" + "{ title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AppendConversationMessageRequestParamsInput", + "id": "def-common.AttackDiscoveryPostRequestBody", "type": "Type", "tags": [], - "label": "AppendConversationMessageRequestParamsInput", + "label": "AttackDiscoveryPostRequestBody", "description": [], "signature": [ - "{ id: string; }" + "{ connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AppendConversationMessageResponse", + "id": "def-common.AttackDiscoveryPostRequestBodyInput", "type": "Type", "tags": [], - "label": "AppendConversationMessageResponse", + "label": "AttackDiscoveryPostRequestBodyInput", "description": [], "signature": [ - "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AssistantFeatures", + "id": "def-common.AttackDiscoveryPostResponse", "type": "Type", "tags": [], - "label": "AssistantFeatures", - "description": [ - "\nInterface for features available to the elastic assistant" - ], + "label": "AttackDiscoveryPostResponse", + "description": [], "signature": [ - "{ readonly assistantAlertsInsights: boolean; readonly assistantModelEvaluation: boolean; }" + "{ connector_id?: string | undefined; attackDiscoveries?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }" ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -1007,7 +1007,7 @@ "label": "ConversationCreateProps", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + "{ title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -1097,7 +1097,7 @@ "label": "CreateConversationRequestBody", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + "{ title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -1112,7 +1112,7 @@ "label": "CreateConversationRequestBodyInput", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }" + "{ title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -1679,7 +1679,7 @@ "label": "GetCapabilitiesResponse", "description": [], "signature": [ - "{ assistantAlertsInsights: boolean; assistantModelEvaluation: boolean; }" + "{ assistantModelEvaluation: boolean; attackDiscoveryEnabled: boolean; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", "deprecated": false, @@ -1837,7 +1837,7 @@ "label": "PerformBulkActionRequestBody", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -1852,7 +1852,7 @@ "label": "PerformBulkActionRequestBodyInput", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2291,51 +2291,6 @@ } ], "objects": [ - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AlertsInsight", - "type": "Object", - "tags": [], - "label": "AlertsInsight", - "description": [], - "signature": [ - "Zod.ZodObject<{ alertIds: Zod.ZodArray; detailsMarkdown: Zod.ZodString; entitySummaryMarkdown: Zod.ZodString; mitreAttackTactics: Zod.ZodOptional>; summaryMarkdown: Zod.ZodString; title: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }>" - ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AlertsInsightsPostRequestBody", - "type": "Object", - "tags": [], - "label": "AlertsInsightsPostRequestBody", - "description": [], - "signature": [ - "Zod.ZodObject<{ alertsIndexPattern: Zod.ZodString; anonymizationFields: Zod.ZodArray; field: Zod.ZodString; allowed: Zod.ZodOptional; anonymized: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; createdAt: Zod.ZodOptional; createdBy: Zod.ZodOptional; namespace: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }, { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }>, \"many\">; connectorId: Zod.ZodString; actionTypeId: Zod.ZodString; langSmithProject: Zod.ZodOptional; langSmithApiKey: Zod.ZodOptional; model: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; size: Zod.ZodNumber; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" - ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/elastic-assistant-common", - "id": "def-common.AlertsInsightsPostResponse", - "type": "Object", - "tags": [], - "label": "AlertsInsightsPostResponse", - "description": [], - "signature": [ - "Zod.ZodObject<{ connector_id: Zod.ZodOptional; insights: Zod.ZodOptional; detailsMarkdown: Zod.ZodString; entitySummaryMarkdown: Zod.ZodString; mitreAttackTactics: Zod.ZodOptional>; summaryMarkdown: Zod.ZodString; title: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }>, \"many\">>; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; 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, { connector_id?: string | undefined; insights?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { connector_id?: string | undefined; insights?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>" - ], - "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.API_VERSIONS", @@ -2458,6 +2413,51 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AttackDiscovery", + "type": "Object", + "tags": [], + "label": "AttackDiscovery", + "description": [], + "signature": [ + "Zod.ZodObject<{ alertIds: Zod.ZodArray; detailsMarkdown: Zod.ZodString; entitySummaryMarkdown: Zod.ZodString; mitreAttackTactics: Zod.ZodOptional>; summaryMarkdown: Zod.ZodString; title: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AttackDiscoveryPostRequestBody", + "type": "Object", + "tags": [], + "label": "AttackDiscoveryPostRequestBody", + "description": [], + "signature": [ + "Zod.ZodObject<{ alertsIndexPattern: Zod.ZodString; anonymizationFields: Zod.ZodArray; field: Zod.ZodString; allowed: Zod.ZodOptional; anonymized: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; createdAt: Zod.ZodOptional; createdBy: Zod.ZodOptional; namespace: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }, { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }>, \"many\">; connectorId: Zod.ZodString; actionTypeId: Zod.ZodString; langSmithProject: Zod.ZodOptional; langSmithApiKey: Zod.ZodOptional; model: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; size: Zod.ZodNumber; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { connectorId: string; actionTypeId: string; size: number; subAction: \"invokeAI\" | \"invokeStream\"; alertsIndexPattern: string; anonymizationFields: { id: string; field: string; timestamp?: string | undefined; allowed?: boolean | undefined; anonymized?: boolean | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; namespace?: string | undefined; }[]; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; model?: string | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.AttackDiscoveryPostResponse", + "type": "Object", + "tags": [], + "label": "AttackDiscoveryPostResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ connector_id: Zod.ZodOptional; attackDiscoveries: Zod.ZodOptional; detailsMarkdown: Zod.ZodString; entitySummaryMarkdown: Zod.ZodString; mitreAttackTactics: Zod.ZodOptional>; summaryMarkdown: Zod.ZodString; title: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }, { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }>, \"many\">>; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; 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, { connector_id?: string | undefined; attackDiscoveries?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { connector_id?: string | undefined; attackDiscoveries?: { title: string; alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; summaryMarkdown: string; mitreAttackTactics?: string[] | undefined; }[] | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; status?: string | undefined; trace_data?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.BulkActionBase", @@ -2616,7 +2616,7 @@ "label": "ConversationCreateProps", "description": [], "signature": [ - "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodOptional; 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2706,7 +2706,7 @@ "label": "CreateConversationRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodOptional; 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2798,7 +2798,7 @@ "\nDefault features available to the elastic assistant" ], "signature": [ - "{ readonly assistantAlertsInsights: false; readonly assistantModelEvaluation: false; }" + "{ readonly assistantModelEvaluation: false; readonly attackDiscoveryEnabled: false; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts", "deprecated": false, @@ -3023,7 +3023,7 @@ "label": "GetCapabilitiesResponse", "description": [], "signature": [ - "Zod.ZodObject<{ assistantAlertsInsights: Zod.ZodBoolean; assistantModelEvaluation: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantAlertsInsights: boolean; assistantModelEvaluation: boolean; }, { assistantAlertsInsights: boolean; assistantModelEvaluation: boolean; }>" + "Zod.ZodObject<{ assistantModelEvaluation: Zod.ZodBoolean; attackDiscoveryEnabled: Zod.ZodBoolean; }, \"strip\", Zod.ZodTypeAny, { assistantModelEvaluation: boolean; attackDiscoveryEnabled: boolean; }, { assistantModelEvaluation: boolean; attackDiscoveryEnabled: boolean; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts", "deprecated": false, @@ -3158,7 +3158,7 @@ "label": "PerformBulkActionRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: 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, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }>" + "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional; 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"strip\", Zod.ZodTypeAny, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }, { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; actionTypeId: 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, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>>; }, \"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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; id?: 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; actionTypeId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | 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; actionTypeId: 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?: Zod.objectInputType<{}, Zod.ZodString, \"strip\"> | undefined; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 39bfb01835ce9..48c0dab752167 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index d028ef50929dd..2b63ca6eddcca 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-04-25 +date: 2024-04-29 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 e72df58506781..9a268876a8ee5 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-04-25 +date: 2024-04-29 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 5c30bb55ca208..01eb5d3b98d33 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-04-25 +date: 2024-04-29 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 5d6ee85ad4b8f..93a323b1e4326 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 87965fd919954..51591a4113c24 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index d896a8a128f54..25b166d4f05a7 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-04-25 +date: 2024-04-29 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_ast.devdocs.json b/api_docs/kbn_esql_ast.devdocs.json index f8d3c562b9d24..2fdbdcea62f32 100644 --- a/api_docs/kbn_esql_ast.devdocs.json +++ b/api_docs/kbn_esql_ast.devdocs.json @@ -212,7 +212,7 @@ "label": "getAstAndSyntaxErrors", "description": [], "signature": [ - "(text: string | undefined) => Promise<{ errors: ", + "(text: string | undefined) => { errors: ", { "pluginId": "@kbn/esql-ast", "scope": "common", @@ -228,7 +228,7 @@ "section": "def-common.ESQLAst", "text": "ESQLAst" }, - "; }>" + "; }" ], "path": "packages/kbn-esql-ast/src/ast_parser.ts", "deprecated": false, @@ -987,7 +987,23 @@ "section": "def-common.EditorError", "text": "EditorError" }, - "[]; }>" + "[]; }> | { ast: ", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLAst", + "text": "ESQLAst" + }, + "; errors: ", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.EditorError", + "text": "EditorError" + }, + "[]; }" ], "path": "packages/kbn-esql-ast/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index 48389f403e292..c4427b2d638ef 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 5b5ae69defe2b..77be7a4a2f440 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.devdocs.json b/api_docs/kbn_esql_validation_autocomplete.devdocs.json index b07a64619d3df..899fc12eb4232 100644 --- a/api_docs/kbn_esql_validation_autocomplete.devdocs.json +++ b/api_docs/kbn_esql_validation_autocomplete.devdocs.json @@ -384,7 +384,7 @@ "label": "getAllFunctions", "description": [], "signature": [ - "(options: { type: \"agg\" | \"builtin\" | \"eval\" | (\"agg\" | \"builtin\" | \"eval\")[]; } | undefined) => ", + "(options: { type: \"grouping\" | \"agg\" | \"builtin\" | \"eval\" | (\"grouping\" | \"agg\" | \"builtin\" | \"eval\")[]; } | undefined) => ", { "pluginId": "@kbn/esql-validation-autocomplete", "scope": "common", @@ -417,7 +417,7 @@ "label": "type", "description": [], "signature": [ - "\"agg\" | \"builtin\" | \"eval\" | (\"agg\" | \"builtin\" | \"eval\")[]" + "\"grouping\" | \"agg\" | \"builtin\" | \"eval\" | (\"grouping\" | \"agg\" | \"builtin\" | \"eval\")[]" ], "path": "packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts", "deprecated": false, @@ -3149,7 +3149,7 @@ "label": "type", "description": [], "signature": [ - "\"agg\" | \"builtin\" | \"eval\"" + "\"grouping\" | \"agg\" | \"builtin\" | \"eval\"" ], "path": "packages/kbn-esql-validation-autocomplete/src/definitions/types.ts", "deprecated": false, diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index ef657202585f7..619f85fdc4127 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 6f49507798f16..09994713bf2d9 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-04-25 +date: 2024-04-29 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 74d20bdf60e05..6d0e977c79599 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-04-25 +date: 2024-04-29 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 2248b0036ee89..5373005b396d8 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-04-25 +date: 2024-04-29 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 63ceb8312248b..485339cb7199a 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-04-25 +date: 2024-04-29 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 dd9ceaf2b22e6..354bb101fafaf 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-04-25 +date: 2024-04-29 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 4fec5584ea842..88cdf500f2a2f 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-04-25 +date: 2024-04-29 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 d84a6c541465e..d7b9153541fe2 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-04-25 +date: 2024-04-29 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 094c5e0c3e84e..558cbe44334f8 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-04-25 +date: 2024-04-29 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 5e08df5f47e1e..71a6ae307d34d 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-04-25 +date: 2024-04-29 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 b3e04d03fd726..e6f6671d7a5a2 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-04-25 +date: 2024-04-29 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 0e18a1f81751f..987ecb437bbfc 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-04-25 +date: 2024-04-29 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 b1428043ed89b..216a3dbb721de 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-04-25 +date: 2024-04-29 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 5f70b5007dd40..462a770dd36e4 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-04-25 +date: 2024-04-29 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 a72a94a12481a..cc70cd6eaf747 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-04-25 +date: 2024-04-29 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 34c590806a675..69dc0a8d5c49b 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-04-25 +date: 2024-04-29 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 4f8dfe0e4a95f..ecd3bd9750476 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-04-25 +date: 2024-04-29 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 dde9afd6c80f2..483702bceed2c 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-04-25 +date: 2024-04-29 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 ba2c06a9030d5..9e194e1717500 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-04-25 +date: 2024-04-29 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 89b75ed9f2b6d..1e2a94c922874 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-04-25 +date: 2024-04-29 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 bbdc276c6d82e..59181d7e6f5de 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-04-25 +date: 2024-04-29 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 113b04eeab8fb..e64cf065ac217 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index d91fd5e8c7a5f..eb191a0e93522 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 596bb6bce99c2..39bf14e46f049 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index e0b434de7bc4b..de3fda580c21f 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-04-25 +date: 2024-04-29 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 1b45f7b0e90bc..51cafb867136b 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-04-25 +date: 2024-04-29 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 b0a9a6722749d..e604e4a805259 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 404e7fa94edd7..a5f3cc676382f 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 3b23d9f7683b2..096a52beb462a 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index cba1416ac2453..3e40f55cf6af2 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-04-25 +date: 2024-04-29 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 a951396cce252..4ef626a3fa2f7 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-04-25 +date: 2024-04-29 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 30799be1c2cb4..6d550587e3f97 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-04-25 +date: 2024-04-29 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 6de2a9dfe874f..3f403a36907ae 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-04-25 +date: 2024-04-29 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 b0465bb9bcf89..f427afd603ea9 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-04-25 +date: 2024-04-29 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 c09868907bc0c..941f69ade50a5 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-04-25 +date: 2024-04-29 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 213b1cc668f24..ef854ebc0ec54 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-04-25 +date: 2024-04-29 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 47d9d131d0934..7e6bb4efae6c9 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-04-25 +date: 2024-04-29 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 947a6db171f37..7dbe61359a154 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-04-25 +date: 2024-04-29 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 22550d018e7cd..2fffa55b5ed43 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-04-25 +date: 2024-04-29 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 b551cb8633a87..94ff5112454af 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-04-25 +date: 2024-04-29 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 4f59149b4fba8..17414c6123205 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-04-25 +date: 2024-04-29 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 cd9da4cecdbd4..fa84620f0ed6d 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-04-25 +date: 2024-04-29 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 34be49d55ac78..f606ea9adb507 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-04-25 +date: 2024-04-29 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 ec0bee7928be9..81e5d865a69f6 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-04-25 +date: 2024-04-29 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 7930243e2d574..718928fd8969a 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-04-25 +date: 2024-04-29 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 837b3452f409b..f93185fbedc42 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-04-25 +date: 2024-04-29 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 a7db5a7cacde7..9d04cd8920652 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-04-25 +date: 2024-04-29 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 cc5db31a15dac..09a31d48c72d3 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-04-25 +date: 2024-04-29 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 de5484d56e692..3de7eaa5988e7 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-04-25 +date: 2024-04-29 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 f37117c819559..a2ccae4a18b57 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-04-25 +date: 2024-04-29 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 1f091064ada6f..23e299ea6a1d4 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-04-25 +date: 2024-04-29 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 1b7a0f1fb8c72..2e7266b506316 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-04-25 +date: 2024-04-29 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 48b1dc432f1bf..02078e57f36e0 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-04-25 +date: 2024-04-29 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 8229433cfded8..7f9f21d603a38 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-04-25 +date: 2024-04-29 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 b1aaadff3e590..5c62e0c125908 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-04-25 +date: 2024-04-29 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 5fd5c1bf1f619..ed972bdf3fe33 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-04-25 +date: 2024-04-29 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 f58fd5a684c0b..852187d4a7cfc 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-04-25 +date: 2024-04-29 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 39fb78878e6da..31e63d5295a42 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-04-25 +date: 2024-04-29 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 aa781b093d7a2..13884e76afe38 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-04-25 +date: 2024-04-29 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 66bc5702aca94..970f88060f3fc 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-04-25 +date: 2024-04-29 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 ea4b91d8d89e2..6c19b42ee3493 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-04-25 +date: 2024-04-29 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 104b64b0c64f2..4cbecc0ad3c69 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-04-25 +date: 2024-04-29 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 3a4aef2e18f96..24f2a6eb19804 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-04-25 +date: 2024-04-29 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 bf5088ee957af..2d8bd5c484d31 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-04-25 +date: 2024-04-29 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 ec60125a8defb..c9d38d79937a0 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-04-25 +date: 2024-04-29 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 8572ffc107ec4..86531fb1b550a 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-04-25 +date: 2024-04-29 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 6baf4617bdf57..4fcbb2fce2db4 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-04-25 +date: 2024-04-29 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 366872f0c8544..1e9b0ed2e7af3 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-04-25 +date: 2024-04-29 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 6ab4fe2f24148..6781f2fc77a91 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-04-25 +date: 2024-04-29 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 c4bc613ac86da..72d667fe0fd30 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-04-25 +date: 2024-04-29 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 cfdc01717c287..3cbec30ed386d 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-04-25 +date: 2024-04-29 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 fc58a15fd4e83..7085fa2a4bc4d 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-04-25 +date: 2024-04-29 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 277da3ceacf7f..8b6b0db807fd6 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-04-25 +date: 2024-04-29 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 54aa2ec86b42f..76e58af475ffe 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-04-25 +date: 2024-04-29 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 128b7fb6ce16a..1954946b6d539 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index 8d09047f581d2..9e2cbed81f594 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 3bb3181705518..a7b141f643d36 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-04-25 +date: 2024-04-29 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 67b4bd339363f..45a20b05ff140 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-04-25 +date: 2024-04-29 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 c933cbdacc4af..0dc8b6e66908b 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-04-25 +date: 2024-04-29 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 5ce1cf1432017..da9936e678ec9 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_monaco.devdocs.json index 9875106fea658..85062fc30272f 100644 --- a/api_docs/kbn_monaco.devdocs.json +++ b/api_docs/kbn_monaco.devdocs.json @@ -1253,6 +1253,66 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/monaco", + "id": "def-common.CODE_EDITOR_DARK_THEME_ID", + "type": "string", + "tags": [], + "label": "CODE_EDITOR_DARK_THEME_ID", + "description": [], + "signature": [ + "\"codeEditorDarkTheme\"" + ], + "path": "packages/kbn-monaco/src/code_editor/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/monaco", + "id": "def-common.CODE_EDITOR_DARK_THEME_TRANSPARENT_ID", + "type": "string", + "tags": [], + "label": "CODE_EDITOR_DARK_THEME_TRANSPARENT_ID", + "description": [], + "signature": [ + "\"codeEditorDarkTransparentTheme\"" + ], + "path": "packages/kbn-monaco/src/code_editor/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/monaco", + "id": "def-common.CODE_EDITOR_LIGHT_THEME_ID", + "type": "string", + "tags": [], + "label": "CODE_EDITOR_LIGHT_THEME_ID", + "description": [], + "signature": [ + "\"codeEditorLightTheme\"" + ], + "path": "packages/kbn-monaco/src/code_editor/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/monaco", + "id": "def-common.CODE_EDITOR_LIGHT_THEME_TRANSPARENT_ID", + "type": "string", + "tags": [], + "label": "CODE_EDITOR_LIGHT_THEME_TRANSPARENT_ID", + "description": [], + "signature": [ + "\"codeEditorLightTransparentTheme\"" + ], + "path": "packages/kbn-monaco/src/code_editor/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/monaco", "id": "def-common.CONSOLE_LANG_ID", diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 1179e249c5b2f..a46492ec46481 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 120 | 0 | 120 | 3 | +| 124 | 0 | 124 | 3 | ## Common diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 1f1614ef8c4d2..35a20bfc9ecae 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-04-25 +date: 2024-04-29 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 450260a0f5f20..4b6737a45ab1f 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-04-25 +date: 2024-04-29 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 838132bb8b784..29e47b125d7a5 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-04-25 +date: 2024-04-29 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 18a9a6e449355..8e8a4de75c409 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-04-25 +date: 2024-04-29 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 d5770977ee2fb..f08f8e52bd001 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-04-25 +date: 2024-04-29 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 f4c640a225f95..00fb25cfec14b 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-04-25 +date: 2024-04-29 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 8879a2fd18da5..5a7d9401bc92f 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-04-25 +date: 2024-04-29 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 ad97d0df8b310..92d3807eeb0bd 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-04-25 +date: 2024-04-29 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 83eabf77c6a94..2867731b79dec 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-04-25 +date: 2024-04-29 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 ae0193d13c481..dad7989871a69 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-04-25 +date: 2024-04-29 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 8b4edc25ecb93..9776d70272063 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-04-25 +date: 2024-04-29 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 27792f523f19d..505dea8b7f57d 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-04-25 +date: 2024-04-29 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 a0c642d8ab9b3..d9701245a9a97 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-04-25 +date: 2024-04-29 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 0ce21d06be114..2d2232c7bb5cb 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-04-25 +date: 2024-04-29 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 39d68080ed50e..e5fd1249cd79a 100644 --- a/api_docs/kbn_presentation_containers.devdocs.json +++ b/api_docs/kbn_presentation_containers.devdocs.json @@ -711,7 +711,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -843,7 +843,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -1112,7 +1112,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: { [key: string]: unknown; }; error: (err: any) => void; forEach: { (next: (value: { [key: string]: unknown; }) => void): Promise; (next: (value: { [key: string]: unknown; }) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => { [key: string]: unknown; }; pipe: { (): ", + " | undefined; readonly value: { [key: string]: unknown; }; error: (err: any) => void; forEach: { (next: (value: { [key: string]: unknown; }) => void): Promise; (next: (value: { [key: string]: unknown; }) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => { [key: string]: unknown; }; pipe: { (): ", "Observable", "<{ [key: string]: unknown; }>; (op1: ", "OperatorFunction", @@ -1244,7 +1244,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<{ [key: string]: unknown; }>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 96e82e950f290..1d5332133e2ea 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index 844fe5ab1dbdc..92acf2ea0f9e9 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -1477,9 +1477,21 @@ "description": [], "signature": [ "(rawState: ", - "SerializedTimeRange", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTimeRange", + "text": "SerializedTimeRange" + }, ") => { serialize: () => ", - "SerializedTimeRange", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTimeRange", + "text": "SerializedTimeRange" + }, "; api: ", "PublishesWritableTimeRange", "; comparators: ", @@ -1491,7 +1503,13 @@ "text": "StateComparators" }, "<", - "SerializedTimeRange", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTimeRange", + "text": "SerializedTimeRange" + }, ">; }" ], "path": "packages/presentation/presentation_publishing/interfaces/fetch/initialize_time_range.ts", @@ -1506,7 +1524,13 @@ "label": "rawState", "description": [], "signature": [ - "SerializedTimeRange" + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTimeRange", + "text": "SerializedTimeRange" + } ], "path": "packages/presentation/presentation_publishing/interfaces/fetch/initialize_time_range.ts", "deprecated": false, @@ -2715,7 +2739,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", + " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => Error | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -2847,7 +2871,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -2893,7 +2917,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3025,7 +3049,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -3095,7 +3119,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "dataViews", "scope": "common", @@ -3323,7 +3347,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -3449,7 +3473,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", + " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string[] | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3581,7 +3605,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -3643,7 +3667,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3775,7 +3799,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -3842,7 +3866,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3974,7 +3998,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -4006,7 +4030,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -4138,7 +4162,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -4229,7 +4253,7 @@ "section": "def-common.PhaseEvent", "text": "PhaseEvent" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -4457,7 +4481,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -4585,7 +4609,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -4717,7 +4741,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -4787,7 +4811,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -5015,7 +5039,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -5183,7 +5207,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: object | undefined; error: (err: any) => void; forEach: { (next: (value: object | undefined) => void): Promise; (next: (value: object | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => object | undefined; pipe: { (): ", + " | undefined; readonly value: object | undefined; error: (err: any) => void; forEach: { (next: (value: object | undefined) => void): Promise; (next: (value: object | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => object | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5315,7 +5339,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", @@ -5403,7 +5427,7 @@ "section": "def-common.ViewMode", "text": "ViewMode" }, - ") => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + ") => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -5631,7 +5655,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "<", { @@ -5736,6 +5760,41 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTimeRange", + "type": "Interface", + "tags": [], + "label": "SerializedTimeRange", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/fetch/initialize_time_range.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTimeRange.timeRange", + "type": "Object", + "tags": [], + "label": "timeRange", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined" + ], + "path": "packages/presentation/presentation_publishing/interfaces/fetch/initialize_time_range.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.SerializedTitles", @@ -6245,7 +6304,7 @@ "signature": [ "{ source: ", "Observable", - " | undefined; readonly value: T; error: (err: any) => void; forEach: { (next: (value: T) => void): Promise; (next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => T; pipe: { (): ", + " | undefined; readonly value: T; error: (err: any) => void; forEach: { (next: (value: T) => void): Promise; (next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; }; complete: () => void; getValue: () => T; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -6377,7 +6436,7 @@ "OperatorFunction", "[]): ", "Observable", - "; }; complete: () => void; closed: boolean; observers: ", + "; }; closed: boolean; observers: ", "Observer", "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 6c41abbcc9e69..126b17f6f49e2 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-04-25 +date: 2024-04-29 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 | |-------------------|-----------|------------------------|-----------------| -| 182 | 0 | 153 | 6 | +| 184 | 0 | 155 | 5 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 01cb00ef5a82d..243105534cddb 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-04-25 +date: 2024-04-29 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 2d2674508fc09..2b0448365f1bc 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-04-25 +date: 2024-04-29 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 b52410c269ea8..49db8680a0688 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-04-25 +date: 2024-04-29 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 3129ed4c3fbe3..737c4bf691042 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_react_kibana_context_render.devdocs.json index 3313d26d838a6..adc8eec74f763 100644 --- a/api_docs/kbn_react_kibana_context_render.devdocs.json +++ b/api_docs/kbn_react_kibana_context_render.devdocs.json @@ -92,7 +92,7 @@ "section": "def-common.I18nStart", "text": "I18nStart" }, - "; analytics?: ", + "; analytics?: Pick<", { "pluginId": "@kbn/core-analytics-browser", "scope": "common", @@ -100,7 +100,7 @@ "section": "def-common.AnalyticsServiceStart", "text": "AnalyticsServiceStart" }, - " | undefined; theme: ", + ", \"reportEvent\"> | undefined; theme: ", { "pluginId": "@kbn/react-kibana-context-common", "scope": "common", diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 9ff75786da5ed..a9eb826fddb52 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_react_kibana_context_root.devdocs.json index cceb5bdfd7a96..55c5d50c9b83f 100644 --- a/api_docs/kbn_react_kibana_context_root.devdocs.json +++ b/api_docs/kbn_react_kibana_context_root.devdocs.json @@ -247,6 +247,7 @@ "The `AnalyticsServiceStart` API from `CoreStart`." ], "signature": [ + "Pick<", { "pluginId": "@kbn/core-analytics-browser", "scope": "common", @@ -254,7 +255,7 @@ "section": "def-common.AnalyticsServiceStart", "text": "AnalyticsServiceStart" }, - " | undefined" + ", \"reportEvent\"> | undefined" ], "path": "packages/react/kibana_context/root/root_provider.tsx", "deprecated": false, diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index abf1f7c5e7315..c181684a9bca2 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-04-25 +date: 2024-04-29 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 87776f5e6dd9b..feda10aa296ed 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-04-25 +date: 2024-04-29 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 e155003075164..7bd96a4ff1ac6 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_react_kibana_mount.devdocs.json index 6b8df73ac95d1..2fa2b0bf1ccf8 100644 --- a/api_docs/kbn_react_kibana_mount.devdocs.json +++ b/api_docs/kbn_react_kibana_mount.devdocs.json @@ -243,7 +243,7 @@ "section": "def-common.I18nStart", "text": "I18nStart" }, - "; analytics?: ", + "; analytics?: Pick<", { "pluginId": "@kbn/core-analytics-browser", "scope": "common", @@ -251,7 +251,7 @@ "section": "def-common.AnalyticsServiceStart", "text": "AnalyticsServiceStart" }, - " | undefined; theme: ", + ", \"reportEvent\"> | undefined; theme: ", { "pluginId": "@kbn/react-kibana-context-common", "scope": "common", diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 0de66f391de48..8be73899bb1d3 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-04-25 +date: 2024-04-29 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 a0b410a7d62c1..3ad1d3811508f 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-04-25 +date: 2024-04-29 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 ae116adf0c9ec..50c6c449b4381 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-04-25 +date: 2024-04-29 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 f006310ccc40c..30104bc658a43 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-04-25 +date: 2024-04-29 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 fb22675c4fd29..20e1479bf8ca0 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-04-25 +date: 2024-04-29 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 830eef14de083..536bfe3037111 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index eca03a58170dd..d1efbd18e29bd 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 134ef06eebb7c..1dbd89f0e6e37 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-04-25 +date: 2024-04-29 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 3ded31c7519bd..e8761a1926042 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-04-25 +date: 2024-04-29 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 87f84651d5ab1..77b6cca28e08a 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-04-25 +date: 2024-04-29 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 98c0084b907fa..95e21a96ad4a0 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-04-25 +date: 2024-04-29 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 9299583410257..36d6049377604 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-04-25 +date: 2024-04-29 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 dbbb4a116617b..7b77ab6fdbd4f 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-04-25 +date: 2024-04-29 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 2c7f726a66a94..bdb729add265d 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-04-25 +date: 2024-04-29 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 4cb9628f671c5..776c88d8db1ea 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-04-25 +date: 2024-04-29 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 85ebaa3fc786b..1df251197e6bb 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-04-25 +date: 2024-04-29 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 cb3c7a0ec5a6c..c7367fae2333c 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-04-25 +date: 2024-04-29 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 dcb4c015e6830..7d07752736554 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index c258bf98c751c..fe19c362a77e4 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index db918d417c73d..dd5490ba22cb5 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-04-25 +date: 2024-04-29 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 bbf1a9b3a4ec6..67f6c416d391e 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-04-25 +date: 2024-04-29 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 3f512646387a4..6ffead9f7c86c 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -626,6 +626,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.ALERT_RULE_EXECUTION_TIMESTAMP", + "type": "string", + "tags": [], + "label": "ALERT_RULE_EXECUTION_TIMESTAMP", + "description": [], + "signature": [ + "\"kibana.alert.rule.execution.timestamp\"" + ], + "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_RULE_EXECUTION_UUID", @@ -1519,7 +1534,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.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\"" + "\"@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.execution.timestamp\" | \"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 1a17fdcee9689..8f5b4b936df8a 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-04-25 +date: 2024-04-29 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 | |-------------------|-----------|------------------------|-----------------| -| 124 | 0 | 121 | 0 | +| 125 | 0 | 122 | 0 | ## Common diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 14271bccfea24..ed6649aff1eb9 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 6b71e62659bd5..8eede00a8c2f0 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 662d26a1824e4..cfe3fa3c43391 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 17b5526f676cf..89e1a9fc523b2 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-04-25 +date: 2024-04-29 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 fba9ad02c46ba..bcba9af60ec39 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-04-25 +date: 2024-04-29 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 f32b2a2560917..39446d8c75ff2 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-04-25 +date: 2024-04-29 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 e42b8502dc824..ca732083943ac 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 22ff4c0bce946..956ad48227eea 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-04-25 +date: 2024-04-29 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.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 99bec495c1a13..d59ef657c2231 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-04-25 +date: 2024-04-29 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.mdx b/api_docs/kbn_security_plugin_types_server.mdx index e4b0016cdb1de..56a25a4f7faeb 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-04-25 +date: 2024-04-29 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 7907ed4e5c8ae..64698e8947c61 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-04-25 +date: 2024-04-29 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 f2745254c8c79..58634f8a66044 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-04-25 +date: 2024-04-29 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 cb85f78f77e93..5b4264cacb7f4 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-04-25 +date: 2024-04-29 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 f9532b7f463fc..7d01d3ea9fce7 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-04-25 +date: 2024-04-29 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 6e9bcd74bbb7f..563d44c3a214f 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-04-25 +date: 2024-04-29 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 98cefc21ef42d..00debf93cc9f6 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-04-25 +date: 2024-04-29 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 929121448bc25..67c4a50619427 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-04-25 +date: 2024-04-29 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 30d53bc40c51b..55eb870662d92 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-04-25 +date: 2024-04-29 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 014bd6f7389da..02dc97ca17ffc 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-04-25 +date: 2024-04-29 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 fa3add30e9c6a..67fedefec5b24 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-04-25 +date: 2024-04-29 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 0059f8b9f187c..d62c16930541c 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-04-25 +date: 2024-04-29 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 42aae9ae0d03e..d5ce3969a9bd8 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-04-25 +date: 2024-04-29 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 ee407c859c493..9adf7a2bf8751 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-04-25 +date: 2024-04-29 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 9a57954542d5d..b41a4ad58e5c9 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-04-25 +date: 2024-04-29 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 3286ef0999088..d3284c2930a0c 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-04-25 +date: 2024-04-29 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 ec51e61907880..18db052b7e6cf 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-04-25 +date: 2024-04-29 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 0d761565d3b23..1ea0240756ada 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-04-25 +date: 2024-04-29 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 76b407766005c..82ba0f08d3c13 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-04-25 +date: 2024-04-29 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 75913f4251e78..8e5ef96259cf7 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-04-25 +date: 2024-04-29 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 9f102c3bb43d4..3ca812025113e 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-04-25 +date: 2024-04-29 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 bcc9b6d62f7c7..635d828d77780 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-04-25 +date: 2024-04-29 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 079f231990b9e..88398b9d54e1f 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-04-25 +date: 2024-04-29 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 77db574b8c04c..cbc7ecefb6928 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-04-25 +date: 2024-04-29 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 575dae4fffe27..f68b83be44868 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-04-25 +date: 2024-04-29 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 118dc95c6a614..0f9b089fae61a 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-04-25 +date: 2024-04-29 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 ba25ad464da81..40e97215cc486 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-04-25 +date: 2024-04-29 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 d2ec1ac28b344..559c5781a01a4 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-04-25 +date: 2024-04-29 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 5b481f285dbba..f682a4ab1b52a 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-04-25 +date: 2024-04-29 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 cfb54c4886af2..5f12448868875 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-04-25 +date: 2024-04-29 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 d23e1a51d106b..526829e035435 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-04-25 +date: 2024-04-29 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 6bf85f17d8c43..ae55f1e184b2b 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-04-25 +date: 2024-04-29 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 d208fda28c60e..d4db4ded61f53 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-04-25 +date: 2024-04-29 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 97419aafd3037..b8df41d84594a 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-04-25 +date: 2024-04-29 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 09f4e5e60d636..e595f6fa3dd63 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-04-25 +date: 2024-04-29 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 9321e212d58e0..1899b73dcfb7f 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-04-25 +date: 2024-04-29 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 a7bc58f081cff..99a628537da01 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-04-25 +date: 2024-04-29 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 6ef3091b6e845..f1839fadcaa13 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-04-25 +date: 2024-04-29 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 8594b87c12780..d944caebab8c4 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-04-25 +date: 2024-04-29 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 b12da7e3f74a4..41a2b1f0b733f 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-04-25 +date: 2024-04-29 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 f5e8157cb4aec..b61ff4f0e7f8e 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-04-25 +date: 2024-04-29 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 44fdb295a3f56..1b178b6b84c9a 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-04-25 +date: 2024-04-29 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 fa468d841a973..d902a8d188858 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-04-25 +date: 2024-04-29 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 2fbedf68abe0b..1415edd7abfe2 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-04-25 +date: 2024-04-29 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 a7c7e65369104..d2a3de382825f 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-04-25 +date: 2024-04-29 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 ff417cae77bc2..77c76532f1bff 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-04-25 +date: 2024-04-29 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 a31926256a0bb..55d32dcbcd8d4 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-04-25 +date: 2024-04-29 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 ee305495d1fe4..1b3aacaeb6b62 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-04-25 +date: 2024-04-29 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 db572114423f2..e95cb8bf55cb5 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-04-25 +date: 2024-04-29 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 c4de4aabeb184..a7e46cdb62444 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-04-25 +date: 2024-04-29 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 6338fa321eafb..c87a77d7643b2 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-04-25 +date: 2024-04-29 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 f08c0911f0333..7daaf56f6e885 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-04-25 +date: 2024-04-29 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 1dafe7a264f93..01d64a5310d2f 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-04-25 +date: 2024-04-29 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 e86e5f5a253e6..1465058b9b00f 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-04-25 +date: 2024-04-29 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 0728d9c9e5b20..d36d6a938febc 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-04-25 +date: 2024-04-29 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 996aaf18b7c35..99e952450783f 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-04-25 +date: 2024-04-29 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 0c2ed3c88863a..d61632e8bc490 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-04-25 +date: 2024-04-29 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 d2c8c9425044d..cbb17ff21e5c0 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-04-25 +date: 2024-04-29 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 a510f93e43917..31c71efb88587 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-04-25 +date: 2024-04-29 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 db0ec2159f17c..b7e50be2499ee 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-04-25 +date: 2024-04-29 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 a8623d1092ba5..902b271017c5d 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-04-25 +date: 2024-04-29 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 f4f07869bd869..fc2583e9f0abe 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-04-25 +date: 2024-04-29 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 9dcf0aaa5980f..9497902af33fb 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-04-25 +date: 2024-04-29 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 91e8e685ba4bd..167efe66bf508 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-04-25 +date: 2024-04-29 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 5b507bf02e103..10c3a47521db0 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-04-25 +date: 2024-04-29 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 0a43ee3dbad13..18ab066fb425b 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-04-25 +date: 2024-04-29 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 6962a0bab5664..0b3a59c01b02a 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-04-25 +date: 2024-04-29 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 9ab7f940fd568..94ac8e2db64d4 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-04-25 +date: 2024-04-29 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 efe77d79593b9..d145416483a07 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-04-25 +date: 2024-04-29 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_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index 22b24b6364734..4925f37bd0b46 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 57a409cb4996e..43b0541fffd2e 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_slo_schema.devdocs.json index ceff1c4719ec6..3fd0681763c9a 100644 --- a/api_docs/kbn_slo_schema.devdocs.json +++ b/api_docs/kbn_slo_schema.devdocs.json @@ -888,7 +888,7 @@ "label": "GetPreviewDataResponse", "description": [], "signature": [ - "({ date: string; sliValue: number; } & { events?: { good: number; bad: number; total: number; } | undefined; })[]" + "({ date: string; sliValue: number | null; } & { events?: { good: number; bad: number; total: number; } | undefined; })[]" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/get_preview_data.ts", "deprecated": false, @@ -7878,8 +7878,12 @@ "<{ date: ", "Type", "; sliValue: ", + "UnionC", + "<[", "NumberC", - "; }>, ", + ", ", + "NullC", + "]>; }>, ", "PartialC", "<{ events: ", "TypeC", diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index f4c49ed52c990..662971e0c766a 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx index 949e861ac8301..94fe190a87344 100644 --- a/api_docs/kbn_solution_nav_es.mdx +++ b/api_docs/kbn_solution_nav_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-es title: "@kbn/solution-nav-es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-es plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] --- import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx index 758df52ccbce8..7f0bdb815b15a 100644 --- a/api_docs/kbn_solution_nav_oblt.mdx +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-oblt title: "@kbn/solution-nav-oblt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-oblt plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] --- import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index c7c913c8be48d..c172549b12c8f 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-04-25 +date: 2024-04-29 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 b5250afee3e8c..a3439cf65cc84 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-04-25 +date: 2024-04-29 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 20c092393bcea..f1b716523d950 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-04-25 +date: 2024-04-29 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 b99029e2c0b79..7883865c5dc38 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-04-25 +date: 2024-04-29 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 388b9c3356827..f368c364605c2 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-04-25 +date: 2024-04-29 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 b49139bb526e5..7e768649a33ce 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.devdocs.json b/api_docs/kbn_test.devdocs.json index 3c3bc71f68089..7f24cc4e8ca6f 100644 --- a/api_docs/kbn_test.devdocs.json +++ b/api_docs/kbn_test.devdocs.json @@ -1699,6 +1699,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/test", + "id": "def-common.SamlSessionManager.Unnamed.$2", + "type": "string", + "tags": [], + "label": "rolesFilename", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [] diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 00ed72523a478..c43e63b21acc4 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 312 | 4 | 264 | 12 | +| 313 | 4 | 265 | 12 | ## Common diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 2dcd94fa9948e..2c0947bf5d36d 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_test_jest_helpers.devdocs.json index 966ba9bd7dd51..445e53cbd2a76 100644 --- a/api_docs/kbn_test_jest_helpers.devdocs.json +++ b/api_docs/kbn_test_jest_helpers.devdocs.json @@ -330,43 +330,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/test-jest-helpers", - "id": "def-common.expectToBeAccessible", - "type": "Function", - "tags": [], - "label": "expectToBeAccessible", - "description": [ - "\nFunction to test if a component doesn't have a11y violations from axe automated testing" - ], - "signature": [ - "(component: ", - "ReactWrapper", - ") => Promise" - ], - "path": "packages/kbn-test-jest-helpers/src/axe_helpers.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/test-jest-helpers", - "id": "def-common.expectToBeAccessible.$1", - "type": "Object", - "tags": [], - "label": "component", - "description": [], - "signature": [ - "ReactWrapper" - ], - "path": "packages/kbn-test-jest-helpers/src/axe_helpers.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/test-jest-helpers", "id": "def-common.findTestSubject", @@ -445,45 +408,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/test-jest-helpers", - "id": "def-common.getA11yViolations", - "type": "Function", - "tags": [], - "label": "getA11yViolations", - "description": [ - "\nReturns a11y violations as found by axe testing" - ], - "signature": [ - "(component: ", - "ReactWrapper", - ") => Promise<", - "Result", - "[]>" - ], - "path": "packages/kbn-test-jest-helpers/src/axe_helpers.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/test-jest-helpers", - "id": "def-common.getA11yViolations.$1", - "type": "Object", - "tags": [], - "label": "component", - "description": [], - "signature": [ - "ReactWrapper" - ], - "path": "packages/kbn-test-jest-helpers/src/axe_helpers.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/test-jest-helpers", "id": "def-common.getBroadcastChannelInstances", diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index eeee3f8eca854..e0bdd6e47d2f3 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 137 | 5 | 105 | 2 | +| 133 | 5 | 103 | 2 | ## Common diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index f85f0c390d603..d7a672c9b111d 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-04-25 +date: 2024-04-29 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 36ac117fd13f0..e3ed0339bab87 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-04-25 +date: 2024-04-29 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 8f04fc154b875..da14ede18eae0 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-04-25 +date: 2024-04-29 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 63b835e4d9dd8..114482beb55ec 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-04-25 +date: 2024-04-29 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 4ff38920c4df3..64268eaa01147 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-04-25 +date: 2024-04-29 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 0a2f027c17c4b..4f637c619b01b 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-04-25 +date: 2024-04-29 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 bb98c468a7409..a1f2a67d56e4f 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-04-25 +date: 2024-04-29 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 10e249f587e0e..cbc8782ae8a67 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_ui_shared_deps_src.devdocs.json index c7fe4c7b741d3..6b080cdc7e1f5 100644 --- a/api_docs/kbn_ui_shared_deps_src.devdocs.json +++ b/api_docs/kbn_ui_shared_deps_src.devdocs.json @@ -644,6 +644,17 @@ "path": "packages/kbn-ui-shared-deps-src/src/definitions.js", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ui-shared-deps-src", + "id": "def-common.externals.kbnesqlast", + "type": "string", + "tags": [], + "label": "'@kbn/esql-ast'", + "description": [], + "path": "packages/kbn-ui-shared-deps-src/src/definitions.js", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 055c2371dcc03..66e6156801499 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 54 | 0 | 45 | 0 | +| 55 | 0 | 46 | 0 | ## Common diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index aa018c4bdbafa..3701918317665 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-04-25 +date: 2024-04-29 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 bfd32bd8a087c..30e719bdd720f 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-04-25 +date: 2024-04-29 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 1b3875e6b3d2e..f1ac718182693 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-04-25 +date: 2024-04-29 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 cf332689a83ca..1becdb74a6af8 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-04-25 +date: 2024-04-29 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 c4d469547dc56..2f7db71964060 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-04-25 +date: 2024-04-29 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 9042db5f58e02..03cfc0455bc11 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-04-25 +date: 2024-04-29 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.devdocs.json b/api_docs/kbn_user_profile_components.devdocs.json index 189cf6bb088af..c997a518eb326 100644 --- a/api_docs/kbn_user_profile_components.devdocs.json +++ b/api_docs/kbn_user_profile_components.devdocs.json @@ -971,7 +971,7 @@ "section": "def-common.I18nStart", "text": "I18nStart" }, - "; analytics?: ", + "; analytics?: Pick<", { "pluginId": "@kbn/core-analytics-browser", "scope": "common", @@ -979,7 +979,7 @@ "section": "def-common.AnalyticsServiceStart", "text": "AnalyticsServiceStart" }, - " | undefined; theme: ", + ", \"reportEvent\"> | undefined; theme: ", { "pluginId": "@kbn/react-kibana-context-common", "scope": "common", diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 4a05c38557d5d..454195a695aa4 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-04-25 +date: 2024-04-29 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 72e1a5ee10b79..b9a6ed87f667a 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-04-25 +date: 2024-04-29 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 91e31c7ee8e69..3900a792deb45 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-04-25 +date: 2024-04-29 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 c6ad527f2368f..03229684da7c3 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-04-25 +date: 2024-04-29 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 476cdbc6e11db..91dc523120de2 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-04-25 +date: 2024-04-29 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 d58daa018cd5e..c35386ed8112d 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-04-25 +date: 2024-04-29 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 8eb8ac0c7f58c..21e689b48e48f 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-04-25 +date: 2024-04-29 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 8b5b348844357..3d7c85a3bb727 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-04-25 +date: 2024-04-29 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 1d2e418352c4a..504c9fae66a40 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-04-25 +date: 2024-04-29 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 880aa0c973fa4..1e13cdf48d98b 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-04-25 +date: 2024-04-29 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 2129ced1ded60..1882b2e7dddd3 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -511,238 +511,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/wizard/show_new_vis.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/wizard/show_new_vis.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/wizard/show_new_vis.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/index.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/index.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/index.tsx" - }, - { - "plugin": "expressionXY", - "path": "src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx" - }, - { - "plugin": "expressionXY", - "path": "src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx" - }, - { - "plugin": "expressionXY", - "path": "src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/datatable/expression.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/datatable/expression.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/datatable/expression.tsx" - }, - { - "plugin": "expressionMetricVis", - "path": "src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "expressionMetricVis", - "path": "src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "expressionMetricVis", - "path": "src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx" - }, - { - "plugin": "expressionGauge", - "path": "src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx" - }, - { - "plugin": "expressionGauge", - "path": "src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx" - }, - { - "plugin": "expressionGauge", - "path": "src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/settings_menu.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/settings_menu.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/settings_menu.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/mounter.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/mounter.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/mounter.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx" - }, - { - "plugin": "aiops", - "path": "x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx" - }, - { - "plugin": "aiops", - "path": "x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx" - }, - { - "plugin": "aiops", - "path": "x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx" @@ -863,102 +631,6 @@ "plugin": "expressionShape", "path": "src/plugins/expression_shape/public/expression_renderers/progress_renderer.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_app_state.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/app.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/app.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/app.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx" - }, { "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/integrations/app.tsx" @@ -1003,18 +675,6 @@ "plugin": "crossClusterReplication", "path": "x-pack/plugins/cross_cluster_replication/public/shared_imports.ts" }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/application.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/application.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/application.tsx" - }, { "plugin": "grokdebugger", "path": "x-pack/plugins/grokdebugger/public/shared_imports.ts" @@ -1131,30 +791,6 @@ "plugin": "searchprofiler", "path": "x-pack/plugins/searchprofiler/public/application/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/app/app.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/app/app.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/app/app.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/app.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/app.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/app.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/observability_solution/apm/public/application/index.tsx" @@ -1190,150 +826,6 @@ { "plugin": "filesManagement", "path": "src/plugins/files_management/public/mount_management_section.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/default_editor_controller.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/default_editor_controller.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/default_editor_controller.tsx" - }, - { - "plugin": "expressionHeatmap", - "path": "src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx" - }, - { - "plugin": "expressionHeatmap", - "path": "src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx" - }, - { - "plugin": "expressionHeatmap", - "path": "src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx" - }, - { - "plugin": "expressionLegacyMetricVis", - "path": "src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "expressionLegacyMetricVis", - "path": "src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "expressionLegacyMetricVis", - "path": "src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx" - }, - { - "plugin": "expressionPartitionVis", - "path": "src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx" - }, - { - "plugin": "expressionPartitionVis", - "path": "src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx" - }, - { - "plugin": "expressionPartitionVis", - "path": "src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx" - }, - { - "plugin": "expressionTagcloud", - "path": "src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx" - }, - { - "plugin": "expressionTagcloud", - "path": "src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx" - }, - { - "plugin": "expressionTagcloud", - "path": "src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx" - }, - { - "plugin": "visTypeTable", - "path": "src/plugins/vis_types/table/public/table_vis_renderer.tsx" - }, - { - "plugin": "visTypeTable", - "path": "src/plugins/vis_types/table/public/table_vis_renderer.tsx" - }, - { - "plugin": "visTypeTable", - "path": "src/plugins/vis_types/table/public/table_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimelion", - "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimelion", - "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimelion", - "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/application/editor_controller.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/application/editor_controller.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/application/editor_controller.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx" - }, - { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx" - }, - { - "plugin": "visTypeVega", - "path": "src/plugins/vis_types/vega/public/vega_vis_renderer.tsx" - }, - { - "plugin": "visTypeVega", - "path": "src/plugins/vis_types/vega/public/vega_vis_renderer.tsx" - }, - { - "plugin": "visTypeVega", - "path": "src/plugins/vis_types/vega/public/vega_vis_renderer.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vis_renderer.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vis_renderer.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vis_renderer.tsx" } ], "children": [ @@ -1792,14 +1284,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "inspector", - "path": "src/plugins/inspector/public/plugin.tsx" - }, - { - "plugin": "inspector", - "path": "src/plugins/inspector/public/plugin.tsx" - }, { "plugin": "data", "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx" @@ -1832,14 +1316,6 @@ "plugin": "data", "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx" }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_service.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_service.ts" - }, { "plugin": "data", "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" @@ -1856,58 +1332,6 @@ "plugin": "data", "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" }, - { - "plugin": "dataViewEditor", - "path": "src/plugins/data_view_editor/public/shared_imports.ts" - }, - { - "plugin": "unifiedSearch", - "path": "src/plugins/unified_search/public/query_string_input/query_string_input.tsx" - }, - { - "plugin": "unifiedSearch", - "path": "src/plugins/unified_search/public/query_string_input/query_string_input.tsx" - }, - { - "plugin": "unifiedSearch", - "path": "src/plugins/unified_search/public/actions/apply_filter_action.ts" - }, - { - "plugin": "unifiedSearch", - "path": "src/plugins/unified_search/public/actions/apply_filter_action.ts" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx" - }, { "plugin": "visualizations", "path": "src/plugins/visualizations/public/visualize_app/index.tsx" @@ -1916,82 +1340,6 @@ "plugin": "visualizations", "path": "src/plugins/visualizations/public/visualize_app/index.tsx" }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/shared_imports.ts" - }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/open_delete_modal.tsx" - }, - { - "plugin": "dataViewFieldEditor", - "path": "src/plugins/data_view_field_editor/public/open_delete_modal.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx" - }, - { - "plugin": "lens", - "path": "x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_container/embeddable/api/show_settings.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_container/embeddable/api/show_settings.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_no_match.tsx" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_no_match.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/dashboard_listing/dashboard_listing.tsx" @@ -2024,82 +1372,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/render_app.tsx" }, - { - "plugin": "@kbn/reporting-public", - "path": "packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx" - }, - { - "plugin": "@kbn/reporting-public", - "path": "packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_failure.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_failure.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_failure.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/general_error.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/general_error.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_success.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_success.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_success.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_max_size.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_max_size.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning_max_size.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning.tsx" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/notifier/job_warning.tsx" - }, { "plugin": "timelines", "path": "x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx" @@ -2208,6 +1480,14 @@ "plugin": "cloudSecurityPosture", "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" }, + { + "plugin": "cloudSecurityPosture", + "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" + }, + { + "plugin": "cloudSecurityPosture", + "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" + }, { "plugin": "console", "path": "src/plugins/console/public/shared_imports.ts" @@ -2240,30 +1520,6 @@ "plugin": "indexManagement", "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" }, - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx" - }, - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx" - }, - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx" - }, - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx" - }, { "plugin": "graph", "path": "x-pack/plugins/graph/public/application.tsx" @@ -2272,74 +1528,6 @@ "plugin": "graph", "path": "x-pack/plugins/graph/public/application.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx" - }, - { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx" - }, - { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx" - }, - { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx" - }, - { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx" - }, { "plugin": "eventAnnotationListing", "path": "src/plugins/event_annotation_listing/public/get_table_list.tsx" @@ -2355,30 +1543,6 @@ { "plugin": "filesManagement", "path": "src/plugins/files_management/public/mount_management_section.tsx" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx" - }, - { - "plugin": "embeddable", - "path": "src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vis_controller.tsx" - }, - { - "plugin": "visTypeVislib", - "path": "src/plugins/vis_types/vislib/public/vis_controller.tsx" } ], "children": [ diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index a00e09f4289ab..0756a147e31b1 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-04-25 +date: 2024-04-29 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 6ac1e978a14af..908283e067103 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-04-25 +date: 2024-04-29 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 cbcfcde7259bb..f3986a4e65528 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-04-25 +date: 2024-04-29 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 f6a2d4aee3d53..70fc2d0eb2646 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -3702,6 +3702,29 @@ "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.LegendConfig.legendStats", + "type": "Array", + "tags": [], + "label": "legendStats", + "description": [ + "\nmetrics to display in the legend" + ], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" + ], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -5111,13 +5134,20 @@ }, { "parentPluginId": "lens", - "id": "def-public.SharedPieLayerState.showValuesInLegend", - "type": "CompoundType", + "id": "def-public.SharedPieLayerState.legendStats", + "type": "Array", "tags": [], - "label": "showValuesInLegend", + "label": "legendStats", "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, @@ -9226,20 +9256,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "lens", - "id": "def-public.XYArgs.valuesInLegend", - "type": "CompoundType", - "tags": [], - "label": "valuesInLegend", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "lens", "id": "def-public.XYArgs.ariaLabel", @@ -10399,20 +10415,6 @@ "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "lens", - "id": "def-public.XYState.valuesInLegend", - "type": "CompoundType", - "tags": [], - "label": "valuesInLegend", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/lens/public/visualizations/xy/types.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index e2bbb7b7423ee..6463cd3e15d95 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 670 | 0 | 569 | 62 | +| 669 | 0 | 567 | 62 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index a669d29f39e93..bef59c7372935 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-04-25 +date: 2024-04-29 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 1bfda840a0f49..d239071a37bcf 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-04-25 +date: 2024-04-29 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 19342410a1eb2..b259b4fd6dacc 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-04-25 +date: 2024-04-29 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 c6c6757fc65ab..bee6056d99075 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-04-25 +date: 2024-04-29 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 11e8033cb3d59..72e1c6314920a 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_explorer.devdocs.json b/api_docs/logs_explorer.devdocs.json index 0b44e50f6b51c..5c20de98c84ee 100644 --- a/api_docs/logs_explorer.devdocs.json +++ b/api_docs/logs_explorer.devdocs.json @@ -335,7 +335,9 @@ "description": [], "signature": [ "Observable", - "" + "<", + "LogsExplorerPublicEvent", + ">" ], "path": "x-pack/plugins/observability_solution/logs_explorer/public/controller/types.ts", "deprecated": false, @@ -2702,6 +2704,56 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "logsExplorer", + "id": "def-common.singleDatasetSelectionPlainRT", + "type": "Object", + "tags": [], + "label": "singleDatasetSelectionPlainRT", + "description": [], + "signature": [ + "TypeC", + "<{ selectionType: ", + "LiteralC", + "<\"single\">; selection: ", + "IntersectionC", + "<[", + "PartialC", + "<{ name: ", + "StringC", + "; }>, ", + "PartialC", + "<{ title: ", + "StringC", + "; }>, ", + "PartialC", + "<{ version: ", + "StringC", + "; }>, ", + "TypeC", + "<{ dataset: ", + "ExactC", + "<", + "IntersectionC", + "<[", + "TypeC", + "<{ name: ", + "BrandC", + "<", + "StringC", + ", ", + "IndexPatternBrand", + ">; }>, ", + "PartialC", + "<{ title: ", + "StringC", + "; }>]>>; }>]>; }>" + ], + "path": "x-pack/plugins/observability_solution/logs_explorer/common/data_source_selection/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "logsExplorer", "id": "def-common.SMART_FALLBACK_FIELDS", diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index dfa4c282d10dd..0575f3e12336c 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 121 | 4 | 121 | 23 | +| 122 | 4 | 122 | 24 | ## Client diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 4590cd09c34dd..2655f0ad4100b 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.devdocs.json b/api_docs/management.devdocs.json index 1fad4d96a8664..987a92c442595 100644 --- a/api_docs/management.devdocs.json +++ b/api_docs/management.devdocs.json @@ -625,10 +625,6 @@ { "plugin": "triggersActionsUi", "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts" - }, - { - "plugin": "reporting", - "path": "x-pack/plugins/reporting/public/management/mount_management_section.tsx" } ] } diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 22bc1ac9bcea9..6286ee0c519e2 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 5c80fff41c359..fdabcfc32dd1d 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-04-25 +date: 2024-04-29 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 307f719cdb63a..d024473984cbe 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-04-25 +date: 2024-04-29 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 6fb6cfd454ec7..e7426f4a38845 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-04-25 +date: 2024-04-29 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 93c029981aeba..5a2b6a6ed066e 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -992,6 +992,62 @@ "text": "AnomalySwimLaneEmbeddableState" }, "> & ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesDataViews", + "text": "PublishesDataViews" + }, + " & ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" + }, + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; } & ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 1772729f2396a..ebb9b5c9e55ed 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 0aac3445eacc9..668bc3617e9db 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-04-25 +date: 2024-04-29 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 da6b7123da837..87e15600624fc 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-04-25 +date: 2024-04-29 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 d372da7b71546..1d875ce2b6057 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-04-25 +date: 2024-04-29 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 722cf08837d86..23a3f3fbc3e01 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-04-25 +date: 2024-04-29 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 77251421701eb..7d799ad863d80 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-04-25 +date: 2024-04-29 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 356bffc89bbe2..230f4fa9e3ee4 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-04-25 +date: 2024-04-29 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 ccdad0f5ee73d..c09ce90faf07f 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-04-25 +date: 2024-04-29 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 45100a94439eb..0ed96396e0a43 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -3836,7 +3836,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -3863,7 +3863,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -4153,7 +4153,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf> & TAdditionalMetaFields" + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf> & TAdditionalMetaFields" ], "path": "x-pack/plugins/observability_solution/observability/public/typings/alerts.ts", "deprecated": false, @@ -4743,7 +4743,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -4770,7 +4770,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 93574115a561c..e21ec40a7c49e 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index f1b4eb753094b..97022256bfe10 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 1efe55c72cf3d..8ae891b273991 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index 9efa5cbb2c3d6..0aec432b93345 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 84f5771e92d27..792c88c57b793 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-04-25 +date: 2024-04-29 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 ec2a847de6505..3f18e5db96111 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-04-25 +date: 2024-04-29 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 b49a3b3f2e76c..61c34f6b4c89b 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-04-25 +date: 2024-04-29 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 e3de3dbf5b36b..25200d49eec76 100644 --- a/api_docs/osquery.devdocs.json +++ b/api_docs/osquery.devdocs.json @@ -309,7 +309,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> | undefined) => Promise<{ response: { action_id: string; '@timestamp': string; expiration: string; type: string; input_type: string; alert_ids: string[] | undefined; event_ids: string[] | undefined; case_ids: string[] | undefined; agent_ids: string[] | undefined; agent_all: boolean | undefined; agent_platforms: string[] | undefined; agent_policy_ids: string[] | undefined; agents: string[]; user_id: string | undefined; metadata: object | undefined; pack_id: string | undefined; pack_name: string | undefined; pack_prebuilt: boolean | undefined; queries: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> | undefined) => Promise<{ response: { action_id: string; '@timestamp': string; expiration: string; type: string; input_type: string; alert_ids: string[] | undefined; event_ids: string[] | undefined; case_ids: string[] | undefined; agent_ids: string[] | undefined; agent_all: boolean | undefined; agent_platforms: string[] | undefined; agent_policy_ids: string[] | undefined; agents: string[]; user_id: string | undefined; metadata: object | undefined; pack_id: string | undefined; pack_name: string | undefined; pack_prebuilt: boolean | undefined; queries: ", "Dictionary", "[]; }; fleetActionsCount: number; }>; stop: () => void; }" ], diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index e9458f7dbb0dc..fc8a70da5e679 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 8baba23da6f74..17a54afc09732 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index f6461387e5e45..090852545ed5f 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 47972 | 240 | 36580 | 1850 | +| 47996 | 240 | 36599 | 1850 | ## Plugin Directory @@ -31,7 +31,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 4 | 0 | 4 | 1 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 67 | 0 | 4 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 858 | 1 | 826 | 54 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 860 | 1 | 828 | 55 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 125 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Asset manager plugin for entity assets (inventory, topology, etc) | 9 | 0 | 9 | 2 | @@ -64,11 +64,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 31 | 3 | 25 | 3 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin introduces the concept of dataset quality, where users can easily get an overview on the datasets they have. | 10 | 0 | 10 | 5 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 15 | 0 | 9 | 2 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 144 | 0 | 97 | 27 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 146 | 0 | 99 | 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 | 45 | 0 | 31 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 575 | 1 | 468 | 8 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 577 | 1 | 470 | 8 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 19 | 0 | 19 | 2 | | | [@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 | @@ -89,7 +89,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 14 | 0 | 14 | 3 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 6 | 0 | 6 | 2 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 177 | 0 | 167 | 13 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 177 | 0 | 166 | 13 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2217 | 17 | 1756 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 235 | 0 | 99 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Index pattern fields and ambiguous values formatters | 292 | 5 | 253 | 3 | @@ -118,13 +118,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | kibanaUsageCollection | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 609 | 3 | 416 | 9 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 5 | 0 | 5 | 1 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 670 | 0 | 569 | 62 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 669 | 0 | 567 | 62 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | A dashboard panel for creating links to dashboards or external links. | 57 | 0 | 57 | 6 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 226 | 0 | 97 | 52 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 121 | 4 | 121 | 23 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 122 | 4 | 122 | 24 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 302 | 0 | 276 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 44 | 0 | 44 | 7 | @@ -155,7 +155,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 23 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 9 | 0 | 2 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 21 | 0 | 21 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 274 | 0 | 245 | 14 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 276 | 0 | 247 | 14 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 131 | 2 | 120 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 | @@ -167,7 +167,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 32 | 0 | 8 | 4 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Plugin hosting shared features for connectors | 19 | 0 | 19 | 3 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Plugin to provide access to and rendering of python notebooks for use in the persistent developer console. | 6 | 0 | 6 | 0 | -| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 15 | 0 | 9 | 1 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 18 | 0 | 10 | 1 | | searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 404 | 0 | 200 | 2 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 190 | 0 | 120 | 36 | @@ -219,7 +219,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the vislib visualizations. These are the classical area/line/bar, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 1 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 52 | 0 | 50 | 5 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 862 | 12 | 831 | 19 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 863 | 12 | 832 | 19 | | watcher | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | ## Package Directory @@ -245,7 +245,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 47 | 0 | 47 | 8 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 44 | 0 | 44 | 7 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 191 | 0 | 191 | 28 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 12 | 0 | 12 | 0 | @@ -260,7 +260,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 62 | 0 | 17 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 38 | 0 | 15 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 39 | 0 | 16 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 8 | 0 | 4 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 217 | 0 | 180 | 9 | @@ -294,7 +294,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 204 | 0 | 99 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 205 | 0 | 99 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | @@ -343,12 +343,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 50 | 7 | 50 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 475 | 1 | 189 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 89 | 0 | 77 | 10 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 91 | 0 | 78 | 10 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 1 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 10 | 2 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 13 | 2 | | | [@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) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 2 | 0 | @@ -392,7 +392,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 112 | 1 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 354 | 1 | 5 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 0 | 11 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 225 | 0 | 182 | 11 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 226 | 0 | 183 | 11 | | | [@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) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | @@ -474,7 +474,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 15 | 0 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 36 | 2 | 32 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 63 | 0 | 41 | 4 | -| | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 75 | 0 | 75 | 2 | +| | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 76 | 0 | 76 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 5 | 0 | 5 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 41 | 0 | 27 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 27 | 0 | 19 | 0 | @@ -570,7 +570,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 18 | 0 | 18 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 31 | 1 | 24 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 22 | 0 | 16 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 120 | 0 | 120 | 3 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 124 | 0 | 124 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 55 | 1 | 50 | 0 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 10 | 0 | 10 | 2 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 99 | 1 | 99 | 0 | @@ -586,7 +586,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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) | - | 65 | 0 | 61 | 1 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 182 | 0 | 153 | 6 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 184 | 0 | 155 | 5 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 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 | @@ -616,7 +616,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 5 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 2 | 0 | 1 | 1 | | | [@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) | - | 124 | 0 | 121 | 0 | +| | [@elastic/security-detections-response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 125 | 0 | 122 | 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) | - | 81 | 0 | 81 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 3647 | 0 | 3647 | 0 | @@ -706,9 +706,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 4 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 21 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 5 | 1 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 312 | 4 | 264 | 12 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 313 | 4 | 265 | 12 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 14 | 0 | 8 | 0 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 137 | 5 | 105 | 2 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 133 | 5 | 103 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 32 | 0 | 13 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 8 | 0 | 8 | 0 | @@ -717,7 +717,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 39 | 0 | 25 | 1 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 86 | 0 | 86 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 0 | 28 | 0 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 54 | 0 | 45 | 0 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 55 | 0 | 46 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 151 | 0 | 83 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 14 | 0 | 13 | 6 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 2d4f0ce97028f..051aa15bc3ad8 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 350efe202dc1e..fa9c7b6626fc1 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-04-25 +date: 2024-04-29 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 32a937da36efc..c484c32688b3b 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index f18b65eb3f139..1758de90dbb2a 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-04-25 +date: 2024-04-29 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 9b66a0a902fe6..09321fc15b71d 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-04-25 +date: 2024-04-29 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 4039eaf374bec..db590f59232fc 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-04-25 +date: 2024-04-29 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 c8a3d5bf83de9..d98995ca9cbdb 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-04-25 +date: 2024-04-29 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 5de86f60a610a..75b6012f0a9e5 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -115,7 +115,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> | undefined>" + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> | undefined>" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -419,7 +419,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>>, Record>, Record>>" ], @@ -2747,7 +2747,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf>>>(request: TSearchRequest) => Promise<", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf>>>(request: TSearchRequest) => Promise<", { "pluginId": "@kbn/es-types", "scope": "common", @@ -3392,7 +3392,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf>> | null> | null" + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & OutputOf>> | null> | null" ], "path": "x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.ts", "deprecated": false, @@ -3505,7 +3505,7 @@ "label": "alertWithPersistence", "description": [], "signature": [ - "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined) => Promise<", + "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -3575,6 +3575,20 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithPersistence.$5", + "type": "Object", + "tags": [], + "label": "currentTimeOverride", + "description": [], + "signature": [ + "Date | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false } ] }, @@ -4255,7 +4269,7 @@ "label": "PersistenceAlertService", "description": [], "signature": [ - "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined) => Promise<", + "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -4325,6 +4339,20 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceAlertService.$5", + "type": "Object", + "tags": [], + "label": "currentTimeOverride", + "description": [], + "signature": [ + "Date | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -4916,7 +4944,7 @@ "section": "def-common.MultiField", "text": "MultiField" }, - "[]; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>>" + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>>" ], "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, @@ -5292,7 +5320,7 @@ "label": "ParsedTechnicalFields", "description": [], "signature": [ - "{ readonly \"@timestamp\": string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.name\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.alert.rule.revision\": number; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.uuid\": string; readonly \"kibana.space_ids\": string[]; readonly \"event.action\"?: string | undefined; readonly tags?: string[] | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"event.kind\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.case_ids\"?: string[] | undefined; readonly \"kibana.alert.consecutive_matches\"?: number | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.flapping\"?: boolean | undefined; readonly \"kibana.alert.flapping_history\"?: boolean[] | undefined; readonly \"kibana.alert.last_detected\"?: string | undefined; readonly \"kibana.alert.maintenance_window_ids\"?: string[] | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.time_range\"?: unknown; readonly \"kibana.alert.url\"?: string | undefined; readonly \"kibana.alert.workflow_assignee_ids\"?: string[] | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_tags\"?: string[] | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.alert.suppression.docs_count\"?: number | undefined; readonly \"kibana.alert.suppression.end\"?: string | undefined; readonly \"kibana.alert.suppression.start\"?: string | undefined; readonly \"kibana.alert.suppression.terms.field\"?: string[] | undefined; readonly \"kibana.alert.suppression.terms.value\"?: string[] | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.workflow_status_updated_at\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; }" + "{ readonly \"@timestamp\": string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.name\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.alert.rule.revision\": number; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.uuid\": string; readonly \"kibana.space_ids\": string[]; readonly \"event.action\"?: string | undefined; readonly tags?: string[] | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"event.kind\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.case_ids\"?: string[] | undefined; readonly \"kibana.alert.consecutive_matches\"?: number | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.flapping\"?: boolean | undefined; readonly \"kibana.alert.flapping_history\"?: boolean[] | undefined; readonly \"kibana.alert.last_detected\"?: string | undefined; readonly \"kibana.alert.maintenance_window_ids\"?: string[] | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.rule.execution.timestamp\"?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.time_range\"?: unknown; readonly \"kibana.alert.url\"?: string | undefined; readonly \"kibana.alert.workflow_assignee_ids\"?: string[] | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_tags\"?: string[] | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.alert.suppression.docs_count\"?: number | undefined; readonly \"kibana.alert.suppression.end\"?: string | undefined; readonly \"kibana.alert.suppression.start\"?: string | undefined; readonly \"kibana.alert.suppression.terms.field\"?: string[] | undefined; readonly \"kibana.alert.suppression.terms.value\"?: string[] | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.workflow_status_updated_at\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; }" ], "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 84279f90caa97..dae56fb7655f9 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.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 | |-------------------|-----------|------------------------|-----------------| -| 274 | 0 | 245 | 14 | +| 276 | 0 | 247 | 14 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 240b129d49061..61afbb4109678 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index f63c4d0830398..9abeda6922862 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index cb0a71a16832a..0d52ff4b0d110 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 6bc1664e08ca6..8a1245cda3c23 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 9abd81d521943..6fceb969fa1a1 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index e20b11c581980..c17e144812098 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 51db951b86900..443d73f8a1c96 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 477b2474ffe25..43cf43627ab81 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 49bd6c36efc7b..4a707328868d9 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 8b6455cd8ecc6..bb74854df0955 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 412ce5747540a..2124251c1a60f 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.devdocs.json b/api_docs/search_playground.devdocs.json index 2a069c7157ede..0306aa3c5780a 100644 --- a/api_docs/search_playground.devdocs.json +++ b/api_docs/search_playground.devdocs.json @@ -168,6 +168,51 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundHeaderDocs", + "type": "Function", + "tags": [], + "label": "PlaygroundHeaderDocs", + "description": [], + "signature": [ + "React.FunctionComponent<{ children?: React.ReactNode; }>" + ], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundHeaderDocs.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P & { children?: React.ReactNode; }" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundHeaderDocs.$2", + "type": "Any", + "tags": [], + "label": "context", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "lifecycle": "start", diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index e77ff5eff30c6..1ead7642b1daf 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.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 | |-------------------|-----------|------------------------|-----------------| -| 15 | 0 | 9 | 1 | +| 18 | 0 | 10 | 1 | ## Client diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 5ad2f5d92e615..b29c813491028 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-04-25 +date: 2024-04-29 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 1330b20f12171..b86687341bf59 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -485,7 +485,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantAlertsInsights\" | \"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForNewTermsRuleEnabled\" | \"alertSuppressionForNonSequenceEqlRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -565,7 +565,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantAlertsInsights\" | \"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForNewTermsRuleEnabled\" | \"alertSuppressionForNonSequenceEqlRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1964,7 +1964,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantAlertsInsights: 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 alertSuppressionForNewTermsRuleEnabled: boolean; readonly alertSuppressionForNonSequenceEqlRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: 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 sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3054,7 +3054,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantAlertsInsights: 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 alertSuppressionForNewTermsRuleEnabled: boolean; readonly alertSuppressionForNonSequenceEqlRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: 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 sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3230,7 +3230,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantAlertsInsights: 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 alertSuppressionForNewTermsRuleEnabled: boolean; readonly alertSuppressionForNonSequenceEqlRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: 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 sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3254,15 +3254,15 @@ }, { "parentPluginId": "securitySolution", - "id": "def-common.SENTINEL_ONE_ACTIVITY_INDEX", + "id": "def-common.SENTINEL_ONE_ACTIVITY_INDEX_PATTERN", "type": "string", "tags": [], - "label": "SENTINEL_ONE_ACTIVITY_INDEX", + "label": "SENTINEL_ONE_ACTIVITY_INDEX_PATTERN", "description": [ - "\nIndex name where the SentinelOne activity log is written to by the SentinelOne integration" + "\nIndex pattern where the SentinelOne activity log is written to by the SentinelOne integration" ], "signature": [ - "\"logs-sentinel_one.activity-default\"" + "\"logs-sentinel_one.activity-*\"" ], "path": "x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts", "deprecated": false, @@ -3296,7 +3296,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 donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly expandableTimelineFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly assistantAlertsInsights: false; 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 alertSuppressionForNewTermsRuleEnabled: false; readonly alertSuppressionForNonSequenceEqlRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; readonly aiAssistantFlyoutMode: false; readonly valueListItemsModalEnabled: false; }" + "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly expandableTimelineFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly attackDiscoveryEnabled: false; 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 sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; readonly aiAssistantFlyoutMode: false; readonly valueListItemsModalEnabled: 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 70dadff0acc0d..bd0f98c8b38b3 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-04-25 +date: 2024-04-29 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 e67450a646f1f..ac151e7816c73 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-04-25 +date: 2024-04-29 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 6d8bc6d9b996a..f55cfaf306456 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-04-25 +date: 2024-04-29 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 fae98bb36b959..b34b09f670cc2 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-04-25 +date: 2024-04-29 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 62df428dcb71b..b175227f30964 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-04-25 +date: 2024-04-29 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 77697c21cfc23..dec805bdce82a 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-04-25 +date: 2024-04-29 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 1101b1859ca36..a29f7f67160ff 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-04-25 +date: 2024-04-29 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 957966d763f0f..f2ca3eeb0a0a8 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index aa59c59cd6212..85d3515a8400e 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 780d8f912ed51..75c136481bfac 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-04-25 +date: 2024-04-29 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 ecb31fa9cc5b7..4e42703f8db71 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-04-25 +date: 2024-04-29 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 2859ba23e5bf4..281717ff4363a 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-04-25 +date: 2024-04-29 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 85ec8c0cc92af..66585830f5011 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 0fc06f663982c..74fea2515a9c1 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 85a24008f79d1..24be426adab6d 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-04-25 +date: 2024-04-29 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 daf439d6a7c90..0c9b3c1b05f6e 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-04-25 +date: 2024-04-29 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 7ec2cd68ac108..30d951948d780 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-04-25 +date: 2024-04-29 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 0a313525d1e98..55be38bd9c97a 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-04-25 +date: 2024-04-29 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 1b92916ee746a..c2d4a9a2b6cd8 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-04-25 +date: 2024-04-29 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 8eee4aadc928f..4c14212d0f928 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index ee51489687f18..39d4b70944e23 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -1491,14 +1491,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" @@ -1535,6 +1527,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx" @@ -4127,91 +4127,91 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" + "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" + "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx" + "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx" + "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx" + "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" + "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" }, { "plugin": "securitySolution", @@ -4339,19 +4339,19 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/context.tsx" + "path": "x-pack/plugins/security_solution/public/flyout/document_details/left/context.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/context.tsx" + "path": "x-pack/plugins/security_solution/public/flyout/document_details/left/context.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/document_details/left/context.tsx" + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/context.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/flyout/document_details/left/context.tsx" + "path": "x-pack/plugins/security_solution/public/flyout/document_details/right/context.tsx" }, { "plugin": "securitySolution", @@ -4363,11 +4363,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/utils.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/utils.ts" }, { "plugin": "securitySolution", diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index a861b561cebf8..89cf521a763fb 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-04-25 +date: 2024-04-29 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 e0514375fc88a..0f44aa59a42f6 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-04-25 +date: 2024-04-29 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 3d1e657cbafec..fcf43a2856582 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-04-25 +date: 2024-04-29 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 304b720083fbc..505d8ab50800c 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-04-25 +date: 2024-04-29 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 bf59c940bef54..269fd8328d628 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-04-25 +date: 2024-04-29 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 47f2ecd11572b..ccd7f47b6caef 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-04-25 +date: 2024-04-29 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 a01484a4e4ba0..040c6763bdb1c 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index 870b8d0d8bae2..d89079af5b706 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -27,15 +27,15 @@ "section": "def-public.TimefilterContract", "text": "TimefilterContract" }, - ", theme: ", + ", core: ", { - "pluginId": "@kbn/core-theme-browser", + "pluginId": "@kbn/core-lifecycle-browser", "scope": "common", - "docId": "kibKbnCoreThemeBrowserPluginApi", - "section": "def-common.ThemeServiceSetup", - "text": "ThemeServiceSetup" + "docId": "kibKbnCoreLifecycleBrowserPluginApi", + "section": "def-common.CoreSetup", + "text": "CoreSetup" }, - ", id: string, type: string) => ", + ", id: string, type: string) => ", { "pluginId": "uiActions", "scope": "public", @@ -104,16 +104,17 @@ "id": "def-public.createFilterAction.$3", "type": "Object", "tags": [], - "label": "theme", + "label": "core", "description": [], "signature": [ { - "pluginId": "@kbn/core-theme-browser", + "pluginId": "@kbn/core-lifecycle-browser", "scope": "common", - "docId": "kibKbnCoreThemeBrowserPluginApi", - "section": "def-common.ThemeServiceSetup", - "text": "ThemeServiceSetup" - } + "docId": "kibKbnCoreLifecycleBrowserPluginApi", + "section": "def-common.CoreSetup", + "text": "CoreSetup" + }, + "" ], "path": "src/plugins/unified_search/public/actions/apply_filter_action.ts", "deprecated": false, diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 266e19a6050f2..c0c5593f7a968 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-04-25 +date: 2024-04-29 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 9ffe1e2608b15..091b91b0108fd 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-04-25 +date: 2024-04-29 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 f890875bf6cbb..d5520ef257b59 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-04-25 +date: 2024-04-29 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 2c34cca5ac254..a18888e719cf3 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-04-25 +date: 2024-04-29 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 c25ad0a19b499..99e065d8277c0 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-04-25 +date: 2024-04-29 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 cac0851535dd8..0ff70edd1c31f 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-04-25 +date: 2024-04-29 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 73af6e2544451..b4f9ebb096cae 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-04-25 +date: 2024-04-29 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 48e611533a092..5d1fd3a7c0edf 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-04-25 +date: 2024-04-29 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 964fb5e8e421b..d282d355b7aca 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-04-25 +date: 2024-04-29 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 09f1339fbc3fe..bfbe225efafa6 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-04-25 +date: 2024-04-29 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 91c668cd5f152..17c02cdef3b81 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-04-25 +date: 2024-04-29 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 ed7485e8e2945..74abb6751db60 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-04-25 +date: 2024-04-29 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 a1b4e24760fbc..edea653fd9b5e 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-04-25 +date: 2024-04-29 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 c440bc9a5d448..6da2c8bbfcd80 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-04-25 +date: 2024-04-29 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 fb806b88e3a67..8babe8eb3ca05 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-04-25 +date: 2024-04-29 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 12f6a28b38f83..b14059ebf1569 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-04-25 +date: 2024-04-29 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 ccfb9c976f202..ad0a8095992b7 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -11535,6 +11535,27 @@ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.LegendConfig.legendStats", + "type": "Array", + "tags": [], + "label": "legendStats", + "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -12175,13 +12196,20 @@ }, { "parentPluginId": "visualizations", - "id": "def-common.PartitionLayerState.showValuesInLegend", - "type": "CompoundType", + "id": "def-common.PartitionLayerState.legendStats", + "type": "Array", "tags": [], - "label": "showValuesInLegend", + "label": "legendStats", "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.LegendStats", + "text": "LegendStats" + }, + "[] | undefined" ], "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", "deprecated": false, @@ -14152,20 +14180,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "visualizations", - "id": "def-common.XYConfiguration.valuesInLegend", - "type": "CompoundType", - "tags": [], - "label": "valuesInLegend", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "visualizations", "id": "def-common.XYConfiguration.showCurrentTimeMarker", @@ -15804,6 +15818,18 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.LegendStats", + "type": "string", + "tags": [], + "label": "LegendStats", + "description": [], + "path": "src/plugins/visualizations/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.LENS_GAUGE_ID", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 4c75e553f4525..c83c056bbc3c7 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-04-25 +date: 2024-04-29 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 862 | 12 | 831 | 19 | +| 863 | 12 | 832 | 19 | ## Client diff --git a/config/serverless.es.yml b/config/serverless.es.yml index 73b8c09e29125..1f7f200c71a13 100644 --- a/config/serverless.es.yml +++ b/config/serverless.es.yml @@ -28,8 +28,9 @@ xpack.serverless.plugin.developer.projectSwitcher.currentType: 'search' # Specify in telemetry the project type telemetry.labels.serverless: search -# Alerts config -xpack.actions.enabledActionTypes: ['.email', '.index', '.slack', '.jira', '.webhook', '.teams'] +# Alerts and LLM config +xpack.actions.enabledActionTypes: + ['.email', '.index', '.slack', '.jira', '.webhook', '.teams', '.gen-ai', '.bedrock'] # Customize empty page state for analytics apps no_data_page.analyticsNoDataPageFlavor: 'serverless_search' @@ -43,3 +44,6 @@ xpack.ml.nlp.enabled: true xpack.ml.compatibleModuleType: 'search' data_visualizer.resultLinks.fileBeat.enabled: false + +# Search Playground +xpack.searchPlayground.ui.enabled: false diff --git a/examples/embeddable_examples/kibana.jsonc b/examples/embeddable_examples/kibana.jsonc index 08e4a02360b2c..b3b63480e1103 100644 --- a/examples/embeddable_examples/kibana.jsonc +++ b/examples/embeddable_examples/kibana.jsonc @@ -5,7 +5,7 @@ "description": "Example app that shows how to register custom embeddables", "plugin": { "id": "embeddableExamples", - "server": true, + "server": false, "browser": true, "requiredPlugins": [ "dataViews", @@ -15,9 +15,9 @@ "data", "charts", "fieldFormats", - "developerExamples" + "developerExamples", + "dataViewFieldEditor" ], - "requiredBundles": ["presentationUtil"], - "extraPublicDirs": ["public/hello_world"] + "requiredBundles": ["presentationUtil", "kibanaUtils", "kibanaReact"] } } diff --git a/examples/embeddable_examples/public/app/app.tsx b/examples/embeddable_examples/public/app/app.tsx index 72c5d4f11779a..e29177b4749e7 100644 --- a/examples/embeddable_examples/public/app/app.tsx +++ b/examples/embeddable_examples/public/app/app.tsx @@ -21,9 +21,11 @@ import { EuiTabs, } from '@elastic/eui'; import { Overview } from './overview'; +import { RegisterEmbeddable } from './register_embeddable'; import { RenderExamples } from './render_examples'; const OVERVIEW_TAB_ID = 'overview'; +const REGISTER_EMBEDDABLE_TAB_ID = 'register'; const RENDER_TAB_ID = 'render'; const App = () => { @@ -38,6 +40,10 @@ const App = () => { return ; } + if (selectedTabId === REGISTER_EMBEDDABLE_TAB_ID) { + return ; + } + return ; } @@ -56,6 +62,12 @@ const App = () => { > Embeddables overview + onSelectedTabChanged(REGISTER_EMBEDDABLE_TAB_ID)} + isSelected={REGISTER_EMBEDDABLE_TAB_ID === selectedTabId} + > + Register new embeddable type + onSelectedTabChanged(RENDER_TAB_ID)} isSelected={RENDER_TAB_ID === selectedTabId} diff --git a/examples/embeddable_examples/public/app/register_embeddable.tsx b/examples/embeddable_examples/public/app/register_embeddable.tsx new file mode 100644 index 0000000000000..e9116a611d0ed --- /dev/null +++ b/examples/embeddable_examples/public/app/register_embeddable.tsx @@ -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 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 { EuiCodeBlock, EuiSpacer, EuiText } from '@elastic/eui'; +// @ts-ignore +import registerSearchEmbeddableSource from '!!raw-loader!../react_embeddables/search/register_search_embeddable'; +// @ts-ignore +import registerAttachActionSource from '!!raw-loader!../react_embeddables/search/register_add_search_panel_action'; + +export const RegisterEmbeddable = () => { + return ( + <> + +

+ This plugin registers several embeddable types with{' '} + registerReactEmbeddableFactory during plugin start. The code example + below shows Search embeddable registration. Notice how the embeddable factory is imported + asynchronously to limit initial page load size. +

+
+ + + {registerSearchEmbeddableSource} + + + + + +

+ Run the example embeddables by creating a dashboard, clicking Add panel button, + and then selecting Embeddable examples group. +

+

+ Add your own embeddables to Add panel menu by attaching an action to the{' '} + ADD_PANEL_TRIGGER trigger. Notice usage of grouping to + nest related panel types and avoid bloating Add panel menu. Please reach out to + @elastic/kibana-presentation team to coordinate menu updates. +

+
+ + + {registerAttachActionSource} + + + ); +}; diff --git a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable.tsx b/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable.tsx deleted file mode 100644 index 7cc87623db841..0000000000000 --- a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import ReactDOM from 'react-dom'; -import { Embeddable, IContainer } from '@kbn/embeddable-plugin/public'; - -import { - FilterDebuggerEmbeddableInput, - FILTER_DEBUGGER_EMBEDDABLE, -} from './filter_debugger_embeddable_factory'; -import { FilterDebuggerEmbeddableComponent } from './filter_debugger_embeddable_component'; - -export class FilterDebuggerEmbeddable extends Embeddable { - public readonly type = FILTER_DEBUGGER_EMBEDDABLE; - - private domNode?: HTMLElement; - - constructor(initialInput: FilterDebuggerEmbeddableInput, parent?: IContainer) { - super(initialInput, {}, parent); - } - - public render(node: HTMLElement) { - if (this.domNode) { - ReactDOM.unmountComponentAtNode(this.domNode); - } - this.domNode = node; - ReactDOM.render(, node); - } - - public reload() {} - - public destroy() { - super.destroy(); - if (this.domNode) ReactDOM.unmountComponentAtNode(this.domNode); - } -} diff --git a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_component.tsx b/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_component.tsx deleted file mode 100644 index 14890f1ac7a17..0000000000000 --- a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_component.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { useEffect, useState } from 'react'; -import { distinctUntilChanged } from 'rxjs'; - -import { css } from '@emotion/react'; -import { EuiPanel, EuiTitle, EuiCodeBlock, EuiSpacer } from '@elastic/eui'; -import { compareFilters, COMPARE_ALL_OPTIONS, type Filter, type Query } from '@kbn/es-query'; - -import { FilterDebuggerEmbeddable } from './filter_debugger_embeddable'; - -interface Props { - embeddable: FilterDebuggerEmbeddable; -} - -export function FilterDebuggerEmbeddableComponent({ embeddable }: Props) { - const [filters, setFilters] = useState(); - const [query, setQuery] = useState(); - - useEffect(() => { - const subscription = embeddable - .getInput$() - .pipe( - distinctUntilChanged( - ({ filters: filtersA, query: queryA }, { filters: filtersB, query: queryB }) => { - return ( - JSON.stringify(queryA) === JSON.stringify(queryB) && - compareFilters(filtersA ?? [], filtersB ?? [], COMPARE_ALL_OPTIONS) - ); - } - ) - ) - .subscribe(({ filters: newFilters, query: newQuery }) => { - setFilters(newFilters); - setQuery(newQuery); - }); - - return () => { - subscription.unsubscribe(); - }; - }, [embeddable]); - - return ( - - -

Filters

-
- {JSON.stringify(filters, undefined, 1)} - - -

Query

-
- {JSON.stringify(query, undefined, 1)} -
- ); -} diff --git a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_factory.ts b/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_factory.ts deleted file mode 100644 index e610904f66d5d..0000000000000 --- a/examples/embeddable_examples/public/filter_debugger/filter_debugger_embeddable_factory.ts +++ /dev/null @@ -1,43 +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 { - IContainer, - EmbeddableInput, - EmbeddableFactoryDefinition, - EmbeddableFactory, -} from '@kbn/embeddable-plugin/public'; -import { type Filter, type Query } from '@kbn/es-query'; -import { FilterDebuggerEmbeddable } from './filter_debugger_embeddable'; - -export const FILTER_DEBUGGER_EMBEDDABLE = 'filterDebuggerEmbeddable'; -export interface FilterDebuggerEmbeddableInput extends EmbeddableInput { - filters?: Filter[]; - query?: Query; -} - -export type FilterDebuggerEmbeddableFactory = EmbeddableFactory; -export class FilterDebuggerEmbeddableFactoryDefinition implements EmbeddableFactoryDefinition { - public readonly type = FILTER_DEBUGGER_EMBEDDABLE; - - public async isEditable() { - return true; - } - - public async create(initialInput: FilterDebuggerEmbeddableInput, parent?: IContainer) { - return new FilterDebuggerEmbeddable(initialInput, parent); - } - - public canCreateNew() { - return true; - } - - public getDisplayName() { - return 'Filter debugger'; - } -} diff --git a/examples/embeddable_examples/public/hello_world/hello_world_embeddable.tsx b/examples/embeddable_examples/public/hello_world/hello_world_embeddable.tsx deleted file mode 100644 index 3f82356a1466e..0000000000000 --- a/examples/embeddable_examples/public/hello_world/hello_world_embeddable.tsx +++ /dev/null @@ -1,45 +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 { Embeddable, EmbeddableInput, IContainer } from '@kbn/embeddable-plugin/public'; - -export const HELLO_WORLD_EMBEDDABLE = 'HELLO_WORLD_EMBEDDABLE'; - -export class HelloWorldEmbeddable extends Embeddable { - // The type of this embeddable. This will be used to find the appropriate factory - // to instantiate this kind of embeddable. - public readonly type = HELLO_WORLD_EMBEDDABLE; - - constructor(initialInput: EmbeddableInput, parent?: IContainer) { - super( - // Input state is irrelevant to this embeddable, just pass it along. - initialInput, - // Initial output state - this embeddable does not do anything with output, so just - // pass along an empty object. - {}, - // Optional parent component, this embeddable can optionally be rendered inside a container. - parent - ); - } - - /** - * Render yourself at the dom node using whatever framework you like, angular, react, or just plain - * vanilla js. - * @param node - */ - public render(node: HTMLElement) { - node.innerHTML = - '
HELLO WORLD!
'; - } - - /** - * This is mostly relevant for time based embeddables which need to update data - * even if EmbeddableInput has not changed at all. - */ - public reload() {} -} diff --git a/examples/embeddable_examples/public/hello_world/hello_world_embeddable_factory.ts b/examples/embeddable_examples/public/hello_world/hello_world_embeddable_factory.ts deleted file mode 100644 index 2147c439cc691..0000000000000 --- a/examples/embeddable_examples/public/hello_world/hello_world_embeddable_factory.ts +++ /dev/null @@ -1,40 +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 { i18n } from '@kbn/i18n'; -import { - IContainer, - EmbeddableInput, - EmbeddableFactoryDefinition, - EmbeddableFactory, -} from '@kbn/embeddable-plugin/public'; -import { HelloWorldEmbeddable, HELLO_WORLD_EMBEDDABLE } from './hello_world_embeddable'; - -export type HelloWorldEmbeddableFactory = EmbeddableFactory; -export class HelloWorldEmbeddableFactoryDefinition implements EmbeddableFactoryDefinition { - public readonly type = HELLO_WORLD_EMBEDDABLE; - - /** - * In our simple example, we let everyone have permissions to edit this. Most - * embeddables should check the UI Capabilities service to be sure of - * the right permissions. - */ - public async isEditable() { - return true; - } - - public async create(initialInput: EmbeddableInput, parent?: IContainer) { - return new HelloWorldEmbeddable(initialInput, parent); - } - - public getDisplayName() { - return i18n.translate('embeddableExamples.helloworld.displayName', { - defaultMessage: 'hello world', - }); - } -} diff --git a/examples/embeddable_examples/public/index.ts b/examples/embeddable_examples/public/index.ts index 10da6533673cc..b587a2aafdd46 100644 --- a/examples/embeddable_examples/public/index.ts +++ b/examples/embeddable_examples/public/index.ts @@ -6,21 +6,6 @@ * Side Public License, v 1. */ -export type { HelloWorldEmbeddableFactory } from './hello_world'; -export { - HELLO_WORLD_EMBEDDABLE, - HelloWorldEmbeddable, - HelloWorldEmbeddableFactoryDefinition, -} from './hello_world'; -export type { ListContainerFactory } from './list_container'; -export { ListContainer, LIST_CONTAINER } from './list_container'; - -export { SIMPLE_EMBEDDABLE } from './migrations'; -export { - FILTER_DEBUGGER_EMBEDDABLE, - FilterDebuggerEmbeddableFactoryDefinition, -} from './filter_debugger'; - import { EmbeddableExamplesPlugin } from './plugin'; export const plugin = () => new EmbeddableExamplesPlugin(); diff --git a/examples/embeddable_examples/public/list_container/list_container.tsx b/examples/embeddable_examples/public/list_container/list_container.tsx deleted file mode 100644 index 45841a539ecef..0000000000000 --- a/examples/embeddable_examples/public/list_container/list_container.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import ReactDOM from 'react-dom'; -import { Container, ContainerInput, EmbeddableStart } from '@kbn/embeddable-plugin/public'; -import { ListContainerComponent } from './list_container_component'; - -export const LIST_CONTAINER = 'LIST_CONTAINER'; - -export class ListContainer extends Container<{}, ContainerInput> { - public readonly type = LIST_CONTAINER; - private node?: HTMLElement; - - constructor(input: ContainerInput, embeddableServices: EmbeddableStart) { - super(input, { embeddableLoaded: {} }, embeddableServices.getEmbeddableFactory); - } - - getInheritedInput() { - return { - viewMode: this.input.viewMode, - }; - } - - public render(node: HTMLElement) { - if (this.node) { - ReactDOM.unmountComponentAtNode(this.node); - } - this.node = node; - ReactDOM.render(, node); - } - - public destroy() { - super.destroy(); - if (this.node) { - ReactDOM.unmountComponentAtNode(this.node); - } - } -} diff --git a/examples/embeddable_examples/public/list_container/list_container_component.tsx b/examples/embeddable_examples/public/list_container/list_container_component.tsx deleted file mode 100644 index e0d0b7c72139f..0000000000000 --- a/examples/embeddable_examples/public/list_container/list_container_component.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; - -import { EuiFlexGroup, EuiSpacer, EuiFlexItem, EuiText, EuiPanel } from '@elastic/eui'; -import { - IContainer, - withEmbeddableSubscription, - ContainerInput, - ContainerOutput, - EmbeddablePanel, -} from '@kbn/embeddable-plugin/public'; - -interface Props { - embeddable: IContainer; - input: ContainerInput; - output: ContainerOutput; -} - -function renderList(embeddable: IContainer, panels: ContainerInput['panels']) { - let number = 0; - const list = Object.values(panels).map((panel) => { - number++; - return ( - - - - -

{number}

-
-
- - embeddable.untilEmbeddableLoaded(panel.explicitInput.id)} - /> - -
-
- ); - }); - return list; -} - -export function ListContainerComponentInner({ embeddable, input }: Props) { - return ( -
-

{embeddable.getTitle()}

- - {renderList(embeddable, input.panels)} -
- ); -} - -// You don't have to use this helper wrapper, but it handles a lot of the React boilerplate for -// embeddables, like setting up the subscriptions to cause the component to refresh whenever -// anything on input or output state changes. If you don't want that to happen (for example -// if you expect something on input or output state to change frequently that your react -// component does not care about, then you should probably hook this up manually). -export const ListContainerComponent = withEmbeddableSubscription< - ContainerInput, - ContainerOutput, - IContainer ->(ListContainerComponentInner); diff --git a/examples/embeddable_examples/public/list_container/list_container_factory.ts b/examples/embeddable_examples/public/list_container/list_container_factory.ts deleted file mode 100644 index ddf889f2afd8a..0000000000000 --- a/examples/embeddable_examples/public/list_container/list_container_factory.ts +++ /dev/null @@ -1,46 +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 { i18n } from '@kbn/i18n'; -import { - EmbeddableFactoryDefinition, - ContainerInput, - EmbeddableStart, - EmbeddableFactory, - ContainerOutput, -} from '@kbn/embeddable-plugin/public'; -import { LIST_CONTAINER, ListContainer } from './list_container'; - -interface StartServices { - embeddableServices: EmbeddableStart; -} - -export type ListContainerFactory = EmbeddableFactory; -export class ListContainerFactoryDefinition - implements EmbeddableFactoryDefinition -{ - public readonly type = LIST_CONTAINER; - public readonly isContainerType = true; - - constructor(private getStartServices: () => Promise) {} - - public async isEditable() { - return true; - } - - public create = async (initialInput: ContainerInput) => { - const { embeddableServices } = await this.getStartServices(); - return new ListContainer(initialInput, embeddableServices); - }; - - public getDisplayName() { - return i18n.translate('embeddableExamples.searchableListContainer.displayName', { - defaultMessage: 'List container', - }); - } -} diff --git a/examples/embeddable_examples/public/migrations/migration_definitions.ts b/examples/embeddable_examples/public/migrations/migration_definitions.ts deleted file mode 100644 index 56e03bed313eb..0000000000000 --- a/examples/embeddable_examples/public/migrations/migration_definitions.ts +++ /dev/null @@ -1,26 +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 { MigrateFunction } from '@kbn/kibana-utils-plugin/common/persistable_state'; -import { EmbeddableInput } from '@kbn/embeddable-plugin/common'; -import { SimpleEmbeddableInput } from './migrations_embeddable_factory'; - -// before 7.3.0 this embeddable received a very simple input with a variable named `number` -type SimpleEmbeddableInputV1 = EmbeddableInput & { - number: number; -}; - -type SimpleEmbeddable730MigrateFn = MigrateFunction; - -// when migrating old state we'll need to set a default title, or we should make title optional in the new state -const defaultTitle = 'no title'; - -export const migrateToVersion2: SimpleEmbeddable730MigrateFn = (state) => { - const newState: SimpleEmbeddableInput = { ...state, title: defaultTitle, value: state.number }; - return newState; -}; diff --git a/examples/embeddable_examples/public/migrations/migrations_embeddable.tsx b/examples/embeddable_examples/public/migrations/migrations_embeddable.tsx deleted file mode 100644 index 94f095efd62af..0000000000000 --- a/examples/embeddable_examples/public/migrations/migrations_embeddable.tsx +++ /dev/null @@ -1,45 +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 { Embeddable, IContainer } from '@kbn/embeddable-plugin/public'; -import { SIMPLE_EMBEDDABLE, SimpleEmbeddableInput } from '.'; - -export class SimpleEmbeddable extends Embeddable { - // The type of this embeddable. This will be used to find the appropriate factory - // to instantiate this kind of embeddable. - public readonly type = SIMPLE_EMBEDDABLE; - - constructor(initialInput: SimpleEmbeddableInput, parent?: IContainer) { - super( - // Input state is irrelevant to this embeddable, just pass it along. - initialInput, - // Initial output state - this embeddable does not do anything with output, so just - // pass along an empty object. - {}, - // Optional parent component, this embeddable can optionally be rendered inside a container. - parent - ); - } - - /** - * Render yourself at the dom node using whatever framework you like, angular, react, or just plain - * vanilla js. - * @param node - */ - public render(node: HTMLElement) { - const input = this.getInput(); - // eslint-disable-next-line no-unsanitized/property - node.innerHTML = `
${input.title} ${input.value}
`; - } - - /** - * This is mostly relevant for time based embeddables which need to update data - * even if EmbeddableInput has not changed at all. - */ - public reload() {} -} diff --git a/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts b/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts deleted file mode 100644 index 3dea64a742161..0000000000000 --- a/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts +++ /dev/null @@ -1,68 +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 { i18n } from '@kbn/i18n'; -import { EmbeddableStateWithType } from '@kbn/embeddable-plugin/common'; -import { - IContainer, - EmbeddableInput, - EmbeddableFactoryDefinition, - EmbeddableFactory, -} from '@kbn/embeddable-plugin/public'; -import { SimpleEmbeddable } from './migrations_embeddable'; -import { migrateToVersion2 } from './migration_definitions'; - -export const SIMPLE_EMBEDDABLE = 'SIMPLE_EMBEDDABLE'; - -// in 7.3.0 we added `title` to the input and renamed the `number` variable to `value` -export type SimpleEmbeddableInput = EmbeddableInput & { - title: string; - value: number; -}; - -export type SimpleEmbeddableFactory = EmbeddableFactory; -export class SimpleEmbeddableFactoryDefinition - implements EmbeddableFactoryDefinition -{ - public readonly type = SIMPLE_EMBEDDABLE; - public latestVersion = '2'; - - // we need to provide migration function every time we change the interface of our state - public readonly migrations = { - '2': migrateToVersion2, - }; - - public extract(state: EmbeddableStateWithType) { - // this embeddable does not store references to other saved objects - return { state, references: [] }; - } - - public inject(state: EmbeddableStateWithType) { - // this embeddable does not store references to other saved objects - return state; - } - - /** - * In our simple example, we let everyone have permissions to edit this. Most - * embeddables should check the UI Capabilities service to be sure of - * the right permissions. - */ - public async isEditable() { - return true; - } - - public async create(initialInput: SimpleEmbeddableInput, parent?: IContainer) { - return new SimpleEmbeddable(initialInput, parent); - } - - public getDisplayName() { - return i18n.translate('embeddableExamples.migrations.displayName', { - defaultMessage: 'simple migration embeddable', - }); - } -} diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts index 85faad072920a..e588919591724 100644 --- a/examples/embeddable_examples/public/plugin.ts +++ b/examples/embeddable_examples/public/plugin.ts @@ -6,47 +6,28 @@ * Side Public License, v 1. */ +import { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DataViewFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; import { EmbeddableSetup, EmbeddableStart, registerReactEmbeddableFactory, } from '@kbn/embeddable-plugin/public'; -import { Plugin, CoreSetup, CoreStart } from '@kbn/core/public'; -import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { ChartsPluginStart } from '@kbn/charts-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; -import { - HelloWorldEmbeddableFactory, - HELLO_WORLD_EMBEDDABLE, - HelloWorldEmbeddableFactoryDefinition, -} from './hello_world'; - -import { - LIST_CONTAINER, - ListContainerFactoryDefinition, - ListContainerFactory, -} from './list_container'; - -import { - SIMPLE_EMBEDDABLE, - SimpleEmbeddableFactory, - SimpleEmbeddableFactoryDefinition, -} from './migrations'; -import { - FILTER_DEBUGGER_EMBEDDABLE, - FilterDebuggerEmbeddableFactory, - FilterDebuggerEmbeddableFactoryDefinition, -} from './filter_debugger'; +import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { setupApp } from './app/setup_app'; +import { DATA_TABLE_ID } from './react_embeddables/data_table/constants'; +import { registerCreateDataTableAction } from './react_embeddables/data_table/create_data_table_action'; +import { EUI_MARKDOWN_ID } from './react_embeddables/eui_markdown/constants'; import { registerCreateEuiMarkdownAction } from './react_embeddables/eui_markdown/create_eui_markdown_action'; +import { FIELD_LIST_ID } from './react_embeddables/field_list/constants'; import { registerCreateFieldListAction } from './react_embeddables/field_list/create_field_list_action'; import { registerAddSearchPanelAction } from './react_embeddables/search/register_add_search_panel_action'; -import { EUI_MARKDOWN_ID } from './react_embeddables/eui_markdown/constants'; -import { FIELD_LIST_ID } from './react_embeddables/field_list/constants'; -import { SEARCH_EMBEDDABLE_ID } from './react_embeddables/search/constants'; -import { setupApp } from './app/setup_app'; +import { registerSearchEmbeddable } from './react_embeddables/search/register_search_embeddable'; export interface SetupDeps { developerExamples: DeveloperExamplesSetup; @@ -56,6 +37,7 @@ export interface SetupDeps { export interface StartDeps { dataViews: DataViewsPublicPluginStart; + dataViewFieldEditor: DataViewFieldEditorStart; embeddable: EmbeddableStart; uiActions: UiActionsStart; data: DataPublicPluginStart; @@ -63,52 +45,12 @@ export interface StartDeps { fieldFormats: FieldFormatsStart; } -interface ExampleEmbeddableFactories { - getHelloWorldEmbeddableFactory: () => HelloWorldEmbeddableFactory; - getListContainerEmbeddableFactory: () => ListContainerFactory; - getMigrationsEmbeddableFactory: () => SimpleEmbeddableFactory; - getFilterDebuggerEmbeddableFactory: () => FilterDebuggerEmbeddableFactory; -} - -export interface StartApi { - createSampleData: () => Promise; - factories: ExampleEmbeddableFactories; -} - -export class EmbeddableExamplesPlugin implements Plugin { - private exampleEmbeddableFactories: Partial = {}; - +export class EmbeddableExamplesPlugin implements Plugin { public setup(core: CoreSetup, { embeddable, developerExamples }: SetupDeps) { setupApp(core, developerExamples); - - this.exampleEmbeddableFactories.getHelloWorldEmbeddableFactory = - embeddable.registerEmbeddableFactory( - HELLO_WORLD_EMBEDDABLE, - new HelloWorldEmbeddableFactoryDefinition() - ); - - this.exampleEmbeddableFactories.getMigrationsEmbeddableFactory = - embeddable.registerEmbeddableFactory( - SIMPLE_EMBEDDABLE, - new SimpleEmbeddableFactoryDefinition() - ); - - this.exampleEmbeddableFactories.getListContainerEmbeddableFactory = - embeddable.registerEmbeddableFactory( - LIST_CONTAINER, - new ListContainerFactoryDefinition(async () => ({ - embeddableServices: (await core.getStartServices())[1].embeddable, - })) - ); - - this.exampleEmbeddableFactories.getFilterDebuggerEmbeddableFactory = - embeddable.registerEmbeddableFactory( - FILTER_DEBUGGER_EMBEDDABLE, - new FilterDebuggerEmbeddableFactoryDefinition() - ); } - public start(core: CoreStart, deps: StartDeps): StartApi { + public start(core: CoreStart, deps: StartDeps) { registerCreateFieldListAction(deps.uiActions); registerReactEmbeddableFactory(FIELD_LIST_ID, async () => { const { getFieldListFactory } = await import( @@ -126,17 +68,15 @@ export class EmbeddableExamplesPlugin implements Plugin { - const { getSearchEmbeddableFactory } = await import( - './react_embeddables/search/search_react_embeddable' + registerSearchEmbeddable(deps); + + registerCreateDataTableAction(deps.uiActions); + registerReactEmbeddableFactory(DATA_TABLE_ID, async () => { + const { getDataTableFactory } = await import( + './react_embeddables/data_table/data_table_react_embeddable' ); - return getSearchEmbeddableFactory(deps); + return getDataTableFactory(core, deps); }); - - return { - createSampleData: async () => {}, - factories: this.exampleEmbeddableFactories as ExampleEmbeddableFactories, - }; } public stop() {} diff --git a/examples/embeddable_examples/public/hello_world/index.ts b/examples/embeddable_examples/public/react_embeddables/add_panel_grouping.ts similarity index 76% rename from examples/embeddable_examples/public/hello_world/index.ts rename to examples/embeddable_examples/public/react_embeddables/add_panel_grouping.ts index a155f65d47858..2c043569d5cfb 100644 --- a/examples/embeddable_examples/public/hello_world/index.ts +++ b/examples/embeddable_examples/public/react_embeddables/add_panel_grouping.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export * from './hello_world_embeddable'; -export * from './hello_world_embeddable_factory'; +export const addPanelGrouping = { + id: 'embeddableExamples', + getDisplayName: () => 'Embeddable examples', +}; diff --git a/examples/embeddable_examples/public/filter_debugger/index.ts b/examples/embeddable_examples/public/react_embeddables/data_table/constants.ts similarity index 77% rename from examples/embeddable_examples/public/filter_debugger/index.ts rename to examples/embeddable_examples/public/react_embeddables/data_table/constants.ts index c78f934fa2616..a935e7f8099cb 100644 --- a/examples/embeddable_examples/public/filter_debugger/index.ts +++ b/examples/embeddable_examples/public/react_embeddables/data_table/constants.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export * from './filter_debugger_embeddable'; -export * from './filter_debugger_embeddable_factory'; +export const DATA_TABLE_ID = 'data_table'; +export const ADD_DATA_TABLE_ACTION_ID = 'create_data_table'; diff --git a/examples/embeddable_examples/public/react_embeddables/data_table/create_data_table_action.ts b/examples/embeddable_examples/public/react_embeddables/data_table/create_data_table_action.ts new file mode 100644 index 0000000000000..3d0c99289b121 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/data_table/create_data_table_action.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 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 { i18n } from '@kbn/i18n'; +import { apiIsPresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { IncompatibleActionError, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { addPanelGrouping } from '../add_panel_grouping'; +import { ADD_DATA_TABLE_ACTION_ID, DATA_TABLE_ID } from './constants'; + +// ----------------------------------------------------------------------------- +// Create and register an action which allows this embeddable to be created from +// the dashboard toolbar context menu. +// ----------------------------------------------------------------------------- +export const registerCreateDataTableAction = (uiActions: UiActionsStart) => { + uiActions.registerAction({ + id: ADD_DATA_TABLE_ACTION_ID, + grouping: [addPanelGrouping], + getIconType: () => 'tableDensityNormal', + isCompatible: async ({ embeddable }) => { + return apiIsPresentationContainer(embeddable); + }, + execute: async ({ embeddable }) => { + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + embeddable.addNewPanel( + { + panelType: DATA_TABLE_ID, + }, + true + ); + }, + getDisplayName: () => + i18n.translate('embeddableExamples.dataTable.ariaLabel', { + defaultMessage: 'Data table', + }), + }); + uiActions.attachAction('ADD_PANEL_TRIGGER', ADD_DATA_TABLE_ACTION_ID); +}; diff --git a/examples/embeddable_examples/public/react_embeddables/data_table/data_table_queries.ts b/examples/embeddable_examples/public/react_embeddables/data_table/data_table_queries.ts new file mode 100644 index 0000000000000..49376ac02ffe0 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/data_table/data_table_queries.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 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 { DataView } from '@kbn/data-views-plugin/public'; +import { buildDataTableRecord } from '@kbn/discover-utils'; +import { DataTableRecord, EsHitRecord } from '@kbn/discover-utils/types'; +import { Filter } from '@kbn/es-query'; +import { i18n } from '@kbn/i18n'; +import { listenForCompatibleApi } from '@kbn/presentation-containers'; +import { apiPublishesDataViews, fetch$ } from '@kbn/presentation-publishing'; +import { BehaviorSubject, combineLatest, lastValueFrom, map, Subscription, switchMap } from 'rxjs'; +import { StartDeps } from '../../plugin'; +import { apiPublishesSelectedFields } from '../field_list/publishes_selected_fields'; +import { DataTableApi } from './types'; + +export const initializeDataTableQueries = async ( + services: StartDeps, + api: DataTableApi, + queryLoading$: BehaviorSubject +) => { + // initialize services + const defaultDataViewPromise = services.data.dataViews.getDefault(); + const searchSourcePromise = services.data.search.searchSource.create(); + const [defaultDataView, searchSource] = await Promise.all([ + defaultDataViewPromise, + searchSourcePromise, + ]); + if (!defaultDataView) { + throw new Error( + i18n.translate('embeddableExamples.dataTable.noDataViewError', { + defaultMessage: 'At least one data view is required to use the data table example..', + }) + ); + } + + // set up search source + let abortController: AbortController | undefined; + const fields: Record = { field: '*', include_unmapped: 'true' }; + searchSource.setField('fields', [fields]); + searchSource.setField('size', 50); + + // initialize state for API. + const fields$ = new BehaviorSubject([]); + const dataView$ = new BehaviorSubject(defaultDataView); + const rows$ = new BehaviorSubject([]); + + const dataSubscription = new Subscription(); + + // set up listeners - these will listen for the closest compatible api (parent or sibling) + const stopListeningForDataViews = listenForCompatibleApi( + api.parentApi, + apiPublishesDataViews, + (dataViewProvider) => { + if (!dataViewProvider) { + dataView$.next(defaultDataView); + return; + } + const dataViewSubscription = dataViewProvider.dataViews.subscribe((dataViews) => { + dataView$.next(dataViews?.[0] ?? defaultDataView); + }); + return () => dataViewSubscription.unsubscribe(); + } + ); + const stopListeningForFields = listenForCompatibleApi( + api.parentApi, + apiPublishesSelectedFields, + (fieldsProvider) => { + if (!fieldsProvider) { + fields$.next([]); + return; + } + const fieldsSubscription = fieldsProvider.selectedFields.subscribe((nextFields) => { + fields$.next(nextFields ?? []); + }); + return () => fieldsSubscription.unsubscribe(); + } + ); + + // run query whenever the embeddable's fetch state or the data view changes + dataSubscription.add( + combineLatest([fetch$(api), dataView$]) + .pipe( + map(([{ filters, timeRange, query, timeslice, searchSessionId }, dataView]) => ({ + filters, + timeRange, + query, + dataView, + timeslice, + searchSessionId, + })), + switchMap(async ({ filters, query, timeRange, dataView, timeslice, searchSessionId }) => { + if (!dataView) return; + queryLoading$.next(true); + const appliedTimeRange = timeslice + ? { + from: new Date(timeslice[0]).toISOString(), + to: new Date(timeslice[1]).toISOString(), + mode: 'absolute' as 'absolute', + } + : timeRange; + const timeRangeFilter = services.data.query.timefilter.timefilter.createFilter( + dataView, + appliedTimeRange + ) as Filter; + searchSource.setField('filter', [...(filters ?? []), timeRangeFilter]); + searchSource.setField('query', query); + searchSource.setField('index', dataView); + + abortController?.abort(); + abortController = new AbortController(); + const { rawResponse: resp } = await lastValueFrom( + searchSource.fetch$({ + abortSignal: abortController.signal, + sessionId: searchSessionId, + disableWarningToasts: true, + }) + ); + queryLoading$.next(false); + return resp.hits.hits.map((hit) => buildDataTableRecord(hit as EsHitRecord, dataView)); + }) + ) + .subscribe((rows) => rows$.next(rows)) + ); + + return { + rows$, + fields$, + dataView$, + stop: () => { + stopListeningForDataViews(); + stopListeningForFields(); + dataSubscription.unsubscribe(); + }, + }; +}; diff --git a/examples/embeddable_examples/public/react_embeddables/data_table/data_table_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/data_table/data_table_react_embeddable.tsx new file mode 100644 index 0000000000000..3bf161bd51490 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/data_table/data_table_react_embeddable.tsx @@ -0,0 +1,129 @@ +/* + * Copyright 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 { EuiScreenReaderOnly } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { CellActionsProvider } from '@kbn/cell-actions'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { i18n } from '@kbn/i18n'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { + initializeTimeRange, + initializeTitles, + useBatchedPublishingSubjects, +} from '@kbn/presentation-publishing'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import { DataLoadingState, UnifiedDataTable, UnifiedDataTableProps } from '@kbn/unified-data-table'; +import React, { useEffect } from 'react'; +import { BehaviorSubject } from 'rxjs'; +import { StartDeps } from '../../plugin'; +import { DATA_TABLE_ID } from './constants'; +import { initializeDataTableQueries } from './data_table_queries'; +import { DataTableApi, DataTableSerializedState } from './types'; + +export const getDataTableFactory = ( + core: CoreStart, + services: StartDeps +): ReactEmbeddableFactory => ({ + type: DATA_TABLE_ID, + deserializeState: (state) => { + return state.rawState as DataTableSerializedState; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const storage = new Storage(localStorage); + const timeRange = initializeTimeRange(state); + const queryLoading$ = new BehaviorSubject(true); + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + const allServices: UnifiedDataTableProps['services'] = { + ...services, + storage, + theme: core.theme, + uiSettings: core.uiSettings, + toastNotifications: core.notifications.toasts, + }; + + const api = buildApi( + { + ...timeRange.api, + ...titlesApi, + dataLoading: queryLoading$, + serializeState: () => { + return { + rawState: { ...serializeTitles(), ...timeRange.serialize() }, + }; + }, + }, + { ...titleComparators, ...timeRange.comparators } + ); + + const queryService = await initializeDataTableQueries(services, api, queryLoading$); + + // Create the React Embeddable component + return { + api, + Component: () => { + // unwrap publishing subjects into reactive state + const [fields, rows, loading, dataView] = useBatchedPublishingSubjects( + queryService.fields$, + queryService.rows$, + queryLoading$, + queryService.dataView$ + ); + + // stop query service on unmount + useEffect(() => { + return () => { + queryService.stop(); + }; + }, []); + + return ( + <> + + + {i18n.translate('embeddableExamples.dataTable.ariaLabel', { + defaultMessage: 'Data table', + })} + + +
+ + + + {}} + dataView={dataView} + sampleSizeState={100} + columns={fields ?? []} + useNewFieldsApi={true} + services={allServices} + onSetColumns={() => {}} + ariaLabelledBy="dataTableReactEmbeddableAria" + loadingState={loading ? DataLoadingState.loading : DataLoadingState.loaded} + /> + + + +
+ + ); + }, + }; + }, +}); diff --git a/examples/embeddable_examples/public/react_embeddables/data_table/types.ts b/examples/embeddable_examples/public/react_embeddables/data_table/types.ts new file mode 100644 index 0000000000000..d693577bc89fb --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/data_table/types.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 { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { + PublishesDataLoading, + SerializedTimeRange, + SerializedTitles, +} from '@kbn/presentation-publishing'; + +export type DataTableSerializedState = SerializedTitles & SerializedTimeRange; + +export type DataTableApi = DefaultEmbeddableApi & PublishesDataLoading; diff --git a/examples/embeddable_examples/public/react_embeddables/eui_markdown/create_eui_markdown_action.tsx b/examples/embeddable_examples/public/react_embeddables/eui_markdown/create_eui_markdown_action.tsx index 7aae7577dbb12..21306a4037262 100644 --- a/examples/embeddable_examples/public/react_embeddables/eui_markdown/create_eui_markdown_action.tsx +++ b/examples/embeddable_examples/public/react_embeddables/eui_markdown/create_eui_markdown_action.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import { apiCanAddNewPanel } from '@kbn/presentation-containers'; import { EmbeddableApiContext } from '@kbn/presentation-publishing'; import { IncompatibleActionError, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { addPanelGrouping } from '../add_panel_grouping'; import { ADD_EUI_MARKDOWN_ACTION_ID, EUI_MARKDOWN_ID } from './constants'; // ----------------------------------------------------------------------------- @@ -19,6 +20,7 @@ import { ADD_EUI_MARKDOWN_ACTION_ID, EUI_MARKDOWN_ID } from './constants'; export const registerCreateEuiMarkdownAction = (uiActions: UiActionsStart) => { uiActions.registerAction({ id: ADD_EUI_MARKDOWN_ACTION_ID, + grouping: [addPanelGrouping], getIconType: () => 'editorCodeBlock', isCompatible: async ({ embeddable }) => { return apiCanAddNewPanel(embeddable); diff --git a/examples/embeddable_examples/public/react_embeddables/field_list/create_field_list_action.tsx b/examples/embeddable_examples/public/react_embeddables/field_list/create_field_list_action.tsx index 1b860c81954f1..8e02aa6e385e0 100644 --- a/examples/embeddable_examples/public/react_embeddables/field_list/create_field_list_action.tsx +++ b/examples/embeddable_examples/public/react_embeddables/field_list/create_field_list_action.tsx @@ -12,10 +12,12 @@ import { EmbeddableApiContext } from '@kbn/presentation-publishing'; import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { UiActionsPublicStart } from '@kbn/ui-actions-plugin/public/plugin'; import { ADD_FIELD_LIST_ACTION_ID, FIELD_LIST_ID } from './constants'; +import { addPanelGrouping } from '../add_panel_grouping'; export const registerCreateFieldListAction = (uiActions: UiActionsPublicStart) => { uiActions.registerAction({ id: ADD_FIELD_LIST_ACTION_ID, + grouping: [addPanelGrouping], getIconType: () => 'indexOpen', isCompatible: async ({ embeddable }) => { return apiCanAddNewPanel(embeddable); 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 b466b5bd736db..c7067cba6ce8c 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 @@ -97,6 +97,9 @@ export const getFieldListFactory = ( const initialDataView = await dataViews.get(initialDataViewId); const selectedDataViewId$ = new BehaviorSubject(initialDataViewId); const dataViews$ = new BehaviorSubject([initialDataView]); + const selectedFieldNames$ = new BehaviorSubject( + initialState.selectedFieldNames + ); subscriptions.add( selectedDataViewId$ @@ -106,17 +109,15 @@ export const getFieldListFactory = ( ) .subscribe((nextSelectedDataView) => { dataViews$.next([nextSelectedDataView]); + selectedFieldNames$.next([]); }) ); - const selectedFieldNames$ = new BehaviorSubject( - initialState.selectedFieldNames - ); - const api = buildApi( { ...titlesApi, dataViews: dataViews$, + selectedFields: selectedFieldNames$, serializeState: () => { const dataViewId = selectedDataViewId$.getValue(); const references: Reference[] = dataViewId diff --git a/packages/core/user-settings/core-user-settings-server-mocks/src/service_contract.mock.ts b/examples/embeddable_examples/public/react_embeddables/field_list/publishes_selected_fields.ts similarity index 50% rename from packages/core/user-settings/core-user-settings-server-mocks/src/service_contract.mock.ts rename to examples/embeddable_examples/public/react_embeddables/field_list/publishes_selected_fields.ts index d4176ee2bbfb6..eb660ca88ccbc 100644 --- a/packages/core/user-settings/core-user-settings-server-mocks/src/service_contract.mock.ts +++ b/examples/embeddable_examples/public/react_embeddables/field_list/publishes_selected_fields.ts @@ -5,10 +5,13 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { UserSettingsService } from '@kbn/core-user-settings-server-internal'; -export const serviceContractMock = (): jest.Mocked => { - return { - setup: jest.fn(), - } as unknown as jest.Mocked; +import { PublishingSubject } from '@kbn/presentation-publishing'; + +export interface PublishesSelectedFields { + selectedFields: PublishingSubject; +} + +export const apiPublishesSelectedFields = (api: unknown): api is PublishesSelectedFields => { + return Boolean(api && (api as PublishesSelectedFields)?.selectedFields !== undefined); }; diff --git a/examples/embeddable_examples/public/react_embeddables/field_list/types.ts b/examples/embeddable_examples/public/react_embeddables/field_list/types.ts index 7d1f7a451b49e..0dd6651c57706 100644 --- a/examples/embeddable_examples/public/react_embeddables/field_list/types.ts +++ b/examples/embeddable_examples/public/react_embeddables/field_list/types.ts @@ -8,10 +8,11 @@ import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; import { PublishesDataViews, SerializedTitles } from '@kbn/presentation-publishing'; +import { PublishesSelectedFields } from './publishes_selected_fields'; export type FieldListSerializedStateState = SerializedTitles & { dataViewId?: string; selectedFieldNames?: string[]; }; -export type FieldListApi = DefaultEmbeddableApi & PublishesDataViews; +export type FieldListApi = DefaultEmbeddableApi & PublishesSelectedFields & PublishesDataViews; diff --git a/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx b/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx index 2466fa7be3533..391a9e3c370d4 100644 --- a/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx +++ b/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx @@ -9,14 +9,14 @@ import { apiCanAddNewPanel } from '@kbn/presentation-containers'; import { EmbeddableApiContext } from '@kbn/presentation-publishing'; import { IncompatibleActionError, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { addPanelGrouping } from '../add_panel_grouping'; import { ADD_SEARCH_ACTION_ID, SEARCH_EMBEDDABLE_ID } from './constants'; export const registerAddSearchPanelAction = (uiActions: UiActionsStart) => { uiActions.registerAction({ id: ADD_SEARCH_ACTION_ID, - getDisplayName: () => 'Unified search example', - getDisplayNameTooltip: () => - 'Demonstrates how to use global filters, global time range, panel time range, and global query state in an embeddable', + grouping: [addPanelGrouping], + getDisplayName: () => 'Search example', getIconType: () => 'search', isCompatible: async ({ embeddable }) => { return apiCanAddNewPanel(embeddable); diff --git a/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable.ts b/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable.ts new file mode 100644 index 0000000000000..547437a61a283 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable.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 { registerReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { SEARCH_EMBEDDABLE_ID } from './constants'; +import { Services } from './types'; + +export function registerSearchEmbeddable(services: Services) { + registerReactEmbeddableFactory(SEARCH_EMBEDDABLE_ID, async () => { + const { getSearchEmbeddableFactory } = await import('./search_react_embeddable'); + return getSearchEmbeddableFactory(services); + }); +} diff --git a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx index 3f1918beda531..e6fd182319631 100644 --- a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx @@ -79,7 +79,7 @@ export const getSearchEmbeddableFactory = (services: Services) => { fetchContext.filters ?? [], fetchContext.query, // timeRange and timeslice provided seperatly so consumers can decide - // whether to refetch data for just mask current data. + // whether to refetch data or just mask current data. // In this example, we must refetch because we need a count within the time range. fetchContext.timeslice ? { diff --git a/examples/embeddable_examples/server/plugin.ts b/examples/embeddable_examples/server/plugin.ts deleted file mode 100644 index 2e27254700fff..0000000000000 --- a/examples/embeddable_examples/server/plugin.ts +++ /dev/null @@ -1,24 +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 { Plugin, CoreSetup, CoreStart } from '@kbn/core/server'; -import { EmbeddableSetup } from '@kbn/embeddable-plugin/server'; - -export interface EmbeddableExamplesSetupDependencies { - embeddable: EmbeddableSetup; -} - -export class EmbeddableExamplesPlugin - implements Plugin -{ - public setup(core: CoreSetup, { embeddable }: EmbeddableExamplesSetupDependencies) {} - - public start(core: CoreStart) {} - - public stop() {} -} diff --git a/examples/embeddable_examples/tsconfig.json b/examples/embeddable_examples/tsconfig.json index 1165c05b189ad..30ac39afe90b7 100644 --- a/examples/embeddable_examples/tsconfig.json +++ b/examples/embeddable_examples/tsconfig.json @@ -14,7 +14,6 @@ "exclude": ["target/**/*"], "kbn_references": [ "@kbn/core", - "@kbn/kibana-utils-plugin", "@kbn/ui-actions-plugin", "@kbn/embeddable-plugin", "@kbn/presentation-publishing", @@ -31,6 +30,13 @@ "@kbn/unified-field-list", "@kbn/presentation-containers", "@kbn/core-application-browser", - "@kbn/developer-examples-plugin" + "@kbn/developer-examples-plugin", + "@kbn/data-view-field-editor-plugin", + "@kbn/discover-utils", + "@kbn/cell-actions", + "@kbn/kibana-react-plugin", + "@kbn/react-kibana-context-render", + "@kbn/unified-data-table", + "@kbn/kibana-utils-plugin" ] } diff --git a/examples/portable_dashboards_example/kibana.jsonc b/examples/portable_dashboards_example/kibana.jsonc index d6fd1a82e1df5..e91a879f3b801 100644 --- a/examples/portable_dashboards_example/kibana.jsonc +++ b/examples/portable_dashboards_example/kibana.jsonc @@ -17,8 +17,7 @@ "embeddable", "navigation", "unifiedSearch", - "developerExamples", - "embeddableExamples" + "developerExamples" ] } } diff --git a/examples/portable_dashboards_example/public/app.tsx b/examples/portable_dashboards_example/public/app.tsx index 861d2a0ec33b5..5772df8f1ac1a 100644 --- a/examples/portable_dashboards_example/public/app.tsx +++ b/examples/portable_dashboards_example/public/app.tsx @@ -17,7 +17,7 @@ import { DashboardListingTable } from '@kbn/dashboard-plugin/public'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; import { DualReduxExample } from './dual_redux_example'; -import { PortableDashboardsExampleStartDeps } from './plugin'; +import { StartDeps } from './plugin'; import { StaticByValueExample } from './static_by_value_example'; import { StaticByReferenceExample } from './static_by_reference_example'; import { DynamicByReferenceExample } from './dynamically_add_panels_example'; @@ -27,7 +27,7 @@ const DASHBOARD_DEMO_PATH = '/dashboardDemo'; const DASHBOARD_LIST_PATH = '/listingDemo'; export const renderApp = async ( - { data, dashboard }: PortableDashboardsExampleStartDeps, + { data, dashboard }: StartDeps, { element, history }: AppMountParameters ) => { ReactDOM.render( @@ -42,8 +42,8 @@ const PortableDashboardsDemos = ({ dashboard, history, }: { - data: PortableDashboardsExampleStartDeps['data']; - dashboard: PortableDashboardsExampleStartDeps['dashboard']; + data: StartDeps['data']; + dashboard: StartDeps['dashboard']; history: AppMountParameters['history']; }) => { return ( @@ -69,8 +69,8 @@ const DashboardsDemo = ({ dashboard, }: { history: AppMountParameters['history']; - data: PortableDashboardsExampleStartDeps['data']; - dashboard: PortableDashboardsExampleStartDeps['dashboard']; + data: StartDeps['data']; + dashboard: StartDeps['dashboard']; }) => { const { loading, value: dataviewResults } = useAsync(async () => { const dataViews = await data.dataViews.find('kibana_sample_data_logs'); diff --git a/examples/portable_dashboards_example/public/constants.ts b/examples/portable_dashboards_example/public/constants.ts index f38481412a53c..04bc8eab1793d 100644 --- a/examples/portable_dashboards_example/public/constants.ts +++ b/examples/portable_dashboards_example/public/constants.ts @@ -7,3 +7,5 @@ */ export const PLUGIN_ID = 'portableDashboardExamples'; + +export const FILTER_DEBUGGER_EMBEDDABLE_ID = 'FILTER_DEBUGGER_EMBEDDABLE_ID'; diff --git a/examples/portable_dashboards_example/public/dashboard_with_controls_example.tsx b/examples/portable_dashboards_example/public/dashboard_with_controls_example.tsx index ce67d8525d479..ac902c72e851f 100644 --- a/examples/portable_dashboards_example/public/dashboard_with_controls_example.tsx +++ b/examples/portable_dashboards_example/public/dashboard_with_controls_example.tsx @@ -13,12 +13,13 @@ import type { DataView } from '@kbn/data-views-plugin/public'; import { EuiPanel, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { controlGroupInputBuilder } from '@kbn/controls-plugin/public'; import { getDefaultControlGroupInput } from '@kbn/controls-plugin/common'; -import { FILTER_DEBUGGER_EMBEDDABLE } from '@kbn/embeddable-examples-plugin/public'; import { AwaitingDashboardAPI, DashboardRenderer, DashboardCreationOptions, } from '@kbn/dashboard-plugin/public'; +import { apiHasUniqueId } from '@kbn/presentation-publishing'; +import { FILTER_DEBUGGER_EMBEDDABLE_ID } from './constants'; export const DashboardWithControlsExample = ({ dataView }: { dataView: DataView }) => { const [dashboard, setDashboard] = useState(); @@ -27,14 +28,23 @@ export const DashboardWithControlsExample = ({ dataView }: { dataView: DataView useEffect(() => { if (!dashboard) return; (async () => { - const embeddable = await dashboard.addNewEmbeddable(FILTER_DEBUGGER_EMBEDDABLE, {}); - const prevPanelState = dashboard.getExplicitInput().panels[embeddable.id]; + const api = await dashboard.addNewPanel( + { + panelType: FILTER_DEBUGGER_EMBEDDABLE_ID, + initialState: {}, + }, + true + ); + if (!apiHasUniqueId(api)) { + return; + } + const prevPanelState = dashboard.getExplicitInput().panels[api.uuid]; // resize the new panel so that it fills up the entire width of the dashboard dashboard.updateInput({ panels: { - [embeddable.id]: { + [api.uuid]: { ...prevPanelState, - gridData: { i: embeddable.id, x: 0, y: 0, w: 48, h: 12 }, + gridData: { i: api.uuid, x: 0, y: 0, w: 48, h: 12 }, }, }, }); diff --git a/examples/portable_dashboards_example/public/filter_debugger_embeddable.tsx b/examples/portable_dashboards_example/public/filter_debugger_embeddable.tsx new file mode 100644 index 0000000000000..fd2c23731011b --- /dev/null +++ b/examples/portable_dashboards_example/public/filter_debugger_embeddable.tsx @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { css } from '@emotion/react'; +import { DefaultEmbeddableApi, ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { + PublishesUnifiedSearch, + useStateFromPublishingSubject, +} from '@kbn/presentation-publishing'; +import { EuiCodeBlock, EuiPanel, EuiTitle } from '@elastic/eui'; +import { FILTER_DEBUGGER_EMBEDDABLE_ID } from './constants'; + +export type Api = DefaultEmbeddableApi<{}>; + +export const factory: ReactEmbeddableFactory<{}, Api> = { + type: FILTER_DEBUGGER_EMBEDDABLE_ID, + deserializeState: () => { + return {}; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const api = buildApi( + { + serializeState: () => { + return { + rawState: {}, + references: [], + }; + }, + }, + {} + ); + + return { + api, + Component: () => { + const filters = useStateFromPublishingSubject( + (parentApi as PublishesUnifiedSearch)?.filters$ + ); + + return ( + + +

Filters

+
+ {JSON.stringify(filters, undefined, 1)} +
+ ); + }, + }; + }, +}; diff --git a/examples/portable_dashboards_example/public/plugin.tsx b/examples/portable_dashboards_example/public/plugin.tsx index 83a7fd53dbc5d..74d16be104277 100644 --- a/examples/portable_dashboards_example/public/plugin.tsx +++ b/examples/portable_dashboards_example/public/plugin.tsx @@ -6,32 +6,28 @@ * Side Public License, v 1. */ -import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { AppMountParameters, CoreSetup, Plugin } from '@kbn/core/public'; import type { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { DashboardStart } from '@kbn/dashboard-plugin/public'; +import { registerReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import img from './portable_dashboard_image.png'; -import { PLUGIN_ID } from './constants'; +import { FILTER_DEBUGGER_EMBEDDABLE_ID, PLUGIN_ID } from './constants'; interface SetupDeps { developerExamples: DeveloperExamplesSetup; } -export interface PortableDashboardsExampleStartDeps { +export interface StartDeps { dashboard: DashboardStart; data: DataPublicPluginStart; navigation: NavigationPublicPluginStart; } -export class PortableDashboardsExamplePlugin - implements Plugin -{ - public setup( - core: CoreSetup, - { developerExamples }: SetupDeps - ) { +export class PortableDashboardsExamplePlugin implements Plugin { + public setup(core: CoreSetup, { developerExamples }: SetupDeps) { core.application.register({ id: PLUGIN_ID, title: 'Portable dashboard examples', @@ -51,7 +47,12 @@ export class PortableDashboardsExamplePlugin }); } - public async start(core: CoreStart, { dashboard }: PortableDashboardsExampleStartDeps) {} + public async start() { + registerReactEmbeddableFactory(FILTER_DEBUGGER_EMBEDDABLE_ID, async () => { + const { factory } = await import('./filter_debugger_embeddable'); + return factory; + }); + } public stop() {} } diff --git a/examples/portable_dashboards_example/tsconfig.json b/examples/portable_dashboards_example/tsconfig.json index fa93233be3f2a..e15af91765497 100644 --- a/examples/portable_dashboards_example/tsconfig.json +++ b/examples/portable_dashboards_example/tsconfig.json @@ -21,9 +21,9 @@ "@kbn/data-views-plugin", "@kbn/visualizations-plugin", "@kbn/developer-examples-plugin", - "@kbn/embeddable-examples-plugin", "@kbn/shared-ux-page-kibana-template", "@kbn/controls-plugin", - "@kbn/shared-ux-router" + "@kbn/shared-ux-router", + "@kbn/presentation-publishing" ] } diff --git a/examples/search_examples/kibana.jsonc b/examples/search_examples/kibana.jsonc index 8fc8c271ee521..73bcf4f8d492f 100644 --- a/examples/search_examples/kibana.jsonc +++ b/examples/search_examples/kibana.jsonc @@ -16,8 +16,6 @@ "share", "unifiedSearch" ], - "requiredBundles": [ - "kibanaReact" - ] + "requiredBundles": [] } } diff --git a/examples/search_examples/public/application.tsx b/examples/search_examples/public/application.tsx index c6c0eb053526a..10985afc4984a 100644 --- a/examples/search_examples/public/application.tsx +++ b/examples/search_examples/public/application.tsx @@ -39,7 +39,7 @@ const LINKS: ExampleLink[] = [ ]; export const renderApp = ( - { notifications, savedObjects, http, application }: CoreStart, + { notifications, savedObjects, http, application, ...startServices }: CoreStart, { data, navigation, unifiedSearch }: AppPluginStartDependencies, { element, history }: AppMountParameters ) => { @@ -60,6 +60,7 @@ export const renderApp = ( data={data} http={http} unifiedSearch={unifiedSearch} + {...startServices} /> diff --git a/examples/search_examples/public/search/app.tsx b/examples/search_examples/public/search/app.tsx index 09d145ff5aee7..014ef1d8f3080 100644 --- a/examples/search_examples/public/search/app.tsx +++ b/examples/search_examples/public/search/app.tsx @@ -36,7 +36,7 @@ import type { DataView, DataViewField } from '@kbn/data-views-plugin/public'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import React, { useEffect, useState } from 'react'; @@ -44,9 +44,8 @@ import { lastValueFrom } from 'rxjs'; import { PLUGIN_ID, PLUGIN_NAME, SERVER_SEARCH_ROUTE_PATH } from '../../common'; import { IMyStrategyResponse } from '../../common/types'; -interface SearchExamplesAppDeps { - notifications: CoreStart['notifications']; - http: CoreStart['http']; +interface SearchExamplesAppDeps + extends Pick { navigation: NavigationPublicPluginStart; data: DataPublicPluginStart; unifiedSearch: UnifiedSearchPublicPluginStart; @@ -86,6 +85,7 @@ export const SearchExamplesApp = ({ navigation, data, unifiedSearch, + ...startServices }: SearchExamplesAppDeps) => { const { IndexPatternSelect } = unifiedSearch.ui; const [getCool, setGetCool] = useState(false); @@ -234,7 +234,7 @@ export const SearchExamplesApp = ({ notifications.toasts.addSuccess( { title: 'Query result', - text: toMountPoint(message), + text: toMountPoint(message, startServices), }, { toastLifeTimeMs: 300000, @@ -243,7 +243,7 @@ export const SearchExamplesApp = ({ if (res.warning) { notifications.toasts.addWarning({ title: 'Warning', - text: toMountPoint(res.warning), + text: toMountPoint(res.warning, startServices), }); } } @@ -337,7 +337,7 @@ export const SearchExamplesApp = ({ notifications.toasts.addSuccess( { title: 'Query result', - text: toMountPoint(message), + text: toMountPoint(message, startServices), }, { toastLifeTimeMs: 300000, diff --git a/examples/search_examples/tsconfig.json b/examples/search_examples/tsconfig.json index e4d18b3443263..fb5136311fe1c 100644 --- a/examples/search_examples/tsconfig.json +++ b/examples/search_examples/tsconfig.json @@ -20,7 +20,6 @@ "@kbn/data-views-plugin", "@kbn/inspector-plugin", "@kbn/kibana-utils-plugin", - "@kbn/kibana-react-plugin", "@kbn/navigation-plugin", "@kbn/share-plugin", "@kbn/developer-examples-plugin", @@ -34,5 +33,6 @@ "@kbn/shared-ux-router", "@kbn/search-response-warnings", "@kbn/shared-ux-link-redirect-app", + "@kbn/react-kibana-mount", ] } diff --git a/packages/core/apps/core-apps-server-internal/src/core_app.ts b/packages/core/apps/core-apps-server-internal/src/core_app.ts index 2639e15cca05e..c29fb2d7cc096 100644 --- a/packages/core/apps/core-apps-server-internal/src/core_app.ts +++ b/packages/core/apps/core-apps-server-internal/src/core_app.ts @@ -192,7 +192,7 @@ export class CoreAppsService { body: schema.recordOf(schema.string(), schema.any()), }, response: { - '200': { body: schema.object({ ok: schema.boolean() }) }, + '200': { body: () => schema.object({ ok: schema.boolean() }) }, }, }, }, 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 1d48fdbb24dc0..cf0fb81f7407e 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 @@ -202,7 +202,7 @@ export class ChromeService { // ChromeStyle is set to undefined by default, which means that no header will be rendered until // setChromeStyle(). This is to avoid a flickering between the "classic" and "project" header meanwhile // we load the user profile to check if the user opted out of the new solution navigation. - const chromeStyle$ = new BehaviorSubject(undefined); + const chromeStyleSubject$ = new BehaviorSubject(undefined); const getKbnVersionClass = () => { // we assume that the version is valid and has the form 'X.X.X' @@ -214,16 +214,20 @@ export class ChromeService { return `kbnVersion-${formattedVersionClass}`; }; + const chromeStyle$ = chromeStyleSubject$.pipe( + filter((style): style is ChromeStyle => style !== undefined), + takeUntil(this.stop$) + ); const setChromeStyle = (style: ChromeStyle) => { - if (style === chromeStyle$.getValue()) return; - chromeStyle$.next(style); + if (style === chromeStyleSubject$.getValue()) return; + chromeStyleSubject$.next(style); }; const headerBanner$ = new BehaviorSubject(undefined); const bodyClasses$ = combineLatest([ headerBanner$, this.isVisible$!, - chromeStyle$, + chromeStyleSubject$, application.currentActionMenu$, ]).pipe( map(([headerBanner, isVisible, chromeStyle, actionMenu]) => { @@ -267,7 +271,7 @@ export class ChromeService { const getIsNavDrawerLocked$ = isNavDrawerLocked$.pipe(takeUntil(this.stop$)); const validateChromeStyle = () => { - const chromeStyle = chromeStyle$.getValue(); + const chromeStyle = chromeStyleSubject$.getValue(); if (chromeStyle !== 'project') { // Helps ensure callers go through the serverless plugin to get here. throw new Error( @@ -348,7 +352,7 @@ export class ChromeService { } const getHeaderComponent = () => { - const defaultChromeStyle = chromeStyle$.getValue(); + const defaultChromeStyle = chromeStyleSubject$.getValue(); const HeaderComponent = () => { const isVisible = useObservable(this.isVisible$); @@ -530,12 +534,9 @@ export class ChromeService { getBodyClasses$: () => bodyClasses$.pipe(takeUntil(this.stop$)), setChromeStyle, - getChromeStyle$: () => - chromeStyle$.pipe( - filter((style): style is ChromeStyle => style !== undefined), - takeUntil(this.stop$) - ), + getChromeStyle$: () => chromeStyle$, getIsSideNavCollapsed$: () => this.isSideNavCollapsed$.asObservable(), + getActiveSolutionNavId$: () => projectNavigation.getActiveSolutionNavId$(), project: { setHome: setProjectHome, setCloudUrls: projectNavigation.setCloudUrls.bind(projectNavigation), 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 59becdebeb406..1f3efef5d7821 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 @@ -202,6 +202,8 @@ export class ProjectNavigationService { changeActiveSolutionNavigation: this.changeActiveSolutionNavigation.bind(this), /** In stateful Kibana, get the active solution navigation definition */ getActiveSolutionNavDefinition$: this.getActiveSolutionNavDefinition$.bind(this), + /** In stateful Kibana, get the id of the active solution navigation */ + getActiveSolutionNavId$: () => this.activeSolutionNavDefinitionId$.asObservable(), }; } diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx index 6ef44b08bddd0..0613a569fa187 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_nav_controls.tsx @@ -16,12 +16,13 @@ import { HeaderExtension } from './header_extension'; interface Props { navControls$: Observable; side?: 'left' | 'right'; + append?: JSX.Element | null; } -export function HeaderNavControls({ navControls$ }: Props) { +export function HeaderNavControls({ navControls$, append = null }: Props) { const navControls = useObservable(navControls$, []); - if (!navControls) { + if (!navControls || navControls.length === 0) { return null; } @@ -34,6 +35,7 @@ export function HeaderNavControls({ navControls$ }: Props) { ))} + {append} ); } diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx index 80f108c8be784..77aef1053a8a2 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx @@ -43,7 +43,7 @@ import { ScreenReaderRouteAnnouncements, SkipToMainContent } from '../header/scr import { AppMenuBar } from './app_menu'; import { ProjectNavigation } from './navigation'; -const getHeaderCss = ({ size }: EuiThemeComputed) => ({ +const getHeaderCss = ({ size, colors }: EuiThemeComputed) => ({ logo: { container: css` display: inline-block; @@ -73,6 +73,23 @@ const getHeaderCss = ({ size }: EuiThemeComputed) => ({ redirectAppLinksContainer: css` min-width: 0; // needed to enable breadcrumbs truncation `, + leftNavcontrols: css` + .navcontrols__separator { + display: flex; + margin-right: ${size.xs}; + &:after { + background: ${colors.lightShade}; + content: ''; + flex-shrink: 0; + margin-block-start: ${size.xs}; + margin-block-end: 0; + margin-inline: ${size.s}; + block-size: 16px; + inline-size: 1px; + transform: translateY(-1px) rotate(15deg); + } + } + `, }); type HeaderCss = ReturnType; @@ -207,6 +224,14 @@ export const ProjectHeader = ({ /> + + } + /> + + { getBodyClasses$: jest.fn(), getChromeStyle$: jest.fn(), setChromeStyle: jest.fn(), + getActiveSolutionNavId$: jest.fn(), project: { setHome: jest.fn(), setCloudUrls: jest.fn(), diff --git a/packages/core/chrome/core-chrome-browser/src/contracts.ts b/packages/core/chrome/core-chrome-browser/src/contracts.ts index 328c0142df9cc..aa03c1fdbe9a6 100644 --- a/packages/core/chrome/core-chrome-browser/src/contracts.ts +++ b/packages/core/chrome/core-chrome-browser/src/contracts.ts @@ -176,4 +176,9 @@ export interface ChromeStart { * Get an observable of the current collapsed state of the side nav. */ getIsSideNavCollapsed$(): Observable; + + /** + * Get the id of the currently active project navigation or `null` otherwise. + */ + getActiveSolutionNavId$(): Observable; } diff --git a/packages/core/http/core-http-router-server-internal/index.ts b/packages/core/http/core-http-router-server-internal/index.ts index 6643a1b887fab..17ef51df81675 100644 --- a/packages/core/http/core-http-router-server-internal/index.ts +++ b/packages/core/http/core-http-router-server-internal/index.ts @@ -11,6 +11,7 @@ export { versionHandlerResolvers, CoreVersionedRouter, ALLOWED_PUBLIC_VERSION, + unwrapVersionedResponseBodyValidation, type VersionedRouterRoute, type HandlerResolutionStrategy, } from './src/versioned_router'; diff --git a/packages/core/http/core-http-router-server-internal/src/router.test.ts b/packages/core/http/core-http-router-server-internal/src/router.test.ts index f3b25ba7e5696..cab011a5f0f72 100644 --- a/packages/core/http/core-http-router-server-internal/src/router.test.ts +++ b/packages/core/http/core-http-router-server-internal/src/router.test.ts @@ -8,9 +8,10 @@ import { Router, type RouterOptions } from './router'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { schema } from '@kbn/config-schema'; +import { isConfigSchema, schema } from '@kbn/config-schema'; import { createFooValidation } from './router.test.util'; import { createRequestMock } from '@kbn/hapi-mocks/src/request'; +import type { RouteValidatorRequestAndResponses } from '@kbn/core-http-server'; const mockResponse: any = { code: jest.fn().mockImplementation(() => mockResponse), @@ -32,6 +33,10 @@ const routerOptions: RouterOptions = { }; describe('Router', () => { + let testValidation: ReturnType; + beforeEach(() => { + testValidation = createFooValidation(); + }); afterEach(() => jest.clearAllMocks()); describe('#getRoutes', () => { it('returns expected route metadata', () => { @@ -81,12 +86,10 @@ describe('Router', () => { }); }); - const { fooValidation, validateBodyFn, validateOutputFn, validateParamsFn, validateQueryFn } = - createFooValidation(); - it.each([['static' as const], ['lazy' as const]])( 'runs %s route validations', async (staticOrLazy) => { + const { fooValidation } = testValidation; const router = new Router('', logger, enhanceWithContext, routerOptions); router.post( { @@ -104,6 +107,8 @@ describe('Router', () => { }), mockResponseToolkit ); + const { validateBodyFn, validateParamsFn, validateQueryFn, validateOutputFn } = + testValidation; expect(validateBodyFn).toHaveBeenCalledTimes(1); expect(validateParamsFn).toHaveBeenCalledTimes(1); expect(validateQueryFn).toHaveBeenCalledTimes(1); @@ -113,6 +118,16 @@ describe('Router', () => { it('constructs lazily provided validations once (idempotency)', async () => { const router = new Router('', logger, enhanceWithContext, routerOptions); + const { fooValidation } = testValidation; + + const response200 = fooValidation.response[200].body; + const lazyResponse200 = jest.fn(() => response200()); + fooValidation.response[200].body = lazyResponse200; + + const response404 = fooValidation.response[404].body; + const lazyResponse404 = jest.fn(() => response404()); + fooValidation.response[404].body = lazyResponse404; + const lazyValidation = jest.fn(() => fooValidation); router.post( { @@ -121,7 +136,7 @@ describe('Router', () => { }, (context, req, res) => res.ok() ); - const [{ handler }] = router.getRoutes(); + const [{ handler, validationSchemas }] = router.getRoutes(); for (let i = 0; i < 10; i++) { await handler( createRequestMock({ @@ -131,8 +146,25 @@ describe('Router', () => { }), mockResponseToolkit ); + + expect( + isConfigSchema( + ( + validationSchemas as () => RouteValidatorRequestAndResponses + )().response![200].body() + ) + ).toBe(true); + expect( + isConfigSchema( + ( + validationSchemas as () => RouteValidatorRequestAndResponses + )().response![404].body() + ) + ).toBe(true); } expect(lazyValidation).toHaveBeenCalledTimes(1); + expect(lazyResponse200).toHaveBeenCalledTimes(1); + expect(lazyResponse404).toHaveBeenCalledTimes(1); }); it('registers pluginId if provided', () => { diff --git a/packages/core/http/core-http-router-server-internal/src/router.test.util.ts b/packages/core/http/core-http-router-server-internal/src/router.test.util.ts index 110641d9ff0ac..0b98e4c293103 100644 --- a/packages/core/http/core-http-router-server-internal/src/router.test.util.ts +++ b/packages/core/http/core-http-router-server-internal/src/router.test.util.ts @@ -33,11 +33,18 @@ export function createFooValidation() { }, response: { 200: { - body: schema.object({ - foo: schema.number({ - validate: validateOutputFn, + body: () => + schema.object({ + foo: schema.number({ + validate: validateOutputFn, + }), + }), + }, + 404: { + body: () => + schema.object({ + error: schema.string(), }), - }), }, }, }; diff --git a/packages/core/http/core-http-router-server-internal/src/router.ts b/packages/core/http/core-http-router-server-internal/src/router.ts index cce67dc335577..9db0829355587 100644 --- a/packages/core/http/core-http-router-server-internal/src/router.ts +++ b/packages/core/http/core-http-router-server-internal/src/router.ts @@ -7,7 +7,6 @@ */ import type { Request, ResponseToolkit } from '@hapi/hapi'; -import { once } from 'lodash'; import apm from 'elastic-apm-node'; import { isConfigSchema } from '@kbn/config-schema'; import type { Logger } from '@kbn/logging'; @@ -35,6 +34,7 @@ import { kibanaResponseFactory } from './response'; import { HapiResponseAdapter } from './response_adapter'; import { wrapErrors } from './error_wrapper'; import { Method } from './versioned_router/types'; +import { prepareRouteConfigValidation } from './util'; export type ContextEnhancer< P, @@ -187,9 +187,7 @@ export class Router, internalOptions: { isVersioned: boolean } = { isVersioned: false } ) => { - if (typeof route.validate === 'function') { - route = { ...route, validate: once(route.validate) }; - } + route = prepareRouteConfigValidation(route); const routeSchemas = routeSchemasFromRouteConfig(route, method); this.routes.push({ diff --git a/packages/core/http/core-http-router-server-internal/src/util.test.ts b/packages/core/http/core-http-router-server-internal/src/util.test.ts new file mode 100644 index 0000000000000..8febff7b113f6 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/src/util.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 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 { RouteValidator } from '@kbn/core-http-server'; +import { prepareResponseValidation } from './util'; + +describe('prepareResponseValidation', () => { + it('wraps only expected values in "once"', () => { + const validation: RouteValidator = { + request: {}, + response: { + 200: { + body: jest.fn(() => schema.string()), + }, + 404: { + body: jest.fn(() => schema.string()), + }, + unsafe: { + body: true, + }, + }, + }; + + const prepared = prepareResponseValidation(validation.response!); + + expect(prepared).toEqual({ + 200: { body: expect.any(Function) }, + 404: { body: expect.any(Function) }, + unsafe: { body: true }, + }); + + [1, 2, 3].forEach(() => prepared[200].body()); + [1, 2, 3].forEach(() => prepared[404].body()); + + expect(validation.response![200].body).toHaveBeenCalledTimes(1); + expect(validation.response![404].body).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/core/http/core-http-router-server-internal/src/util.ts b/packages/core/http/core-http-router-server-internal/src/util.ts new file mode 100644 index 0000000000000..88bf7f7276116 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/src/util.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { once } from 'lodash'; +import { + isFullValidatorContainer, + type RouteConfig, + type RouteMethod, + type RouteValidator, +} from '@kbn/core-http-server'; +import type { ObjectType, Type } from '@kbn/config-schema'; + +function isStatusCode(key: string) { + return !isNaN(parseInt(key, 10)); +} + +interface ResponseValidation { + [statusCode: number]: { body: () => ObjectType | Type }; +} + +export function prepareResponseValidation(validation: ResponseValidation): ResponseValidation { + const responses = Object.entries(validation).map(([key, value]) => { + if (isStatusCode(key)) { + return [key, { body: once(value.body) }]; + } + return [key, value]; + }); + + return Object.fromEntries(responses); +} + +function prepareValidation(validator: RouteValidator) { + if (isFullValidatorContainer(validator) && validator.response) { + return { + ...validator, + response: prepareResponseValidation(validator.response), + }; + } + return validator; +} + +// Integration tested in ./routes.test.ts +export function prepareRouteConfigValidation( + config: RouteConfig +): RouteConfig { + // Calculating schema validation can be expensive so when it is provided lazily + // we only want to instantiate it once. This also provides idempotency guarantees + if (typeof config.validate === 'function') { + const validate = config.validate; + return { + ...config, + validate: once(() => prepareValidation(validate())), + }; + } else if (typeof config.validate === 'object' && typeof config.validate !== null) { + return { + ...config, + validate: prepareValidation(config.validate), + }; + } + return config; +} diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.test.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.test.ts index ac247f1a6b0ce..269d53cfd897c 100644 --- a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.test.ts +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.test.ts @@ -7,20 +7,28 @@ */ import type { ApiVersion } from '@kbn/core-http-common'; -import type { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core-http-server'; +import type { + KibanaResponseFactory, + RequestHandler, + RouteConfig, + VersionedRouteValidation, +} from '@kbn/core-http-server'; import { Router } from '../router'; import { createFooValidation } from '../router.test.util'; import { createRouter } from './mocks'; -import { CoreVersionedRouter } from '.'; +import { CoreVersionedRouter, unwrapVersionedResponseBodyValidation } from '.'; import { passThroughValidation } from './core_versioned_route'; import { Method } from './types'; import { createRequest } from './core_versioned_route.test.util'; +import { isConfigSchema } from '@kbn/config-schema'; describe('Versioned route', () => { let router: Router; let responseFactory: jest.Mocked; + let testValidation: ReturnType; const handlerFn: RequestHandler = async (ctx, req, res) => res.ok({ body: { foo: 1 } }); beforeEach(() => { + testValidation = createFooValidation(); responseFactory = { custom: jest.fn(({ body, statusCode }) => ({ options: {}, @@ -37,9 +45,6 @@ describe('Versioned route', () => { router = createRouter(); }); - const { fooValidation, validateBodyFn, validateOutputFn, validateParamsFn, validateQueryFn } = - createFooValidation(); - afterEach(() => { jest.clearAllMocks(); }); @@ -162,6 +167,8 @@ describe('Versioned route', () => { 'runs %s request validations', async (staticOrLazy) => { let handler: RequestHandler; + const { fooValidation, validateBodyFn, validateOutputFn, validateParamsFn, validateQueryFn } = + testValidation; (router.post as jest.Mock).mockImplementation((opts: unknown, fn) => (handler = fn)); const versionedRouter = CoreVersionedRouter.from({ router }); @@ -194,6 +201,16 @@ describe('Versioned route', () => { it('constructs lazily provided validations once (idempotency)', async () => { let handler: RequestHandler; + const { fooValidation } = testValidation; + + const response200 = fooValidation.response[200].body; + const lazyResponse200 = jest.fn(() => response200()); + fooValidation.response[200].body = lazyResponse200; + + const response404 = fooValidation.response[404].body; + const lazyResponse404 = jest.fn(() => response404()); + fooValidation.response[404].body = lazyResponse404; + (router.post as jest.Mock).mockImplementation((opts: unknown, fn) => (handler = fn)); const versionedRouter = CoreVersionedRouter.from({ router }); const lazyValidation = jest.fn(() => fooValidation); @@ -216,10 +233,29 @@ describe('Versioned route', () => { }), responseFactory ); + const [route] = versionedRouter.getRoutes(); + const [ + { + options: { validate }, + }, + ] = route.handlers; + + const res200 = (validate as () => VersionedRouteValidation)() + .response![200].body; + + expect(isConfigSchema(unwrapVersionedResponseBodyValidation(res200))).toBe(true); + + const res404 = (validate as () => VersionedRouteValidation)() + .response![404].body; + + expect(isConfigSchema(unwrapVersionedResponseBodyValidation(res404))).toBe(true); + expect(status).toBe(200); } expect(lazyValidation).toHaveBeenCalledTimes(1); + expect(lazyResponse200).toHaveBeenCalledTimes(1); + expect(lazyResponse404).toHaveBeenCalledTimes(1); }); describe('when in dev', () => { @@ -232,8 +268,10 @@ describe('Versioned route', () => { ).toThrow(/Invalid public version/); }); - it('also runs response validations', async () => { + it('runs response validations', async () => { let handler: RequestHandler; + const { fooValidation, validateBodyFn, validateOutputFn, validateParamsFn, validateQueryFn } = + testValidation; (router.post as jest.Mock).mockImplementation((opts: unknown, fn) => (handler = fn)); const versionedRouter = CoreVersionedRouter.from({ router, isDev: true }); @@ -262,6 +300,42 @@ describe('Versioned route', () => { expect(validateQueryFn).toHaveBeenCalledTimes(1); expect(validateOutputFn).toHaveBeenCalledTimes(1); }); + + it('runs custom response validations', async () => { + let handler: RequestHandler; + const { fooValidation, validateBodyFn, validateOutputFn, validateParamsFn, validateQueryFn } = + testValidation; + + const custom = jest.fn(() => ({ value: 1 })); + fooValidation.response[200].body = { custom } as any; + (router.post as jest.Mock).mockImplementation((opts: unknown, fn) => (handler = fn)); + const versionedRouter = CoreVersionedRouter.from({ router, isDev: true }); + versionedRouter.post({ path: '/test/{id}', access: 'internal' }).addVersion( + { + version: '1', + validate: fooValidation, + }, + handlerFn + ); + + const kibanaResponse = await handler!( + {} as any, + createRequest({ + version: '1', + body: { foo: 1 }, + params: { foo: 1 }, + query: { foo: 1 }, + }), + responseFactory + ); + + expect(kibanaResponse.status).toBe(200); + expect(validateBodyFn).toHaveBeenCalledTimes(1); + expect(validateParamsFn).toHaveBeenCalledTimes(1); + expect(validateQueryFn).toHaveBeenCalledTimes(1); + expect(validateOutputFn).toHaveBeenCalledTimes(0); + expect(custom).toHaveBeenCalledTimes(1); + }); }); it('allows using default resolution for specific internal routes', async () => { diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts index bdd6ff2e06856..704520d26d8a8 100644 --- a/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/core_versioned_route.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ import { schema } from '@kbn/config-schema'; -import { once } from 'lodash'; import { ELASTIC_HTTP_VERSION_HEADER, ELASTIC_HTTP_VERSION_QUERY_PARAM, @@ -38,6 +37,7 @@ import { import { injectResponseHeaders } from './inject_response_headers'; import { resolvers } from './handler_resolvers'; +import { prepareVersionedRouteValidation, unwrapVersionedResponseBodyValidation } from './util'; type Options = AddVersionOpts; @@ -170,7 +170,7 @@ export class CoreVersionedRoute implements VersionedRoute { Boolean(validation.request.body || validation.request.params || validation.request.query) ) { try { - const { body, params, query } = validate(req, validation.request, handler.options.version); + const { body, params, query } = validate(req, validation.request); req.body = body; req.params = params; req.query = query; @@ -189,12 +189,14 @@ export class CoreVersionedRoute implements VersionedRoute { const response = await handler.fn(ctx, req, res); if (this.router.isDev && validation?.response?.[response.status]) { - const responseValidation = validation.response[response.status]; + const { [response.status]: responseValidation, unsafe } = validation.response; try { validate( { body: response.payload }, - { body: responseValidation.body, unsafe: { body: validation.response.unsafe?.body } }, - handler.options.version + { + body: unwrapVersionedResponseBodyValidation(responseValidation.body), + unsafe: { body: unsafe?.body }, + } ); } catch (e) { return res.custom({ @@ -238,13 +240,10 @@ export class CoreVersionedRoute implements VersionedRoute { public addVersion(options: Options, handler: RequestHandler): VersionedRoute { this.validateVersion(options.version); + options = prepareVersionedRouteValidation(options); this.handlers.set(options.version, { fn: handler, - options: { - ...options, - validate: - typeof options.validate === 'function' ? once(options.validate) : options.validate, - }, + options, }); return this; } diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/index.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/index.ts index 6511bcabdd057..680f8455ac630 100644 --- a/packages/core/http/core-http-router-server-internal/src/versioned_router/index.ts +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/index.ts @@ -9,3 +9,4 @@ export { resolvers as versionHandlerResolvers } from './handler_resolvers'; export { CoreVersionedRouter } from './core_versioned_router'; export type { HandlerResolutionStrategy, VersionedRouterRoute } from './types'; export { ALLOWED_PUBLIC_VERSION } from './route_version_utils'; +export { unwrapVersionedResponseBodyValidation } from './util'; diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/util.test.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/util.test.ts new file mode 100644 index 0000000000000..b9ef74c11fa3c --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/util.test.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { VersionedRouteResponseValidation } from '@kbn/core-http-server'; +import { isCustomValidation, unwrapVersionedResponseBodyValidation } from './util'; + +test.each([ + [() => schema.object({}), false], + [{ custom: () => ({ value: 1 }) }, true], +])('isCustomValidation correctly detects custom validation %#', (input, result) => { + expect(isCustomValidation(input)).toBe(result); +}); + +test('unwrapVersionedResponseBodyValidation', () => { + const mySchema = schema.object({}); + const custom = () => ({ value: 'ok' }); + const validation: VersionedRouteResponseValidation = { + 200: { + body: () => mySchema, + }, + 404: { + body: { custom }, + }, + }; + + expect(unwrapVersionedResponseBodyValidation(validation[200].body)).toBe(mySchema); + expect(unwrapVersionedResponseBodyValidation(validation[404].body)).toBe(custom); +}); diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/util.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/util.ts new file mode 100644 index 0000000000000..ddd546be5bab5 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/util.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 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 { once } from 'lodash'; +import type { + AddVersionOpts, + RouteValidationSpec, + VersionedRouteCustomResponseBodyValidation, + VersionedResponseBodyValidation, + VersionedRouteResponseValidation, + VersionedRouteValidation, +} from '@kbn/core-http-server'; + +export function isCustomValidation( + v: VersionedRouteCustomResponseBodyValidation | VersionedResponseBodyValidation +): v is VersionedRouteCustomResponseBodyValidation { + return 'custom' in v; +} + +/** + * Utility for unwrapping versioned router response validation to + * {@link RouteValidationSpec}. + * + * @param validation - versioned response body validation + * @internal + */ +export function unwrapVersionedResponseBodyValidation( + validation: VersionedRouteResponseValidation[number]['body'] +): RouteValidationSpec { + if (isCustomValidation(validation)) { + return validation.custom; + } + return validation(); +} + +function prepareValidation(validation: VersionedRouteValidation) { + if (validation.response) { + const { unsafe, ...responseValidations } = validation.response; + const result: VersionedRouteResponseValidation = {}; + + for (const [key, { body }] of Object.entries(responseValidations)) { + result[key as unknown as number] = { body: isCustomValidation(body) ? body : once(body) }; + } + + return { + ...validation, + response: { + ...validation.response, + ...result, + }, + }; + } + return validation; +} + +// Integration tested in ./core_versioned_route.test.ts +export function prepareVersionedRouteValidation( + options: AddVersionOpts +): AddVersionOpts { + if (typeof options.validate === 'function') { + const validate = options.validate; + return { + ...options, + validate: once(() => prepareValidation(validate())), + }; + } else if (typeof options.validate === 'object' && options.validate !== null) { + return { + ...options, + validate: prepareValidation(options.validate), + }; + } + return options; +} diff --git a/packages/core/http/core-http-router-server-internal/src/versioned_router/validate.ts b/packages/core/http/core-http-router-server-internal/src/versioned_router/validate.ts index ef03c1098fc45..1cd2e00910215 100644 --- a/packages/core/http/core-http-router-server-internal/src/versioned_router/validate.ts +++ b/packages/core/http/core-http-router-server-internal/src/versioned_router/validate.ts @@ -7,14 +7,12 @@ */ import type { RouteValidatorFullConfigRequest } from '@kbn/core-http-server'; -import type { ApiVersion } from '@kbn/core-http-server'; import { RouteValidator } from '../validator'; /** Will throw if any of the validation checks fail */ export function validate( data: { body?: unknown; params?: unknown; query?: unknown }, - runtimeSchema: RouteValidatorFullConfigRequest, - version: ApiVersion + runtimeSchema: RouteValidatorFullConfigRequest ): { body: unknown; params: unknown; query: unknown } { const validator = RouteValidator.from(runtimeSchema); return { diff --git a/packages/core/http/core-http-server-internal/src/static_assets/static_assets.test.ts b/packages/core/http/core-http-server-internal/src/static_assets/static_assets.test.ts index 438a87765d85e..9d2c58e85b8ae 100644 --- a/packages/core/http/core-http-server-internal/src/static_assets/static_assets.test.ts +++ b/packages/core/http/core-http-server-internal/src/static_assets/static_assets.test.ts @@ -35,6 +35,19 @@ describe('StaticAssets', () => { }); }); + describe('#isUsingCdn()', () => { + it('returns false when the CDN is not configured', () => { + staticAssets = new StaticAssets(args); + expect(staticAssets.isUsingCdn()).toBe(false); + }); + + it('returns true when the CDN is configured', () => { + args.cdnConfig = CdnConfig.from({ url: 'https://cdn.example.com/test' }); + staticAssets = new StaticAssets(args); + expect(staticAssets.isUsingCdn()).toBe(true); + }); + }); + describe('#getPluginAssetHref()', () => { it('returns the expected value when CDN is not configured', () => { staticAssets = new StaticAssets(args); diff --git a/packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts b/packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts index f5f7d7ac80430..f67dfbc46d9b7 100644 --- a/packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts +++ b/packages/core/http/core-http-server-internal/src/static_assets/static_assets.ts @@ -16,6 +16,11 @@ import { export interface InternalStaticAssets { getHrefBase(): string; + /** + * Returns true if a CDN has been configured and should be used to serve static assets. + * Should only be used in scenarios where different behavior has to be used when CDN is enabled or not. + */ + isUsingCdn(): boolean; /** * Intended for use by server code rendering UI or generating links to static assets * that will ultimately be called from the browser and must respect settings like @@ -67,6 +72,10 @@ export class StaticAssets implements InternalStaticAssets { this.assetsServerPathBase = `/${shaDigest}`; } + public isUsingCdn() { + return this.hasCdnHost; + } + /** * Returns a href (hypertext reference) intended to be used as the base for constructing * other hrefs to static assets. diff --git a/packages/core/http/core-http-server-mocks/src/http_service.mock.ts b/packages/core/http/core-http-server-mocks/src/http_service.mock.ts index 7172accf98a9f..01f8c99bf2332 100644 --- a/packages/core/http/core-http-server-mocks/src/http_service.mock.ts +++ b/packages/core/http/core-http-server-mocks/src/http_service.mock.ts @@ -87,6 +87,7 @@ const createInternalStaticAssetsMock = ( basePath: BasePathMocked, cdnUrl: undefined | string = undefined ): InternalStaticAssetsMocked => ({ + isUsingCdn: jest.fn().mockReturnValue(!!cdnUrl), getHrefBase: jest.fn().mockReturnValue(cdnUrl ?? basePath.serverBasePath), getPluginAssetHref: jest.fn().mockReturnValue(cdnUrl ?? basePath.serverBasePath), getPluginServerPath: jest.fn((v, _) => v), diff --git a/packages/core/http/core-http-server/index.ts b/packages/core/http/core-http-server/index.ts index fef0a3cb19ebc..f30550bf943f7 100644 --- a/packages/core/http/core-http-server/index.ts +++ b/packages/core/http/core-http-server/index.ts @@ -104,6 +104,7 @@ export type { RouteValidatorRequestAndResponses, RouteValidatorFullConfigRequest, RouteValidatorFullConfigResponse, + LazyValidator, } from './src/router'; export { validBodyOutput, @@ -151,6 +152,8 @@ export type { VersionedRouteConfig, VersionedRouteRegistrar, VersionedRouter, + VersionedRouteCustomResponseBodyValidation, + VersionedResponseBodyValidation, } from './src/versioning'; export type { IStaticAssets } from './src/static_assets'; diff --git a/packages/core/http/core-http-server/src/router/index.ts b/packages/core/http/core-http-server/src/router/index.ts index 61ef84a48c63f..cee2bf39e0b32 100644 --- a/packages/core/http/core-http-server/src/router/index.ts +++ b/packages/core/http/core-http-server/src/router/index.ts @@ -62,6 +62,7 @@ export type { RouteValidatorOptions, RouteValidator, RouteValidatorRequestAndResponses, + LazyValidator, } from './route_validator'; export { RouteValidationError } from './route_validator'; export type { IRouter, RouteRegistrar, RouterRoute } from './router'; diff --git a/packages/core/http/core-http-server/src/router/route_validator.ts b/packages/core/http/core-http-server/src/router/route_validator.ts index 2717117298673..9bcb77d4ce5d9 100644 --- a/packages/core/http/core-http-server/src/router/route_validator.ts +++ b/packages/core/http/core-http-server/src/router/route_validator.ts @@ -131,10 +131,33 @@ export type RouteValidatorFullConfigRequest = RouteValidatorConfig schema.object({ foo: foo.string() }); + * + * type ResponseType = TypeOf; // Can take a func + * ... + * router.post( + * { validation: { response: responseSchema } }, + * handlerFn + * ) + * ... + * ``` * @public */ export interface RouteValidatorFullConfigResponse { - [statusCode: number]: { body: ObjectType | Type }; + [statusCode: number]: { body: LazyValidator }; unsafe?: { body?: boolean; }; @@ -146,6 +169,9 @@ export interface RouteValidatorFullConfigResponse { */ export interface RouteValidatorRequestAndResponses { request: RouteValidatorFullConfigRequest; + /** + * Response schemas for your route. + */ response?: RouteValidatorFullConfigResponse; } @@ -156,3 +182,14 @@ export interface RouteValidatorRequestAndResponses { export type RouteValidator = | RouteValidatorFullConfigRequest | RouteValidatorRequestAndResponses; + +/** + * A validation schema factory. + * + * @note Used to lazily create schemas that are otherwise not needed + * @note Assume this function will only be called once + * + * @return A @kbn/config-schema schema + * @public + */ +export type LazyValidator = () => Type; diff --git a/packages/core/http/core-http-server/src/versioning/index.ts b/packages/core/http/core-http-server/src/versioning/index.ts index 6bdb36b4c93bf..644199c09f02c 100644 --- a/packages/core/http/core-http-server/src/versioning/index.ts +++ b/packages/core/http/core-http-server/src/versioning/index.ts @@ -16,4 +16,6 @@ export type { VersionedRouteConfig, VersionedRouteRegistrar, VersionedRouter, + VersionedRouteCustomResponseBodyValidation, + VersionedResponseBodyValidation, } from './types'; diff --git a/packages/core/http/core-http-server/src/versioning/types.ts b/packages/core/http/core-http-server/src/versioning/types.ts index b064b07841777..baa550b253544 100644 --- a/packages/core/http/core-http-server/src/versioning/types.ts +++ b/packages/core/http/core-http-server/src/versioning/types.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import type { Type } from '@kbn/config-schema'; import type { ApiVersion } from '@kbn/core-http-common'; import type { MaybePromise } from '@kbn/utility-types'; import type { @@ -18,6 +17,7 @@ import type { RouteValidatorFullConfigRequest, RequestHandlerContextBase, RouteValidationFunction, + LazyValidator, } from '../..'; type RqCtx = RequestHandlerContextBase; @@ -203,8 +203,47 @@ export interface VersionedRouter { export type VersionedRouteRequestValidation = RouteValidatorFullConfigRequest; /** @public */ +export interface VersionedRouteCustomResponseBodyValidation { + /** A custom validation function */ + custom: RouteValidationFunction; +} + +/** @public */ +export type VersionedResponseBodyValidation = + | LazyValidator + | VersionedRouteCustomResponseBodyValidation; + +/** + * Map of response status codes to response schemas + * + * @note Instantiating response schemas is expensive, especially when it is + * not needed in most cases. See example below to ensure this is lazily + * provided. + * + * @note The {@link TypeOf} type utility from @kbn/config-schema can extract + * types from lazily created schemas + * + * @example + * ```ts + * // Avoid this: + * const badResponseSchema = schema.object({ foo: foo.string() }); + * // Do this: + * const goodResponseSchema = () => schema.object({ foo: foo.string() }); + * + * type ResponseType = TypeOf; + * ... + * .addVersion( + * { ... validation: { response: { 200: { body: goodResponseSchema } } } }, + * handlerFn + * ) + * ... + * ``` + * @public + */ export interface VersionedRouteResponseValidation { - [statusCode: number]: { body: RouteValidationFunction | Type }; + [statusCode: number]: { + body: VersionedResponseBodyValidation; + }; unsafe?: { body?: boolean }; } @@ -219,9 +258,11 @@ export interface VersionedRouteValidation { */ request?: VersionedRouteRequestValidation; /** - * Validation to run against route output + * Validation to run against route output. + * * @note This validation is only intended to run in development. Do not use this * for setting default values! + * * @public */ response?: VersionedRouteResponseValidation; diff --git a/packages/core/i18n/core-i18n-server-internal/index.ts b/packages/core/i18n/core-i18n-server-internal/index.ts index e4709a8cd7b83..e7a7daa801609 100644 --- a/packages/core/i18n/core-i18n-server-internal/index.ts +++ b/packages/core/i18n/core-i18n-server-internal/index.ts @@ -8,3 +8,5 @@ export type { I18nConfigType, InternalI18nServicePreboot } from './src'; export { config, I18nService } from './src'; +export { getKibanaTranslationFiles } from './src/get_kibana_translation_files'; +export { supportedLocale } from './src/constants'; diff --git a/packages/kbn-es-query/src/kuery/grammar/__mocks__/index.ts b/packages/core/i18n/core-i18n-server-internal/src/constants.ts similarity index 73% rename from packages/kbn-es-query/src/kuery/grammar/__mocks__/index.ts rename to packages/core/i18n/core-i18n-server-internal/src/constants.ts index c8466fead14a1..c662f77b6adbf 100644 --- a/packages/kbn-es-query/src/kuery/grammar/__mocks__/index.ts +++ b/packages/core/i18n/core-i18n-server-internal/src/constants.ts @@ -6,4 +6,7 @@ * Side Public License, v 1. */ -export { parse } from './grammar'; +/** + * List of all locales that are officially supported. + */ +export const supportedLocale = ['en', 'fr-FR', 'ja-JP', 'zh-CN']; 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 830df5c94e008..7844319de1df9 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 @@ -272,9 +272,7 @@ export function createPluginSetupContext({ registerGlobal: deps.uiSettings.registerGlobal, setAllowlist: deps.uiSettings.setAllowlist, }, - userSettings: { - setUserProfileSettings: deps.userSettings.setUserProfileSettings, - }, + userSettings: {}, getStartServices: () => plugin.startDependencies, deprecations: deps.deprecations.getRegistry(plugin.name), coreUsageData: { diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts index 2f87f6dd27a37..285553ba46a1b 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts +++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts @@ -129,7 +129,7 @@ describe('bootstrapRenderer', () => { }); it('calls getThemeTag with values (true/dark) from the UserSettingsService when provided', async () => { - userSettingsService.getUserSettingDarkMode.mockReturnValueOnce(true); + userSettingsService.getUserSettingDarkMode.mockResolvedValueOnce(true); renderer = bootstrapRendererFactory({ auth, @@ -155,7 +155,7 @@ describe('bootstrapRenderer', () => { }); it('calls getThemeTag with values (false/light) from the UserSettingsService when provided', async () => { - userSettingsService.getUserSettingDarkMode.mockReturnValueOnce(false); + userSettingsService.getUserSettingDarkMode.mockResolvedValueOnce(false); renderer = bootstrapRendererFactory({ auth, @@ -181,7 +181,7 @@ describe('bootstrapRenderer', () => { }); it('calls getThemeTag with values from the UiSettingsClient when values (false/light) from UserSettingsService are `undefined`', async () => { - userSettingsService.getUserSettingDarkMode.mockReturnValueOnce(undefined); + userSettingsService.getUserSettingDarkMode.mockResolvedValueOnce(undefined); renderer = bootstrapRendererFactory({ auth, @@ -207,7 +207,7 @@ describe('bootstrapRenderer', () => { }); it('calls getThemeTag with values from the UiSettingsClient when values (true/dark) from UserSettingsService are `undefined`', async () => { - userSettingsService.getUserSettingDarkMode.mockReturnValueOnce(undefined); + userSettingsService.getUserSettingDarkMode.mockResolvedValueOnce(undefined); renderer = bootstrapRendererFactory({ auth, diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts index 7ebb97fb0779b..b07b8a1cd6fa1 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts +++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts @@ -258,6 +258,42 @@ function renderTestCases( const data = JSON.parse(dom('kbn-injected-metadata').attr('data') ?? '""'); expect(data.logging).toEqual(loggingConfig); }); + + it('use the correct translation url when CDN is enabled', async () => { + const userSettings = { 'theme:darkMode': { userValue: true } }; + uiSettings.client.getUserProvided.mockResolvedValue(userSettings); + + const [render, deps] = await getRender(); + + (deps.http.staticAssets.getHrefBase as jest.Mock).mockReturnValueOnce('http://foo.bar:1773'); + (deps.http.staticAssets.isUsingCdn as jest.Mock).mockReturnValueOnce(true); + + const content = await render(createKibanaRequest(), uiSettings, { + isAnonymousPage: false, + }); + const dom = load(content); + const data = JSON.parse(dom('kbn-injected-metadata').attr('data') ?? '""'); + expect(data.i18n.translationsUrl).toEqual('http://foo.bar:1773/translations/en.json'); + }); + + it('use the correct translation url when CDN is disabled', async () => { + const userSettings = { 'theme:darkMode': { userValue: true } }; + uiSettings.client.getUserProvided.mockResolvedValue(userSettings); + + const [render, deps] = await getRender(); + + (deps.http.staticAssets.getHrefBase as jest.Mock).mockReturnValueOnce('http://foo.bar:1773'); + (deps.http.staticAssets.isUsingCdn as jest.Mock).mockReturnValueOnce(false); + + const content = await render(createKibanaRequest(), uiSettings, { + isAnonymousPage: false, + }); + const dom = load(content); + const data = JSON.parse(dom('kbn-injected-metadata').attr('data') ?? '""'); + expect(data.i18n.translationsUrl).toEqual( + '/mock-server-basepath/translations/MOCK_HASH/en.json' + ); + }); }); } diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx index cf97bad34fc60..498cc60b49376 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx +++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx @@ -130,6 +130,7 @@ export class RenderingService { packageInfo: this.coreContext.env.packageInfo, }; const staticAssetsHrefBase = http.staticAssets.getHrefBase(); + const usingCdn = http.staticAssets.isUsingCdn(); const basePath = http.basePath.get(request); const { serverBasePath, publicBaseUrl } = http.basePath; @@ -205,8 +206,14 @@ export class RenderingService { const loggingConfig = await getBrowserLoggingConfig(this.coreContext.configService); - const translationHash = i18n.getTranslationHash(); - const translationsUrl = `${serverBasePath}/translations/${translationHash}/${i18nLib.getLocale()}.json`; + const locale = i18nLib.getLocale(); + let translationsUrl: string; + if (usingCdn) { + translationsUrl = `${staticAssetsHrefBase}/translations/${locale}.json`; + } else { + const translationHash = i18n.getTranslationHash(); + translationsUrl = `${serverBasePath}/translations/${translationHash}/${locale}.json`; + } const filteredPlugins = filterUiPlugins({ uiPlugins, isAnonymousPage }); const bootstrapScript = isAnonymousPage ? 'bootstrap-anonymous.js' : 'bootstrap.js'; @@ -215,7 +222,7 @@ export class RenderingService { uiPublicUrl: `${staticAssetsHrefBase}/ui`, bootstrapScriptUrl: `${basePath}/${bootstrapScript}`, i18n: i18nLib.translate, - locale: i18nLib.getLocale(), + locale, themeVersion, darkMode, stylesheetPaths: commonStylesheetPaths, @@ -239,7 +246,6 @@ export class RenderingService { clusterInfo, anonymousStatusPage: status?.isStatusPageAnonymous() ?? false, i18n: { - // TODO: Make this load as part of static assets! translationsUrl, }, theme: { 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 60073cc5fcfd4..2b9e55d466f54 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 @@ -219,6 +219,7 @@ test('runs services on "start"', async () => { expect(mockCustomBrandingService.start).toHaveBeenCalledTimes(1); expect(mockSecurityService.start).toHaveBeenCalledTimes(1); expect(mockUserProfileService.start).toHaveBeenCalledTimes(1); + expect(mockUserSettingsService.start).toHaveBeenCalledTimes(1); }); test('does not fail on "setup" if there are unused paths detected', 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 fc34e151e657f..5613a70fce97f 100644 --- a/packages/core/root/core-root-server-internal/src/server.ts +++ b/packages/core/root/core-root-server-internal/src/server.ts @@ -386,6 +386,7 @@ export class Server { const analyticsStart = this.analytics.start(); const securityStart = this.security.start(); const userProfileStart = this.userProfile.start(); + this.userSettingsService.start({ userProfile: userProfileStart }); const executionContextStart = this.executionContext.start(); const docLinkStart = this.docLinks.start(); diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts index c9341a0af49a4..d4a220630f036 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts @@ -58,30 +58,30 @@ export const registerBulkCreateRoute = ( ), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'post', path: '/api/saved_objects/_bulk_create', - req, + request, logger, }); - const { overwrite } = req.query; + const { overwrite } = request.query; + const types = [...new Set(request.body.map(({ type }) => type))]; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsBulkCreate({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsBulkCreate({ request, types }).catch(() => {}); const { savedObjects } = await context.core; - const typesToCheck = [...new Set(req.body.map(({ type }) => type))]; if (!allowHttpApiAccess) { - throwIfAnyTypeNotVisibleByAPI(typesToCheck, savedObjects.typeRegistry); + throwIfAnyTypeNotVisibleByAPI(types, savedObjects.typeRegistry); } - const result = await savedObjects.client.bulkCreate(req.body, { + const result = await savedObjects.client.bulkCreate(request.body, { overwrite, migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts index 1d3c52a581da5..cc5b3eee69007 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts @@ -43,25 +43,26 @@ export const registerBulkDeleteRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'post', path: '/api/saved_objects/_bulk_delete', - req, + request, logger, }); - const { force } = req.query; + const { force } = request.query; + const types = [...new Set(request.body.map(({ type }) => type))]; + const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsBulkDelete({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsBulkDelete({ request, types }).catch(() => {}); const { savedObjects } = await context.core; - const typesToCheck = [...new Set(req.body.map(({ type }) => type))]; if (!allowHttpApiAccess) { - throwIfAnyTypeNotVisibleByAPI(typesToCheck, savedObjects.typeRegistry); + throwIfAnyTypeNotVisibleByAPI(types, savedObjects.typeRegistry); } - const statuses = await savedObjects.client.bulkDelete(req.body, { force }); - return res.ok({ body: statuses }); + const statuses = await savedObjects.client.bulkDelete(request.body, { force }); + return response.ok({ body: statuses }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts index ee9fb6c6bba7b..845a825351a91 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts @@ -42,25 +42,27 @@ export const registerBulkGetRoute = ( ), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'post', path: '/api/saved_objects/_bulk_get', - req, + request, logger, }); + const types = [...new Set(request.body.map(({ type }) => type))]; + const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsBulkGet({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsBulkGet({ request, types }).catch(() => {}); const { savedObjects } = await context.core; - const typesToCheck = [...new Set(req.body.map(({ type }) => type))]; + if (!allowHttpApiAccess) { - throwIfAnyTypeNotVisibleByAPI(typesToCheck, savedObjects.typeRegistry); + throwIfAnyTypeNotVisibleByAPI(types, savedObjects.typeRegistry); } - const result = await savedObjects.client.bulkGet(req.body, { + const result = await savedObjects.client.bulkGet(request.body, { migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts index 1ea31071f2618..65e91400160f1 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts @@ -40,25 +40,26 @@ export const registerBulkResolveRoute = ( ), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'post', path: '/api/saved_objects/_bulk_resolve', - req, + request, logger, }); + const types = [...new Set(request.body.map(({ type }) => type))]; + const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsBulkResolve({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsBulkResolve({ request, types }).catch(() => {}); const { savedObjects } = await context.core; - const typesToCheck = [...new Set(req.body.map(({ type }) => type))]; if (!allowHttpApiAccess) { - throwIfAnyTypeNotVisibleByAPI(typesToCheck, savedObjects.typeRegistry); + throwIfAnyTypeNotVisibleByAPI(types, savedObjects.typeRegistry); } - const result = await savedObjects.client.bulkResolve(req.body, { + const result = await savedObjects.client.bulkResolve(request.body, { migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts index 4aacc320e9ee6..c3784c96de9da 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts @@ -52,24 +52,25 @@ export const registerBulkUpdateRoute = ( ), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'put', path: '/api/saved_objects/_bulk_update', - req, + request, logger, }); + const types = [...new Set(request.body.map(({ type }) => type))]; + const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsBulkUpdate({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsBulkUpdate({ request, types }).catch(() => {}); const { savedObjects } = await context.core; - const typesToCheck = [...new Set(req.body.map(({ type }) => type))]; if (!allowHttpApiAccess) { - throwIfAnyTypeNotVisibleByAPI(typesToCheck, savedObjects.typeRegistry); + throwIfAnyTypeNotVisibleByAPI(types, savedObjects.typeRegistry); } - const savedObject = await savedObjects.client.bulkUpdate(req.body); - return res.ok({ body: savedObject }); + const savedObject = await savedObjects.client.bulkUpdate(request.body); + return response.ok({ body: savedObject }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts index 75c2a6634d61e..f4eeb364a756a 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts @@ -57,15 +57,15 @@ export const registerCreateRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'post', path: '/api/saved_objects/{type}/{id?}', - req, + request, logger, }); - const { type, id } = req.params; - const { overwrite } = req.query; + const { type, id } = request.params; + const { overwrite } = request.query; const { attributes, migrationVersion, @@ -73,10 +73,10 @@ export const registerCreateRoute = ( typeMigrationVersion, references, initialNamespaces, - } = req.body; + } = request.body; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsCreate({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsCreate({ request, types: [type] }).catch(() => {}); const { savedObjects } = await context.core; if (!allowHttpApiAccess) { @@ -93,7 +93,7 @@ export const registerCreateRoute = ( migrationVersionCompatibility: 'compatible' as const, }; const result = await savedObjects.client.create(type, attributes, options); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts index a36c14b7c1672..c44c2a1208aff 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts @@ -41,25 +41,25 @@ export const registerDeleteRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'delete', path: '/api/saved_objects/{type}/{id}', - req, + request, logger, }); - const { type, id } = req.params; - const { force } = req.query; + const { type, id } = request.params; + const { force } = request.query; const { getClient, typeRegistry } = (await context.core).savedObjects; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsDelete({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsDelete({ request, types: [type] }).catch(() => {}); if (!allowHttpApiAccess) { throwIfTypeNotVisibleByAPI(type, typeRegistry); } const client = getClient(); const result = await client.delete(type, id, { force }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts index 1d8a55b9e3fdc..91ff609767acc 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts @@ -164,20 +164,20 @@ export const registerExportRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { - const cleaned = cleanOptions(req.body); + catchAndReturnBoomErrors(async (context, request, response) => { + const cleaned = cleanOptions(request.body); const { typeRegistry, getExporter, getClient } = (await context.core).savedObjects; const supportedTypes = typeRegistry.getImportableAndExportableTypes().map((t) => t.name); let options: EitherExportOptions; try { options = validateOptions(cleaned, { - request: req, + request, exportSizeLimit: maxImportExportSize, supportedTypes, }); } catch (e) { - return res.badRequest({ + return response.badRequest({ body: e, }); } @@ -191,7 +191,11 @@ export const registerExportRoute = ( const usageStatsClient = coreUsageData.getClient(); usageStatsClient - .incrementSavedObjectsExport({ request: req, types: cleaned.types, supportedTypes }) + .incrementSavedObjectsExport({ + request, + types: cleaned.types ?? [], + supportedTypes, + }) .catch(() => {}); try { @@ -207,7 +211,7 @@ export const registerExportRoute = ( createConcatStream([]), ]); - return res.ok({ + return response.ok({ body: docsToExport.join('\n'), headers: { 'Content-Disposition': `attachment; filename="export.ndjson"`, @@ -216,7 +220,7 @@ export const registerExportRoute = ( }); } catch (e) { if (e instanceof SavedObjectsExportError) { - return res.badRequest({ + return response.badRequest({ body: { message: e.message, attributes: e.attributes, diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts index 2058dd3188638..05747f074ab6b 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts @@ -62,20 +62,22 @@ export const registerFindRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'get', path: '/api/saved_objects/_find', - req, + request, logger, }); - const query = req.query; - + const query = request.query; + const types: string[] = Array.isArray(query.type) ? query.type : [query.type]; const namespaces = - typeof req.query.namespaces === 'string' ? [req.query.namespaces] : req.query.namespaces; + typeof request.query.namespaces === 'string' + ? [request.query.namespaces] + : request.query.namespaces; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsFind({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsFind({ request, types }).catch(() => {}); // manually validate to avoid using JSON.parse twice let aggs; @@ -83,7 +85,7 @@ export const registerFindRoute = ( try { aggs = JSON.parse(query.aggs); } catch (e) { - return res.badRequest({ + return response.badRequest({ body: { message: 'invalid aggs value', }, @@ -93,9 +95,7 @@ export const registerFindRoute = ( const { savedObjects } = await context.core; // check if registered type(s)are exposed to the global SO Http API's. - const findForTypes = Array.isArray(query.type) ? query.type : [query.type]; - - const unsupportedTypes = [...new Set(findForTypes)].filter((tname) => { + const unsupportedTypes = [...new Set(types)].filter((tname) => { const fullType = savedObjects.typeRegistry.getType(tname); // pass unknown types through to the registry to handle if (!fullType?.hidden && fullType?.hiddenFromHttpApis) { @@ -109,7 +109,7 @@ export const registerFindRoute = ( const result = await savedObjects.client.find({ perPage: query.per_page, page: query.page, - type: findForTypes, + type: types, search: query.search, defaultSearchOperator: query.default_search_operator, searchFields: @@ -126,7 +126,7 @@ export const registerFindRoute = ( migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts index b9614414a8763..3abba7fab27f7 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts @@ -38,17 +38,17 @@ export const registerGetRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'get', path: '/api/saved_objects/{type}/{id}', - req, + request, logger, }); - const { type, id } = req.params; + const { type, id } = request.params; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsGet({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsGet({ request, types: [type] }).catch(() => {}); const { savedObjects } = await context.core; @@ -59,7 +59,7 @@ export const registerGetRoute = ( const object = await savedObjects.client.get(type, id, { migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: object }); + return response.ok({ body: object }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts index b4cf2bd77ca9a..c489a1996ae73 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts @@ -66,31 +66,31 @@ export const registerImportRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { - const { overwrite, createNewCopies, compatibilityMode } = req.query; + catchAndReturnBoomErrors(async (context, request, response) => { + const { overwrite, createNewCopies, compatibilityMode } = request.query; const { getClient, getImporter, typeRegistry } = (await context.core).savedObjects; const usageStatsClient = coreUsageData.getClient(); usageStatsClient .incrementSavedObjectsImport({ - request: req, + request, createNewCopies, overwrite, compatibilityMode, }) .catch(() => {}); - const file = req.body.file as FileStream; + const file = request.body.file as FileStream; const fileExtension = extname(file.hapi.filename).toLowerCase(); if (fileExtension !== '.ndjson') { - return res.badRequest({ body: `Invalid file extension ${fileExtension}` }); + return response.badRequest({ body: `Invalid file extension ${fileExtension}` }); } let readStream: Readable; try { readStream = await createSavedObjectsStreamFromNdJson(file); } catch (e) { - return res.badRequest({ + return response.badRequest({ body: e, }); } @@ -112,10 +112,10 @@ export const registerImportRoute = ( compatibilityMode, }); - return res.ok({ body: result }); + return response.ok({ body: result }); } catch (e) { if (e instanceof SavedObjectsImportError) { - return res.badRequest({ + return response.badRequest({ body: { message: e.message, attributes: e.attributes, diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/export.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/export.ts index 3ccbee914e8b1..82460756a911c 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/export.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/export.ts @@ -33,22 +33,24 @@ export const registerLegacyExportRoute = ( tags: ['api'], }, }, - async (ctx, req, res) => { + async (context, request, response) => { logger.warn( "The export dashboard API '/api/kibana/dashboards/export' is deprecated. Use the saved objects export objects API '/api/saved_objects/_export' instead." ); - const ids = Array.isArray(req.query.dashboard) ? req.query.dashboard : [req.query.dashboard]; - const { client } = (await ctx.core).savedObjects; + const ids = Array.isArray(request.query.dashboard) + ? request.query.dashboard + : [request.query.dashboard]; + const { client } = (await context.core).savedObjects; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementLegacyDashboardsExport({ request: req }).catch(() => {}); + usageStatsClient.incrementLegacyDashboardsExport({ request }).catch(() => {}); const exported = await exportDashboards(ids, client, kibanaVersion); const filename = `kibana-dashboards.${moment.utc().format('YYYY-MM-DD-HH-mm-ss')}.json`; const body = JSON.stringify(exported, null, ' '); - return res.ok({ + return response.ok({ body, headers: { 'Content-Disposition': `attachment; filename="${filename}"`, diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts index 5de9d4dc82b1a..031a4995279ea 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts @@ -43,23 +43,23 @@ export const registerLegacyImportRoute = ( }, }, }, - async (ctx, req, res) => { + async (context, request, response) => { logger.warn( "The import dashboard API '/api/kibana/dashboards/import' is deprecated. Use the saved objects import objects API '/api/saved_objects/_import' instead." ); - const { client } = (await ctx.core).savedObjects; - const objects = req.body.objects as SavedObject[]; - const { force, exclude } = req.query; + const { client } = (await context.core).savedObjects; + const objects = request.body.objects as SavedObject[]; + const { force, exclude } = request.query; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementLegacyDashboardsImport({ request: req }).catch(() => {}); + usageStatsClient.incrementLegacyDashboardsImport({ request }).catch(() => {}); const result = await importDashboards(client, objects, { overwrite: force, exclude: Array.isArray(exclude) ? exclude : [exclude], }); - return res.ok({ + return response.ok({ body: result, }); } diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts index ecca123b0a4f3..83604448f41eb 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts @@ -34,25 +34,25 @@ export const registerResolveRoute = ( }), }, }, - router.handleLegacyErrors(async (context, req, res) => { + router.handleLegacyErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'get', path: '/api/saved_objects/resolve/{type}/{id}', - req, + request, logger, }); - const { type, id } = req.params; + const { type, id } = request.params; const { savedObjects } = await context.core; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsResolve({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsResolve({ request, types: [type] }).catch(() => {}); if (!allowHttpApiAccess) { throwIfTypeNotVisibleByAPI(type, savedObjects.typeRegistry); } const result = await savedObjects.client.resolve(type, id, { migrationVersionCompatibility: 'compatible', }); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts index b720260619aca..3fc88d92c259e 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts @@ -53,15 +53,15 @@ export const registerUpdateRoute = ( }), }, }, - catchAndReturnBoomErrors(async (context, req, res) => { + catchAndReturnBoomErrors(async (context, request, response) => { logWarnOnExternalRequest({ method: 'get', path: '/api/saved_objects/{type}/{id}', - req, + request, logger, }); - const { type, id } = req.params; - const { attributes, version, references, upsert } = req.body; + const { type, id } = request.params; + const { attributes, version, references, upsert } = request.body; const options: SavedObjectsUpdateOptions = { version, references, @@ -70,13 +70,13 @@ export const registerUpdateRoute = ( }; const usageStatsClient = coreUsageData.getClient(); - usageStatsClient.incrementSavedObjectsUpdate({ request: req }).catch(() => {}); + usageStatsClient.incrementSavedObjectsUpdate({ request, types: [type] }).catch(() => {}); const { savedObjects } = await context.core; if (!allowHttpApiAccess) { throwIfTypeNotVisibleByAPI(type, savedObjects.typeRegistry); } const result = await savedObjects.client.update(type, id, attributes, options); - return res.ok({ body: result }); + return response.ok({ body: result }); }) ); }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.test.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.test.ts index 0a630fe18d353..1a35d3978b6da 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.test.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.test.ts @@ -381,7 +381,7 @@ describe('logWarnOnExternalRequest', () => { logWarnOnExternalRequest({ method: 'get', path: '/resolve/{type}/{id}', - req: extRequest, + request: extRequest, logger, }); expect(logger.warn).toHaveBeenCalledTimes(1); @@ -394,7 +394,7 @@ describe('logWarnOnExternalRequest', () => { logWarnOnExternalRequest({ method: 'post', path: '/_bulk_resolve', - req: extRequest, + request: extRequest, logger, }); expect(logger.warn).toHaveBeenCalledTimes(1); @@ -407,14 +407,14 @@ describe('logWarnOnExternalRequest', () => { logWarnOnExternalRequest({ method: 'get', path: '/resolve/{type}/{id}', - req: kibRequest, + request: kibRequest, logger, }); expect(logger.warn).toHaveBeenCalledTimes(0); logWarnOnExternalRequest({ method: 'post', path: '/_bulk_resolve', - req: kibRequest, + request: kibRequest, logger, }); expect(logger.warn).toHaveBeenCalledTimes(0); diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts index 454345f322df6..63394027b1237 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts @@ -171,7 +171,7 @@ export function isKibanaRequest({ headers }: KibanaRequest) { export interface LogWarnOnExternalRequest { method: string; path: string; - req: KibanaRequest; + request: KibanaRequest; logger: Logger; } @@ -181,8 +181,8 @@ export interface LogWarnOnExternalRequest { * @internal */ export function logWarnOnExternalRequest(params: LogWarnOnExternalRequest) { - const { method, path, req, logger } = params; - if (!isKibanaRequest(req)) { + const { method, path, request, logger } = params; + if (!isKibanaRequest(request)) { logger.warn(`The ${method} saved object API ${path} is deprecated.`); } } diff --git a/packages/core/usage-data/core-usage-data-base-server-internal/src/usage_stats_client.ts b/packages/core/usage-data/core-usage-data-base-server-internal/src/usage_stats_client.ts index efc494160a16a..9697e4077e7af 100644 --- a/packages/core/usage-data/core-usage-data-base-server-internal/src/usage_stats_client.ts +++ b/packages/core/usage-data/core-usage-data-base-server-internal/src/usage_stats_client.ts @@ -12,6 +12,7 @@ import type { CoreUsageStats } from '@kbn/core-usage-data-server'; /** @internal */ export interface BaseIncrementOptions { request: KibanaRequest; + types?: string[]; // we might not have info on the imported types for some operations, e.g. for import we're using a readStream } /** @internal */ @@ -29,7 +30,6 @@ export type IncrementSavedObjectsResolveImportErrorsOptions = BaseIncrementOptio /** @internal */ export type IncrementSavedObjectsExportOptions = BaseIncrementOptions & { - types?: string[]; supportedTypes: string[]; }; diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts index c11a51b7d41fe..261db435a1a73 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts @@ -34,6 +34,8 @@ import type { CoreIncrementUsageCounter, ConfigUsageData, CoreConfigUsageData, + CoreIncrementCounterParams, + CoreUsageCounter, } from '@kbn/core-usage-data-server'; import { CORE_USAGE_STATS_TYPE, @@ -493,28 +495,33 @@ export class CoreUsageDataService typeRegistry.registerType(coreUsageStatsType); }; - this.coreUsageStatsClient = new CoreUsageStatsClient( - (message: string) => this.logger.debug(message), - http.basePath, - internalRepositoryPromise, - this.stop$ - ); + const registerUsageCounter = (usageCounter: CoreUsageCounter) => { + this.incrementUsageCounter = (params) => usageCounter.incrementCounter(params); + }; + + const incrementUsageCounter = (params: CoreIncrementCounterParams) => { + try { + this.incrementUsageCounter(params); + } catch (e) { + // Self-defense mechanism since the handler is externally registered + this.logger.debug('Failed to increase the usage counter'); + this.logger.debug(e); + } + }; + + this.coreUsageStatsClient = new CoreUsageStatsClient({ + debugLogger: (message: string) => this.logger.debug(message), + basePath: http.basePath, + repositoryPromise: internalRepositoryPromise, + stop$: this.stop$, + incrementUsageCounter, + }); const contract: InternalCoreUsageDataSetup = { registerType, getClient: () => this.coreUsageStatsClient!, - registerUsageCounter: (usageCounter) => { - this.incrementUsageCounter = (params) => usageCounter.incrementCounter(params); - }, - incrementUsageCounter: (params) => { - try { - this.incrementUsageCounter(params); - } catch (e) { - // Self-defense mechanism since the handler is externally registered - this.logger.debug('Failed to increase the usage counter'); - this.logger.debug(e); - } - }, + registerUsageCounter, + incrementUsageCounter, }; return contract; diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.test.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.test.ts index 6c30d6ce2c8ff..eba8e89b6e6ec 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.test.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.test.ts @@ -40,18 +40,20 @@ import { CoreUsageStatsClient } from '.'; describe('CoreUsageStatsClient', () => { const stop$ = new Subject(); + const incrementUsageCounterMock = jest.fn(); const setup = (namespace?: string) => { const debugLoggerMock = jest.fn(); const basePathMock = httpServiceMock.createBasePath(); // we could mock a return value for basePathMock.get, but it isn't necessary for testing purposes basePathMock.remove.mockReturnValue(namespace ? `/s/${namespace}` : '/'); const repositoryMock = savedObjectsRepositoryMock.create(); - const usageStatsClient = new CoreUsageStatsClient( - debugLoggerMock, - basePathMock, - Promise.resolve(repositoryMock), - stop$ - ); + const usageStatsClient = new CoreUsageStatsClient({ + debugLogger: debugLoggerMock, + basePath: basePathMock, + repositoryPromise: Promise.resolve(repositoryMock), + stop$, + incrementUsageCounter: incrementUsageCounterMock, + }); return { usageStatsClient, debugLoggerMock, basePathMock, repositoryMock }; }; const firstPartyRequestHeaders = { @@ -65,6 +67,10 @@ describe('CoreUsageStatsClient', () => { jest.useFakeTimers(); }); + beforeEach(() => { + incrementUsageCounterMock.mockReset(); + }); + afterEach(() => { stop$.next(); }); @@ -280,6 +286,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsBulkCreate({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1', 'type2'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_CREATE_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_CREATE_STATS_PREFIX}.kibanaRequest.yes.types.type2`, + }); + }); }); describe('#incrementSavedObjectsBulkGet', () => { @@ -368,6 +391,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsBulkGet({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_GET_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_GET_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementSavedObjectsBulkResolve', () => { @@ -456,6 +496,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsBulkResolve({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1', 'type2'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_RESOLVE_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_RESOLVE_STATS_PREFIX}.kibanaRequest.yes.types.type2`, + }); + }); }); describe('#incrementSavedObjectsBulkUpdate', () => { @@ -544,6 +601,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsBulkUpdate({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_UPDATE_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_UPDATE_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementSavedObjectsCreate', () => { @@ -629,6 +703,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsCreate({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${CREATE_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + }); }); describe('#incrementSavedObjectsBulkDelete', () => { @@ -717,6 +805,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsBulkDelete({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_DELETE_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${BULK_DELETE_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementSavedObjectsDelete', () => { @@ -802,6 +907,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsDelete({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${DELETE_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + }); }); describe('#incrementSavedObjectsFind', () => { @@ -881,6 +1000,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsFind({ + request: httpServerMock.createKibanaRequest(), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${FIND_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + }); }); describe('#incrementSavedObjectsGet', () => { @@ -960,6 +1093,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsGet({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${GET_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + }); }); describe('#incrementSavedObjectsResolve', () => { @@ -1048,6 +1195,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsResolve({ + request: httpServerMock.createKibanaRequest(), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${RESOLVE_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + }); }); describe('#incrementSavedObjectsUpdate', () => { @@ -1133,6 +1294,20 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsUpdate({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1'], + } as BaseIncrementOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(1); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${UPDATE_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + }); }); describe('#incrementSavedObjectsImport', () => { @@ -1255,6 +1430,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage if provided', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsImport({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as IncrementSavedObjectsImportOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${IMPORT_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${IMPORT_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementSavedObjectsResolveImportErrors', () => { @@ -1386,6 +1578,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage if provided', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsResolveImportErrors({ + request: httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }), + types: ['type1', 'type2'], + } as IncrementSavedObjectsImportOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${RESOLVE_IMPORT_STATS_PREFIX}.kibanaRequest.yes.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${RESOLVE_IMPORT_STATS_PREFIX}.kibanaRequest.yes.types.type2`, + }); + }); }); describe('#incrementSavedObjectsExport', () => { @@ -1478,6 +1687,24 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementSavedObjectsExport({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + supportedTypes: ['type1', 'type2', 'type3'], + } as IncrementSavedObjectsExportOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${EXPORT_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${EXPORT_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementLegacyDashboardsImport', () => { @@ -1489,7 +1716,7 @@ describe('CoreUsageStatsClient', () => { await expect( usageStatsClient.incrementLegacyDashboardsImport({ request, - } as IncrementSavedObjectsExportOptions) + } as BaseIncrementOptions) ).resolves.toBeUndefined(); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalled(); @@ -1501,7 +1728,7 @@ describe('CoreUsageStatsClient', () => { const request = httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }); await usageStatsClient.incrementLegacyDashboardsImport({ request, - } as IncrementSavedObjectsExportOptions); + } as BaseIncrementOptions); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalledTimes(1); expect(repositoryMock.incrementCounter).toHaveBeenCalledWith( @@ -1528,7 +1755,7 @@ describe('CoreUsageStatsClient', () => { const request = httpServerMock.createKibanaRequest(); await usageStatsClient.incrementLegacyDashboardsImport({ request, - } as IncrementSavedObjectsExportOptions); + } as BaseIncrementOptions); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalledTimes(1); expect(repositoryMock.incrementCounter).toHaveBeenCalledWith( @@ -1548,6 +1775,23 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage if provided', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementLegacyDashboardsImport({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as IncrementSavedObjectsImportOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${LEGACY_DASHBOARDS_IMPORT_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${LEGACY_DASHBOARDS_IMPORT_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); describe('#incrementLegacyDashboardsExport', () => { @@ -1559,7 +1803,7 @@ describe('CoreUsageStatsClient', () => { await expect( usageStatsClient.incrementLegacyDashboardsExport({ request, - } as IncrementSavedObjectsExportOptions) + } as BaseIncrementOptions) ).resolves.toBeUndefined(); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalled(); @@ -1571,7 +1815,7 @@ describe('CoreUsageStatsClient', () => { const request = httpServerMock.createKibanaRequest({ headers: firstPartyRequestHeaders }); await usageStatsClient.incrementLegacyDashboardsExport({ request, - } as IncrementSavedObjectsExportOptions); + } as BaseIncrementOptions); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalledTimes(1); expect(repositoryMock.incrementCounter).toHaveBeenCalledWith( @@ -1598,7 +1842,7 @@ describe('CoreUsageStatsClient', () => { const request = httpServerMock.createKibanaRequest(); await usageStatsClient.incrementLegacyDashboardsExport({ request, - } as IncrementSavedObjectsExportOptions); + } as BaseIncrementOptions); await jest.runOnlyPendingTimersAsync(); expect(repositoryMock.incrementCounter).toHaveBeenCalledTimes(1); expect(repositoryMock.incrementCounter).toHaveBeenCalledWith( @@ -1618,5 +1862,22 @@ describe('CoreUsageStatsClient', () => { incrementOptions ); }); + + it('reports SO type usage if provided', async () => { + const { usageStatsClient } = setup('foo'); + + await usageStatsClient.incrementLegacyDashboardsExport({ + request: httpServerMock.createKibanaRequest(), + types: ['type1', 'type2'], + } as IncrementSavedObjectsImportOptions); + await jest.runOnlyPendingTimersAsync(); + expect(incrementUsageCounterMock).toHaveBeenCalledTimes(2); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${LEGACY_DASHBOARDS_EXPORT_STATS_PREFIX}.kibanaRequest.no.types.type1`, + }); + expect(incrementUsageCounterMock).toHaveBeenCalledWith({ + counterName: `savedObjects.${LEGACY_DASHBOARDS_EXPORT_STATS_PREFIX}.kibanaRequest.no.types.type2`, + }); + }); }); }); diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.ts index 19c1bc1facafb..44ba93a785838 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_stats_client.ts @@ -12,7 +12,7 @@ import type { SavedObjectsIncrementCounterField, } from '@kbn/core-saved-objects-api-server'; import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; -import type { CoreUsageStats } from '@kbn/core-usage-data-server'; +import type { CoreUsageStats, CoreIncrementCounterParams } from '@kbn/core-usage-data-server'; import { type ICoreUsageStatsClient, type BaseIncrementOptions, @@ -24,6 +24,7 @@ import { REPOSITORY_RESOLVE_OUTCOME_STATS, } from '@kbn/core-usage-data-base-server-internal'; import { + type Observable, bufferWhen, exhaustMap, filter, @@ -33,6 +34,7 @@ import { skip, Subject, takeUntil, + tap, } from 'rxjs'; export const BULK_CREATE_STATS_PREFIX = 'apiCalls.savedObjectsBulkCreate'; @@ -95,18 +97,46 @@ const SPACE_CONTEXT_REGEX = /^\/s\/([a-z0-9_\-]+)/; const MAX_BUFFER_SIZE = 10_000; const DEFAULT_BUFFER_TIME_MS = 10_000; +/** + * Interface that models some of the core events (e.g. SO HTTP API calls) + * @internal + */ +export interface CoreUsageEvent { + id: string; + isKibanaRequest: boolean; + types?: string[]; +} + +/** @internal */ +export interface CoreUsageStatsClientParams { + debugLogger: (message: string) => void; + basePath: IBasePath; + repositoryPromise: Promise; + stop$: Observable; + incrementUsageCounter: (params: CoreIncrementCounterParams) => void; + bufferTimeMs?: number; +} + /** @internal */ export class CoreUsageStatsClient implements ICoreUsageStatsClient { + private readonly debugLogger: (message: string) => void; + private readonly basePath: IBasePath; + private readonly repositoryPromise: Promise; private readonly fieldsToIncrement$ = new Subject(); private readonly flush$ = new Subject(); + private readonly coreUsageEvents$ = new Subject(); - constructor( - private readonly debugLogger: (message: string) => void, - private readonly basePath: IBasePath, - private readonly repositoryPromise: Promise, - stop$: Subject, - bufferTimeMs: number = DEFAULT_BUFFER_TIME_MS - ) { + constructor({ + debugLogger, + basePath, + repositoryPromise, + stop$, + incrementUsageCounter, + bufferTimeMs = DEFAULT_BUFFER_TIME_MS, + }: CoreUsageStatsClientParams) { + this.debugLogger = debugLogger; + this.basePath = basePath; + this.repositoryPromise = repositoryPromise; this.fieldsToIncrement$ .pipe( takeUntil(stop$), @@ -148,6 +178,21 @@ export class CoreUsageStatsClient implements ICoreUsageStatsClient { }) ) .subscribe(); + + this.coreUsageEvents$ + .pipe( + takeUntil(stop$), + tap(({ id, isKibanaRequest, types }: CoreUsageEvent) => { + const kibanaYesNo = isKibanaRequest ? 'yes' : 'no'; + // NB this usage counter has the domainId: 'core', and so will related docs in 'kibana-usage-counters' data view + types?.forEach((type) => + incrementUsageCounter({ + counterName: `savedObjects.${id}.kibanaRequest.${kibanaYesNo}.types.${type}`, + }) + ); + }) + ) + .subscribe(); } public async getUsageStats() { @@ -251,36 +296,46 @@ export class CoreUsageStatsClient implements ICoreUsageStatsClient { private async updateUsageStats( counterFieldNames: string[], - prefix: string, - { request }: BaseIncrementOptions + id: string, + { request, types }: BaseIncrementOptions ) { - const fields = this.getFieldsToIncrement(counterFieldNames, prefix, request); + const isKibanaRequest = getIsKibanaRequest(request); + const spaceId = this.getNamespace(request); + const fields = this.getFieldsToIncrement({ + counterFieldNames, + prefix: id, + isKibanaRequest, + spaceId, + }); + this.coreUsageEvents$.next({ id, isKibanaRequest, types }); this.fieldsToIncrement$.next(fields); } - private getIsDefaultNamespace(request: KibanaRequest) { + private getNamespace(request: KibanaRequest): string { const requestBasePath = this.basePath.get(request); // obtain the original request basePath, as it may have been modified by a request interceptor const pathToCheck = this.basePath.remove(requestBasePath); // remove the server basePath from the request basePath const matchResult = pathToCheck.match(SPACE_CONTEXT_REGEX); // Look for `/s/space-url-context` in the base path if (!matchResult || matchResult.length === 0) { - return true; + return DEFAULT_NAMESPACE_STRING; } // Ignoring first result, we only want the capture group result at index 1 - const [, spaceId] = matchResult; - - return spaceId === DEFAULT_NAMESPACE_STRING; + return matchResult[1]; } - private getFieldsToIncrement( - counterFieldNames: string[], - prefix: string, - request: KibanaRequest - ) { - const isKibanaRequest = getIsKibanaRequest(request); - const isDefaultNamespace = this.getIsDefaultNamespace(request); - const namespaceField = isDefaultNamespace ? 'default' : 'custom'; + private getFieldsToIncrement({ + prefix, + counterFieldNames, + spaceId, + isKibanaRequest, + }: { + prefix: string; + counterFieldNames: string[]; + spaceId: string; + isKibanaRequest: boolean; + }) { + const namespaceField = spaceId === DEFAULT_NAMESPACE_STRING ? 'default' : 'custom'; return [ 'total', `namespace.${namespaceField}.total`, @@ -302,10 +357,10 @@ function getFieldsForCounter(prefix: string) { ].map((x) => `${prefix}.${x}`); } -function getIsKibanaRequest({ headers }: KibanaRequest) { +function getIsKibanaRequest({ headers }: KibanaRequest): boolean { // The presence of these request headers gives us a good indication that this is a first-party request from the Kibana client. // We can't be 100% certain, but this is a reasonable attempt. - return ( + return Boolean( headers && headers['kbn-version'] && headers.referer && headers['x-elastic-internal-origin'] ); } diff --git a/packages/core/user-settings/core-user-settings-server-internal/index.ts b/packages/core/user-settings/core-user-settings-server-internal/index.ts index e4cd3e0e42f30..f226321af6d64 100644 --- a/packages/core/user-settings/core-user-settings-server-internal/index.ts +++ b/packages/core/user-settings/core-user-settings-server-internal/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { UserSettingsService } from './user_settings_service'; -export type { InternalUserSettingsServiceSetup } from './user_settings_service'; +export { UserSettingsService } from './src/user_settings_service'; +export type { InternalUserSettingsServiceSetup } from './src/user_settings_service'; diff --git a/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.test.ts b/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.test.ts new file mode 100644 index 0000000000000..79feda9e23a98 --- /dev/null +++ b/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.test.ts @@ -0,0 +1,98 @@ +/* + * Copyright 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 { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; +import { userProfileServiceMock } from '@kbn/core-user-profile-server-mocks'; +import type { UserProfileWithSecurity } from '@kbn/core-user-profile-common'; +import { UserSettingsService } from './user_settings_service'; + +describe('#setup', () => { + let coreContext: ReturnType; + let service: UserSettingsService; + let startDeps: { userProfile: ReturnType }; + + beforeEach(() => { + coreContext = mockCoreContext.create(); + service = new UserSettingsService(coreContext); + startDeps = { + userProfile: userProfileServiceMock.createInternalStart(), + }; + }); + + const createUserProfile = (darkMode: string | undefined): UserProfileWithSecurity => { + return { + data: { + userSettings: { + darkMode, + }, + }, + } as unknown as UserProfileWithSecurity; + }; + + it('fetches userSettings when client is set and returns `true` when `darkMode` is set to `dark`', async () => { + startDeps.userProfile.getCurrent.mockResolvedValue(createUserProfile('dark')); + + const { getUserSettingDarkMode } = service.setup(); + service.start(startDeps); + + const kibanaRequest = httpServerMock.createKibanaRequest(); + const darkMode = await getUserSettingDarkMode(kibanaRequest); + + expect(darkMode).toEqual(true); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledTimes(1); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledWith({ + request: kibanaRequest, + dataPath: 'userSettings', + }); + }); + + it('fetches userSettings when client is set and returns `false` when `darkMode` is set to `light`', async () => { + startDeps.userProfile.getCurrent.mockResolvedValue(createUserProfile('light')); + + const { getUserSettingDarkMode } = service.setup(); + service.start(startDeps); + + const kibanaRequest = httpServerMock.createKibanaRequest(); + const darkMode = await getUserSettingDarkMode(kibanaRequest); + + expect(darkMode).toEqual(false); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledTimes(1); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledWith({ + request: kibanaRequest, + dataPath: 'userSettings', + }); + }); + + it('fetches userSettings when client is set and returns `undefined` when `darkMode` is set to `` (the default value)', async () => { + startDeps.userProfile.getCurrent.mockResolvedValue(createUserProfile('')); + + const { getUserSettingDarkMode } = service.setup(); + service.start(startDeps); + + const kibanaRequest = httpServerMock.createKibanaRequest(); + const darkMode = await getUserSettingDarkMode(kibanaRequest); + + expect(darkMode).toEqual(undefined); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledTimes(1); + expect(startDeps.userProfile.getCurrent).toHaveBeenCalledWith({ + request: kibanaRequest, + dataPath: 'userSettings', + }); + }); + + it('does not fetch userSettings when client is not set, returns `undefined`, and logs a debug statement', async () => { + const { getUserSettingDarkMode } = service.setup(); + + const kibanaRequest = httpServerMock.createKibanaRequest(); + const darkMode = await getUserSettingDarkMode(kibanaRequest); + + expect(darkMode).toEqual(undefined); + expect(coreContext.logger.get().debug).toHaveBeenCalledWith('userProfile not set'); + }); +}); diff --git a/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.ts b/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.ts new file mode 100644 index 0000000000000..feb7877a795ad --- /dev/null +++ b/packages/core/user-settings/core-user-settings-server-internal/src/user_settings_service.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 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 { CoreContext } from '@kbn/core-base-server-internal'; +import type { Logger } from '@kbn/logging'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { DarkModeValue } from '@kbn/core-ui-settings-common'; +import type { InternalUserProfileServiceStart } from '@kbn/core-user-profile-server-internal'; + +export interface UserSettingsServiceStartDeps { + userProfile: InternalUserProfileServiceStart; +} + +const userSettingsDataPath = 'userSettings'; + +/** + * @internal + */ +export interface InternalUserSettingsServiceSetup { + getUserSettingDarkMode: (request: KibanaRequest) => Promise; +} + +/** + * @internal + */ +export class UserSettingsService { + private logger: Logger; + private userProfile?: InternalUserProfileServiceStart; + + constructor(coreContext: CoreContext) { + this.logger = coreContext.logger.get('user-settings-service'); + } + + public setup(): InternalUserSettingsServiceSetup { + return { + getUserSettingDarkMode: async (request: KibanaRequest) => { + const userSettings = await this.getSettings(request); + return getUserSettingDarkMode(userSettings); + }, + }; + } + + public start(deps: UserSettingsServiceStartDeps) { + this.userProfile = deps.userProfile; + } + + private async getSettings(request: KibanaRequest): Promise> { + if (this.userProfile) { + const userProfile = await this.userProfile.getCurrent({ + request, + dataPath: userSettingsDataPath, + }); + return (userProfile?.data?.[userSettingsDataPath] ?? {}) as Record; + } else { + this.logger.debug('userProfile not set'); + return {}; + } + } +} + +const getUserSettingDarkMode = ( + userSettings: Record +): DarkModeValue | undefined => { + if (userSettings?.darkMode) { + return userSettings.darkMode.toUpperCase() === 'DARK'; + } + return undefined; +}; diff --git a/packages/core/user-settings/core-user-settings-server-internal/tsconfig.json b/packages/core/user-settings/core-user-settings-server-internal/tsconfig.json index a35a40a0d3c49..37fbe2fd5cc02 100644 --- a/packages/core/user-settings/core-user-settings-server-internal/tsconfig.json +++ b/packages/core/user-settings/core-user-settings-server-internal/tsconfig.json @@ -13,8 +13,10 @@ "@kbn/core-base-server-internal", "@kbn/logging", "@kbn/core-http-server-mocks", - "@kbn/core-user-settings-server", "@kbn/core-ui-settings-common", + "@kbn/core-user-profile-server-mocks", + "@kbn/core-user-profile-common", + "@kbn/core-user-profile-server-internal", ], "include": [ "**/*.ts", diff --git a/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.test.ts b/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.test.ts deleted file mode 100644 index 15715e62823d2..0000000000000 --- a/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.test.ts +++ /dev/null @@ -1,82 +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 { mockCoreContext } from '@kbn/core-base-server-mocks'; -import { UserSettingsService } from './user_settings_service'; -import { httpServerMock } from '@kbn/core-http-server-mocks'; - -describe('#setup', () => { - const coreContext: ReturnType = mockCoreContext.create(); - const { createKibanaRequest } = httpServerMock; - - it('fetches userSettings when client is set and returns `true` when `darkMode` is set to `dark`', async () => { - const service = new UserSettingsService(coreContext); - const { setUserProfileSettings, getUserSettingDarkMode } = service.setup(); - - const userProfileContract = { - get: jest.fn().mockReturnValueOnce(Promise.resolve({ darkMode: 'dark' })), - }; - - setUserProfileSettings(userProfileContract); - - const kibanaRequest = createKibanaRequest(); - const darkMode = await getUserSettingDarkMode(kibanaRequest); - - expect(darkMode).toEqual(true); - expect(userProfileContract.get).toHaveBeenCalledTimes(1); - expect(userProfileContract.get).toHaveBeenCalledWith(kibanaRequest); - }); - - it('fetches userSettings when client is set and returns `false` when `darkMode` is set to `light`', async () => { - const service = new UserSettingsService(coreContext); - const { setUserProfileSettings, getUserSettingDarkMode } = service.setup(); - - const userProfileContract = { - get: jest.fn().mockReturnValueOnce(Promise.resolve({ darkMode: 'light' })), - }; - - setUserProfileSettings(userProfileContract); - - const kibanaRequest = createKibanaRequest(); - const darkMode = await getUserSettingDarkMode(kibanaRequest); - - expect(darkMode).toEqual(false); - expect(userProfileContract.get).toHaveBeenCalledTimes(1); - expect(userProfileContract.get).toHaveBeenCalledWith(kibanaRequest); - }); - - it('fetches userSettings when client is set and returns `undefined` when `darkMode` is set to `` (the default value)', async () => { - const service = new UserSettingsService(coreContext); - const { setUserProfileSettings, getUserSettingDarkMode } = service.setup(); - - const userProfileContract = { - get: jest.fn().mockReturnValueOnce(Promise.resolve({ darkMode: '' })), - }; - - setUserProfileSettings(userProfileContract); - - const kibanaRequest = createKibanaRequest(); - const darkMode = await getUserSettingDarkMode(kibanaRequest); - - expect(darkMode).toEqual(undefined); - expect(userProfileContract.get).toHaveBeenCalledTimes(1); - expect(userProfileContract.get).toHaveBeenCalledWith(kibanaRequest); - }); - - it('does not fetch userSettings when client is not set, returns `undefined`, and logs a debug statement', async () => { - const service = new UserSettingsService(coreContext); - const { getUserSettingDarkMode } = service.setup(); - const kibanaRequest = createKibanaRequest(); - const darkMode = await getUserSettingDarkMode(kibanaRequest); - - expect(darkMode).toEqual(undefined); - expect(coreContext.logger.get().debug).toHaveBeenCalledWith( - 'UserProfileSettingsClient not set' - ); - }); -}); diff --git a/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.ts b/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.ts deleted file mode 100644 index 309f0defd22e2..0000000000000 --- a/packages/core/user-settings/core-user-settings-server-internal/user_settings_service.ts +++ /dev/null @@ -1,65 +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 { CoreContext } from '@kbn/core-base-server-internal'; -import { Logger } from '@kbn/logging'; -import { KibanaRequest } from '@kbn/core-http-server'; -import { DarkModeValue } from '@kbn/core-ui-settings-common'; -import { UserProfileSettingsClientContract } from '@kbn/core-user-settings-server'; - -/** - * @internal - */ -export interface InternalUserSettingsServiceSetup { - setUserProfileSettings: (client: UserProfileSettingsClientContract) => void; - getUserSettingDarkMode: (request: KibanaRequest) => Promise; -} - -export class UserSettingsService { - private logger: Logger; - private client?: UserProfileSettingsClientContract; - - constructor(coreContext: CoreContext) { - this.logger = coreContext.logger.get('user-settings-service'); - } - - public setup(): InternalUserSettingsServiceSetup { - return { - setUserProfileSettings: (client: UserProfileSettingsClientContract) => { - this.client = client; - }, - getUserSettingDarkMode: async (request: KibanaRequest) => { - const userSettings = await this.getSettings(request); - return this.getUserSettingDarkMode(userSettings); - }, - }; - } - - private async getSettings(request: KibanaRequest): Promise> { - let result = {}; - if (this.client) { - result = (await this.client.get(request)) as Record; - } else { - this.logger.debug('UserProfileSettingsClient not set'); - } - - return result; - } - - private async getUserSettingDarkMode( - userSettings: Record - ): Promise { - let result; - - if (userSettings?.darkMode) { - result = userSettings.darkMode.toUpperCase() === 'DARK'; - } - - return result; - } -} diff --git a/packages/core/user-settings/core-user-settings-server-mocks/src/user_settings_service.mock.ts b/packages/core/user-settings/core-user-settings-server-mocks/src/user_settings_service.mock.ts index 74cbc491bad5f..88dca2b79e1c5 100644 --- a/packages/core/user-settings/core-user-settings-server-mocks/src/user_settings_service.mock.ts +++ b/packages/core/user-settings/core-user-settings-server-mocks/src/user_settings_service.mock.ts @@ -6,20 +6,25 @@ * Side Public License, v 1. */ -import { serviceContractMock } from './service_contract.mock'; +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { + UserSettingsService, + InternalUserSettingsServiceSetup, +} from '@kbn/core-user-settings-server-internal'; -const createSetupContractMock = () => { +const createSetupContractMock = (): jest.Mocked => { return { - setUserProfileSettings: jest.fn(), getUserSettingDarkMode: jest.fn(), }; }; -const createMock = () => { - const mocked = serviceContractMock(); - mocked.setup.mockReturnValue(createSetupContractMock()); - // mocked.start.mockReturnValue(createStartContractMock()); - return mocked; +const createMock = (): jest.Mocked> => { + const mock = { + setup: jest.fn(), + start: jest.fn(), + }; + mock.setup.mockReturnValue(createSetupContractMock()); + return mock; }; export const userSettingsServiceMock = { diff --git a/packages/core/user-settings/core-user-settings-server-mocks/tsconfig.json b/packages/core/user-settings/core-user-settings-server-mocks/tsconfig.json index 44431c1ebcf0e..09c11388d22c1 100644 --- a/packages/core/user-settings/core-user-settings-server-mocks/tsconfig.json +++ b/packages/core/user-settings/core-user-settings-server-mocks/tsconfig.json @@ -9,6 +9,7 @@ }, "kbn_references": [ "@kbn/core-user-settings-server-internal", + "@kbn/utility-types", ], "include": [ "**/*.ts", diff --git a/packages/core/user-settings/core-user-settings-server/index.ts b/packages/core/user-settings/core-user-settings-server/index.ts index c13d17fb4b955..3f74a1d95fee6 100644 --- a/packages/core/user-settings/core-user-settings-server/index.ts +++ b/packages/core/user-settings/core-user-settings-server/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export type { UserSettingsServiceSetup, UserProfileSettingsClientContract } from './types'; +export type { UserSettingsServiceSetup } from './types'; diff --git a/packages/core/user-settings/core-user-settings-server/tsconfig.json b/packages/core/user-settings/core-user-settings-server/tsconfig.json index 3270f469296eb..931451997d24a 100644 --- a/packages/core/user-settings/core-user-settings-server/tsconfig.json +++ b/packages/core/user-settings/core-user-settings-server/tsconfig.json @@ -7,7 +7,6 @@ ] }, "kbn_references": [ - "@kbn/core-http-server", ], "include": [ "**/*.ts", diff --git a/packages/core/user-settings/core-user-settings-server/types.ts b/packages/core/user-settings/core-user-settings-server/types.ts index f852e0e188bfd..b7ef24e7a3053 100644 --- a/packages/core/user-settings/core-user-settings-server/types.ts +++ b/packages/core/user-settings/core-user-settings-server/types.ts @@ -5,13 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { KibanaRequest } from '@kbn/core-http-server'; /** @public */ -export interface UserSettingsServiceSetup { - setUserProfileSettings: (client: UserProfileSettingsClientContract) => void; -} - -export interface UserProfileSettingsClientContract { - get: (request: KibanaRequest) => Promise>; -} +// keeping the empty service contract for now as we might re-use it very soon +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface UserSettingsServiceSetup {} diff --git a/packages/deeplinks/search/constants.ts b/packages/deeplinks/search/constants.ts index 8a8570d24a81a..fb8a0c459cbd0 100644 --- a/packages/deeplinks/search/constants.ts +++ b/packages/deeplinks/search/constants.ts @@ -14,3 +14,4 @@ export const ENTERPRISE_SEARCH_APPSEARCH_APP_ID = 'appSearch'; export const ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID = 'workplaceSearch'; export const SERVERLESS_ES_APP_ID = 'serverlessElasticsearch'; export const SERVERLESS_ES_CONNECTORS_ID = 'serverlessConnectors'; +export const SERVERLESS_ES_SEARCH_PLAYGROUND_ID = 'searchPlayground'; diff --git a/packages/deeplinks/search/deep_links.ts b/packages/deeplinks/search/deep_links.ts index fbd8e363948cd..352640e6d4947 100644 --- a/packages/deeplinks/search/deep_links.ts +++ b/packages/deeplinks/search/deep_links.ts @@ -15,6 +15,7 @@ import { ENTERPRISE_SEARCH_ANALYTICS_APP_ID, ENTERPRISE_SEARCH_APPSEARCH_APP_ID, ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, + SERVERLESS_ES_SEARCH_PLAYGROUND_ID, } from './constants'; export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID; @@ -25,6 +26,7 @@ export type EnterpriseSearchAppsearchApp = typeof ENTERPRISE_SEARCH_APPSEARCH_AP export type EnterpriseSearchWorkplaceSearchApp = typeof ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID; export type ServerlessSearchApp = typeof SERVERLESS_ES_APP_ID; export type ConnectorsId = typeof SERVERLESS_ES_CONNECTORS_ID; +export type SearchPlaygroundId = typeof SERVERLESS_ES_SEARCH_PLAYGROUND_ID; export type ContentLinkId = 'searchIndices' | 'connectors' | 'webCrawlers'; @@ -41,6 +43,7 @@ export type DeepLinkId = | EnterpriseSearchWorkplaceSearchApp | ServerlessSearchApp | ConnectorsId + | SearchPlaygroundId | `${EnterpriseSearchContentApp}:${ContentLinkId}` | `${EnterpriseSearchApplicationsApp}:${ApplicationsLinkId}` | `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}`; diff --git a/packages/deeplinks/security/deep_links.ts b/packages/deeplinks/security/deep_links.ts index 7cf870a6ecdff..ea1d818cf8010 100644 --- a/packages/deeplinks/security/deep_links.ts +++ b/packages/deeplinks/security/deep_links.ts @@ -8,9 +8,9 @@ export enum SecurityPageName { administration = 'administration', - aiInsights = 'ai_insights', alerts = 'alerts', assets = 'assets', + attackDiscovery = 'attack_discovery', blocklist = 'blocklist', /* * Warning: Computed values are not permitted in an enum with string valued members diff --git a/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.test.tsx new file mode 100644 index 0000000000000..c4bb2b4e13014 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.test.tsx @@ -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 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 { render, screen, within } from '@testing-library/react'; +import { RuleTypeList } from './rule_type_list'; +import { RuleTypeWithDescription } from '../types'; + +const ruleTypes: RuleTypeWithDescription[] = [ + { + id: '1', + name: 'B - Rule Type 1', + enabledInLicense: true, + description: 'Description 1', + actionVariables: { + params: [], + }, + authorizedConsumers: {}, + actionGroups: [], + producer: 'stackAlerts', + minimumLicenseRequired: 'basic', + recoveryActionGroup: { + id: '1', + name: 'default', + }, + defaultActionGroupId: '1', + }, + { + id: '2', + name: 'Rule Type 2', + enabledInLicense: false, + description: 'Description 2', + actionVariables: { + params: [], + }, + authorizedConsumers: {}, + actionGroups: [], + producer: 'stackAlerts', + minimumLicenseRequired: 'platinum', + recoveryActionGroup: { + id: '2', + name: 'default', + }, + defaultActionGroupId: '2', + }, + { + id: '3', + name: 'A - Rule Type 3', + enabledInLicense: true, + description: 'Description 3', + actionVariables: { + params: [], + }, + authorizedConsumers: {}, + actionGroups: [], + producer: 'stackAlerts', + minimumLicenseRequired: 'basic', + recoveryActionGroup: { + id: '3', + name: 'default', + }, + defaultActionGroupId: '3', + }, +]; + +describe('RuleTypeList', () => { + it('should sort by enabled in license first and then alphabetically', async () => { + render( + + ); + + const ruleListEl = await screen.findAllByTestId('-SelectOption', { exact: false }); + const firstRuleInList = within(ruleListEl[0]).getByRole('button', { name: 'A - Rule Type 3' }); + expect(firstRuleInList).not.toBeDisabled(); + const secondRuleInList = within(ruleListEl[1]).getByRole('button', { name: 'B - Rule Type 1' }); + expect(secondRuleInList).not.toBeDisabled(); + const thirdRuleInList = within(ruleListEl[2]).getByRole('button', { name: 'Rule Type 2' }); + expect(thirdRuleInList).toBeDisabled(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.tsx b/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.tsx index 8bb47f145de9a..3bf9b5df34af3 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_type_modal/components/rule_type_list.tsx @@ -38,6 +38,21 @@ const producerToDisplayName = (producer: string) => { return Reflect.get(PRODUCER_DISPLAY_NAMES, producer) ?? producer; }; +/** + * Sorts an array of objects (ruleTypes) based on two criteria: + * 1. First, sorts by the 'enabledInLicense' property. + * - If 'enabledInLicense' is the same for both rules (a and b), + * it sorts them based on the 'name' property using locale-sensitive string comparison. + * 2. If 'enabledInLicense' is different for a and b, + * places the object with 'enabledInLicense' set to true before the one with 'enabledInLicense' set to false. + */ +const sortRuleTypes = (a: RuleTypeWithDescription, b: RuleTypeWithDescription) => { + if (a.enabledInLicense === b.enabledInLicense) { + return a.name.localeCompare(b.name); + } + return a.enabledInLicense ? -1 : 1; +}; + export const RuleTypeList: React.FC = ({ ruleTypes, onSelectRuleType, @@ -47,7 +62,7 @@ export const RuleTypeList: React.FC = ({ onClearFilters, showCategories = true, }) => { - const ruleTypesList = [...ruleTypes].sort((a, b) => a.name.localeCompare(b.name)); + const ruleTypesList = [...ruleTypes].sort(sortRuleTypes); const { euiTheme } = useEuiTheme(); const facetList = useMemo( @@ -154,6 +169,7 @@ export const RuleTypeList: React.FC = ({ } style={{ marginRight: '8px', flexGrow: 0 }} data-test-subj={`${rule.id}-SelectOption`} + isDisabled={rule.enabledInLicense === false} /> diff --git a/packages/kbn-apm-synthtrace-client/index.ts b/packages/kbn-apm-synthtrace-client/index.ts index c1f2bd25750c0..4eb96051bb5ba 100644 --- a/packages/kbn-apm-synthtrace-client/index.ts +++ b/packages/kbn-apm-synthtrace-client/index.ts @@ -19,7 +19,6 @@ export type { OSInfo, } from './src/lib/apm/mobile_device'; export { httpExitSpan } from './src/lib/apm/span'; -export { type AssetDocument } from './src/lib/assets'; export { DistributedTrace } from './src/lib/dsl/distributed_trace_client'; export { serviceMap } from './src/lib/dsl/service_map'; export type { Fields } from './src/lib/entity'; @@ -34,3 +33,4 @@ export { generateLongId, generateShortId } from './src/lib/utils/generate_id'; export { appendHash, hashKeysOf } from './src/lib/utils/hash'; export type { ESDocumentWithOperation, SynthtraceESAction, SynthtraceGenerator } from './src/types'; export { log, type LogDocument } from './src/lib/logs'; +export { type AssetDocument } from './src/lib/assets'; diff --git a/packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts b/packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts index d55d34cc18841..f968d710fe408 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts @@ -211,6 +211,7 @@ export type ApmFields = Fields<{ span: { id: string }; }>; 'url.original': string; + 'url.domain': string; }> & ApmApplicationMetricFields & ExperimentalFields; diff --git a/packages/kbn-apm-synthtrace-client/src/lib/apm/service.ts b/packages/kbn-apm-synthtrace-client/src/lib/apm/service.ts index 668834e73106e..1925c0cdcfd13 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/apm/service.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/apm/service.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { ServiceAsset } from '../assets'; import { Entity } from '../entity'; import { ApmFields } from './apm_fields'; import { Instance } from './instance'; @@ -19,15 +18,6 @@ export class Service extends Entity { 'host.name': instanceName, }); } - - asset() { - return new ServiceAsset({ - 'asset.kind': 'service', - 'asset.id': this.fields['service.name']!, - 'asset.name': this.fields['service.name'], - 'asset.ean': `service:${this.fields['service.name']}`, - }); - } } export function service(name: string, environment: string, agentName: string): Service; diff --git a/packages/kbn-apm-synthtrace-client/src/lib/assets/asset.ts b/packages/kbn-apm-synthtrace-client/src/lib/assets/asset.ts new file mode 100644 index 0000000000000..e91c1b2869aa0 --- /dev/null +++ b/packages/kbn-apm-synthtrace-client/src/lib/assets/asset.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 { Fields } from '../entity'; +import { Serializable } from '../serializable'; + +type AssetType = 'host' | 'pod' | 'container' | 'service'; + +export interface AssetDocument extends Fields { + 'asset.id': string; + 'asset.type': AssetType; + 'asset.first_seen': string; + 'asset.last_seen': string; + 'asset.identifying_metadata': string[]; + 'asset.signalTypes': { + 'asset.traces'?: boolean; + 'asset.logs'?: boolean; + }; +} + +export class Asset extends Serializable {} diff --git a/packages/kbn-apm-synthtrace-client/src/lib/assets/index.ts b/packages/kbn-apm-synthtrace-client/src/lib/assets/index.ts index f449dd75972b7..45f38114abef4 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/assets/index.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/assets/index.ts @@ -6,50 +6,6 @@ * Side Public License, v 1. */ -// eslint-disable-next-line max-classes-per-file -import { Fields } from '../entity'; -import { Serializable } from '../serializable'; +import { ServiceAssetDocument } from './service_assets'; -// Can I pull in types from asset-manager here? -type AssetKind = 'host' | 'pod' | 'container' | 'service'; - -export interface AssetKindDocument extends Fields { - 'asset.kind': T; - 'asset.ean': string; - 'asset.id': string; - 'asset.name'?: string; - 'asset.parents'?: string[]; - 'asset.children'?: string[]; - 'asset.references'?: string[]; -} - -// What is the best way to tie up relationships? -// With these setters we can go both ways but the entities might be able to produce -// pre-linked assets as well -class Asset extends Serializable> { - parents(parents: string[]) { - this.fields['asset.parents'] = parents; - } - - children(children: string[]) { - this.fields['asset.children'] = children; - } - - references(references: string[]) { - this.fields['asset.references'] = references; - } -} - -export class HostAsset extends Asset<'host'> {} - -export class PodAsset extends Asset<'pod'> {} - -export class ContainerAsset extends Asset<'container'> {} - -export class ServiceAsset extends Asset<'service'> {} - -export type AssetDocument = - | AssetKindDocument<'host'> - | AssetKindDocument<'pod'> - | AssetKindDocument<'container'> - | AssetKindDocument<'service'>; +export type AssetDocument = ServiceAssetDocument; diff --git a/packages/kbn-apm-synthtrace-client/src/lib/assets/service_assets.ts b/packages/kbn-apm-synthtrace-client/src/lib/assets/service_assets.ts new file mode 100644 index 0000000000000..5b1e64dafb3db --- /dev/null +++ b/packages/kbn-apm-synthtrace-client/src/lib/assets/service_assets.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 { Asset, AssetDocument } from './asset'; + +export interface ServiceAssetDocument extends AssetDocument { + 'service.language.name'?: string; + 'service.name': string; + 'service.node.name'?: string; + 'service.environment'?: string; +} + +export class ServiceAsset extends Asset { + constructor(fields: Omit) { + super({ 'asset.type': 'service', ...fields }); + } +} diff --git a/packages/kbn-apm-synthtrace-client/src/lib/infra/container.ts b/packages/kbn-apm-synthtrace-client/src/lib/infra/container.ts index 2f1cb1b7c27e9..d9bef38c2fdb5 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/infra/container.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/infra/container.ts @@ -7,7 +7,6 @@ */ /* eslint-disable max-classes-per-file */ -import { ContainerAsset } from '../assets'; import { Entity, Fields } from '../entity'; import { Serializable } from '../serializable'; @@ -25,15 +24,6 @@ export class Container extends Entity { 'kubernetes.container.cpu.usage.limit.pct': 46, }); } - - asset() { - return new ContainerAsset({ - 'asset.kind': 'container', - 'asset.id': this.fields['container.id'], - 'asset.name': this.fields['container.id'], - 'asset.ean': `container:${this.fields['container.id']}`, - }); - } } export interface ContainerMetricsDocument extends ContainerDocument { diff --git a/packages/kbn-apm-synthtrace-client/src/lib/infra/host.ts b/packages/kbn-apm-synthtrace-client/src/lib/infra/host.ts index 7d599cf1b4b86..136b3cf227a9d 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/infra/host.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/infra/host.ts @@ -5,9 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - /* eslint-disable max-classes-per-file */ -import { HostAsset } from '../assets'; import { Entity, Fields } from '../entity'; import { Serializable } from '../serializable'; import { pod } from './pod'; @@ -90,15 +88,6 @@ class Host extends Entity { }); } - asset() { - return new HostAsset({ - 'asset.kind': 'host', - 'asset.id': this.fields['host.hostname'], - 'asset.name': this.fields['host.hostname'], - 'asset.ean': `host:${this.fields['host.hostname']}`, - }); - } - pod(uid: string) { return pod(uid, this.fields['host.hostname']); } diff --git a/packages/kbn-apm-synthtrace-client/src/lib/infra/pod.ts b/packages/kbn-apm-synthtrace-client/src/lib/infra/pod.ts index 618db5a69b77a..9f5c999184176 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/infra/pod.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/infra/pod.ts @@ -7,7 +7,6 @@ */ /* eslint-disable max-classes-per-file */ -import { PodAsset } from '../assets'; import { Entity, Fields } from '../entity'; import { Serializable } from '../serializable'; import { container } from './container'; @@ -26,15 +25,6 @@ export class Pod extends Entity { }); } - asset() { - return new PodAsset({ - 'asset.kind': 'pod', - 'asset.id': this.fields['kubernetes.pod.uid'], - 'asset.name': this.fields['kubernetes.pod.uid'], - 'asset.ean': `pod:${this.fields['kubernetes.pod.uid']}`, - }); - } - container(id: string) { return container(id, this.fields['kubernetes.pod.uid'], this.fields['kubernetes.node.name']); } diff --git a/packages/kbn-apm-synthtrace/index.ts b/packages/kbn-apm-synthtrace/index.ts index 378d7f610539d..8ed45126e7cf9 100644 --- a/packages/kbn-apm-synthtrace/index.ts +++ b/packages/kbn-apm-synthtrace/index.ts @@ -10,14 +10,9 @@ export { createLogger, LogLevel } from './src/lib/utils/create_logger'; export { ApmSynthtraceEsClient } from './src/lib/apm/client/apm_synthtrace_es_client'; export { ApmSynthtraceKibanaClient } from './src/lib/apm/client/apm_synthtrace_kibana_client'; - export { InfraSynthtraceEsClient } from './src/lib/infra/infra_synthtrace_es_client'; export { InfraSynthtraceKibanaClient } from './src/lib/infra/infra_synthtrace_kibana_client'; - -export { AssetsSynthtraceEsClient } from './src/lib/assets/assets_synthtrace_es_client'; - export { MonitoringSynthtraceEsClient } from './src/lib/monitoring/monitoring_synthtrace_es_client'; - export { LogsSynthtraceEsClient } from './src/lib/logs/logs_synthtrace_es_client'; export { diff --git a/packages/kbn-apm-synthtrace/src/cli/scenario.ts b/packages/kbn-apm-synthtrace/src/cli/scenario.ts index b2a1fc51a5b87..990682cb65aee 100644 --- a/packages/kbn-apm-synthtrace/src/cli/scenario.ts +++ b/packages/kbn-apm-synthtrace/src/cli/scenario.ts @@ -7,10 +7,11 @@ */ import { Timerange } from '@kbn/apm-synthtrace-client'; -import { Logger } from '../lib/utils/create_logger'; -import { RunOptions } from './utils/parse_run_cli_flags'; import { ApmSynthtraceEsClient, InfraSynthtraceEsClient, LogsSynthtraceEsClient } from '../..'; +import { AssetsSynthtraceEsClient } from '../lib/assets/assets_synthtrace_es_client'; +import { Logger } from '../lib/utils/create_logger'; import { ScenarioReturnType } from '../lib/utils/with_client'; +import { RunOptions } from './utils/parse_run_cli_flags'; type Generate = (options: { range: Timerange; @@ -18,6 +19,7 @@ type Generate = (options: { apmEsClient: ApmSynthtraceEsClient; logsEsClient: LogsSynthtraceEsClient; infraEsClient: InfraSynthtraceEsClient; + assetsEsClient: AssetsSynthtraceEsClient; }; }) => ScenarioReturnType | Array>; @@ -26,6 +28,7 @@ export type Scenario = (options: RunOptions & { logger: Logger }) => Pr apmEsClient: ApmSynthtraceEsClient; logsEsClient: LogsSynthtraceEsClient; infraEsClient: InfraSynthtraceEsClient; + assetsEsClient: AssetsSynthtraceEsClient; }) => Promise; generate: Generate; }>; diff --git a/packages/kbn-apm-synthtrace/src/cli/utils/bootstrap.ts b/packages/kbn-apm-synthtrace/src/cli/utils/bootstrap.ts index 505b79be458c6..be9f0a313fe0a 100644 --- a/packages/kbn-apm-synthtrace/src/cli/utils/bootstrap.ts +++ b/packages/kbn-apm-synthtrace/src/cli/utils/bootstrap.ts @@ -13,6 +13,7 @@ import { getInfraEsClient } from './get_infra_es_client'; import { getKibanaClient } from './get_kibana_client'; import { getServiceUrls } from './get_service_urls'; import { RunOptions } from './parse_run_cli_flags'; +import { getAssetsEsClient } from './get_assets_es_client'; export async function bootstrap(runOptions: RunOptions) { const logger = createLogger(runOptions.logLevel); @@ -54,10 +55,17 @@ export async function bootstrap(runOptions: RunOptions) { concurrency: runOptions.concurrency, }); + const assetsEsClient = getAssetsEsClient({ + target: esUrl, + logger, + concurrency: runOptions.concurrency, + }); + if (runOptions.clean) { await apmEsClient.clean(); await logsEsClient.clean(); await infraEsClient.clean(); + await assetsEsClient.clean(); } return { @@ -65,6 +73,7 @@ export async function bootstrap(runOptions: RunOptions) { apmEsClient, logsEsClient, infraEsClient, + assetsEsClient, version, kibanaUrl, esUrl, diff --git a/packages/kbn-apm-synthtrace/src/cli/utils/get_assets_es_client.ts b/packages/kbn-apm-synthtrace/src/cli/utils/get_assets_es_client.ts new file mode 100644 index 0000000000000..059a837492699 --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/cli/utils/get_assets_es_client.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 { Client } from '@elastic/elasticsearch'; +import { AssetsSynthtraceEsClient } from '../../lib/assets/assets_synthtrace_es_client'; +import { Logger } from '../../lib/utils/create_logger'; +import { RunOptions } from './parse_run_cli_flags'; + +export function getAssetsEsClient({ + target, + logger, + concurrency, +}: Pick & { + target: string; + logger: Logger; +}) { + const client = new Client({ + node: target, + }); + + return new AssetsSynthtraceEsClient({ + client, + logger, + concurrency, + refreshAfterIndex: true, + }); +} diff --git a/packages/kbn-apm-synthtrace/src/cli/utils/start_live_data_upload.ts b/packages/kbn-apm-synthtrace/src/cli/utils/start_live_data_upload.ts index 24c942b65c5fc..74468dbaa1569 100644 --- a/packages/kbn-apm-synthtrace/src/cli/utils/start_live_data_upload.ts +++ b/packages/kbn-apm-synthtrace/src/cli/utils/start_live_data_upload.ts @@ -25,7 +25,9 @@ export async function startLiveDataUpload({ }) { const file = runOptions.file; - const { logger, apmEsClient, logsEsClient, infraEsClient } = await bootstrap(runOptions); + const { logger, apmEsClient, logsEsClient, infraEsClient, assetsEsClient } = await bootstrap( + runOptions + ); const scenario = await getScenario({ file, logger }); const { generate } = await scenario({ ...runOptions, logger }); @@ -62,7 +64,7 @@ export async function startLiveDataUpload({ const generatorsAndClients = generate({ range: timerange(bucketFrom.getTime(), bucketTo.getTime()), - clients: { logsEsClient, apmEsClient, infraEsClient }, + clients: { logsEsClient, apmEsClient, infraEsClient, assetsEsClient }, }); const generatorsAndClientsArray = castArray(generatorsAndClients); diff --git a/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts b/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts index 2d1e1d19c5162..fc7c70b0d6bc7 100644 --- a/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts +++ b/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts @@ -16,6 +16,7 @@ import { loggerProxy } from './logger_proxy'; import { RunOptions } from './parse_run_cli_flags'; import { getLogsEsClient } from './get_logs_es_client'; import { getInfraEsClient } from './get_infra_es_client'; +import { getAssetsEsClient } from './get_assets_es_client'; export interface WorkerData { bucketFrom: Date; @@ -30,6 +31,12 @@ const { bucketFrom, bucketTo, runOptions, esUrl, version } = workerData as Worke async function start() { const logger = loggerProxy; + const assetsEsClient = getAssetsEsClient({ + concurrency: runOptions.concurrency, + target: esUrl, + logger, + }); + const apmEsClient = getApmEsClient({ concurrency: runOptions.concurrency, target: esUrl, @@ -62,6 +69,7 @@ async function start() { apmEsClient, logsEsClient, infraEsClient, + assetsEsClient, }); } @@ -70,7 +78,7 @@ async function start() { const generatorsAndClients = logger.perf('generate_scenario', () => generate({ range: timerange(bucketFrom, bucketTo), - clients: { logsEsClient, apmEsClient, infraEsClient }, + clients: { logsEsClient, apmEsClient, infraEsClient, assetsEsClient }, }) ); diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/get_routing_transform.ts b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/get_routing_transform.ts index 4ca2498c610b1..a441e56032426 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/get_routing_transform.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/get_routing_transform.ts @@ -16,7 +16,6 @@ export function getRoutingTransform() { let index: string | undefined; const namespace = 'default'; - switch (document['processor.event']) { case 'transaction': case 'span': diff --git a/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_assets_aggregator.ts b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_assets_aggregator.ts new file mode 100644 index 0000000000000..269dd3490468e --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_assets_aggregator.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 { LogDocument } from '@kbn/apm-synthtrace-client'; +import { createAssetsAggregatorFactory } from '../../utils/create_assets_aggregator_factory'; + +export const createLogsAssetsAggregator = createAssetsAggregatorFactory(); diff --git a/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_service_assets_aggregator.ts b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_service_assets_aggregator.ts new file mode 100644 index 0000000000000..6a5855f943f94 --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_logs_service_assets_aggregator.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { hashKeysOf, LogDocument } from '@kbn/apm-synthtrace-client'; +import { ServiceAssetDocument } from '@kbn/apm-synthtrace-client/src/lib/assets/service_assets'; +import { identity, noop } from 'lodash'; +import { createLogsAssetsAggregator } from './create_logs_assets_aggregator'; + +const KEY_FIELDS: Array = ['service.name']; + +export function createLogsServiceAssetsAggregator() { + return createLogsAssetsAggregator( + { + filter: (event) => event['input.type'] === 'logs', + getAggregateKey: (event) => { + // see https://github.com/elastic/apm-server/blob/main/x-pack/apm-server/aggregation/txmetrics/aggregator.go + return hashKeysOf(event as LogDocument, KEY_FIELDS as Array); + }, + init: (event, firstSeen, lastSeen) => { + return { + 'asset.id': event['service.name']!, + 'asset.type': 'service', + 'asset.identifying_metadata': ['service.name'], + 'asset.first_seen': firstSeen, + 'asset.last_seen': lastSeen, + 'asset.signalTypes': { + 'asset.logs': true, + }, + 'service.name': event['service.name']!, + }; + }, + }, + noop, + identity + ); +} diff --git a/examples/embeddable_examples/public/list_container/index.ts b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_assets_aggregator.ts similarity index 59% rename from examples/embeddable_examples/public/list_container/index.ts rename to packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_assets_aggregator.ts index 299c3eeae42cd..65e5e2c9c7e63 100644 --- a/examples/embeddable_examples/public/list_container/index.ts +++ b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_assets_aggregator.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ -export { ListContainer, LIST_CONTAINER } from './list_container'; -export type { ListContainerFactory } from './list_container_factory'; -export { ListContainerFactoryDefinition } from './list_container_factory'; +import { ApmFields } from '@kbn/apm-synthtrace-client'; +import { createAssetsAggregatorFactory } from '../../utils/create_assets_aggregator_factory'; + +export const createTracesAssetsAggregator = createAssetsAggregatorFactory(); diff --git a/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_service_assets_aggregator.ts b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_service_assets_aggregator.ts new file mode 100644 index 0000000000000..3ef520793f041 --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/assets/aggregators/create_traces_service_assets_aggregator.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 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 { ApmFields, hashKeysOf } from '@kbn/apm-synthtrace-client'; +import { ServiceAssetDocument } from '@kbn/apm-synthtrace-client/src/lib/assets/service_assets'; +import { identity, noop } from 'lodash'; +import { createTracesAssetsAggregator } from './create_traces_assets_aggregator'; + +const KEY_FIELDS: Array = ['service.name']; + +export function createTracesServiceAssetsAggregator() { + return createTracesAssetsAggregator( + { + filter: (event) => event['processor.event'] === 'transaction', + getAggregateKey: (event) => { + // see https://github.com/elastic/apm-server/blob/main/x-pack/apm-server/aggregation/txmetrics/aggregator.go + return hashKeysOf(event as ApmFields, KEY_FIELDS as Array); + }, + init: (event, firstSeen, lastSeen) => { + return { + 'asset.id': event['service.name']!, + 'asset.type': 'service', + 'asset.identifying_metadata': ['service.name'], + 'asset.first_seen': firstSeen, + 'asset.last_seen': lastSeen, + 'asset.signalTypes': { + 'asset.traces': true, + }, + 'service.environment': event['service.environment'], + 'service.name': event['service.name']!, + 'service.node.name': event['service.node.name'], + 'service.language.name': event['service.language.name'], + }; + }, + }, + noop, + identity + ); +} diff --git a/packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts b/packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts index 3f74304119d78..2f12a4b3d1593 100644 --- a/packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts +++ b/packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts @@ -7,12 +7,21 @@ */ import { Client } from '@elastic/elasticsearch'; -import { AssetDocument, ESDocumentWithOperation } from '@kbn/apm-synthtrace-client'; -import { pipeline, Readable, Transform } from 'stream'; +import { + ApmFields, + AssetDocument, + ESDocumentWithOperation, + LogDocument, +} from '@kbn/apm-synthtrace-client'; +import { merge } from 'lodash'; +import { PassThrough, pipeline, Readable, Transform } from 'stream'; import { SynthtraceEsClient, SynthtraceEsClientOptions } from '../shared/base_client'; import { getDedotTransform } from '../shared/get_dedot_transform'; import { getSerializeTransform } from '../shared/get_serialize_transform'; import { Logger } from '../utils/create_logger'; +import { fork } from '../utils/stream_utils'; +import { createLogsServiceAssetsAggregator } from './aggregators/create_logs_service_assets_aggregator'; +import { createTracesServiceAssetsAggregator } from './aggregators/create_traces_service_assets_aggregator'; export type AssetsSynthtraceEsClientOptions = Omit; @@ -22,15 +31,22 @@ export class AssetsSynthtraceEsClient extends SynthtraceEsClient ...options, pipeline: assetsPipeline(), }); - this.dataStreams = ['assets-*']; + this.indices = ['assets']; } } function assetsPipeline() { return (base: Readable) => { + const aggregators = [ + createTracesServiceAssetsAggregator(), + createLogsServiceAssetsAggregator(), + ]; return pipeline( base, getSerializeTransform(), + fork(new PassThrough({ objectMode: true }), ...aggregators), + getAssetsFilterTransform(), + getMergeAssetsTransform(), getRoutingTransform(), getDedotTransform(), (err: unknown) => { @@ -42,14 +58,55 @@ function assetsPipeline() { }; } +function getAssetsFilterTransform() { + return new Transform({ + objectMode: true, + transform( + document: ESDocumentWithOperation, + encoding, + callback + ) { + if ('asset.id' in document) { + callback(null, document); + } else { + callback(); + } + }, + }); +} + +function getMergeAssetsTransform() { + const mergedDocuments: Record = {}; + return new Transform({ + objectMode: true, + transform(nextDocument: ESDocumentWithOperation, encoding, callback) { + const assetId = nextDocument['asset.id']; + if (!mergedDocuments[assetId]) { + mergedDocuments[assetId] = { ...nextDocument }; + } else { + const mergedDocument = mergedDocuments[assetId]; + mergedDocument['asset.signalTypes'] = merge( + mergedDocument['asset.signalTypes'], + nextDocument['asset.signalTypes'] + ); + } + callback(); + }, + flush(callback) { + Object.values(mergedDocuments).forEach((item) => this.push(item)); + callback(); + }, + }); +} + function getRoutingTransform() { return new Transform({ objectMode: true, transform(document: ESDocumentWithOperation, encoding, callback) { - if ('asset.kind' in document) { - document._index = `assets-${document['asset.kind']}-default`; + if ('asset.type' in document) { + document._index = `assets`; } else { - throw new Error('Cannot determine index for event'); + throw new Error(`Cannot determine index for event ${JSON.stringify(document)}`); } callback(null, document); diff --git a/packages/kbn-apm-synthtrace/src/lib/shared/base_client.ts b/packages/kbn-apm-synthtrace/src/lib/shared/base_client.ts index 4b00a574b447e..ed2b7b17577cd 100644 --- a/packages/kbn-apm-synthtrace/src/lib/shared/base_client.ts +++ b/packages/kbn-apm-synthtrace/src/lib/shared/base_client.ts @@ -36,6 +36,7 @@ export class SynthtraceEsClient { private pipelineCallback: (base: Readable) => NodeJS.WritableStream; protected dataStreams: string[] = []; + protected indices: string[] = []; constructor(options: { client: Client; logger: Logger } & SynthtraceEsClientOptions) { this.client = options.client; @@ -46,19 +47,40 @@ export class SynthtraceEsClient { } async clean() { - this.logger.info(`Cleaning data streams ${this.dataStreams.join(',')}`); - - await this.client.indices.deleteDataStream({ - name: this.dataStreams.join(','), - expand_wildcards: ['open', 'hidden'], - }); + this.logger.info( + `Cleaning data streams "${this.dataStreams.join(',')}" and indices "${this.indices.join( + ',' + )}"` + ); + + await Promise.all([ + ...(this.dataStreams.length + ? [ + this.client.indices.deleteDataStream({ + name: this.dataStreams.join(','), + expand_wildcards: ['open', 'hidden'], + }), + ] + : []), + ...(this.indices.length + ? [ + this.client.indices.delete({ + index: this.indices.join(','), + expand_wildcards: ['open', 'hidden'], + ignore_unavailable: true, + allow_no_indices: true, + }), + ] + : []), + ]); } async refresh() { - this.logger.info(`Refreshing ${this.dataStreams.join(',')}`); + const allIndices = this.dataStreams.concat(this.indices); + this.logger.info(`Refreshing "${allIndices.join(',')}"`); return this.client.indices.refresh({ - index: this.dataStreams, + index: allIndices, allow_no_indices: true, ignore_unavailable: true, expand_wildcards: ['open', 'hidden'], diff --git a/packages/kbn-apm-synthtrace/src/lib/shared/get_dedot_transform.ts b/packages/kbn-apm-synthtrace/src/lib/shared/get_dedot_transform.ts index 86a827eb704d0..fb8679aeddd2d 100644 --- a/packages/kbn-apm-synthtrace/src/lib/shared/get_dedot_transform.ts +++ b/packages/kbn-apm-synthtrace/src/lib/shared/get_dedot_transform.ts @@ -35,7 +35,9 @@ export function getDedotTransform(keepFlattenedFields: boolean = false) { } delete target.meta; - target['@timestamp'] = new Date(target['@timestamp']!).toISOString(); + if (target['@timestamp']) { + target['@timestamp'] = new Date(target['@timestamp']).toISOString(); + } callback(null, target); }, diff --git a/packages/kbn-apm-synthtrace/src/lib/utils/create_assets_aggregator_factory.ts b/packages/kbn-apm-synthtrace/src/lib/utils/create_assets_aggregator_factory.ts new file mode 100644 index 0000000000000..1c84e9ffb41fe --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/utils/create_assets_aggregator_factory.ts @@ -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 { appendHash, AssetDocument, Fields } from '@kbn/apm-synthtrace-client'; +import { Duplex, PassThrough } from 'stream'; + +export function createAssetsAggregatorFactory() { + return function ( + { + filter, + getAggregateKey, + init, + }: { + filter: (event: TFields) => boolean; + getAggregateKey: (event: TFields) => string; + init: (event: TFields, firstSeen: string, lastSeen: string) => TAsset; + }, + reduce: (asset: TAsset, event: TFields) => void, + serialize: (asset: TAsset) => TAsset + ) { + const assets: Map = new Map(); + let toFlush: TAsset[] = []; + let cb: (() => void) | undefined; + + function flush(stream: Duplex, includeCurrentAssets: boolean, callback?: () => void) { + const allItems = [...toFlush]; + + toFlush = []; + + if (includeCurrentAssets) { + allItems.push(...assets.values()); + assets.clear(); + } + + while (allItems.length) { + const next = allItems.shift()!; + const serialized = serialize(next); + const shouldWriteNext = stream.push(serialized); + if (!shouldWriteNext) { + toFlush = allItems; + cb = callback; + return; + } + } + + const next = cb; + cb = undefined; + next?.(); + callback?.(); + } + + const timeRanges: number[] = []; + + return new PassThrough({ + objectMode: true, + read() { + flush(this, false, cb); + }, + final(callback) { + flush(this, true, callback); + }, + write(event: TFields, encoding, callback) { + if (!filter(event)) { + callback(); + return; + } + timeRanges.push(event['@timestamp']!); + const firstSeen = new Date(Math.min(...timeRanges)).toISOString(); + const lastSeen = new Date(Math.max(...timeRanges)).toISOString(); + + const key = appendHash(getAggregateKey(event), ''); + + let asset = assets.get(key); + + if (asset) { + // @ts-ignore + asset['asset.last_seen'] = lastSeen; + } else { + asset = init({ ...event }, firstSeen, lastSeen); + assets.set(key, asset); + } + + reduce(asset, event); + callback(); + }, + }); + }; +} diff --git a/packages/kbn-apm-synthtrace/src/scenarios/simple_trace.ts b/packages/kbn-apm-synthtrace/src/scenarios/simple_trace.ts index 1d5ee6f53d63c..fc03d49b9a178 100644 --- a/packages/kbn-apm-synthtrace/src/scenarios/simple_trace.ts +++ b/packages/kbn-apm-synthtrace/src/scenarios/simple_trace.ts @@ -33,6 +33,9 @@ const scenario: Scenario = async (runOptions) => { instance .transaction({ transactionName }) .timestamp(timestamp) + .defaults({ + 'url.domain': 'foo.bar', + }) .duration(1000) .success() .children( diff --git a/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts b/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts new file mode 100644 index 0000000000000..afdec115f5b9e --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts @@ -0,0 +1,214 @@ +/* + * Copyright 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 { + apm, + ApmFields, + generateLongId, + generateShortId, + Instance, + log, + Serializable, +} from '@kbn/apm-synthtrace-client'; +import { Readable } from 'stream'; +import { Scenario } from '../cli/scenario'; +import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment'; +import { withClient } from '../lib/utils/with_client'; + +const ENVIRONMENT = getSynthtraceEnvironment(__filename); + +const scenario: Scenario = async (runOptions) => { + const { logger } = runOptions; + const { numServices = 3 } = runOptions.scenarioOpts || {}; + + return { + generate: ({ range, clients: { apmEsClient, assetsEsClient, logsEsClient } }) => { + const transactionName = '240rpm/75% 1000ms'; + + const successfulTimestamps = range.interval('1m').rate(1); + const failedTimestamps = range.interval('1m').rate(1); + const serviceNames = [...Array(numServices).keys()].map((index) => `synth-node-${index}`); + + const instances = serviceNames.map((serviceName) => + apm + .service({ name: serviceName, environment: ENVIRONMENT, agentName: 'nodejs' }) + .instance('instance') + ); + const instanceSpans = (instance: Instance) => { + const successfulTraceEvents = successfulTimestamps.generator((timestamp) => + instance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(1000) + .success() + .children( + instance + .span({ + spanName: 'GET apm-*/_search', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .duration(1000) + .success() + .destination('elasticsearch') + .timestamp(timestamp), + instance + .span({ spanName: 'custom_operation', spanType: 'custom' }) + .duration(100) + .success() + .timestamp(timestamp) + ) + ); + + const failedTraceEvents = failedTimestamps.generator((timestamp) => + instance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(1000) + .failure() + .errors( + instance + .error({ + message: '[ResponseError] index_not_found_exception', + type: 'ResponseError', + }) + .timestamp(timestamp + 50) + ) + ); + + const metricsets = range + .interval('30s') + .rate(1) + .generator((timestamp) => + instance + .appMetrics({ + 'system.memory.actual.free': 800, + 'system.memory.total': 1000, + 'system.cpu.total.norm.pct': 0.6, + 'system.process.cpu.total.norm.pct': 0.7, + }) + .timestamp(timestamp) + ); + + return [...successfulTraceEvents, ...failedTraceEvents, ...metricsets]; + }; + + const logsWithTraces = range + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(3) + .fill(0) + .map(() => { + const { message, level } = { + message: 'A simple log with something random in the middle', + level: 'info', + }; + const CLUSTER = { + clusterId: generateShortId(), + clusterName: 'synth-cluster-2', + namespace: 'production', + }; + + return log + .create() + .message(message.replace('', generateShortId())) + .logLevel(level) + .service(serviceNames[0]) + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'nodejs', + 'orchestrator.cluster.name': CLUSTER.clusterName, + 'orchestrator.cluster.id': CLUSTER.clusterId, + 'orchestrator.namespace': CLUSTER.namespace, + 'container.name': `${serviceNames[0]}-${generateShortId()}`, + 'orchestrator.resource.id': generateShortId(), + 'cloud.provider': 'gcp', + 'cloud.region': 'eu-central-1', + 'cloud.availability_zone': 'eu-central-1a', + 'cloud.project.id': generateShortId(), + 'cloud.instance.id': generateShortId(), + 'log.file.path': `/logs/${generateLongId()}/error.txt`, + }) + .timestamp(timestamp); + }); + }); + + const logsOnly = range + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(3) + .fill(0) + .map(() => { + const { message, level } = { + message: 'A simple log with something random in the middle', + level: 'info', + }; + const CLUSTER = { + clusterId: generateShortId(), + clusterName: 'synth-cluster-2', + namespace: 'production', + }; + + return log + .create() + .message(message.replace('', generateShortId())) + .logLevel(level) + .service('synth-java') + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'nodejs', + 'orchestrator.cluster.name': CLUSTER.clusterName, + 'orchestrator.cluster.id': CLUSTER.clusterId, + 'orchestrator.namespace': CLUSTER.namespace, + 'container.name': `synth-java-${generateShortId()}`, + 'orchestrator.resource.id': generateShortId(), + 'cloud.provider': 'gcp', + 'cloud.region': 'eu-central-1', + 'cloud.availability_zone': 'eu-central-1a', + 'cloud.project.id': generateShortId(), + 'cloud.instance.id': generateShortId(), + 'log.file.path': `/logs/${generateLongId()}/error.txt`, + }) + .timestamp(timestamp); + }); + }); + + function* createGeneratorFromArray(arr: Array>) { + yield* arr; + } + + const logsValuesArray = [...logsWithTraces, ...logsOnly]; + const logsGen = createGeneratorFromArray(logsValuesArray); + const logsGenAssets = createGeneratorFromArray(logsValuesArray); + + const traces = instances.flatMap((instance) => instanceSpans(instance)); + const tracesGen = createGeneratorFromArray(traces); + const tracesGenAssets = createGeneratorFromArray(traces); + + return [ + withClient( + assetsEsClient, + logger.perf('generating_assets_events', () => + Readable.from(Array.from(logsGenAssets).concat(Array.from(tracesGenAssets))) + ) + ), + withClient( + logsEsClient, + logger.perf('generating_logs', () => logsGen) + ), + withClient( + apmEsClient, + logger.perf('generating_apm_events', () => tracesGen) + ), + ]; + }, + }; +}; + +export default scenario; diff --git a/packages/kbn-config-schema/src/types/object_type.test.ts b/packages/kbn-config-schema/src/types/object_type.test.ts index fe2eda8f52705..12ed554e11099 100644 --- a/packages/kbn-config-schema/src/types/object_type.test.ts +++ b/packages/kbn-config-schema/src/types/object_type.test.ts @@ -364,6 +364,14 @@ test('handles optional properties', () => { }); }); +test('handles lazy schemas', () => { + const lazySchema = () => schema.object({ foo: schema.string() }); + type SchemaType = TypeOf; + expectType({ + foo: 'bar', + }); +}); + describe('#extends', () => { it('allows to extend an existing schema by adding new properties', () => { const origin = schema.object({ diff --git a/packages/kbn-config-schema/src/types/object_type.ts b/packages/kbn-config-schema/src/types/object_type.ts index 6927a10630b1e..702d6d100847e 100644 --- a/packages/kbn-config-schema/src/types/object_type.ts +++ b/packages/kbn-config-schema/src/types/object_type.ts @@ -16,7 +16,13 @@ export type Props = Record>; export type NullableProps = Record | undefined | null>; -export type TypeOf> = RT['type']; +export type TypeOrLazyType = Type | (() => Type); + +export type TypeOf = RT extends () => Type + ? ReturnType['type'] + : RT extends Type + ? RT['type'] + : never; type OptionalProperties = Pick< Base, diff --git a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts index f57346917d286..2a0aa91fe01fc 100644 --- a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts +++ b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts @@ -8,7 +8,12 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isPlainObject } from 'lodash'; -import { Datatable, DatatableColumn, DatatableColumnType } from '@kbn/expressions-plugin/common'; +import { + Datatable, + DatatableColumn, + DatatableRow, + DatatableColumnType, +} from '@kbn/expressions-plugin/common'; import type { DataView } from '@kbn/data-views-plugin/common'; // meta fields we won't merge with our result hit @@ -33,6 +38,55 @@ interface TabifyDocsOptions { // Can be removed once the estypes.SearchHit knows about ignored_field_values type Hit = estypes.SearchHit & { ignored_field_values?: Record }; +function flattenAccum( + flat: Record, + obj: Record, + keyPrefix: string, + indexPattern?: DataView, + params?: TabifyDocsOptions +) { + for (const k in obj) { + if (!obj.hasOwnProperty(k)) { + continue; + } + const val = obj[k]; + + const key = keyPrefix + k; + const field = indexPattern?.fields.getByName(key); + + if (params?.shallow === false) { + const isNestedField = field?.type === 'nested'; + if (Array.isArray(val) && !isNestedField) { + for (let i = 0; i < val.length; i++) { + const v = val[i]; + if (isPlainObject(v)) { + flattenAccum(flat, v, key + '.', indexPattern, params); + } + } + continue; + } + } else if (flat[key] !== undefined) { + continue; + } + + const hasValidMapping = field && field.type !== 'conflict'; + const isValue = !isPlainObject(val); + + if (hasValidMapping || isValue) { + if (!flat[key]) { + flat[key] = val; + } else if (Array.isArray(flat[key])) { + flat[key].push(val); + } else { + flat[key] = [flat[key], val]; + } + continue; + } + + flattenAccum(flat, val, key + '.', indexPattern, params); + } +} + /** * Flattens an individual hit (from an ES response) into an object. This will * create flattened field names, like `user.name`. @@ -44,43 +98,10 @@ type Hit = estypes.SearchHit & { ignored_field_values?: Record; - function flatten(obj: Record, keyPrefix: string = '') { - for (const [k, val] of Object.entries(obj)) { - const key = keyPrefix + k; - - const field = indexPattern?.fields.getByName(key); + flattenAccum(flat, hit.fields || {}, '', indexPattern, params); - if (params?.shallow === false) { - const isNestedField = field?.type === 'nested'; - if (Array.isArray(val) && !isNestedField) { - val.forEach((v) => isPlainObject(v) && flatten(v, key + '.')); - continue; - } - } else if (flat[key] !== undefined) { - continue; - } - - const hasValidMapping = field && field.type !== 'conflict'; - const isValue = !isPlainObject(val); - - if (hasValidMapping || isValue) { - if (!flat[key]) { - flat[key] = val; - } else if (Array.isArray(flat[key])) { - flat[key].push(val); - } else { - flat[key] = [flat[key], val]; - } - continue; - } - - flatten(val, key + '.'); - } - } - - flatten(hit.fields || {}); if (params?.source !== false && hit._source) { - flatten(hit._source as Record); + flattenAccum(flat, hit._source as Record, '', indexPattern, params); } else if (params?.includeIgnoredValues && hit.ignored_field_values) { // If enabled merge the ignored_field_values into the flattened hit. This will // merge values that are not actually indexed by ES (i.e. ignored), e.g. because @@ -90,7 +111,11 @@ export function flattenHit(hit: Hit, indexPattern?: DataView, params?: TabifyDoc // merged them both together. We do not merge this (even if enabled) in case source has been // merged, since we would otherwise duplicate values, since ignore_field_values and _source // contain the same values. - Object.entries(hit.ignored_field_values).forEach(([fieldName, fieldValue]) => { + for (const fieldName in hit.ignored_field_values) { + if (!hit.ignored_field_values.hasOwnProperty(fieldName)) { + continue; + } + const fieldValue = hit.ignored_field_values[fieldName]; if (flat[fieldName]) { // If there was already a value from the fields API, make sure we're merging both together if (Array.isArray(flat[fieldName])) { @@ -102,37 +127,45 @@ export function flattenHit(hit: Hit, indexPattern?: DataView, params?: TabifyDoc // If no previous value was assigned we can simply use the value from `ignored_field_values` as it is flat[fieldName] = fieldValue; } - }); + } } // Merge all valid meta fields into the flattened object - indexPattern?.metaFields?.forEach((fieldName) => { - const isExcludedMetaField = - EXCLUDED_META_FIELDS.includes(fieldName) || fieldName.charAt(0) !== '_'; - if (isExcludedMetaField) { - return; + if (indexPattern?.metaFields) { + for (let i = 0; i < indexPattern?.metaFields.length; i++) { + const fieldName = indexPattern?.metaFields[i]; + const isExcludedMetaField = + EXCLUDED_META_FIELDS.includes(fieldName) || fieldName.charAt(0) !== '_'; + if (!isExcludedMetaField) { + flat[fieldName] = hit[fieldName as keyof estypes.SearchHit]; + } } - flat[fieldName] = hit[fieldName as keyof estypes.SearchHit]; - }); + } // Use a proxy to make sure that keys are always returned in a specific order, // so we have a guarantee on the flattened order of keys. + return makeProxy(flat, indexPattern); +} + +function makeProxy(flat: Record, indexPattern?: DataView) { + function comparator(a: string | symbol, b: string | symbol) { + const aIsMeta = indexPattern?.metaFields?.includes(String(a)); + const bIsMeta = indexPattern?.metaFields?.includes(String(b)); + if (aIsMeta && bIsMeta) { + return String(a).localeCompare(String(b)); + } + if (aIsMeta) { + return 1; + } + if (bIsMeta) { + return -1; + } + return String(a).localeCompare(String(b)); + } + return new Proxy(flat, { ownKeys: (target) => { - return Reflect.ownKeys(target).sort((a, b) => { - const aIsMeta = indexPattern?.metaFields?.includes(String(a)); - const bIsMeta = indexPattern?.metaFields?.includes(String(b)); - if (aIsMeta && bIsMeta) { - return String(a).localeCompare(String(b)); - } - if (aIsMeta) { - return 1; - } - if (bIsMeta) { - return -1; - } - return String(a).localeCompare(String(b)); - }); + return Reflect.ownKeys(target).sort(comparator); }, }); } @@ -144,9 +177,12 @@ export const tabifyDocs = ( ): Datatable => { const columns: DatatableColumn[] = []; - const rows = esResponse.hits.hits + const rows: Array = esResponse.hits.hits .map((hit) => { const flat = flattenHit(hit, index, params); + if (!flat) { + return; + } for (const [key, value] of Object.entries(flat)) { const field = index?.fields.getByName(key); const fieldName = field?.name || key; @@ -172,6 +208,6 @@ export const tabifyDocs = ( return { type: 'datatable', columns, - rows, + rows: rows as DatatableRow[], }; }; diff --git a/packages/kbn-discover-utils/index.ts b/packages/kbn-discover-utils/index.ts index a409962230ce6..0434a05a9ce92 100644 --- a/packages/kbn-discover-utils/index.ts +++ b/packages/kbn-discover-utils/index.ts @@ -31,12 +31,17 @@ export { IgnoredReason, buildDataTableRecord, buildDataTableRecordList, + fieldConstants, formatFieldValue, formatHit, getDocId, + getLogDocumentOverview, getIgnoredReason, + getMessageFieldWithFallbacks, getShouldShowFieldHandler, isNestedFieldParent, isLegacyTableEnabled, usePager, } from './src'; + +export * from './src/types'; diff --git a/packages/kbn-discover-utils/src/field_constants.ts b/packages/kbn-discover-utils/src/field_constants.ts new file mode 100644 index 0000000000000..5cc8be86f06d3 --- /dev/null +++ b/packages/kbn-discover-utils/src/field_constants.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. + */ + +// Fields constants +export const TIMESTAMP_FIELD = '@timestamp'; +export const HOST_NAME_FIELD = 'host.name'; +export const LOG_LEVEL_FIELD = 'log.level'; +export const MESSAGE_FIELD = 'message'; +export const ERROR_MESSAGE_FIELD = 'error.message'; +export const EVENT_ORIGINAL_FIELD = 'event.original'; +export const TRACE_ID_FIELD = 'trace.id'; + +export const LOG_FILE_PATH_FIELD = 'log.file.path'; +export const DATASTREAM_NAMESPACE_FIELD = 'data_stream.namespace'; +export const DATASTREAM_DATASET_FIELD = 'data_stream.dataset'; + +// Resource Fields +export const AGENT_NAME_FIELD = 'agent.name'; +export const CLOUD_PROVIDER_FIELD = 'cloud.provider'; +export const CLOUD_REGION_FIELD = 'cloud.region'; +export const CLOUD_AVAILABILITY_ZONE_FIELD = 'cloud.availability_zone'; +export const CLOUD_PROJECT_ID_FIELD = 'cloud.project.id'; +export const CLOUD_INSTANCE_ID_FIELD = 'cloud.instance.id'; +export const SERVICE_NAME_FIELD = 'service.name'; +export const ORCHESTRATOR_CLUSTER_NAME_FIELD = 'orchestrator.cluster.name'; +export const ORCHESTRATOR_RESOURCE_ID_FIELD = 'orchestrator.resource.id'; +export const ORCHESTRATOR_NAMESPACE_FIELD = 'orchestrator.namespace'; +export const CONTAINER_NAME_FIELD = 'container.name'; +export const CONTAINER_ID_FIELD = 'container.id'; + +// Degraded Docs +export const DEGRADED_DOCS_FIELD = 'ignored_field_values'; + +// Error Stacktrace +export const ERROR_STACK_TRACE = 'error.stack_trace'; +export const ERROR_EXCEPTION_STACKTRACE = 'error.exception.stacktrace'; +export const ERROR_LOG_STACKTRACE = 'error.log.stacktrace'; diff --git a/packages/kbn-discover-utils/src/index.ts b/packages/kbn-discover-utils/src/index.ts index abc14f31911fe..b1dc190111746 100644 --- a/packages/kbn-discover-utils/src/index.ts +++ b/packages/kbn-discover-utils/src/index.ts @@ -7,5 +7,6 @@ */ export * from './constants'; +export * as fieldConstants from './field_constants'; export * from './hooks'; export * from './utils'; diff --git a/packages/kbn-discover-utils/src/types.ts b/packages/kbn-discover-utils/src/types.ts index 1fcc7c6a07c7f..05d9a79b0bbbd 100644 --- a/packages/kbn-discover-utils/src/types.ts +++ b/packages/kbn-discover-utils/src/types.ts @@ -46,3 +46,44 @@ type FormattedHitPair = readonly [ * Pairs array for each field in the hit */ export type FormattedHit = FormattedHitPair[]; + +export interface LogDocumentOverview + extends LogResourceFields, + LogStackTraceFields, + LogCloudFields { + '@timestamp': string; + 'log.level'?: string; + message?: string; + 'error.message'?: string; + 'event.original'?: string; + 'trace.id'?: string; + 'log.file.path'?: string; + 'data_stream.namespace': string; + 'data_stream.dataset': string; +} + +export interface LogResourceFields { + 'host.name'?: string; + 'service.name'?: string; + 'agent.name'?: string; + 'orchestrator.cluster.name'?: string; + 'orchestrator.cluster.id'?: string; + 'orchestrator.resource.id'?: string; + 'orchestrator.namespace'?: string; + 'container.name'?: string; + 'container.id'?: string; +} + +export interface LogStackTraceFields { + 'error.stack_trace'?: string; + 'error.exception.stacktrace'?: string; + 'error.log.stacktrace'?: string; +} + +export interface LogCloudFields { + 'cloud.provider'?: string; + 'cloud.region'?: string; + 'cloud.availability_zone'?: string; + 'cloud.project.id'?: string; + 'cloud.instance.id'?: string; +} diff --git a/packages/kbn-discover-utils/src/utils/get_log_document_overview.ts b/packages/kbn-discover-utils/src/utils/get_log_document_overview.ts new file mode 100644 index 0000000000000..92fb5e6c0834d --- /dev/null +++ b/packages/kbn-discover-utils/src/utils/get_log_document_overview.ts @@ -0,0 +1,92 @@ +/* + * Copyright 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 { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; +import { DataTableRecord, LogDocumentOverview, fieldConstants, formatFieldValue } from '../..'; + +export function getLogDocumentOverview( + doc: DataTableRecord, + { dataView, fieldFormats }: { dataView: DataView; fieldFormats: FieldFormatsStart } +): LogDocumentOverview { + const formatField = (field: T) => { + return ( + field in doc.flattened + ? formatFieldValue( + doc.flattened[field], + doc.raw, + fieldFormats, + dataView, + dataView.fields.getByName(field) + ) + : undefined + ) as LogDocumentOverview[T]; + }; + + const levelArray = doc.flattened[fieldConstants.LOG_LEVEL_FIELD]; + const level = + Array.isArray(levelArray) && levelArray.length ? levelArray[0].toLowerCase() : levelArray; + const messageArray = doc.flattened[fieldConstants.MESSAGE_FIELD]; + const message = + Array.isArray(messageArray) && messageArray.length ? messageArray[0] : messageArray; + const errorMessageArray = doc.flattened[fieldConstants.ERROR_MESSAGE_FIELD]; + const errorMessage = + Array.isArray(errorMessageArray) && errorMessageArray.length + ? errorMessageArray[0] + : errorMessageArray; + const eventOriginalArray = doc.flattened[fieldConstants.EVENT_ORIGINAL_FIELD]; + const eventOriginal = + Array.isArray(eventOriginalArray) && eventOriginalArray.length + ? eventOriginalArray[0] + : eventOriginalArray; + const timestamp = formatField(fieldConstants.TIMESTAMP_FIELD); + + // Service + const serviceName = formatField(fieldConstants.SERVICE_NAME_FIELD); + const traceId = formatField(fieldConstants.TRACE_ID_FIELD); + + // Infrastructure + const hostname = formatField(fieldConstants.HOST_NAME_FIELD); + const orchestratorClusterName = formatField(fieldConstants.ORCHESTRATOR_CLUSTER_NAME_FIELD); + const orchestratorResourceId = formatField(fieldConstants.ORCHESTRATOR_RESOURCE_ID_FIELD); + + // Cloud + const cloudProvider = formatField(fieldConstants.CLOUD_PROVIDER_FIELD); + const cloudRegion = formatField(fieldConstants.CLOUD_REGION_FIELD); + const cloudAz = formatField(fieldConstants.CLOUD_AVAILABILITY_ZONE_FIELD); + const cloudProjectId = formatField(fieldConstants.CLOUD_PROJECT_ID_FIELD); + const cloudInstanceId = formatField(fieldConstants.CLOUD_INSTANCE_ID_FIELD); + + // Other + const logFilePath = formatField(fieldConstants.LOG_FILE_PATH_FIELD); + const namespace = formatField(fieldConstants.DATASTREAM_NAMESPACE_FIELD); + const dataset = formatField(fieldConstants.DATASTREAM_DATASET_FIELD); + const agentName = formatField(fieldConstants.AGENT_NAME_FIELD); + + return { + [fieldConstants.LOG_LEVEL_FIELD]: level, + [fieldConstants.TIMESTAMP_FIELD]: timestamp, + [fieldConstants.MESSAGE_FIELD]: message, + [fieldConstants.ERROR_MESSAGE_FIELD]: errorMessage, + [fieldConstants.EVENT_ORIGINAL_FIELD]: eventOriginal, + [fieldConstants.SERVICE_NAME_FIELD]: serviceName, + [fieldConstants.TRACE_ID_FIELD]: traceId, + [fieldConstants.HOST_NAME_FIELD]: hostname, + [fieldConstants.ORCHESTRATOR_CLUSTER_NAME_FIELD]: orchestratorClusterName, + [fieldConstants.ORCHESTRATOR_RESOURCE_ID_FIELD]: orchestratorResourceId, + [fieldConstants.CLOUD_PROVIDER_FIELD]: cloudProvider, + [fieldConstants.CLOUD_REGION_FIELD]: cloudRegion, + [fieldConstants.CLOUD_AVAILABILITY_ZONE_FIELD]: cloudAz, + [fieldConstants.CLOUD_PROJECT_ID_FIELD]: cloudProjectId, + [fieldConstants.CLOUD_INSTANCE_ID_FIELD]: cloudInstanceId, + [fieldConstants.LOG_FILE_PATH_FIELD]: logFilePath, + [fieldConstants.DATASTREAM_NAMESPACE_FIELD]: namespace, + [fieldConstants.DATASTREAM_DATASET_FIELD]: dataset, + [fieldConstants.AGENT_NAME_FIELD]: agentName, + }; +} diff --git a/packages/kbn-discover-utils/src/utils/get_message_field_with_fallbacks.ts b/packages/kbn-discover-utils/src/utils/get_message_field_with_fallbacks.ts new file mode 100644 index 0000000000000..09fda703faee4 --- /dev/null +++ b/packages/kbn-discover-utils/src/utils/get_message_field_with_fallbacks.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { fieldConstants } from '..'; +import { LogDocumentOverview } from '../types'; + +export const getMessageFieldWithFallbacks = (doc: LogDocumentOverview) => { + const rankingOrder = [ + fieldConstants.MESSAGE_FIELD, + fieldConstants.ERROR_MESSAGE_FIELD, + fieldConstants.EVENT_ORIGINAL_FIELD, + ] as const; + + for (const rank of rankingOrder) { + if (doc[rank] !== undefined && doc[rank] !== null) { + return { field: rank, value: doc[rank] }; + } + } + + // If none of the ranks (fallbacks) are present + return { field: undefined }; +}; diff --git a/packages/kbn-discover-utils/src/utils/index.ts b/packages/kbn-discover-utils/src/utils/index.ts index 8415fc7df0710..399d4e8ba298e 100644 --- a/packages/kbn-discover-utils/src/utils/index.ts +++ b/packages/kbn-discover-utils/src/utils/index.ts @@ -11,6 +11,8 @@ export * from './format_hit'; export * from './format_value'; export * from './get_doc_id'; export * from './get_ignored_reason'; +export * from './get_log_document_overview'; +export * from './get_message_field_with_fallbacks'; export * from './get_should_show_field_handler'; export * from './nested_fields'; export { isLegacyTableEnabled } from './is_legacy_table_enabled'; diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index a4c2fd500539f..83dea1f64ceec 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -206,7 +206,6 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`, machineLearningStart: `${ELASTICSEARCH_DOCS}nlp-example.html`, mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`, - playground: `${KIBANA_DOCS}playground.html`, mlDocumentEnrichment: `${ELASTICSEARCH_DOCS}ingest-pipeline-search-inference.html`, searchApplicationsTemplates: `${ELASTICSEARCH_DOCS}search-application-api.html`, searchApplicationsSearchApi: `${ELASTICSEARCH_DOCS}search-application-security.html`, @@ -939,5 +938,8 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D telemetry: { settings: `${KIBANA_DOCS}telemetry-settings-kbn.html`, }, + playground: { + chatPlayground: `${KIBANA_DOCS}playground.html`, + }, }); }; diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index ed6b805d5fcb2..47de74f6219fd 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -170,7 +170,6 @@ export interface DocLinks { readonly languageClients: string; readonly licenseManagement: string; readonly machineLearningStart: string; - readonly playground: string; readonly mailService: string; readonly mlDocumentEnrichment: string; readonly searchApplicationsTemplates: string; @@ -648,6 +647,9 @@ export interface DocLinks { readonly telemetry: { readonly settings: string; }; + readonly playground: { + readonly chatPlayground: string; + }; } export type BuildFlavor = 'serverless' | 'traditional'; diff --git a/packages/kbn-es-query/src/es_query/build_es_query.test.ts b/packages/kbn-es-query/src/es_query/build_es_query.test.ts index a75c8d3d3a03f..b19ac9ce132d9 100644 --- a/packages/kbn-es-query/src/es_query/build_es_query.test.ts +++ b/packages/kbn-es-query/src/es_query/build_es_query.test.ts @@ -14,8 +14,6 @@ import { MatchAllFilter, Query } from '../filters'; import { fields } from '../filters/stubs'; import { DataViewBase } from './types'; -jest.mock('../kuery/grammar'); - describe('build query', () => { const indexPattern: DataViewBase = { fields, diff --git a/packages/kbn-es-query/src/kuery/ast/ast.test.ts b/packages/kbn-es-query/src/kuery/ast/ast.test.ts index aae4bc9de42bd..f9916ecb2edaa 100644 --- a/packages/kbn-es-query/src/kuery/ast/ast.test.ts +++ b/packages/kbn-es-query/src/kuery/ast/ast.test.ts @@ -16,8 +16,7 @@ import { nodeTypes } from '../node_types'; import { DataViewBase } from '../../..'; import { KueryNode } from '../types'; import { fields } from '../../filters/stubs'; - -jest.mock('../grammar'); +import { performance } from 'perf_hooks'; describe('kuery AST API', () => { let indexPattern: DataViewBase; @@ -276,6 +275,43 @@ describe('kuery AST API', () => { const actual = fromKueryExpression('nestedField:{ nestedChild:{ doublyNestedChild:foo } }'); expect(actual).toEqual(expected); }); + + describe('performance', () => { + const NUM_RUNS = 100; + it('with simple expression', () => { + const start = performance.now(); + for (let i = 0; i < NUM_RUNS; i++) { + fromKueryExpression( + 'not fleet-agent-actions.attributes.sent_at: * and fleet-agent-actions.attributes.agent_id:1234567' + ); + } + const elapsed = performance.now() - start; + const opsPerSec = NUM_RUNS / (elapsed / 1000); + expect(opsPerSec).toBeGreaterThan(1000); + }); + + it('with complex expression', () => { + const start = performance.now(); + for (let i = 0; i < NUM_RUNS; i++) { + fromKueryExpression( + `((alert.attributes.alertTypeId:.index-threshold and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:siem.signals and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:siem.notifications and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:metrics.alert.threshold and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:metrics.alert.inventory.threshold and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:logs.alert.document.count and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_cluster_health and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_license_expiration and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_cpu_usage and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_nodes_changed and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_logstash_version_mismatch and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_kibana_version_mismatch and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:monitoring_alert_elasticsearch_version_mismatch and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:apm.transaction_duration and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:apm.transaction_duration_anomaly and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:apm.error_rate and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:xpack.uptime.alerts.monitorStatus and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:xpack.uptime.alerts.tls and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)) or (alert.attributes.alertTypeId:xpack.uptime.alerts.durationAnomaly and alert.attributes.consumer:(alerts or builtInAlerts or siem or infrastructure or logs or monitoring or apm or uptime)))` + ); + } + const elapsed = performance.now() - start; + const opsPerSec = NUM_RUNS / (elapsed / 1000); + expect(opsPerSec).toBeGreaterThan(100); + }); + + it('with many subqueries', () => { + const start = performance.now(); + for (let i = 0; i < NUM_RUNS; i++) { + fromKueryExpression(`((((((((((foo))))))))))`); + } + const elapsed = performance.now() - start; + const opsPerSec = NUM_RUNS / (elapsed / 1000); + expect(opsPerSec).toBeGreaterThan(1000); + }); + }); }); describe('fromLiteralExpression', () => { diff --git a/packages/kbn-es-query/src/kuery/functions/and.test.ts b/packages/kbn-es-query/src/kuery/functions/and.test.ts index 3b9dcbff51fea..87d16c9115bef 100644 --- a/packages/kbn-es-query/src/kuery/functions/and.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/and.test.ts @@ -13,8 +13,6 @@ import * as and from './and'; import { DataViewBase } from '../../es_query'; import { KqlAndFunctionNode } from './and'; -jest.mock('../grammar'); - const childNode1 = nodeTypes.function.buildNode('is', 'machine.os', 'osx'); const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); diff --git a/packages/kbn-es-query/src/kuery/functions/exists.test.ts b/packages/kbn-es-query/src/kuery/functions/exists.test.ts index 69340ab96c752..44f82afdd68fe 100644 --- a/packages/kbn-es-query/src/kuery/functions/exists.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/exists.test.ts @@ -13,8 +13,6 @@ import { KQL_NODE_TYPE_LITERAL } from '../node_types/literal'; import * as exists from './exists'; import type { KqlExistsFunctionNode } from './exists'; -jest.mock('../grammar'); - describe('kuery functions', () => { describe('exists', () => { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/functions/is.test.ts b/packages/kbn-es-query/src/kuery/functions/is.test.ts index 5b52eff548ed3..1b94562c6e99f 100644 --- a/packages/kbn-es-query/src/kuery/functions/is.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/is.test.ts @@ -16,8 +16,6 @@ import { KQL_NODE_TYPE_WILDCARD } from '../node_types/wildcard'; import { KQL_NODE_TYPE_LITERAL } from '../node_types/literal'; import { KqlIsFunctionNode } from './is'; -jest.mock('../grammar'); - describe('kuery functions', () => { describe('is', () => { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/functions/nested.test.ts b/packages/kbn-es-query/src/kuery/functions/nested.test.ts index 5078f3899cd8e..4eedbacce1ff9 100644 --- a/packages/kbn-es-query/src/kuery/functions/nested.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/nested.test.ts @@ -13,8 +13,6 @@ import * as ast from '../ast'; import * as nested from './nested'; import type { KqlNestedFunctionNode } from './nested'; -jest.mock('../grammar'); - const childNode = nodeTypes.function.buildNode('is', 'child', 'foo'); describe('kuery functions', () => { diff --git a/packages/kbn-es-query/src/kuery/functions/not.test.ts b/packages/kbn-es-query/src/kuery/functions/not.test.ts index 84163620e72ce..7ab596101892b 100644 --- a/packages/kbn-es-query/src/kuery/functions/not.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/not.test.ts @@ -14,8 +14,6 @@ import * as ast from '../ast'; import * as not from './not'; import { KqlNotFunctionNode } from './not'; -jest.mock('../grammar'); - const childNode = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { diff --git a/packages/kbn-es-query/src/kuery/functions/or.test.ts b/packages/kbn-es-query/src/kuery/functions/or.test.ts index 26eeb25f7b605..fb0ff337df1ef 100644 --- a/packages/kbn-es-query/src/kuery/functions/or.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/or.test.ts @@ -14,7 +14,6 @@ import * as ast from '../ast'; import * as or from './or'; import { KqlOrFunctionNode } from './or'; -jest.mock('../grammar'); const childNode1 = nodeTypes.function.buildNode('is', 'machine.os', 'osx'); const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); diff --git a/packages/kbn-es-query/src/kuery/functions/range.test.ts b/packages/kbn-es-query/src/kuery/functions/range.test.ts index 3d4d80b6e602f..229b781af476d 100644 --- a/packages/kbn-es-query/src/kuery/functions/range.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/range.test.ts @@ -15,8 +15,6 @@ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { KQL_NODE_TYPE_LITERAL } from '../node_types/literal'; import { KqlRangeFunctionNode } from './range'; -jest.mock('../grammar'); - describe('kuery functions', () => { describe('range', () => { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/functions/utils/get_fields.test.ts b/packages/kbn-es-query/src/kuery/functions/utils/get_fields.test.ts index e0e69c222604e..12955706bdf51 100644 --- a/packages/kbn-es-query/src/kuery/functions/utils/get_fields.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/utils/get_fields.test.ts @@ -12,8 +12,6 @@ import { fields } from '../../../filters/stubs'; import { nodeTypes } from '../..'; import { getFields } from './get_fields'; -jest.mock('../../grammar'); - describe('getFields', () => { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts index 6ea315446d0ea..a052ae009bf6c 100644 --- a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts @@ -11,8 +11,6 @@ import { fields } from '../../../filters/stubs'; import { DataViewBase } from '../../../..'; import { getFullFieldNameNode } from './get_full_field_name_node'; -jest.mock('../../grammar'); - describe('getFullFieldNameNode', function () { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js b/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js deleted file mode 100644 index de6d508872bb2..0000000000000 --- a/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js +++ /dev/null @@ -1,2215 +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. - */ - -// Generated by Peggy 1.2.0. -// -// https://peggyjs.org/ -/* eslint-disable prettier/prettier,no-var,strict,no-use-before-define,one-var,no-undef,no-unused-vars,new-cap */ - -"use strict"; - -function peg$subclass(child, parent) { - function C() { this.constructor = child; } - C.prototype = parent.prototype; - child.prototype = new C(); -} - -function peg$SyntaxError(message, expected, found, location) { - var self = Error.call(this, message); - if (Object.setPrototypeOf) { - Object.setPrototypeOf(self, peg$SyntaxError.prototype); - } - self.expected = expected; - self.found = found; - self.location = location; - self.name = "SyntaxError"; - return self; -} - -peg$subclass(peg$SyntaxError, Error); - -function peg$padEnd(str, targetLength, padString) { - padString = padString || " "; - if (str.length > targetLength) { return str; } - targetLength -= str.length; - padString += padString.repeat(targetLength); - return str + padString.slice(0, targetLength); -} - -peg$SyntaxError.prototype.format = function(sources) { - var str = "Error: " + this.message; - if (this.location) { - var src = null; - var k; - for (k = 0; k < sources.length; k++) { - if (sources[k].source === this.location.source) { - src = sources[k].text.split(/\r\n|\n|\r/g); - break; - } - } - var s = this.location.start; - var loc = this.location.source + ":" + s.line + ":" + s.column; - if (src) { - var e = this.location.end; - var filler = peg$padEnd("", s.line.toString().length); - var line = src[s.line - 1]; - var last = s.line === e.line ? e.column : line.length + 1; - str += "\n --> " + loc + "\n" - + filler + " |\n" - + s.line + " | " + line + "\n" - + filler + " | " + peg$padEnd("", s.column - 1) - + peg$padEnd("", last - s.column, "^"); - } else { - str += "\n at " + loc; - } - } - return str; -}; - -peg$SyntaxError.buildMessage = function(expected, found) { - var DESCRIBE_EXPECTATION_FNS = { - literal: function(expectation) { - return "\"" + literalEscape(expectation.text) + "\""; - }, - - class: function(expectation) { - var escapedParts = expectation.parts.map(function(part) { - return Array.isArray(part) - ? classEscape(part[0]) + "-" + classEscape(part[1]) - : classEscape(part); - }); - - return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; - }, - - any: function() { - return "any character"; - }, - - end: function() { - return "end of input"; - }, - - other: function(expectation) { - return expectation.description; - } - }; - - function hex(ch) { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - function literalEscape(s) { - return s - .replace(/\\/g, "\\\\") - .replace(/"/g, "\\\"") - .replace(/\0/g, "\\0") - .replace(/\t/g, "\\t") - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); - } - - function classEscape(s) { - return s - .replace(/\\/g, "\\\\") - .replace(/\]/g, "\\]") - .replace(/\^/g, "\\^") - .replace(/-/g, "\\-") - .replace(/\0/g, "\\0") - .replace(/\t/g, "\\t") - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); - } - - function describeExpectation(expectation) { - return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); - } - - function describeExpected(expected) { - var descriptions = expected.map(describeExpectation); - var i, j; - - descriptions.sort(); - - if (descriptions.length > 0) { - for (i = 1, j = 1; i < descriptions.length; i++) { - if (descriptions[i - 1] !== descriptions[i]) { - descriptions[j] = descriptions[i]; - j++; - } - } - descriptions.length = j; - } - - switch (descriptions.length) { - case 1: - return descriptions[0]; - - case 2: - return descriptions[0] + " or " + descriptions[1]; - - default: - return descriptions.slice(0, -1).join(", ") - + ", or " - + descriptions[descriptions.length - 1]; - } - } - - function describeFound(found) { - return found ? "\"" + literalEscape(found) + "\"" : "end of input"; - } - - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; -}; - -function peg$parse(input, options) { - options = options !== undefined ? options : {}; - - var peg$FAILED = {}; - var peg$source = options.grammarSource; - - var peg$startRuleFunctions = { start: peg$parsestart, Literal: peg$parseLiteral }; - var peg$startRuleFunction = peg$parsestart; - - var peg$c0 = "("; - var peg$c1 = ")"; - var peg$c2 = ":"; - var peg$c3 = "{"; - var peg$c4 = "}"; - var peg$c5 = "or"; - var peg$c6 = "and"; - var peg$c7 = "not"; - var peg$c8 = "\""; - var peg$c9 = "\\"; - var peg$c10 = "*"; - var peg$c11 = "\\t"; - var peg$c12 = "\\r"; - var peg$c13 = "\\n"; - var peg$c14 = "u"; - var peg$c15 = "<="; - var peg$c16 = ">="; - var peg$c17 = "<"; - var peg$c18 = ">"; - var peg$c19 = "@kuery-cursor@"; - - var peg$r0 = /^[\\"]/; - var peg$r1 = /^[^"]/; - var peg$r2 = /^[\\():<>"*{}]/; - var peg$r3 = /^[0-9a-f]/i; - var peg$r4 = /^[ \t\r\n\xA0]/; - - var peg$e0 = peg$literalExpectation("(", false); - var peg$e1 = peg$literalExpectation(")", false); - var peg$e2 = peg$literalExpectation(":", false); - var peg$e3 = peg$literalExpectation("{", false); - var peg$e4 = peg$literalExpectation("}", false); - var peg$e5 = peg$otherExpectation("fieldName"); - var peg$e6 = peg$otherExpectation("value"); - var peg$e7 = peg$otherExpectation("OR"); - var peg$e8 = peg$literalExpectation("or", true); - var peg$e9 = peg$otherExpectation("AND"); - var peg$e10 = peg$literalExpectation("and", true); - var peg$e11 = peg$otherExpectation("NOT"); - var peg$e12 = peg$literalExpectation("not", true); - var peg$e13 = peg$otherExpectation("literal"); - var peg$e14 = peg$literalExpectation("\"", false); - var peg$e15 = peg$literalExpectation("\\", false); - var peg$e16 = peg$classExpectation(["\\", "\""], false, false); - var peg$e17 = peg$classExpectation(["\""], true, false); - var peg$e18 = peg$anyExpectation(); - var peg$e19 = peg$literalExpectation("*", false); - var peg$e20 = peg$literalExpectation("\\t", false); - var peg$e21 = peg$literalExpectation("\\r", false); - var peg$e22 = peg$literalExpectation("\\n", false); - var peg$e23 = peg$classExpectation(["\\", "(", ")", ":", "<", ">", "\"", "*", "{", "}"], false, false); - var peg$e24 = peg$literalExpectation("u", false); - var peg$e25 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true); - var peg$e26 = peg$literalExpectation("<=", false); - var peg$e27 = peg$literalExpectation(">=", false); - var peg$e28 = peg$literalExpectation("<", false); - var peg$e29 = peg$literalExpectation(">", false); - var peg$e30 = peg$otherExpectation("whitespace"); - var peg$e31 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e32 = peg$literalExpectation("@kuery-cursor@", false); - - var peg$f0 = function(query, trailing) { - if (trailing.type === 'cursor') { - return { - ...trailing, - suggestionTypes: ['conjunction'] - }; - } - if (query !== null) return query; - return nodeTypes.function.buildNode('is', '*', '*'); - }; - var peg$f1 = function(head, query) { return query; }; - var peg$f2 = function(head, tail) { - const nodes = [head, ...tail]; - const cursor = parseCursor && nodes.find(node => node.type === 'cursor'); - if (cursor) return cursor; - return buildFunctionNode('or', nodes); - }; - var peg$f3 = function(head, tail) { - const nodes = [head, ...tail]; - const cursor = parseCursor && nodes.find(node => node.type === 'cursor'); - if (cursor) return cursor; - return buildFunctionNode('and', nodes); - }; - var peg$f4 = function(query) { - if (query.type === 'cursor') return query; - return buildFunctionNode('not', [query]); - }; - var peg$f5 = function(query, trailing) { - if (trailing.type === 'cursor') { - return { - ...trailing, - suggestionTypes: ['conjunction'] - }; - } - return query; - }; - var peg$f6 = function(field, query, trailing) { - if (query.type === 'cursor') { - return { - ...query, - nestedPath: query.nestedPath ? `${field.value}.${query.nestedPath}` : field.value, - } - }; - - if (trailing.type === 'cursor') { - return { - ...trailing, - suggestionTypes: ['conjunction'] - }; - } - return buildFunctionNode('nested', [field, query]); - }; - var peg$f7 = function(field, operator, value) { - if (value.type === 'cursor') { - return { - ...value, - suggestionTypes: ['conjunction'] - }; - } - return buildFunctionNode('range', [field, operator, value]); - }; - var peg$f8 = function(field, partial) { - if (partial.type === 'cursor') { - return { - ...partial, - fieldName: field.value, - suggestionTypes: ['value', 'conjunction'] - }; - } - return partial(field); - }; - var peg$f9 = function(partial) { - if (partial.type === 'cursor') { - const fieldName = `${partial.prefix}${partial.suffix}`.trim(); - return { - ...partial, - fieldName, - suggestionTypes: ['field', 'operator', 'conjunction'] - }; - } - const field = buildLiteralNode(null); - return partial(field); - }; - var peg$f10 = function(partial, trailing) { - if (trailing.type === 'cursor') { - return { - ...trailing, - suggestionTypes: ['conjunction'] - }; - } - return partial; - }; - var peg$f11 = function(head, partial) { return partial; }; - var peg$f12 = function(head, tail) { - const nodes = [head, ...tail]; - const cursor = parseCursor && nodes.find(node => node.type === 'cursor'); - if (cursor) { - return { - ...cursor, - suggestionTypes: ['value'] - }; - } - return (field) => buildFunctionNode('or', nodes.map(partial => partial(field))); - }; - var peg$f13 = function(head, tail) { - const nodes = [head, ...tail]; - const cursor = parseCursor && nodes.find(node => node.type === 'cursor'); - if (cursor) { - return { - ...cursor, - suggestionTypes: ['value'] - }; - } - return (field) => buildFunctionNode('and', nodes.map(partial => partial(field))); - }; - var peg$f14 = function(partial) { - if (partial.type === 'cursor') { - return { - ...list, - suggestionTypes: ['value'] - }; - } - return (field) => buildFunctionNode('not', [partial(field)]); - }; - var peg$f15 = function(value) { - if (value.type === 'cursor') return value; - return (field) => buildFunctionNode('is', [field, value]); - }; - var peg$f16 = function(value) { - if (value.type === 'cursor') return value; - - if (!allowLeadingWildcards && nodeTypes.wildcard.isNode(value) && nodeTypes.wildcard.hasLeadingWildcard(value)) { - error('Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.'); - } - - return (field) => buildFunctionNode('is', [field, value]); - }; - var peg$f17 = function() { return parseCursor; }; - var peg$f18 = function(prefix, cursor, suffix) { - const { start, end } = location(); - return { - type: 'cursor', - start: start.offset, - end: end.offset - cursor.length, - prefix: prefix.join(''), - suffix: suffix.join(''), - text: text().replace(cursor, '') - }; - }; - var peg$f19 = function(chars) { - return buildLiteralNode(chars.join(''), true); - }; - var peg$f20 = function(char) { return char; }; - var peg$f21 = function(chars) { - const sequence = chars.join('').trim(); - if (sequence === 'null') return buildLiteralNode(null); - if (sequence === 'true') return buildLiteralNode(true); - if (sequence === 'false') return buildLiteralNode(false); - if (chars.includes(KQL_WILDCARD_SYMBOL)) return buildWildcardNode(sequence); - return buildLiteralNode(sequence); - }; - var peg$f22 = function() { return KQL_WILDCARD_SYMBOL; }; - var peg$f23 = function() { return '\t'; }; - var peg$f24 = function() { return '\r'; }; - var peg$f25 = function() { return '\n'; }; - var peg$f26 = function(keyword) { return keyword; }; - var peg$f27 = function(sequence) { return sequence; }; - var peg$f28 = function(digits) { - return String.fromCharCode(parseInt(digits, 16)); - }; - var peg$f29 = function() { return 'lte'; }; - var peg$f30 = function() { return 'gte'; }; - var peg$f31 = function() { return 'lt'; }; - var peg$f32 = function() { return 'gt'; }; - var peg$f33 = function() { return cursorSymbol; }; - - var peg$currPos = 0; - var peg$savedPos = 0; - var peg$posDetailsCache = [{ line: 1, column: 1 }]; - var peg$maxFailPos = 0; - var peg$maxFailExpected = []; - var peg$silentFails = 0; - - var peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$savedPos, peg$currPos); - } - - function offset() { - return peg$savedPos; - } - - function range() { - return { - source: peg$source, - start: peg$savedPos, - end: peg$currPos - }; - } - - function location() { - return peg$computeLocation(peg$savedPos, peg$currPos); - } - - function expected(description, location) { - location = location !== undefined - ? location - : peg$computeLocation(peg$savedPos, peg$currPos); - - throw peg$buildStructuredError( - [peg$otherExpectation(description)], - input.substring(peg$savedPos, peg$currPos), - location - ); - } - - function error(message, location) { - location = location !== undefined - ? location - : peg$computeLocation(peg$savedPos, peg$currPos); - - throw peg$buildSimpleError(message, location); - } - - function peg$literalExpectation(text, ignoreCase) { - return { type: "literal", text: text, ignoreCase: ignoreCase }; - } - - function peg$classExpectation(parts, inverted, ignoreCase) { - return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; - } - - function peg$anyExpectation() { - return { type: "any" }; - } - - function peg$endExpectation() { - return { type: "end" }; - } - - function peg$otherExpectation(description) { - return { type: "other", description: description }; - } - - function peg$computePosDetails(pos) { - var details = peg$posDetailsCache[pos]; - var p; - - if (details) { - return details; - } else { - p = pos - 1; - while (!peg$posDetailsCache[p]) { - p--; - } - - details = peg$posDetailsCache[p]; - details = { - line: details.line, - column: details.column - }; - - while (p < pos) { - if (input.charCodeAt(p) === 10) { - details.line++; - details.column = 1; - } else { - details.column++; - } - - p++; - } - - peg$posDetailsCache[pos] = details; - - return details; - } - } - - function peg$computeLocation(startPos, endPos) { - var startPosDetails = peg$computePosDetails(startPos); - var endPosDetails = peg$computePosDetails(endPos); - - return { - source: peg$source, - start: { - offset: startPos, - line: startPosDetails.line, - column: startPosDetails.column - }, - end: { - offset: endPos, - line: endPosDetails.line, - column: endPosDetails.column - } - }; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { return; } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildSimpleError(message, location) { - return new peg$SyntaxError(message, null, null, location); - } - - function peg$buildStructuredError(expected, found, location) { - return new peg$SyntaxError( - peg$SyntaxError.buildMessage(expected, found), - expected, - found, - location - ); - } - - function peg$parsestart() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = []; - s2 = peg$parseSpace(); - while (s2 !== peg$FAILED) { - s1.push(s2); - s2 = peg$parseSpace(); - } - s2 = peg$parseOrQuery(); - if (s2 === peg$FAILED) { - s2 = null; - } - s3 = peg$parseOptionalSpace(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f0(s2, s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseOrQuery() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseAndQuery(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseOr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseAndQuery(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f1(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseOr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseAndQuery(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f1(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f2(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseAndQuery(); - } - - return s0; - } - - function peg$parseAndQuery() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseNotQuery(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseAnd(); - if (s4 !== peg$FAILED) { - s5 = peg$parseNotQuery(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f1(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseAnd(); - if (s4 !== peg$FAILED) { - s5 = peg$parseNotQuery(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f1(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f3(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseNotQuery(); - } - - return s0; - } - - function peg$parseNotQuery() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parseNot(); - if (s1 !== peg$FAILED) { - s2 = peg$parseSubQuery(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f4(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseSubQuery(); - } - - return s0; - } - - function peg$parseSubQuery() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c0; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e0); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - s3 = peg$parseOrQuery(); - if (s3 !== peg$FAILED) { - s4 = peg$parseOptionalSpace(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s5 = peg$c1; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e1); } - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f5(s3, s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseNestedQuery(); - } - - return s0; - } - - function peg$parseNestedQuery() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - s0 = peg$currPos; - s1 = peg$parseField(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c2; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e2); } - } - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseSpace(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseSpace(); - } - if (input.charCodeAt(peg$currPos) === 123) { - s5 = peg$c3; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e3); } - } - if (s5 !== peg$FAILED) { - s6 = []; - s7 = peg$parseSpace(); - while (s7 !== peg$FAILED) { - s6.push(s7); - s7 = peg$parseSpace(); - } - s7 = peg$parseOrQuery(); - if (s7 !== peg$FAILED) { - s8 = peg$parseOptionalSpace(); - if (s8 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 125) { - s9 = peg$c4; - peg$currPos++; - } else { - s9 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e4); } - } - if (s9 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f6(s1, s7, s8); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseExpression(); - } - - return s0; - } - - function peg$parseExpression() { - var s0; - - s0 = peg$parseFieldRangeExpression(); - if (s0 === peg$FAILED) { - s0 = peg$parseFieldValueExpression(); - if (s0 === peg$FAILED) { - s0 = peg$parseValueExpression(); - } - } - - return s0; - } - - function peg$parseField() { - var s0, s1; - - peg$silentFails++; - s0 = peg$parseLiteral(); - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e5); } - } - - return s0; - } - - function peg$parseFieldRangeExpression() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseField(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - s3 = peg$parseRangeOperator(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseSpace(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseSpace(); - } - s5 = peg$parseLiteral(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f7(s1, s3, s5); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseFieldValueExpression() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseField(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c2; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e2); } - } - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseSpace(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseSpace(); - } - s5 = peg$parseListOfValues(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f8(s1, s5); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseValueExpression() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parseValue(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f9(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseListOfValues() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c0; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e0); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - s3 = peg$parseOrListOfValues(); - if (s3 !== peg$FAILED) { - s4 = peg$parseOptionalSpace(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s5 = peg$c1; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e1); } - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f10(s3, s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseValue(); - } - - return s0; - } - - function peg$parseOrListOfValues() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseAndListOfValues(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseOr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseAndListOfValues(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f11(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseOr(); - if (s4 !== peg$FAILED) { - s5 = peg$parseAndListOfValues(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f11(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f12(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseAndListOfValues(); - } - - return s0; - } - - function peg$parseAndListOfValues() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parseNotListOfValues(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseAnd(); - if (s4 !== peg$FAILED) { - s5 = peg$parseNotListOfValues(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f11(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseAnd(); - if (s4 !== peg$FAILED) { - s5 = peg$parseNotListOfValues(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s3 = peg$f11(s1, s5); - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f13(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseNotListOfValues(); - } - - return s0; - } - - function peg$parseNotListOfValues() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parseNot(); - if (s1 !== peg$FAILED) { - s2 = peg$parseListOfValues(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f14(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseListOfValues(); - } - - return s0; - } - - function peg$parseValue() { - var s0, s1; - - peg$silentFails++; - s0 = peg$currPos; - s1 = peg$parseQuotedString(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f15(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseUnquotedLiteral(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f16(s1); - } - s0 = s1; - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e6); } - } - - return s0; - } - - function peg$parseOr() { - var s0, s1, s2, s3, s4; - - peg$silentFails++; - s0 = peg$currPos; - s1 = []; - s2 = peg$parseSpace(); - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - s2 = peg$parseSpace(); - } - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c5) { - s2 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e8); } - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parseSpace(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseSpace(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e7); } - } - - return s0; - } - - function peg$parseAnd() { - var s0, s1, s2, s3, s4; - - peg$silentFails++; - s0 = peg$currPos; - s1 = []; - s2 = peg$parseSpace(); - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - s2 = peg$parseSpace(); - } - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c6) { - s2 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e10); } - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parseSpace(); - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseSpace(); - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e9); } - } - - return s0; - } - - function peg$parseNot() { - var s0, s1, s2, s3; - - peg$silentFails++; - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c7) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e12); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e11); } - } - - return s0; - } - - function peg$parseLiteral() { - var s0, s1; - - peg$silentFails++; - s0 = peg$parseQuotedString(); - if (s0 === peg$FAILED) { - s0 = peg$parseUnquotedLiteral(); - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e13); } - } - - return s0; - } - - function peg$parseQuotedString() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - peg$savedPos = peg$currPos; - s1 = peg$f17(); - if (s1) { - s1 = undefined; - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 34) { - s2 = peg$c8; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e14); } - } - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$parseQuotedCharacter(); - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$parseQuotedCharacter(); - } - s4 = peg$parseCursor(); - if (s4 !== peg$FAILED) { - s5 = []; - s6 = peg$parseQuotedCharacter(); - while (s6 !== peg$FAILED) { - s5.push(s6); - s6 = peg$parseQuotedCharacter(); - } - if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c8; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e14); } - } - if (s6 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f18(s3, s4, s5); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 34) { - s1 = peg$c8; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e14); } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseQuotedCharacter(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseQuotedCharacter(); - } - if (input.charCodeAt(peg$currPos) === 34) { - s3 = peg$c8; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e14); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f19(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - return s0; - } - - function peg$parseQuotedCharacter() { - var s0, s1, s2; - - s0 = peg$parseEscapedWhitespace(); - if (s0 === peg$FAILED) { - s0 = peg$parseEscapedUnicodeSequence(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c9; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } - } - if (s1 !== peg$FAILED) { - if (peg$r0.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e16); } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f20(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$currPos; - peg$silentFails++; - s2 = peg$parseCursor(); - peg$silentFails--; - if (s2 === peg$FAILED) { - s1 = undefined; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - if (peg$r1.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e17); } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f20(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - - return s0; - } - - function peg$parseUnquotedLiteral() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - peg$savedPos = peg$currPos; - s1 = peg$f17(); - if (s1) { - s1 = undefined; - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseUnquotedCharacter(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseUnquotedCharacter(); - } - s3 = peg$parseCursor(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseUnquotedCharacter(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseUnquotedCharacter(); - } - peg$savedPos = s0; - s0 = peg$f18(s2, s3, s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - s2 = peg$parseUnquotedCharacter(); - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - s2 = peg$parseUnquotedCharacter(); - } - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f21(s1); - } - s0 = s1; - } - - return s0; - } - - function peg$parseUnquotedCharacter() { - var s0, s1, s2, s3, s4; - - s0 = peg$parseEscapedWhitespace(); - if (s0 === peg$FAILED) { - s0 = peg$parseEscapedSpecialCharacter(); - if (s0 === peg$FAILED) { - s0 = peg$parseEscapedUnicodeSequence(); - if (s0 === peg$FAILED) { - s0 = peg$parseEscapedKeyword(); - if (s0 === peg$FAILED) { - s0 = peg$parseWildcard(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$currPos; - peg$silentFails++; - s2 = peg$parseSpecialCharacter(); - peg$silentFails--; - if (s2 === peg$FAILED) { - s1 = undefined; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseKeyword(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - peg$silentFails++; - s4 = peg$parseCursor(); - peg$silentFails--; - if (s4 === peg$FAILED) { - s3 = undefined; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - if (input.length > peg$currPos) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e18); } - } - if (s4 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f20(s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - - return s0; - } - - function peg$parseWildcard() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c10; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e19); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f22(); - } - s0 = s1; - - return s0; - } - - function peg$parseOptionalSpace() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - peg$savedPos = peg$currPos; - s1 = peg$f17(); - if (s1) { - s1 = undefined; - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parseSpace(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parseSpace(); - } - s3 = peg$parseCursor(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseSpace(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseSpace(); - } - peg$savedPos = s0; - s0 = peg$f18(s2, s3, s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = []; - s1 = peg$parseSpace(); - while (s1 !== peg$FAILED) { - s0.push(s1); - s1 = peg$parseSpace(); - } - } - - return s0; - } - - function peg$parseEscapedWhitespace() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c11) { - s1 = peg$c11; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e20); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f23(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c12) { - s1 = peg$c12; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e21); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f24(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c13) { - s1 = peg$c13; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e22); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f25(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parseEscapedSpecialCharacter() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c9; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseSpecialCharacter(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f20(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseEscapedKeyword() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c9; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c5) { - s2 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e8); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c6) { - s2 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e10); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c7) { - s2 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e12); } - } - } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f26(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKeyword() { - var s0; - - s0 = peg$parseOr(); - if (s0 === peg$FAILED) { - s0 = peg$parseAnd(); - if (s0 === peg$FAILED) { - s0 = peg$parseNot(); - } - } - - return s0; - } - - function peg$parseSpecialCharacter() { - var s0; - - if (peg$r2.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e23); } - } - - return s0; - } - - function peg$parseEscapedUnicodeSequence() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c9; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e15); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseUnicodeSequence(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f27(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseUnicodeSequence() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 117) { - s1 = peg$c14; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e24); } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$currPos; - s4 = peg$parseHexDigit(); - if (s4 !== peg$FAILED) { - s5 = peg$parseHexDigit(); - if (s5 !== peg$FAILED) { - s6 = peg$parseHexDigit(); - if (s6 !== peg$FAILED) { - s7 = peg$parseHexDigit(); - if (s7 !== peg$FAILED) { - s4 = [s4, s5, s6, s7]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s2 = input.substring(s2, peg$currPos); - } else { - s2 = s3; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f28(s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseHexDigit() { - var s0; - - if (peg$r3.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e25); } - } - - return s0; - } - - function peg$parseRangeOperator() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c15) { - s1 = peg$c15; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f29(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c16) { - s1 = peg$c16; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e27); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f30(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c17; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f31(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c18; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e29); } - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f32(); - } - s0 = s1; - } - } - } - - return s0; - } - - function peg$parseSpace() { - var s0, s1; - - peg$silentFails++; - if (peg$r4.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e31); } - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } - } - - return s0; - } - - function peg$parseCursor() { - var s0, s1, s2; - - s0 = peg$currPos; - peg$savedPos = peg$currPos; - s1 = peg$f17(); - if (s1) { - s1 = undefined; - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 14) === peg$c19) { - s2 = peg$c19; - peg$currPos += 14; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f33(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - - const { parseCursor, cursorSymbol, allowLeadingWildcards = true, helpers: { nodeTypes } } = options; - const buildFunctionNode = nodeTypes.function.buildNodeWithArgumentNodes; - const buildLiteralNode = nodeTypes.literal.buildNode; - const buildWildcardNode = nodeTypes.wildcard.buildNode; - const { KQL_WILDCARD_SYMBOL } = nodeTypes.wildcard; - - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail(peg$endExpectation()); - } - - throw peg$buildStructuredError( - peg$maxFailExpected, - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, - peg$maxFailPos < input.length - ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) - : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) - ); - } -} - -module.exports = { - SyntaxError: peg$SyntaxError, - parse: peg$parse -}; diff --git a/packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json b/packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json index 2428599612899..2f71406084337 100644 --- a/packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json +++ b/packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json @@ -1,3 +1,4 @@ { - "allowedStartRules": ["start", "Literal"] + "allowedStartRules": ["start", "Literal"], + "cache": true } diff --git a/packages/kbn-es-query/src/kuery/kuery_syntax_error.test.ts b/packages/kbn-es-query/src/kuery/kuery_syntax_error.test.ts index e04b1abdc8494..9966c5125efab 100644 --- a/packages/kbn-es-query/src/kuery/kuery_syntax_error.test.ts +++ b/packages/kbn-es-query/src/kuery/kuery_syntax_error.test.ts @@ -8,8 +8,6 @@ import { fromKueryExpression } from './ast'; -jest.mock('./grammar'); - describe('kql syntax errors', () => { it('should throw an error for a field query missing a value', () => { expect(() => { @@ -68,17 +66,21 @@ describe('kql syntax errors', () => { it('should throw an error for unescaped quotes in a quoted string', () => { expect(() => { fromKueryExpression('foo:"ba "r"'); - }).toThrow( - 'Expected AND, OR, end of input, whitespace but "r" found.\n' + 'foo:"ba "r"\n' + '---------^' - ); + }).toThrowErrorMatchingInlineSnapshot(` + "Expected AND, OR, end of input but \\"r\\" found. + foo:\\"ba \\"r\\" + ---------^" + `); }); it('should throw an error for unescaped special characters in literals', () => { expect(() => { fromKueryExpression('foo:ba:r'); - }).toThrow( - 'Expected AND, OR, end of input, whitespace but ":" found.\n' + 'foo:ba:r\n' + '------^' - ); + }).toThrowErrorMatchingInlineSnapshot(` + "Expected AND, OR, end of input but \\":\\" found. + foo:ba:r + ------^" + `); }); it('should throw an error for range queries missing a value', () => { diff --git a/packages/kbn-es-query/src/kuery/node_types/function.test.ts b/packages/kbn-es-query/src/kuery/node_types/function.test.ts index 11e682a25602d..060658a227794 100644 --- a/packages/kbn-es-query/src/kuery/node_types/function.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/function.test.ts @@ -21,8 +21,6 @@ import { import { DataViewBase } from '../../es_query'; import { fields } from '../../filters/stubs/fields.mocks'; -jest.mock('../grammar'); - describe('kuery node types', () => { describe('function', () => { let indexPattern: DataViewBase; diff --git a/packages/kbn-es-query/src/kuery/node_types/literal.test.ts b/packages/kbn-es-query/src/kuery/node_types/literal.test.ts index c0680016644f7..31d885e9b3e17 100644 --- a/packages/kbn-es-query/src/kuery/node_types/literal.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/literal.test.ts @@ -8,8 +8,6 @@ import { buildNode, KQL_NODE_TYPE_LITERAL, toElasticsearchQuery, toKqlExpression } from './literal'; -jest.mock('../grammar'); - describe('kuery node types', () => { describe('literal', () => { describe('buildNode', () => { diff --git a/packages/kbn-es-query/src/kuery/node_types/node_builder.test.ts b/packages/kbn-es-query/src/kuery/node_types/node_builder.test.ts index d414788afec1e..0703e789aed6c 100644 --- a/packages/kbn-es-query/src/kuery/node_types/node_builder.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/node_builder.test.ts @@ -10,8 +10,6 @@ import { nodeBuilder } from './node_builder'; import { toElasticsearchQuery } from '..'; import { buildNode } from './literal'; -jest.mock('../grammar'); - describe('nodeBuilder', () => { describe('is method', () => { test('string value', () => { diff --git a/packages/kbn-es-query/src/kuery/node_types/wildcard.test.ts b/packages/kbn-es-query/src/kuery/node_types/wildcard.test.ts index 40cbfc00e8284..89387930b78f5 100644 --- a/packages/kbn-es-query/src/kuery/node_types/wildcard.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/wildcard.test.ts @@ -18,8 +18,6 @@ import { toQueryStringQuery, } from './wildcard'; -jest.mock('../grammar'); - describe('kuery node types', () => { describe('wildcard', () => { describe('buildNode', () => { diff --git a/packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts b/packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts index cf40a1911b4c7..f787624cc1497 100644 --- a/packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts +++ b/packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts @@ -30,7 +30,7 @@ const testMap = [ describe('Get i18n Identifier for file', () => { test.each(testMap)( - 'should get the right i18n identifier for a file inside an x-pack plugin', + 'should get the right i18n identifier for a file inside a Kibana plugin', (path, expectedValue) => { const appName = getI18nIdentifierFromFilePath(`${SYSTEMPATH}/${path}`, SYSTEMPATH); expect(appName).toBe(expectedValue); diff --git a/packages/kbn-eslint-plugin-i18n/helpers/utils.test.ts b/packages/kbn-eslint-plugin-i18n/helpers/utils.test.ts index 8b2979efbadde..7de00df71678e 100644 --- a/packages/kbn-eslint-plugin-i18n/helpers/utils.test.ts +++ b/packages/kbn-eslint-plugin-i18n/helpers/utils.test.ts @@ -65,7 +65,6 @@ describe('Utils', () => { it('should leave special characters inside sentences alone', () => { expect(getTranslatableValueFromString('Hey, you.')).toBe('Hey, you.'); expect(getTranslatableValueFromString('Hey, "you".')).toBe('Hey, "you".'); - expect(getTranslatableValueFromString("Hey, 'you'.")).toBe("Hey, 'you'."); expect(getTranslatableValueFromString(' Hey, you. ')).toBe('Hey, you.'); expect( getTranslatableValueFromString(` Hey, @@ -85,6 +84,10 @@ describe('Utils', () => { 'Hey, this is great! Success.' ); }); + + it('should escape single quotes', () => { + expect(getTranslatableValueFromString("Hey, 'you'.")).toBe("Hey, \\'you\\'."); + }); }); describe('geti18nIdentifierFromString', () => { diff --git a/packages/kbn-eslint-plugin-i18n/helpers/utils.ts b/packages/kbn-eslint-plugin-i18n/helpers/utils.ts index 28ec739047401..e6e7beafd6049 100644 --- a/packages/kbn-eslint-plugin-i18n/helpers/utils.ts +++ b/packages/kbn-eslint-plugin-i18n/helpers/utils.ts @@ -55,5 +55,5 @@ export function getTranslatableValueFromString(str: string) { return ''; } - return strTrimmed; + return strTrimmed.replace(/'/g, "\\'"); } diff --git a/packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.ts b/packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.ts index 5c9906a7aae79..736b387a1de5c 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.ts @@ -82,19 +82,13 @@ export const FormattedMessageShouldStartWithTheRightId: Rule.RuleModule = { ? `${i18nAppId}.${oldI18nIdentifierArray.slice(2).join('.')}` : `${i18nAppId}.${oldI18nIdentifierArray.slice(1).join('.')}`; - const defaultMessageAttribute = openingElement.attributes.find( - (attribute) => 'name' in attribute && attribute.name.name === 'defaultMessage' - ) as TSESTree.JSXAttribute; - - const defaultMessage = - (defaultMessageAttribute && - 'value' in defaultMessageAttribute && - 'value' && - defaultMessageAttribute.value && - 'value' in defaultMessageAttribute.value && - typeof defaultMessageAttribute.value.value === 'string' && - defaultMessageAttribute.value.value) || - ''; + const existingProps = + openingElement.attributes + .filter((attr) => attr !== idAttribute) + .reduce( + (acc, curr) => acc + sourceCode.getText().slice(curr.range[0], curr.range[1]), + '' + ) || 'defaultMessage=""'; report({ node: node as any, @@ -103,7 +97,7 @@ export const FormattedMessageShouldStartWithTheRightId: Rule.RuleModule = { return [ fixer.replaceTextRange( node.range, - `` + `` ), !hasI18nImportLine && rangeToAddI18nImportLine ? replaceMode === 'replace' diff --git a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts index 1b885fef77931..61e2145d98832 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts @@ -78,35 +78,35 @@ export const I18nTranslateShouldStartWithTheRightId: Rule.RuleModule = { } if (identifier && !identifier.startsWith(`${i18nAppId}.`)) { - const oldI18nIdentifierArray = identifier.split('.'); + const i18nIdentifierRange = node.arguments[0].range; - const newI18nIdentifier = + const oldI18nIdentifierArray = identifier.split('.'); + const correctI18nIdentifier = oldI18nIdentifierArray[0] === 'xpack' ? `${i18nAppId}.${oldI18nIdentifierArray.slice(2).join('.')}` : `${i18nAppId}.${oldI18nIdentifierArray.slice(1).join('.')}`; - let defaultMessage = ''; - - if ( - node.arguments[1] && - 'properties' in node.arguments[1] && - node.arguments[1].properties.length && - 'value' in node.arguments[1].properties[0] && - node.arguments[1].properties[0].value && - 'value' in node.arguments[1].properties[0].value && - typeof node.arguments[1].properties[0].value.value === 'string' - ) { - defaultMessage = node.arguments[1].properties[0].value.value; - } + const hasExistingOpts = node.arguments.length > 1; report({ node: node as any, message: RULE_WARNING_MESSAGE, fix(fixer) { - return fixer.replaceTextRange( - node.range, - `i18n.translate('${newI18nIdentifier}', { defaultMessage: '${defaultMessage}' })` - ); + return [ + hasExistingOpts + ? // if there are existing options, only replace the i18n identifier and keep the options + fixer.replaceTextRange(i18nIdentifierRange, `\'${correctI18nIdentifier}\'`) + : // if there are no existing options, add an options object with an empty default message + fixer.replaceTextRange( + i18nIdentifierRange, + `\'${correctI18nIdentifier}\', { defaultMessage: '' }` + ), + !hasI18nImportLine && rangeToAddI18nImportLine + ? replaceMode === 'replace' + ? fixer.replaceTextRange(rangeToAddI18nImportLine, i18nImportLine) + : fixer.insertTextAfterRange(rangeToAddI18nImportLine, `\n${i18nImportLine}`) + : null, + ].filter(isTruthy); }, }); } diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts index 9afac95ae3a70..d77c0124da609 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts @@ -181,7 +181,7 @@ function TestComponent() { }`, }, { - name: 'JSX elements that have a label, aria-label or title prop with a string value should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a string value should be translated with FormattedMessage', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -237,7 +237,63 @@ function TestComponent3() { }`, }, { - name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a string value with quotes in it should be correctly translated with FormattedMessage', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', + code: ` +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; + +function TestComponent() { + return ( + + ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) +}`, + errors: [ + { + line: 7, + message: RULE_WARNING_MESSAGE, + }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; + +function TestComponent() { + return ( + } /> + ) +} +function TestComponent2() { + return ( + } /> + ) +} +function TestComponent3() { + return ( + } /> + ) +}`, + }, + { + name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string should be translated with FormattedMessage', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -292,6 +348,62 @@ function TestComponent3() { ) }`, }, + { + name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string with quotes in it should be correctly translated with FormattedMessage', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', + code: ` + import React from 'react'; + import { FormattedMessage } from '@kbn/i18n-react'; + + function TestComponent() { + return ( + + ) + } + function TestComponent2() { + return ( + + ) + } + function TestComponent3() { + return ( + + ) + }`, + errors: [ + { + line: 7, + message: RULE_WARNING_MESSAGE, + }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` + import React from 'react'; + import { FormattedMessage } from '@kbn/i18n-react'; + + function TestComponent() { + return ( + } /> + ) + } + function TestComponent2() { + return ( + } /> + ) + } + function TestComponent3() { + return ( + } /> + ) + }`, + }, ]; const valid: RuleTester.ValidTestCase[] = [ diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts index cb99d9a289e66..475a1cbde53ae 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts @@ -222,6 +222,62 @@ function TestComponent3() { return ( ) +}`, + }, + { + name: 'JSX elements that have a label, aria-label or title prop with a string value with quotes should be correctly translated with i18n', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', + code: ` +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + return ( + + ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) +}`, + errors: [ + { + line: 7, + message: RULE_WARNING_MESSAGE, + }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + return ( + + ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, }, { @@ -278,6 +334,62 @@ function TestComponent3() { return ( ) +}`, + }, + { + name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string with quotes in it should be correctly translated with i18n', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', + code: ` +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + return ( + + ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) +}`, + errors: [ + { + line: 7, + message: RULE_WARNING_MESSAGE, + }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + return ( + + ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, }, ]; diff --git a/packages/kbn-esql-ast/src/ast_parser.ts b/packages/kbn-esql-ast/src/ast_parser.ts index 4e7f8b3701729..ea0287b98824b 100644 --- a/packages/kbn-esql-ast/src/ast_parser.ts +++ b/packages/kbn-esql-ast/src/ast_parser.ts @@ -12,10 +12,10 @@ import { getParser, ROOT_STATEMENT } from './antlr_facade'; import { AstListener } from './ast_factory'; import type { ESQLAst, EditorError } from './types'; -export async function getAstAndSyntaxErrors(text: string | undefined): Promise<{ +export function getAstAndSyntaxErrors(text: string | undefined): { errors: EditorError[]; ast: ESQLAst; -}> { +} { if (text == null) { return { ast: [], errors: [] }; } diff --git a/packages/kbn-esql-ast/src/types.ts b/packages/kbn-esql-ast/src/types.ts index f167276ae84a5..15ba84b419fc2 100644 --- a/packages/kbn-esql-ast/src/types.ts +++ b/packages/kbn-esql-ast/src/types.ts @@ -113,10 +113,12 @@ export interface ESQLMessage { code: string; } -export type AstProviderFn = (text: string | undefined) => Promise<{ - ast: ESQLAst; - errors: EditorError[]; -}>; +export type AstProviderFn = (text: string | undefined) => + | Promise<{ + ast: ESQLAst; + errors: EditorError[]; + }> + | { ast: ESQLAst; errors: EditorError[] }; export interface EditorError { startLineNumber: number; diff --git a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts index e021d39bb2cdc..db75dd215b6b7 100644 --- a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts +++ b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts @@ -69,21 +69,27 @@ describe('sql/esql query helpers', () => { expect(idxPattern6).toBe('foo-1,foo-2'); const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2'); - expect(idxPattern7).toBe('foo-1, foo-2'); + expect(idxPattern7).toBe('foo-1,foo-2'); const idxPattern8 = getIndexPatternFromESQLQuery('FROM foo-1, foo-2'); - expect(idxPattern8).toBe('foo-1, foo-2'); + expect(idxPattern8).toBe('foo-1,foo-2'); const idxPattern9 = getIndexPatternFromESQLQuery('FROM foo-1, foo-2 [metadata _id]'); - expect(idxPattern9).toBe('foo-1, foo-2'); + expect(idxPattern9).toBe('foo-1,foo-2'); const idxPattern10 = getIndexPatternFromESQLQuery('FROM foo-1, remote_cluster:foo-2, foo-3'); - expect(idxPattern10).toBe('foo-1, remote_cluster:foo-2, foo-3'); + expect(idxPattern10).toBe('foo-1,remote_cluster:foo-2,foo-3'); const idxPattern11 = getIndexPatternFromESQLQuery( 'FROM foo-1, foo-2 | where event.reason like "*Disable: changed from [true] to [false]*"' ); - expect(idxPattern11).toBe('foo-1, foo-2'); + expect(idxPattern11).toBe('foo-1,foo-2'); + + const idxPattern12 = getIndexPatternFromESQLQuery('FROM foo-1, foo-2 // from command used'); + expect(idxPattern12).toBe('foo-1,foo-2'); + + const idxPattern13 = getIndexPatternFromESQLQuery('ROW a = 1, b = "two", c = null'); + expect(idxPattern13).toBe(''); }); }); diff --git a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.ts b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.ts index bd4985e7fc306..c424b6042aee7 100644 --- a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.ts +++ b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import { type ESQLSource, getAstAndSyntaxErrors } from '@kbn/esql-ast'; const DEFAULT_ESQL_LIMIT = 500; @@ -25,22 +26,13 @@ export function getIndexPatternFromSQLQuery(sqlQuery?: string): string { return ''; } -// retrieves the index pattern from the aggregate query for ES|QL -export function getIndexPatternFromESQLQuery(esql?: string): string { - let fromPipe = (esql || '').split('|')[0]; - const splitFroms = fromPipe?.split(new RegExp(/FROM\s/, 'ig')); - const fromsLength = splitFroms?.length ?? 0; - if (splitFroms && splitFroms?.length > 2) { - fromPipe = `${splitFroms[fromsLength - 2]} FROM ${splitFroms[fromsLength - 1]}`; - } - const parsedString = fromPipe?.replaceAll('`', ''); - // case insensitive match for the index pattern - const regex = new RegExp(/FROM\s+([(\w*:)?\w*-.!@$^()~;\s]+)/, 'i'); - const matches = parsedString?.match(regex); - if (matches) { - return matches[1]?.trim(); - } - return ''; +// retrieves the index pattern from the aggregate query for ES|QL using ast parsing +export function getIndexPatternFromESQLQuery(esql?: string) { + const { ast } = getAstAndSyntaxErrors(esql); + const fromCommand = ast.find(({ name }) => name === 'from'); + const args = (fromCommand?.args ?? []) as ESQLSource[]; + const indices = args.filter((arg) => arg.sourceType === 'index'); + return indices?.map((index) => index.text).join(','); } export function getLimitFromESQLQuery(esql: string): number { diff --git a/packages/kbn-esql-utils/tsconfig.json b/packages/kbn-esql-utils/tsconfig.json index b604fa84c1de3..5a494e9929d7b 100644 --- a/packages/kbn-esql-utils/tsconfig.json +++ b/packages/kbn-esql-utils/tsconfig.json @@ -19,5 +19,6 @@ "@kbn/data-views-plugin", "@kbn/crypto-browser", "@kbn/data-view-utils", + "@kbn/esql-ast", ] } diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts index c119f87a577dd..809552f02b999 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts @@ -16,6 +16,7 @@ import { TRIGGER_SUGGESTION_COMMAND } from './factories'; import { camelCase } from 'lodash'; import { getAstAndSyntaxErrors } from '@kbn/esql-ast'; import { SuggestionRawDefinition } from './types'; +import { groupingFunctionDefinitions } from '../definitions/grouping'; const triggerCharacters = [',', '(', '=', ' ']; @@ -84,14 +85,22 @@ function getFunctionSignaturesByReturnType( _expectedReturnType: string | string[], { agg, + grouping, evalMath, builtin, // skipAssign here is used to communicate to not propose an assignment if it's not possible // within the current context (the actual logic has it, but here we want a shortcut) skipAssign, - }: { agg?: boolean; evalMath?: boolean; builtin?: boolean; skipAssign?: boolean } = {}, + }: { + agg?: boolean; + grouping?: boolean; + evalMath?: boolean; + builtin?: boolean; + skipAssign?: boolean; + } = {}, paramsTypes?: string[], - ignored?: string[] + ignored?: string[], + option?: string ) { const expectedReturnType = Array.isArray(_expectedReturnType) ? _expectedReturnType @@ -101,6 +110,9 @@ function getFunctionSignaturesByReturnType( if (agg) { list.push(...statsAggregationFunctionDefinitions); } + if (grouping) { + list.push(...groupingFunctionDefinitions); + } // eval functions (eval is a special keyword in JS) if (evalMath) { list.push(...evalFunctionsDefinitions); @@ -109,11 +121,11 @@ function getFunctionSignaturesByReturnType( list.push(...builtinFunctions.filter(({ name }) => (skipAssign ? name !== '=' : true))); } return list - .filter(({ signatures, ignoreAsSuggestion, supportedCommands, name }) => { + .filter(({ signatures, ignoreAsSuggestion, supportedCommands, supportedOptions, name }) => { if (ignoreAsSuggestion) { return false; } - if (!supportedCommands.includes(command)) { + if (!supportedCommands.includes(command) && !supportedOptions?.includes(option || '')) { return false; } const filteredByReturnType = signatures.filter( @@ -144,6 +156,7 @@ function getFunctionSignaturesByReturnType( } return true; }) + .sort(({ name: a }, { name: b }) => a.localeCompare(b)) .map(({ type, name, signatures }) => { if (type === 'builtin') { return signatures.some(({ params }) => params.length > 1) ? `${name} $0` : name; @@ -255,12 +268,14 @@ describe('autocomplete', () => { statement, offset, context, - async (text) => (text ? await getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), + async (text) => (text ? getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), callbackMocks ); const suggestionInertTextSorted = suggestions // simulate the editor behaviour for sorting suggestions - .sort((a, b) => (a.sortText || '').localeCompare(b.sortText || '')); + // copied from https://github.com/microsoft/vscode/blob/0a141d23179c76c5771df25a43546d9d9b6ed71c/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L971-L972 + // still not sure how accurate this is... + .sort((a, b) => (a.sortText || a.label).localeCompare(b.sortText || b.label)); expect(suggestionInertTextSorted).toHaveLength(expected.length); for (const [index, receivedSuggestion] of suggestionInertTextSorted.entries()) { @@ -593,15 +608,23 @@ describe('autocomplete', () => { const allAggFunctions = getFunctionSignaturesByReturnType('stats', 'any', { agg: true, }); - const allEvaFunctions = getFunctionSignaturesByReturnType('stats', 'any', { - evalMath: true, - }); + const allEvaFunctions = getFunctionSignaturesByReturnType( + 'stats', + 'any', + { + evalMath: true, + grouping: true, + }, + undefined, + undefined, + 'by' + ); testSuggestions('from a | stats ', ['var0 =', ...allAggFunctions, ...allEvaFunctions]); testSuggestions('from a | stats a ', [ { text: '= $0', asSnippet: true, command: TRIGGER_SUGGESTION_COMMAND }, ]); testSuggestions('from a | stats a=', [...allAggFunctions, ...allEvaFunctions]); - testSuggestions('from a | stats a=max(b) by ', [ + testSuggestions.only('from a | stats a=max(b) by ', [ 'var0 =', ...getFieldNamesByType('any'), ...allEvaFunctions, @@ -1190,7 +1213,7 @@ describe('autocomplete', () => { statement, triggerOffset + 1, context, - async (text) => (text ? await getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), + async (text) => (text ? getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), callbackMocks ); expect(callbackMocks.getFieldsFor).toHaveBeenCalledWith({ @@ -1206,7 +1229,7 @@ describe('autocomplete', () => { statement, triggerOffset + 1, context, - async (text) => (text ? await getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), + async (text) => (text ? getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), callbackMocks ); expect(callbackMocks.getFieldsFor).toHaveBeenCalledWith({ query: 'from a' }); @@ -1222,7 +1245,7 @@ describe('autocomplete', () => { statement, triggerOffset + 1, context, - async (text) => (text ? await getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), + async (text) => (text ? getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), callbackMocks ); } diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/complete_items.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/complete_items.ts index 8dcb8bff6dbc6..204f5b1b4855d 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/complete_items.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/complete_items.ts @@ -8,25 +8,15 @@ import { i18n } from '@kbn/i18n'; import type { SuggestionRawDefinition } from './types'; -import { statsAggregationFunctionDefinitions } from '../definitions/aggs'; import { builtinFunctions } from '../definitions/builtin'; -import { evalFunctionsDefinitions } from '../definitions/functions'; import { getAllCommands } from '../shared/helpers'; import { - getSuggestionFunctionDefinition, getSuggestionBuiltinDefinition, getSuggestionCommandDefinition, TRIGGER_SUGGESTION_COMMAND, buildConstantsDefinitions, } from './factories'; -export const mathCommandDefinition: SuggestionRawDefinition[] = evalFunctionsDefinitions.map( - getSuggestionFunctionDefinition -); - -export const aggregationFunctionsDefinitions: SuggestionRawDefinition[] = - statsAggregationFunctionDefinitions.map(getSuggestionFunctionDefinition); - export function getAssignmentDefinitionCompletitionItem() { const assignFn = builtinFunctions.find(({ name }) => name === '=')!; return getSuggestionBuiltinDefinition(assignFn); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts index cc81ea9a9ae53..7b28ae5add262 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import { SuggestionRawDefinition } from './types'; +import { groupingFunctionDefinitions } from '../definitions/grouping'; import { statsAggregationFunctionDefinitions } from '../definitions/aggs'; import { evalFunctionsDefinitions } from '../definitions/functions'; import { getFunctionSignatures, getCommandSignature } from '../definitions/helpers'; @@ -22,7 +23,9 @@ import { getCommandDefinition, shouldBeQuotedText } from '../shared/helpers'; import { buildDocumentation, buildFunctionDocumentation } from './documentation_util'; import { DOUBLE_BACKTICK, SINGLE_TICK_REGEX } from '../shared/constants'; -const allFunctions = statsAggregationFunctionDefinitions.concat(evalFunctionsDefinitions); +const allFunctions = statsAggregationFunctionDefinitions + .concat(evalFunctionsDefinitions) + .concat(groupingFunctionDefinitions); export const TRIGGER_SUGGESTION_COMMAND = { title: 'Trigger Suggestion Dialog', @@ -75,11 +78,13 @@ export const getCompatibleFunctionDefinition = ( returnTypes?: string[], ignored: string[] = [] ): SuggestionRawDefinition[] => { - const fnSupportedByCommand = allFunctions.filter( - ({ name, supportedCommands, supportedOptions }) => - (option ? supportedOptions?.includes(option) : supportedCommands.includes(command)) && - !ignored.includes(name) - ); + const fnSupportedByCommand = allFunctions + .filter( + ({ name, supportedCommands, supportedOptions }) => + (option ? supportedOptions?.includes(option) : supportedCommands.includes(command)) && + !ignored.includes(name) + ) + .sort((a, b) => a.name.localeCompare(b.name)); if (!returnTypes) { return fnSupportedByCommand.map(getSuggestionFunctionDefinition); } diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts index 5bb91b378aa1c..57dcb9acf93b1 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts @@ -573,72 +573,6 @@ export const evalFunctionsDefinitions: FunctionDefinition[] = [ }, ], }, - { - name: 'bucket', - description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc', { - defaultMessage: `Automatically bucket dates based on a given range and bucket target.`, - }), - signatures: [ - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'string', constantOnly: true }, - { name: 'endDate', type: 'string', constantOnly: true }, - ], - returnType: 'date', - examples: [ - 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', - ], - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'date', constantOnly: true }, - { name: 'endDate', type: 'date', constantOnly: true }, - ], - returnType: 'date', - examples: [ - 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', - ], - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'string', constantOnly: true }, - { name: 'endDate', type: 'date', constantOnly: true }, - ], - returnType: 'date', - examples: [ - 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', - ], - }, - { - params: [ - { name: 'field', type: 'date' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startDate', type: 'date', constantOnly: true }, - { name: 'endDate', type: 'string', constantOnly: true }, - ], - returnType: 'date', - examples: [ - 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', - ], - }, - { - params: [ - { name: 'field', type: 'number' }, - { name: 'buckets', type: 'number', constantOnly: true }, - { name: 'startValue', type: 'number', constantOnly: true }, - { name: 'endValue', type: 'number', constantOnly: true }, - ], - returnType: 'number', - examples: ['from index | eval bs = bucket(salary, 20, 25324, 74999)'], - }, - ], - }, { name: 'case', description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.caseDoc', { diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts new file mode 100644 index 0000000000000..612b898d4c6c6 --- /dev/null +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.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 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 { i18n } from '@kbn/i18n'; +import { FunctionDefinition } from './types'; + +export const groupingFunctionDefinitions: FunctionDefinition[] = [ + { + name: 'bucket', + alias: ['bin'], + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc', { + defaultMessage: `Automatically bucket dates based on a given range and bucket target.`, + }), + type: 'grouping', + supportedCommands: [], + supportedOptions: ['by'], + signatures: [ + { + params: [ + { name: 'field', type: 'date' }, + { name: 'buckets', type: 'time_literal', constantOnly: true }, + ], + returnType: 'date', + examples: ['from index | eval hd = bucket(hire_date, 1 hour)'], + }, + { + params: [ + { name: 'field', type: 'number' }, + { name: 'buckets', type: 'time_literal', constantOnly: true }, + ], + returnType: 'number', + examples: ['from index | eval hd = bucket(bytes, 1 hour)'], + }, + { + params: [ + { name: 'field', type: 'date' }, + { name: 'buckets', type: 'number', constantOnly: true }, + { name: 'startDate', type: 'string', constantOnly: true }, + { name: 'endDate', type: 'string', constantOnly: true }, + ], + returnType: 'date', + examples: [ + 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', + ], + }, + { + params: [ + { name: 'field', type: 'date' }, + { name: 'buckets', type: 'number', constantOnly: true }, + { name: 'startDate', type: 'date', constantOnly: true }, + { name: 'endDate', type: 'date', constantOnly: true }, + ], + returnType: 'date', + examples: [ + 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', + ], + }, + { + params: [ + { name: 'field', type: 'date' }, + { name: 'buckets', type: 'number', constantOnly: true }, + { name: 'startDate', type: 'string', constantOnly: true }, + { name: 'endDate', type: 'date', constantOnly: true }, + ], + returnType: 'date', + examples: [ + 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', + ], + }, + { + params: [ + { name: 'field', type: 'date' }, + { name: 'buckets', type: 'number', constantOnly: true }, + { name: 'startDate', type: 'date', constantOnly: true }, + { name: 'endDate', type: 'string', constantOnly: true }, + ], + returnType: 'date', + examples: [ + 'from index | eval hd = bucket(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")', + ], + }, + { + params: [ + { name: 'field', type: 'number' }, + { name: 'buckets', type: 'number', constantOnly: true }, + { name: 'startValue', type: 'number', constantOnly: true }, + { name: 'endValue', type: 'number', constantOnly: true }, + ], + returnType: 'number', + examples: ['from index | eval bs = bucket(bytes, 20, 25324, 74999)'], + }, + ], + }, +]; diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts index 85c00dd718c62..c586281112337 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts @@ -9,7 +9,7 @@ import type { ESQLCommand, ESQLCommandOption, ESQLFunction, ESQLMessage } from '@kbn/esql-ast'; export interface FunctionDefinition { - type: 'builtin' | 'agg' | 'eval'; + type: 'builtin' | 'agg' | 'eval' | 'grouping'; ignoreAsSuggestion?: boolean; name: string; alias?: string[]; diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts index b2f782b52dd45..868e8f3f9212a 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts @@ -21,6 +21,7 @@ import { statsAggregationFunctionDefinitions } from '../definitions/aggs'; import { builtinFunctions } from '../definitions/builtin'; import { commandDefinitions } from '../definitions/commands'; import { evalFunctionsDefinitions } from '../definitions/functions'; +import { groupingFunctionDefinitions } from '../definitions/grouping'; import { getFunctionSignatures } from '../definitions/helpers'; import { chronoLiterals, timeLiterals } from '../definitions/literals'; import { @@ -128,7 +129,11 @@ let commandLookups: Map | undefined; function buildFunctionLookup() { if (!fnLookups) { fnLookups = builtinFunctions - .concat(evalFunctionsDefinitions, statsAggregationFunctionDefinitions) + .concat( + evalFunctionsDefinitions, + statsAggregationFunctionDefinitions, + groupingFunctionDefinitions + ) .reduce((memo, def) => { memo.set(def.name, def); if (def.alias) { diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json index 55bc187813c5b..bbe3903c1aa07 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json +++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json @@ -811,56 +811,6 @@ ], "warning": [] }, - { - "query": "row var = bucket(now(), 5, \"a\", \"a\")", - "error": [], - "warning": [] - }, - { - "query": "row bucket(now(), 5, \"a\", \"a\")", - "error": [], - "warning": [] - }, - { - "query": "row var = bucket(now(), 5, now(), now())", - "error": [], - "warning": [] - }, - { - "query": "row bucket(now(), 5, now(), now())", - "error": [], - "warning": [] - }, - { - "query": "row var = bucket(now(), 5, \"a\", now())", - "error": [], - "warning": [] - }, - { - "query": "row bucket(now(), 5, \"a\", now())", - "error": [], - "warning": [] - }, - { - "query": "row var = bucket(now(), 5, now(), \"a\")", - "error": [], - "warning": [] - }, - { - "query": "row bucket(now(), 5, now(), \"a\")", - "error": [], - "warning": [] - }, - { - "query": "row var = bucket(5, 5, 5, 5)", - "error": [], - "warning": [] - }, - { - "query": "row bucket(5, 5, 5, 5)", - "error": [], - "warning": [] - }, { "query": "row var = case(true, \"a\")", "error": [], @@ -7099,18 +7049,6 @@ ], "warning": [] }, - { - "query": "from a_index | where bucket(numberField, 5, 5, 5) > 0", - "error": [], - "warning": [] - }, - { - "query": "from a_index | where bucket(stringField, 5, 5, 5) > 0", - "error": [ - "Argument of [bucket] must be [number], found value [stringField] type [string]" - ], - "warning": [] - }, { "query": "from a_index | where ceil(numberField) > 0", "error": [], @@ -9010,101 +8948,6 @@ ], "warning": [] }, - { - "query": "from a_index | eval var = bucket(dateField, 5, \"a\", \"a\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, 5, \"a\", \"a\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, numberField, stringField, stringField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [stringField]", - "Argument of [bucket] must be a constant, received [stringField]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = bucket(dateField, 5, now(), now())", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, 5, now(), now())", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, numberField, dateField, dateField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [dateField]", - "Argument of [bucket] must be a constant, received [dateField]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = bucket(dateField, 5, \"a\", now())", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, 5, \"a\", now())", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, numberField, stringField, dateField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [stringField]", - "Argument of [bucket] must be a constant, received [dateField]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = bucket(dateField, 5, now(), \"a\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, 5, now(), \"a\")", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(dateField, numberField, dateField, stringField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [dateField]", - "Argument of [bucket] must be a constant, received [stringField]" - ], - "warning": [] - }, - { - "query": "from a_index | eval var = bucket(numberField, 5, 5, 5)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(numberField, 5, 5, 5)", - "error": [], - "warning": [] - }, - { - "query": "from a_index | eval bucket(numberField, numberField, numberField, numberField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [numberField]" - ], - "warning": [] - }, { "query": "from a_index | eval var = case(booleanField, stringField)", "error": [], @@ -14172,44 +14015,6 @@ ], "warning": [] }, - { - "query": "from index | eval bucket(dateField, abs(numberField), \"\", \"\")", - "error": [ - "Argument of [bucket] must be a constant, received [abs(numberField)]" - ], - "warning": [] - }, - { - "query": "from index | eval bucket(dateField, abs(length(numberField)), \"\", \"\")", - "error": [ - "Argument of [bucket] must be a constant, received [abs(length(numberField))]" - ], - "warning": [] - }, - { - "query": "from index | eval bucket(dateField, pi(), \"\", \"\")", - "error": [], - "warning": [] - }, - { - "query": "from index | eval bucket(dateField, 1 + 30 / 10, \"\", \"\")", - "error": [], - "warning": [] - }, - { - "query": "from index | eval bucket(dateField, 1 + 30 / 10, concat(\"\", \"\"), \"\")", - "error": [], - "warning": [] - }, - { - "query": "from index | eval bucket(dateField, numberField, stringField, stringField)", - "error": [ - "Argument of [bucket] must be a constant, received [numberField]", - "Argument of [bucket] must be a constant, received [stringField]", - "Argument of [bucket] must be a constant, received [stringField]" - ], - "warning": [] - }, { "query": "from a_index | stats ", "error": [ @@ -15957,6 +15762,131 @@ "error": [], "warning": [] }, + { + "query": "from a_index | stats by bucket(dateField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(numberField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(numberField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bin(numberField, 1 year)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, 5, \"a\", \"a\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, numberField, stringField, stringField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [stringField]", + "Argument of [bucket] must be a constant, received [stringField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, 5, \"a\", \"a\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, 5, now(), now())", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, numberField, dateField, dateField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [dateField]", + "Argument of [bucket] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, 5, now(), now())", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, 5, \"a\", now())", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, numberField, stringField, dateField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [stringField]", + "Argument of [bucket] must be a constant, received [dateField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, 5, \"a\", now())", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, 5, now(), \"a\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(dateField, numberField, dateField, stringField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [dateField]", + "Argument of [bucket] must be a constant, received [stringField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, 5, now(), \"a\")", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(numberField, 5, 5, 5)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | stats by bucket(numberField, numberField, numberField, numberField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [numberField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(numberField, 5, 5, 5)", + "error": [], + "warning": [] + }, { "query": "FROM index\n | EVAL numberField * 3.281\n | STATS avg_numberField = AVG(`numberField * 3.281`)", "error": [], @@ -15977,6 +15907,44 @@ "error": [], "warning": [] }, + { + "query": "from index | stats by bucket(dateField, abs(numberField), \"\", \"\")", + "error": [ + "Argument of [bucket] must be a constant, received [abs(numberField)]" + ], + "warning": [] + }, + { + "query": "from index | stats by bucket(dateField, abs(length(numberField)), \"\", \"\")", + "error": [ + "Argument of [bucket] must be a constant, received [abs(length(numberField))]" + ], + "warning": [] + }, + { + "query": "from index | stats by bucket(dateField, pi(), \"\", \"\")", + "error": [], + "warning": [] + }, + { + "query": "from index | stats by bucket(dateField, 1 + 30 / 10, \"\", \"\")", + "error": [], + "warning": [] + }, + { + "query": "from index | stats by bucket(dateField, 1 + 30 / 10, concat(\"\", \"\"), \"\")", + "error": [], + "warning": [] + }, + { + "query": "from index | stats by bucket(dateField, numberField, stringField, stringField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]", + "Argument of [bucket] must be a constant, received [stringField]", + "Argument of [bucket] must be a constant, received [stringField]" + ], + "warning": [] + }, { "query": "from a_index | sort ", "error": [ diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts index 770f1ce15e32f..63abfc9dff036 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -18,6 +18,7 @@ import capitalize from 'lodash/capitalize'; import { camelCase } from 'lodash'; import { getAstAndSyntaxErrors } from '@kbn/esql-ast'; import { nonNullable } from '../shared/helpers'; +import { groupingFunctionDefinitions } from '../definitions/grouping'; const fieldTypes = [ 'number', @@ -612,11 +613,11 @@ describe('validation logic', () => { } // Skip functions that have only arguments of type "any", as it is not possible to pass "the wrong type". - // bucket and to_version functions are a bit harder to test exactly a combination of argument and predict the + // to_version functions are a bit harder to test exactly a combination of argument and predict the // the right error message if ( params.every(({ type }) => type !== 'any') && - !['bucket', 'to_version', 'mv_sort'].includes(name) + !['to_version', 'mv_sort'].includes(name) ) { // now test nested functions const fieldMappingWithNestedFunctions = getFieldMapping(params, { @@ -1549,11 +1550,11 @@ describe('validation logic', () => { } // Skip functions that have only arguments of type "any", as it is not possible to pass "the wrong type". - // bucket and to_version functions are a bit harder to test exactly a combination of argument and predict the + // to_version functions are a bit harder to test exactly a combination of argument and predict the // the right error message if ( params.every(({ type }) => type !== 'any') && - !['bucket', 'to_version', 'mv_sort'].includes(name) + !['to_version', 'mv_sort'].includes(name) ) { // now test nested functions const fieldMappingWithNestedFunctions = getFieldMapping(params, { @@ -1899,30 +1900,6 @@ describe('validation logic', () => { } } }); - - describe('constant-only parameters', () => { - testErrorsAndWarnings('from index | eval bucket(dateField, abs(numberField), "", "")', [ - 'Argument of [bucket] must be a constant, received [abs(numberField)]', - ]); - testErrorsAndWarnings( - 'from index | eval bucket(dateField, abs(length(numberField)), "", "")', - ['Argument of [bucket] must be a constant, received [abs(length(numberField))]'] - ); - testErrorsAndWarnings('from index | eval bucket(dateField, pi(), "", "")', []); - testErrorsAndWarnings('from index | eval bucket(dateField, 1 + 30 / 10, "", "")', []); - testErrorsAndWarnings( - 'from index | eval bucket(dateField, 1 + 30 / 10, concat("", ""), "")', - [] - ); - testErrorsAndWarnings( - 'from index | eval bucket(dateField, numberField, stringField, stringField)', - [ - 'Argument of [bucket] must be a constant, received [numberField]', - 'Argument of [bucket] must be a constant, received [stringField]', - 'Argument of [bucket] must be a constant, received [stringField]', - ] - ); - }); }); describe('stats', () => { @@ -2263,11 +2240,11 @@ describe('validation logic', () => { } // Skip functions that have only arguments of type "any", as it is not possible to pass "the wrong type". - // bucket and to_version functions are a bit harder to test exactly a combination of argument and predict the + // to_version is a bit harder to test exactly a combination of argument and predict the // the right error message if ( params.every(({ type }) => type !== 'any') && - !['bucket', 'to_version', 'mv_sort'].includes(name) + !['to_version', 'mv_sort'].includes(name) ) { // now test nested functions const fieldMappingWithNestedAggsFunctions = getFieldMapping(params, { @@ -2350,6 +2327,63 @@ describe('validation logic', () => { } } } + + for (const { name, alias, signatures, ...defRest } of groupingFunctionDefinitions) { + for (const { params, ...signRest } of signatures) { + const fieldMapping = getFieldMapping(params); + + const correctSignature = getFunctionSignatures( + { name, ...defRest, signatures: [{ params: fieldMapping, ...signRest }] }, + { withTypes: false } + )[0].declaration; + testErrorsAndWarnings(`from a_index | stats by ${correctSignature}`, []); + + if (params.some(({ constantOnly }) => constantOnly)) { + const fieldReplacedType = params + .filter(({ constantOnly }) => constantOnly) + .map(({ type }) => type); + // create the mapping without the literal flag + // this will make the signature wrong on purpose where in place on constants + // the arg will be a column of the same type + const fieldMappingWithoutLiterals = getFieldMapping( + params.map(({ constantOnly, ...rest }) => rest) + ); + testErrorsAndWarnings( + `from a_index | stats by ${ + getFunctionSignatures( + { + name, + ...defRest, + signatures: [{ params: fieldMappingWithoutLiterals, ...signRest }], + }, + { withTypes: false } + )[0].declaration + }`, + fieldReplacedType + // if a param of type time_literal or chrono_literal it will always be a literal + // so no way to test the constantOnly thing + .filter((type) => !['time_literal', 'chrono_literal'].includes(type)) + .map((type) => `Argument of [${name}] must be a constant, received [${type}Field]`) + ); + } + + if (alias) { + for (const otherName of alias) { + const signatureStringWithAlias = getFunctionSignatures( + { + name: otherName, + ...defRest, + signatures: [{ params: fieldMapping, ...signRest }], + }, + { withTypes: false } + )[0].declaration; + + testErrorsAndWarnings(`from a_index | stats by ${signatureStringWithAlias}`, []); + } + } + } + } + testErrorsAndWarnings( `FROM index | EVAL numberField * 3.281 @@ -2364,6 +2398,30 @@ describe('validation logic', () => { testErrorsAndWarnings(`from a_index | stats sum(case(false, 0, 1))`, []); testErrorsAndWarnings(`from a_index | stats var0 = sum( case(false, 0, 1))`, []); + + describe('constant-only parameters', () => { + testErrorsAndWarnings('from index | stats by bucket(dateField, abs(numberField), "", "")', [ + 'Argument of [bucket] must be a constant, received [abs(numberField)]', + ]); + testErrorsAndWarnings( + 'from index | stats by bucket(dateField, abs(length(numberField)), "", "")', + ['Argument of [bucket] must be a constant, received [abs(length(numberField))]'] + ); + testErrorsAndWarnings('from index | stats by bucket(dateField, pi(), "", "")', []); + testErrorsAndWarnings('from index | stats by bucket(dateField, 1 + 30 / 10, "", "")', []); + testErrorsAndWarnings( + 'from index | stats by bucket(dateField, 1 + 30 / 10, concat("", ""), "")', + [] + ); + testErrorsAndWarnings( + 'from index | stats by bucket(dateField, numberField, stringField, stringField)', + [ + 'Argument of [bucket] must be a constant, received [numberField]', + 'Argument of [bucket] must be a constant, received [stringField]', + 'Argument of [bucket] must be a constant, received [stringField]', + ] + ); + }); }); describe('sort', () => { diff --git a/packages/kbn-generate-csv/src/__snapshots__/generate_csv.test.ts.snap b/packages/kbn-generate-csv/src/__snapshots__/generate_csv.test.ts.snap index ec692fe0fea60..3b55a2d14c342 100644 --- a/packages/kbn-generate-csv/src/__snapshots__/generate_csv.test.ts.snap +++ b/packages/kbn-generate-csv/src/__snapshots__/generate_csv.test.ts.snap @@ -271,8 +271,8 @@ exports[`CsvGenerator fields from job.searchSource.getFields() (7.12 generated) `; exports[`CsvGenerator formats a search result to CSV content 1`] = ` -"date,ip,message -\\"2020-12-31T00:14:28.000Z\\",\\"110.135.176.89\\",\\"This is a great message!\\" +"date,ip,message,\\"bytes_custom_label (bytes)\\" +\\"2020-12-31T00:14:28.000Z\\",\\"110.135.176.89\\",\\"This is a great message!\\",100 " `; diff --git a/packages/kbn-generate-csv/src/generate_csv.test.ts b/packages/kbn-generate-csv/src/generate_csv.test.ts index 86a88fe3d3fb0..2a080e3652288 100644 --- a/packages/kbn-generate-csv/src/generate_csv.test.ts +++ b/packages/kbn-generate-csv/src/generate_csv.test.ts @@ -20,6 +20,8 @@ import { savedObjectsClientMock, uiSettingsServiceMock, } from '@kbn/core/server/mocks'; +import { createStubDataView } from '@kbn/data-views-plugin/common/data_views/data_view.stub'; +import { stubLogstashFieldSpecMap } from '@kbn/data-views-plugin/common/field.stub'; import { ISearchClient, ISearchStartSearchSource } from '@kbn/data-plugin/common'; import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import type { IScopedSearchClient } from '@kbn/data-plugin/server'; @@ -132,20 +134,31 @@ describe('CsvGenerator', () => { mockConfig = getMockConfig(); + const dataView = createStubDataView({ + spec: { + id: 'test', + title: 'logstash-*', + fields: { + ...stubLogstashFieldSpecMap, + bytes: { + ...stubLogstashFieldSpecMap.bytes, + customLabel: 'bytes_custom_label', + }, + }, + }, + opts: { + metaFields: ['_id', '_index', '_type', '_score'], + }, + }); + + dataView.getFormatterForField = jest.fn(); + searchSourceMock.getField = jest.fn((key: string) => { switch (key) { case 'pit': return { id: mockCursorId }; case 'index': - return { - fields: { - getByName: jest.fn(() => []), - getByType: jest.fn(() => []), - }, - metaFields: ['_id', '_index', '_type', '_score'], - getFormatterForField: jest.fn(), - getIndexPattern: () => 'logstash-*', - }; + return dataView; } }); @@ -184,13 +197,14 @@ describe('CsvGenerator', () => { date: `["2020-12-31T00:14:28.000Z"]`, ip: `["110.135.176.89"]`, message: `["This is a great message!"]`, + bytes: `[100]`, }, } as unknown as estypes.SearchHit, ]), }) ); const generateCsv = new CsvGenerator( - createMockJob({ columns: ['date', 'ip', 'message'] }), + createMockJob({ columns: ['date', 'ip', 'message', 'bytes'] }), mockConfig, mockTaskInstanceFields, { diff --git a/packages/kbn-generate-csv/src/generate_csv.ts b/packages/kbn-generate-csv/src/generate_csv.ts index c59e4fd40aafb..25ed0da6226ec 100644 --- a/packages/kbn-generate-csv/src/generate_csv.ts +++ b/packages/kbn-generate-csv/src/generate_csv.ts @@ -11,7 +11,7 @@ import type { Writable } from 'stream'; import { errors as esErrors, estypes } from '@elastic/elasticsearch'; import type { IScopedClusterClient, IUiSettingsClient, Logger } from '@kbn/core/server'; -import type { ISearchClient, ISearchStartSearchSource } from '@kbn/data-plugin/common'; +import type { DataView, ISearchClient, ISearchStartSearchSource } from '@kbn/data-plugin/common'; import { cellHasFormulas, tabifyDocs } from '@kbn/data-plugin/common'; import type { Datatable } from '@kbn/expressions-plugin/server'; import type { @@ -146,11 +146,21 @@ export class CsvGenerator { private generateHeader( columns: Set, builder: MaxSizeStringBuilder, - settings: CsvExportSettings + settings: CsvExportSettings, + dataView: DataView ) { this.logger.debug(`Building CSV header row`); const header = - Array.from(columns).map(this.escapeValues(settings)).join(settings.separator) + '\n'; + Array.from(columns) + .map((column) => { + const field = dataView?.fields.getByName(column); + if (field && field.customLabel && field.customLabel !== column) { + return `${field.customLabel} (${column})`; + } + return column; + }) + .map(this.escapeValues(settings)) + .join(settings.separator) + '\n'; if (!builder.tryAppend(header)) { return { @@ -364,7 +374,7 @@ export class CsvGenerator { if (first) { first = false; - this.generateHeader(columns, builder, settings); + this.generateHeader(columns, builder, settings, index); } if (table.rows.length < 1) { diff --git a/packages/kbn-generate-csv/tsconfig.json b/packages/kbn-generate-csv/tsconfig.json index ce90e0fc346d5..30b1ac0a49f8b 100644 --- a/packages/kbn-generate-csv/tsconfig.json +++ b/packages/kbn-generate-csv/tsconfig.json @@ -29,5 +29,6 @@ "@kbn/es-query", "@kbn/es-types", "@kbn/esql-utils", + "@kbn/data-views-plugin", ] } diff --git a/packages/kbn-lens-embeddable-utils/attribute_builder/visualization_types/xy_chart.ts b/packages/kbn-lens-embeddable-utils/attribute_builder/visualization_types/xy_chart.ts index e0b42c2dcfbf5..4bd38234abd81 100644 --- a/packages/kbn-lens-embeddable-utils/attribute_builder/visualization_types/xy_chart.ts +++ b/packages/kbn-lens-embeddable-utils/attribute_builder/visualization_types/xy_chart.ts @@ -17,6 +17,7 @@ import type { import type { DataView } from '@kbn/data-views-plugin/public'; import type { SavedObjectReference } from '@kbn/core/server'; import { AxesSettingsConfig } from '@kbn/visualizations-plugin/common'; +import type { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import type { Chart, ChartConfig, ChartLayer } from '../types'; import { DEFAULT_LAYER_ID } from '../utils'; import { XY_ID } from './constants'; @@ -130,6 +131,7 @@ export const getXYVisualizationState = ( isVisible: false, position: 'right', showSingleSeries: false, + legendStats: ['values' as LegendStats.values], }, valueLabels: 'show', yLeftScale: 'linear', @@ -149,7 +151,6 @@ export const getXYVisualizationState = ( yRight: true, }, preferredSeriesType: 'line', - valuesInLegend: false, hideEndzones: true, ...custom, }); diff --git a/packages/kbn-monaco/src/esql/lib/hover/hover.test.ts b/packages/kbn-monaco/src/esql/lib/hover/hover.test.ts index 2aba87123b480..6e65619dc479d 100644 --- a/packages/kbn-monaco/src/esql/lib/hover/hover.test.ts +++ b/packages/kbn-monaco/src/esql/lib/hover/hover.test.ts @@ -124,7 +124,7 @@ describe('hover', () => { model, position, token, - async (text) => (text ? await getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), + async (text) => (text ? getAstAndSyntaxErrors(text) : { ast: [], errors: [] }), callbackMocks ); expect(contents.map(({ value }) => value)).toEqual(expected); diff --git a/packages/kbn-monaco/src/esql/worker/esql_worker.ts b/packages/kbn-monaco/src/esql/worker/esql_worker.ts index 89ab95aa8cd21..4b268dc8b3b58 100644 --- a/packages/kbn-monaco/src/esql/worker/esql_worker.ts +++ b/packages/kbn-monaco/src/esql/worker/esql_worker.ts @@ -60,8 +60,8 @@ export class ESQLWorker implements BaseWorkerDefinition { return []; } - async getAst(text: string | undefined) { - const rawAst = await getAstAndSyntaxErrors(text); + getAst(text: string | undefined) { + const rawAst = getAstAndSyntaxErrors(text); return { ast: rawAst.ast, errors: rawAst.errors.map(inlineToMonacoErrors), diff --git a/packages/kbn-profiling-utils/common/profiling.test.ts b/packages/kbn-profiling-utils/common/profiling.test.ts index 42124df4f683f..60e27d1222d32 100644 --- a/packages/kbn-profiling-utils/common/profiling.test.ts +++ b/packages/kbn-profiling-utils/common/profiling.test.ts @@ -132,6 +132,7 @@ describe('getLanguageType', () => { FrameType.Perl, FrameType.Python, FrameType.Ruby, + FrameType.DotNET, ].map((type) => it(`returns interpreted for ${type}`, () => { expect(getLanguageType({ frameType: type })).toEqual('INTERPRETED'); diff --git a/packages/kbn-profiling-utils/common/profiling.ts b/packages/kbn-profiling-utils/common/profiling.ts index c8b2be802d8a6..14e3efc21ca63 100644 --- a/packages/kbn-profiling-utils/common/profiling.ts +++ b/packages/kbn-profiling-utils/common/profiling.ts @@ -33,6 +33,7 @@ export enum FrameType { Perl, JavaScript, PHPJIT, + DotNET, ErrorFlag = 0x80, Error = 0xff, } @@ -48,6 +49,7 @@ const frameTypeDescriptions = { [FrameType.Perl]: 'Perl', [FrameType.JavaScript]: 'JavaScript', [FrameType.PHPJIT]: 'PHP JIT', + [FrameType.DotNET]: '.NET', [FrameType.ErrorFlag]: 'ErrorFlag', [FrameType.Error]: 'Error', }; diff --git a/packages/kbn-router-to-openapispec/src/generate_oas.test.ts b/packages/kbn-router-to-openapispec/src/generate_oas.test.ts index fccf60f9a9fcb..5942779931167 100644 --- a/packages/kbn-router-to-openapispec/src/generate_oas.test.ts +++ b/packages/kbn-router-to-openapispec/src/generate_oas.test.ts @@ -49,8 +49,8 @@ describe('generateOpenApiDocument', () => { body: otherSchema, }, response: { - 200: { - body: schema.string({ maxLength: 10, minLength: 1 }), + [200]: { + body: () => schema.string({ maxLength: 10, minLength: 1 }), }, }, }, diff --git a/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts b/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts index 41a2458619000..455892a871a2f 100644 --- a/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts +++ b/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts @@ -60,7 +60,7 @@ const getRouterDefaults = () => ({ }, response: { 200: { - body: schema.string({ maxLength: 10, minLength: 1 }), + body: () => schema.string({ maxLength: 10, minLength: 1 }), }, }, }, @@ -86,7 +86,7 @@ const getVersionedRouterDefaults = () => ({ }), }, response: { - [200]: { body: schema.object({ fooResponse: schema.string() }) }, + [200]: { body: () => schema.object({ fooResponse: schema.string() }) }, }, }, version: 'oas-test-version-1', @@ -98,7 +98,7 @@ const getVersionedRouterDefaults = () => ({ validate: { request: { body: schema.object({ foo: schema.string() }) }, response: { - [200]: { body: schema.object({ fooResponse: schema.string() }) }, + [200]: { body: () => schema.object({ fooResponse: schema.string() }) }, }, }, version: 'oas-test-version-2', diff --git a/packages/kbn-router-to-openapispec/src/generate_oas.ts b/packages/kbn-router-to-openapispec/src/generate_oas.ts index 56f81a076449a..59f33ac582292 100644 --- a/packages/kbn-router-to-openapispec/src/generate_oas.ts +++ b/packages/kbn-router-to-openapispec/src/generate_oas.ts @@ -11,6 +11,7 @@ import { getResponseValidation } from '@kbn/core-http-server'; import { versionHandlerResolvers, ALLOWED_PUBLIC_VERSION as LATEST_SERVERLESS_VERSION, + unwrapVersionedResponseBodyValidation, } from '@kbn/core-http-router-server-internal'; import type { CoreVersionedRouter, @@ -114,7 +115,9 @@ const extractVersionedResponses = ( if (!schemas?.response) return acc; const statusCodes = Object.keys(schemas.response); for (const statusCode of statusCodes) { - const maybeSchema = schemas.response[statusCode as unknown as number].body; + const maybeSchema = unwrapVersionedResponseBodyValidation( + schemas.response[statusCode as unknown as number].body + ); const schema = converter.convert(maybeSchema); acc[statusCode] = { ...acc[statusCode], @@ -216,7 +219,7 @@ const extractResponses = (route: InternalRouterRoute, converter: OasConverter) = return !!validationSchemas ? Object.entries(validationSchemas).reduce( (acc, [statusCode, schema]) => { - const oasSchema = converter.convert(schema.body); + const oasSchema = converter.convert(schema.body()); acc[statusCode] = { ...acc[statusCode], description: route.options.description ?? 'No description', diff --git a/packages/kbn-search-response-warnings/src/handle_warnings.test.ts b/packages/kbn-search-response-warnings/src/handle_warnings.test.ts index ad9dff53fdf5e..d81d963406cea 100644 --- a/packages/kbn-search-response-warnings/src/handle_warnings.test.ts +++ b/packages/kbn-search-response-warnings/src/handle_warnings.test.ts @@ -7,17 +7,16 @@ */ import { estypes } from '@elastic/elasticsearch'; -import type { ThemeServiceStart } from '@kbn/core/public'; -import type { I18nStart } from '@kbn/core-i18n-browser'; -import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; +import { coreMock } from '@kbn/core/public/mocks'; import type { Start as InspectorStart, RequestAdapter } from '@kbn/inspector-plugin/public'; import { handleWarnings } from './handle_warnings'; describe('handleWarnings', () => { - const notifications = notificationServiceMock.createStartContract(); + const coreStart = coreMock.createStart(); + const addWarningSpy = jest.spyOn(coreStart.notifications.toasts, 'addWarning'); beforeEach(() => { - notifications.toasts.addWarning.mockClear(); + addWarningSpy.mockClear(); }); it('should not show notifications when there are no warnings', () => { @@ -34,14 +33,12 @@ describe('handleWarnings', () => { }, } as estypes.SearchResponse, services: { - i18n: {} as unknown as I18nStart, inspector: {} as unknown as InspectorStart, - notifications, - theme: {} as unknown as ThemeServiceStart, + ...coreStart, }, }); - expect(notifications.toasts.addWarning).toBeCalledTimes(0); + expect(addWarningSpy).toBeCalledTimes(0); }); it('should show notifications for warnings when there is no callback', () => { @@ -57,14 +54,12 @@ describe('handleWarnings', () => { hits: { hits: [] }, } as estypes.SearchResponse, services: { - i18n: {} as unknown as I18nStart, inspector: {} as unknown as InspectorStart, - notifications, - theme: {} as unknown as ThemeServiceStart, + ...coreStart, }, }); - expect(notifications.toasts.addWarning).toBeCalledTimes(1); + expect(addWarningSpy).toBeCalledTimes(1); }); it('should show notifications for warnings not handled by callback', () => { @@ -82,15 +77,13 @@ describe('handleWarnings', () => { hits: { hits: [] }, } as estypes.SearchResponse, services: { - i18n: {} as unknown as I18nStart, inspector: {} as unknown as InspectorStart, - notifications, - theme: {} as unknown as ThemeServiceStart, + ...coreStart, }, }); expect(callbackMock).toBeCalledTimes(1); - expect(notifications.toasts.addWarning).toBeCalledTimes(1); + expect(addWarningSpy).toBeCalledTimes(1); }); it('should not show notifications for warnings handled by callback', () => { @@ -108,14 +101,12 @@ describe('handleWarnings', () => { hits: { hits: [] }, } as estypes.SearchResponse, services: { - i18n: {} as unknown as I18nStart, inspector: {} as unknown as InspectorStart, - notifications, - theme: {} as unknown as ThemeServiceStart, + ...coreStart, }, }); expect(callbackMock).toBeCalledTimes(1); - expect(notifications.toasts.addWarning).toBeCalledTimes(0); + expect(addWarningSpy).toBeCalledTimes(0); }); }); diff --git a/packages/kbn-search-response-warnings/src/handle_warnings.tsx b/packages/kbn-search-response-warnings/src/handle_warnings.tsx index 1ff5cb0eafab4..f826cc881a606 100644 --- a/packages/kbn-search-response-warnings/src/handle_warnings.tsx +++ b/packages/kbn-search-response-warnings/src/handle_warnings.tsx @@ -9,7 +9,11 @@ import React from 'react'; import { EuiButtonEmpty, EuiText } from '@elastic/eui'; import { estypes } from '@elastic/elasticsearch'; -import type { NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; +import type { + AnalyticsServiceStart, + NotificationsStart, + ThemeServiceStart, +} from '@kbn/core/public'; import { toMountPoint } from '@kbn/react-kibana-mount'; import type { I18nStart } from '@kbn/core-i18n-browser'; import type { Start as InspectorStart, RequestAdapter } from '@kbn/inspector-plugin/public'; @@ -26,6 +30,7 @@ import { } from './components/search_response_warnings/i18n_utils'; interface Services { + analytics: AnalyticsServiceStart; i18n: I18nStart; inspector: InspectorStart; notifications: NotificationsStart; @@ -94,7 +99,7 @@ export function handleWarnings({ {viewDetailsLabel} , - { theme: services.theme, i18n: services.i18n } + services ), }); } diff --git a/packages/kbn-search-response-warnings/tsconfig.json b/packages/kbn-search-response-warnings/tsconfig.json index 1a1072b08b02b..6823ef5abf8a1 100644 --- a/packages/kbn-search-response-warnings/tsconfig.json +++ b/packages/kbn-search-response-warnings/tsconfig.json @@ -10,7 +10,6 @@ "@kbn/core", "@kbn/react-kibana-mount", "@kbn/core-i18n-browser", - "@kbn/core-notifications-browser-mocks", ], "exclude": ["target/**/*"] } diff --git a/packages/kbn-test/src/es/test_es_cluster.ts b/packages/kbn-test/src/es/test_es_cluster.ts index 0f94a76d87f71..12f020175fd4e 100644 --- a/packages/kbn-test/src/es/test_es_cluster.ts +++ b/packages/kbn-test/src/es/test_es_cluster.ts @@ -182,6 +182,7 @@ export function createTestEsCluster< } = options; const clusterName = `${CI_PARALLEL_PROCESS_PREFIX}${customClusterName}`; + const isFIPSMode = process.env.FTR_FIPS_MODE === '1'; const defaultEsArgs = [ `cluster.name=${clusterName}`, @@ -192,7 +193,12 @@ export function createTestEsCluster< : ['discovery.type=single-node']), ]; - const esArgs = assignArgs(defaultEsArgs, customEsArgs); + const esArgs = assignArgs( + defaultEsArgs, + // ML has issues running in FIPS mode due to custom OpenSSL + // Remove after https://github.com/elastic/kibana-operations/issues/96 + isFIPSMode ? [...customEsArgs, 'xpack.ml.enabled=false'] : customEsArgs + ); const config = { version: esTestConfig.getVersion(), diff --git a/packages/kbn-text-based-editor/src/editor_footer.tsx b/packages/kbn-text-based-editor/src/editor_footer.tsx index 27a92b504c705..88524bbeb4378 100644 --- a/packages/kbn-text-based-editor/src/editor_footer.tsx +++ b/packages/kbn-text-based-editor/src/editor_footer.tsx @@ -118,6 +118,7 @@ interface EditorFooterProps { hideQueryHistory?: boolean; refetchHistoryItems?: boolean; isInCompactMode?: boolean; + queryHasChanged?: boolean; } export const EditorFooter = memo(function EditorFooter({ @@ -142,6 +143,7 @@ export const EditorFooter = memo(function EditorFooter({ hideQueryHistory, refetchHistoryItems, isInCompactMode, + queryHasChanged, }: EditorFooterProps) { const { euiTheme } = useEuiTheme(); const [isErrorPopoverOpen, setIsErrorPopoverOpen] = useState(false); @@ -329,9 +331,15 @@ export const EditorFooter = memo(function EditorFooter({ > ), }, - { - label: i18n.translate( - 'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.autoBucketFunction', - { - defaultMessage: 'BUCKET', - } - ), - description: ( - = "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" -| EVAL bucket = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z") -| STATS AVG(salary) BY bucket -| SORT bucket -\`\`\` - -Returning: -\`\`\` -46305.0 | 1985-02-01T00:00:00.000Z -44817.0 | 1985-05-01T00:00:00.000Z -62405.0 | 1985-07-01T00:00:00.000Z -49095.0 | 1985-09-01T00:00:00.000Z -51532.0 | 1985-10-01T00:00:00.000Z -54539.75 | 1985-11-01T00:00:00.000 -\`\`\` - -NOTE: \`BUCKET\` does not create buckets that don’t match any documents. That’s why the example above is missing 1985-03-01 and other dates. - `, - description: - 'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)', - } - )} - /> - ), - }, { label: i18n.translate( 'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.caseFunction', @@ -3733,6 +3657,143 @@ Example: ], }; +export const groupingFunctions = { + label: i18n.translate('textBasedEditor.query.textBasedLanguagesEditor.groupingFunctions', { + defaultMessage: 'Grouping functions', + }), + description: i18n.translate( + 'textBasedEditor.query.textBasedLanguagesEditor.groupingFunctionsDocumentationESQLDescription', + { + defaultMessage: `These grouping functions can be used with \`STATS...BY\`:`, + } + ), + items: [ + { + label: i18n.translate( + 'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.autoBucketFunction', + { + defaultMessage: 'BUCKET', + } + ), + description: ( + = "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z") +| SORT hire_date +\`\`\` + +**NOTE**: The goal isn’t to provide the exact target number of buckets, it’s to pick a range that provides _at most_ the target number of buckets. + +You can combine \`BUCKET\` with an aggregation to create a histogram: + +\`\`\` +FROM employees +| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z") +| SORT month +\`\`\` + +**NOTE**: \`BUCKET\` does not create buckets that match zero documents. That’s why the previous example is missing \`1985-03-01\` and other dates. + +Asking for more buckets can result in a smaller range. For example, requesting at most 100 buckets in a year results in weekly buckets: + +\`\`\` +FROM employees +| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z") +| SORT week +\`\`\` + +**NOTE**: \`BUCKET\` does not filter any rows. It only uses the provided range to pick a good bucket size. For rows with a value outside of the range, it returns a bucket value that corresponds to a bucket outside the range. Combine \`BUCKET\` with \`WHERE\` to filter rows. + +If the desired bucket size is known in advance, simply provide it as the second argument, leaving the range out: + +\`\`\` +FROM employees +| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week) +| SORT week +\`\`\` + +**NOTE**: When providing the bucket size as the second parameter, it must be a time duration or date period. + +\`BUCKET\` can also operate on numeric fields. For example, to create a salary histogram: + +\`\`\` +FROM employees +| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999) +| SORT bs +\`\`\` + +Unlike the earlier example that intentionally filters on a date range, you rarely want to filter on a numeric range. You have to find the min and max separately. ES|QL doesn’t yet have an easy way to do that automatically. + +The range can be omitted if the desired bucket size is known in advance. Simply provide it as the second argument: + +\`\`\` +FROM employees +| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.) +| SORT b +\`\`\` + +**NOTE**: When providing the bucket size as the second parameter, it must be of a **floating point type**. + +Here's an example to create hourly buckets for the last 24 hours, and calculate the number of events per hour: + +\`\`\` +FROM sample_data +| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW() +| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW()) +\`\`\` + +Here's an example to create monthly buckets for the year 1985, and calculate the average salary by hiring month: + +\`\`\` +FROM employees +| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z" +| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z") +| SORT bucket +\`\`\` + +\`BUCKET\` may be used in both the aggregating and grouping part of the \`STATS …​ BY …\`​ command, provided that in the aggregating part the function is **referenced by an alias defined in the grouping part**, or that it is invoked with the exact same expression. + +For example: + +\`\`\` +FROM employees +| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.) +| SORT b1, b2 +| KEEP s1, b1, s2, b2 +\`\`\` + `, + description: + 'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)', + } + )} + /> + ), + }, + ], +}; + export const spatialFunctions = { label: i18n.translate('textBasedEditor.query.textBasedLanguagesEditor.spatialFunctions', { defaultMessage: 'Spatial functions', @@ -3779,7 +3840,6 @@ FROM airport_city_boundaries /> ), }, - // ST_DISJOINT { label: i18n.translate( 'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stdisjointFunction', diff --git a/packages/kbn-text-based-editor/src/helpers.ts b/packages/kbn-text-based-editor/src/helpers.ts index f637585d82a06..d8f4fac7f51a2 100644 --- a/packages/kbn-text-based-editor/src/helpers.ts +++ b/packages/kbn-text-based-editor/src/helpers.ts @@ -156,6 +156,7 @@ export const getDocumentationSections = async (language: string) => { initialSection, functions, aggregationFunctions, + groupingFunctions, spatialFunctions, operators, } = await import('./esql_documentation_sections'); @@ -170,6 +171,7 @@ export const getDocumentationSections = async (language: string) => { processingCommands, functions, aggregationFunctions, + groupingFunctions, spatialFunctions, operators ); diff --git a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx index 7cbf3a5a5cbf4..184a8eb4736f5 100644 --- a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx +++ b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx @@ -967,6 +967,7 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({ hideQueryHistory={hideHistoryComponent} refetchHistoryItems={refetchHistoryItems} isInCompactMode={true} + queryHasChanged={code !== codeWhenSubmitted} /> )} @@ -1065,6 +1066,7 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({ containerWidth={editorWidth} hideQueryHistory={hideHistoryComponent} refetchHistoryItems={refetchHistoryItems} + queryHasChanged={code !== codeWhenSubmitted} /> )} {isCodeEditorExpanded && ( diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index fd93f01a0eed5..3d7dd87020047 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -21,10 +21,10 @@ webpack_cli( "//packages/kbn-babel-register", "//packages/kbn-babel-preset", # packages included in the shared deps src bundle - "//packages/kbn-flot-charts", "//packages/kbn-ui-theme", "//packages/kbn-i18n", "//packages/kbn-i18n-react", + "//packages/kbn-esql-ast", "//packages/kbn-monaco", "//packages/kbn-datemath", "//packages/kbn-analytics", diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index e35d736ba503b..519c706e723fd 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -98,6 +98,7 @@ const externals = { '@tanstack/react-query': '__kbnSharedDeps__.ReactQuery', '@tanstack/react-query-devtools': '__kbnSharedDeps__.ReactQueryDevtools', '@kbn/code-editor': '__kbnSharedDeps__.KbnCodeEditor', + '@kbn/esql-ast': '__kbnSharedDeps__.KbnEsqlAst', }; module.exports = { distDir, jsFilename, cssDistFilename, externals }; diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index 785e11ce2affe..1046f2fed7cb2 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -10,8 +10,6 @@ require('./polyfills'); export const Jquery = require('jquery'); window.$ = window.jQuery = Jquery; -// mutates window.jQuery and window.$ -require('@kbn/flot-charts'); // stateful deps export const KbnUiTheme = require('@kbn/ui-theme'); @@ -74,3 +72,4 @@ export const Classnames = require('classnames'); export const ReactQuery = require('@tanstack/react-query'); export const ReactQueryDevtools = require('@tanstack/react-query-devtools'); export const KbnCodeEditor = require('@kbn/code-editor'); +export const KbnEsqlAst = require('@kbn/esql-ast'); diff --git a/packages/kbn-unified-data-table/src/components/data_table.scss b/packages/kbn-unified-data-table/src/components/data_table.scss index 1dde86b0c9eb6..28864457af269 100644 --- a/packages/kbn-unified-data-table/src/components/data_table.scss +++ b/packages/kbn-unified-data-table/src/components/data_table.scss @@ -53,12 +53,6 @@ border-bottom: $euiBorderThin; } - .euiDataGridRowCell--controlColumn:hover::after, - .euiDataGridRowCell--controlColumn:focus::after, - .euiDataGridRowCell--controlColumn.euiDataGridRowCell--open::after { - border-color: transparent; - } - .euiDataGridRowCell--controlColumn .euiDataGridRowCell__content, .euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='openDetails'], .euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='select'] { diff --git a/packages/kbn-unified-doc-viewer/src/components/doc_viewer/doc_viewer.tsx b/packages/kbn-unified-doc-viewer/src/components/doc_viewer/doc_viewer.tsx index fab4673eb8ed5..74fbfcf0a6133 100644 --- a/packages/kbn-unified-doc-viewer/src/components/doc_viewer/doc_viewer.tsx +++ b/packages/kbn-unified-doc-viewer/src/components/doc_viewer/doc_viewer.tsx @@ -22,22 +22,24 @@ export interface DocViewerProps extends DocViewRenderProps { * a `render` function. */ export function DocViewer({ docViews, ...renderProps }: DocViewerProps) { - const tabs = docViews.map(({ id, title, render, component }: DocView) => { - return { - id: `kbn_doc_viewer_tab_${id}`, - name: title, - content: ( - - ), - ['data-test-subj']: `docViewerTab-${id}`, - }; - }); + const tabs = docViews + .filter(({ enabled }) => enabled) // Filter out disabled doc views + .map(({ id, title, render, component }: DocView) => { + return { + id: `kbn_doc_viewer_tab_${id}`, + name: title, + content: ( + + ), + ['data-test-subj']: `docViewerTab-${id}`, + }; + }); if (!tabs.length) { // There's a minimum of 2 tabs active in Discover. diff --git a/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.test.tsx b/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.test.tsx index e8f631814d287..9154866120b01 100644 --- a/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.test.tsx +++ b/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.test.tsx @@ -74,6 +74,25 @@ describe('DocViewerRegistry', () => { }); }); + describe('#enableById & #disableById', () => { + test('should enable/disable a doc view given the passed id', () => { + const registry = new DocViewsRegistry([fnDocView, componentDocView]); + + const docViews = registry.getAll(); + + expect(docViews[0]).toHaveProperty('enabled', true); + expect(docViews[1]).toHaveProperty('enabled', true); + + registry.disableById('function-doc-view'); + + expect(registry.getAll()[0]).toHaveProperty('enabled', false); + + registry.enableById('function-doc-view'); + + expect(registry.getAll()[0]).toHaveProperty('enabled', true); + }); + }); + describe('#clone', () => { test('should return a new DocViewRegistry instance starting from the current one', () => { const registry = new DocViewsRegistry([fnDocView, componentDocView]); @@ -84,6 +103,24 @@ describe('DocViewerRegistry', () => { expect(docViews[0]).toHaveProperty('id', 'function-doc-view'); expect(docViews[1]).toHaveProperty('id', 'component-doc-view'); expect(registry).not.toBe(clonedRegistry); + + // Test against shared references between clones + expect(clonedRegistry).not.toBe(registry); + + // Mutating a cloned registry should not affect the original registry + registry.disableById('function-doc-view'); + expect(registry.getAll()[0]).toHaveProperty('enabled', false); + expect(clonedRegistry.getAll()[0]).toHaveProperty('enabled', true); + + clonedRegistry.add({ + id: 'additional-doc-view', + order: 20, + title: 'Render function', + render: jest.fn(), + }); + + expect(registry.getAll().length).toBe(2); + expect(clonedRegistry.getAll().length).toBe(3); }); }); }); diff --git a/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.ts b/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.ts index 9cada7ed497a3..8babc9c5aa945 100644 --- a/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.ts +++ b/packages/kbn-unified-doc-viewer/src/services/doc_views_registry.ts @@ -15,6 +15,10 @@ export enum ElasticRequestState { NotFoundDataView, } +const defaultDocViewConfig = { + enabled: true, +}; + export class DocViewsRegistry { private docViews: Map; @@ -22,7 +26,9 @@ export class DocViewsRegistry { if (initialValue instanceof DocViewsRegistry) { this.docViews = new Map(initialValue.docViews); } else if (Array.isArray(initialValue)) { - this.docViews = new Map(initialValue.map((docView) => [docView.id, docView])); + this.docViews = new Map( + initialValue.map((docView) => [docView.id, this.createDocView(docView)]) + ); } else { this.docViews = new Map(); } @@ -41,7 +47,7 @@ export class DocViewsRegistry { ); } - this.docViews.set(docView.id, docView); + this.docViews.set(docView.id, this.createDocView(docView)); // Sort the doc views at insertion time to perform this operation once and not on every retrieval. this.sortDocViews(); } @@ -50,8 +56,30 @@ export class DocViewsRegistry { this.docViews.delete(id); } + enableById(id: string) { + const docView = this.docViews.get(id); + if (docView) { + docView.enabled = true; + } else { + throw new Error( + `DocViewsRegistry#enableById: there is no DocView registered with id "${id}".` + ); + } + } + + disableById(id: string) { + const docView = this.docViews.get(id); + if (docView) { + docView.enabled = false; + } else { + throw new Error( + `DocViewsRegistry#disableById: there is no DocView registered with id "${id}".` + ); + } + } + clone() { - return new DocViewsRegistry(this); + return new DocViewsRegistry(this.getAll()); } private sortDocViews() { @@ -61,4 +89,8 @@ export class DocViewsRegistry { this.docViews = new Map(sortedEntries); } + + private createDocView(docView: DocView) { + return { ...defaultDocViewConfig, ...docView }; + } } diff --git a/packages/kbn-unified-doc-viewer/src/services/types.ts b/packages/kbn-unified-doc-viewer/src/services/types.ts index bcf64c817e887..115583c738bb0 100644 --- a/packages/kbn-unified-doc-viewer/src/services/types.ts +++ b/packages/kbn-unified-doc-viewer/src/services/types.ts @@ -60,6 +60,7 @@ export interface BaseDocViewInput { id: string; order: number; title: string; + enabled?: boolean; } export interface RenderDocViewInput extends BaseDocViewInput { diff --git a/packages/presentation/presentation_publishing/index.ts b/packages/presentation/presentation_publishing/index.ts index 167c15a826d08..6223c7cab4245 100644 --- a/packages/presentation/presentation_publishing/index.ts +++ b/packages/presentation/presentation_publishing/index.ts @@ -28,7 +28,10 @@ export { useInheritedViewMode, type CanAccessViewMode, } from './interfaces/can_access_view_mode'; -export { initializeTimeRange } from './interfaces/fetch/initialize_time_range'; +export { + initializeTimeRange, + type SerializedTimeRange, +} from './interfaces/fetch/initialize_time_range'; export { fetch$, type FetchContext } from './interfaces/fetch/fetch'; export { apiPublishesPartialUnifiedSearch, diff --git a/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx b/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx index d71b460e26a3e..5d6d4311ae058 100644 --- a/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx +++ b/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx @@ -49,7 +49,7 @@ export const NoDataButtonLink = ({ @@ -65,7 +65,7 @@ export const NoDataButtonLink = ({ diff --git a/src/core/server/integration_tests/http/router.test.ts b/src/core/server/integration_tests/http/router.test.ts index 614cc27e72f95..42cd093244a48 100644 --- a/src/core/server/integration_tests/http/router.test.ts +++ b/src/core/server/integration_tests/http/router.test.ts @@ -1405,7 +1405,7 @@ describe('Response factory', () => { }, response: { 200: { - body: runtimeValidation, + body: () => runtimeValidation, }, }, }, diff --git a/src/core/server/integration_tests/http/versioned_router.test.ts b/src/core/server/integration_tests/http/versioned_router.test.ts index 1b397af616d7b..86427a2488e2d 100644 --- a/src/core/server/integration_tests/http/versioned_router.test.ts +++ b/src/core/server/integration_tests/http/versioned_router.test.ts @@ -199,14 +199,16 @@ describe('Routing versioned requests', () => { router.versioned .get({ path: '/my-path', access: 'internal' }) .addVersion( - { validate: { response: { 200: { body: schema.number() } } }, version: '1' }, + { validate: { response: { 200: { body: () => schema.number() } } }, version: '1' }, async (ctx, req, res) => { return res.ok({ body: { v: '1' } }); } ) .addVersion( { - validate: { response: { 200: { body: schema.object({}, { unknowns: 'forbid' }) } } }, + validate: { + response: { 200: { body: () => schema.object({}, { unknowns: 'forbid' }) } }, + }, version: '2', }, async (ctx, req, res) => { @@ -215,7 +217,9 @@ describe('Routing versioned requests', () => { ) .addVersion( { - validate: { response: { 200: { body: schema.object({}, { unknowns: 'allow' }) } } }, + validate: { + response: { 200: { body: () => schema.object({}, { unknowns: 'allow' }) } }, + }, version: '3', }, async (ctx, req, res) => { @@ -271,7 +275,7 @@ describe('Routing versioned requests', () => { router.versioned .get({ path: '/my-path', access: 'internal' }) .addVersion( - { validate: { response: { 200: { body: schema.number() } } }, version: '1' }, + { validate: { response: { 200: { body: () => schema.number() } } }, version: '1' }, async (ctx, req, res) => { return res.ok({ body: { v: '1' } }); } @@ -294,11 +298,11 @@ describe('Routing versioned requests', () => { router.versioned .get({ path: '/my-path', access: 'internal' }) .addVersion( - { version: '1', validate: { response: { 200: { body: schema.number() } } } }, + { version: '1', validate: { response: { 200: { body: () => schema.number() } } } }, async (ctx, req, res) => res.ok() ) .addVersion( - { version: '2', validate: { response: { 200: { body: schema.number() } } } }, + { version: '2', validate: { response: { 200: { body: () => schema.number() } } } }, async (ctx, req, res) => res.ok() ); await server.start(); diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts index c7f089ec3dc23..d6e885485aeb9 100644 --- a/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts @@ -99,6 +99,7 @@ describe('POST /api/saved_objects/_bulk_create', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsBulkCreate).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts index 893c406e2f272..d42090e87aa66 100644 --- a/src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts @@ -95,6 +95,7 @@ describe('POST /api/saved_objects/_bulk_delete', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsBulkDelete).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts index f43fbf752e955..4403eb1770c81 100644 --- a/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts @@ -95,6 +95,7 @@ describe('POST /api/saved_objects/_bulk_get', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsBulkGet).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts index 29eee8076394a..05bc1bf93d2ce 100644 --- a/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts @@ -99,6 +99,7 @@ describe('POST /api/saved_objects/_bulk_resolve', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsBulkResolve).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts index 797885e2b2aca..6df5f9cc4c718 100644 --- a/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts @@ -115,6 +115,7 @@ describe('PUT /api/saved_objects/_bulk_update', () => { expect(result.body).toEqual({ saved_objects: clientResponse }); expect(coreUsageStatsClient.incrementSavedObjectsBulkUpdate).toHaveBeenCalledWith({ request: expect.anything(), + types: ['visualization', 'dashboard'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/create.test.ts b/src/core/server/integration_tests/saved_objects/routes/create.test.ts index e1b73461e5fa0..882cccf879ad7 100644 --- a/src/core/server/integration_tests/saved_objects/routes/create.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/create.test.ts @@ -86,6 +86,7 @@ describe('POST /api/saved_objects/{type}', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsCreate).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/delete.test.ts b/src/core/server/integration_tests/saved_objects/routes/delete.test.ts index 7ed9de92ab69a..ec364e5de287d 100644 --- a/src/core/server/integration_tests/saved_objects/routes/delete.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/delete.test.ts @@ -72,6 +72,7 @@ describe('DELETE /api/saved_objects/{type}/{id}', () => { expect(result.body).toEqual({}); expect(coreUsageStatsClient.incrementSavedObjectsDelete).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/find.test.ts b/src/core/server/integration_tests/saved_objects/routes/find.test.ts index 29d82564d223c..99bffe1406862 100644 --- a/src/core/server/integration_tests/saved_objects/routes/find.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/find.test.ts @@ -158,6 +158,7 @@ describe('GET /api/saved_objects/_find', () => { expect(result.body).toEqual(findResponse); expect(coreUsageStatsClient.incrementSavedObjectsFind).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/get.test.ts b/src/core/server/integration_tests/saved_objects/routes/get.test.ts index 9b5b75029f892..7d622e3b118ed 100644 --- a/src/core/server/integration_tests/saved_objects/routes/get.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/get.test.ts @@ -109,6 +109,7 @@ describe('GET /api/saved_objects/{type}/{id}', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsGet).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/core/server/integration_tests/saved_objects/routes/update.test.ts b/src/core/server/integration_tests/saved_objects/routes/update.test.ts index e121fa7a43e0d..283773c3214de 100644 --- a/src/core/server/integration_tests/saved_objects/routes/update.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/update.test.ts @@ -101,6 +101,7 @@ describe('PUT /api/saved_objects/{type}/{id?}', () => { expect(result.body).toEqual(clientResponse); expect(coreUsageStatsClient.incrementSavedObjectsUpdate).toHaveBeenCalledWith({ request: expect.anything(), + types: ['index-pattern'], }); }); diff --git a/src/dev/build/tasks/create_cdn_assets_task.ts b/src/dev/build/tasks/create_cdn_assets_task.ts index 870fd05c4ae39..79e79fba548a0 100644 --- a/src/dev/build/tasks/create_cdn_assets_task.ts +++ b/src/dev/build/tasks/create_cdn_assets_task.ts @@ -12,11 +12,13 @@ import { access } from 'fs/promises'; import { resolve, dirname } from 'path'; import { asyncForEach } from '@kbn/std'; import { Jsonc } from '@kbn/repo-packages'; +import { getKibanaTranslationFiles, supportedLocale } from '@kbn/core-i18n-server-internal'; +import { i18n, i18nLoader } from '@kbn/i18n'; import del from 'del'; import globby from 'globby'; -import { mkdirp, compressTar, Task, copyAll } from '../lib'; +import { mkdirp, compressTar, Task, copyAll, write } from '../lib'; export const CreateCdnAssets: Task = { description: 'Creating CDN assets', @@ -31,9 +33,19 @@ export const CreateCdnAssets: Task = { await del(assets); await mkdirp(assets); - // Plugins - const plugins = globby.sync([`${buildSource}/node_modules/@kbn/**/*/kibana.jsonc`]); + + // translation files + const pluginPaths = plugins.map((plugin) => resolve(dirname(plugin))); + for (const locale of supportedLocale) { + const translationFileContent = await generateTranslationFile(locale, pluginPaths); + await write( + resolve(assets, buildSha, `translations`, `${locale}.json`), + translationFileContent + ); + } + + // Plugins static assets await asyncForEach(plugins, async (path) => { const manifest = Jsonc.parse(readFileSync(path, 'utf8')) as any; if (manifest?.plugin?.id) { @@ -101,3 +113,14 @@ export const CreateCdnAssets: Task = { }); }, }; + +async function generateTranslationFile(locale: string, pluginPaths: string[]) { + const translationFiles = await getKibanaTranslationFiles(locale, pluginPaths); + i18nLoader.registerTranslationFiles(translationFiles); + const translations = await i18nLoader.getTranslationsByLocale(locale); + i18n.init({ + locale, + ...translations, + }); + return JSON.stringify(i18n.getTranslation()); +} diff --git a/src/dev/tsconfig.json b/src/dev/tsconfig.json index ca2253b2ee055..e028b31a931f7 100644 --- a/src/dev/tsconfig.json +++ b/src/dev/tsconfig.json @@ -42,5 +42,6 @@ "@kbn/core-test-helpers-so-type-serializer", "@kbn/core-test-helpers-kbn-server", "@kbn/dev-proc-runner", + "@kbn/core-i18n-server-internal", ] } diff --git a/src/plugins/chart_expressions/expression_gauge/kibana.jsonc b/src/plugins/chart_expressions/expression_gauge/kibana.jsonc index 83cff7fcbd6ec..6f3182e033d6a 100644 --- a/src/plugins/chart_expressions/expression_gauge/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_gauge/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ], "extraPublicDirs": [ "common" diff --git a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx index e25dfbfcd945c..194c1a23a1eca 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { PersistedState } from '@kbn/visualizations-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; import { StartServicesGetter } from '@kbn/kibana-utils-plugin/public'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -90,7 +90,7 @@ export const gaugeRenderer: ( const { GaugeComponent } = await import('../components/gauge_component'); render( - +
-
, + , domNode ); }, diff --git a/src/plugins/chart_expressions/expression_gauge/tsconfig.json b/src/plugins/chart_expressions/expression_gauge/tsconfig.json index 4a603445b9734..b8605187e881a 100644 --- a/src/plugins/chart_expressions/expression_gauge/tsconfig.json +++ b/src/plugins/chart_expressions/expression_gauge/tsconfig.json @@ -23,10 +23,10 @@ "@kbn/test-jest-helpers", "@kbn/i18n-react", "@kbn/kibana-utils-plugin", - "@kbn/kibana-react-plugin", "@kbn/analytics", "@kbn/chart-icons", "@kbn/chart-expressions-common", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_heatmap/kibana.jsonc b/src/plugins/chart_expressions/expression_heatmap/kibana.jsonc index ed382277069e3..aca569c8f606d 100644 --- a/src/plugins/chart_expressions/expression_heatmap/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_heatmap/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ], "extraPublicDirs": [ "common" diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx index 029a2782f70ac..5cbfdaa97c1e3 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { getTimeZone } from '@kbn/visualization-utils'; import type { PersistedState } from '@kbn/visualizations-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; import { StartServicesGetter } from '@kbn/kibana-utils-plugin/public'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -19,7 +19,6 @@ import { extractContainerType, extractVisualizationType, } from '@kbn/chart-expressions-common'; -import { I18nProvider } from '@kbn/i18n-react'; import { MultiFilterEvent } from '../../common/types'; import { ExpressionHeatmapPluginStart } from '../plugin'; import { @@ -99,29 +98,27 @@ export const heatmapRenderer: ( const { isInteractive } = handlers; render( - - -
- -
-
-
, + +
+ +
+
, domNode ); }, diff --git a/src/plugins/chart_expressions/expression_heatmap/tsconfig.json b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json index cdce4c3406ede..175a6eaf19f48 100644 --- a/src/plugins/chart_expressions/expression_heatmap/tsconfig.json +++ b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json @@ -24,11 +24,10 @@ "@kbn/kibana-utils-plugin", "@kbn/test-jest-helpers", "@kbn/chart-icons", - "@kbn/kibana-react-plugin", "@kbn/analytics", "@kbn/chart-expressions-common", - "@kbn/i18n-react", "@kbn/visualization-utils", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_legacy_metric/kibana.jsonc b/src/plugins/chart_expressions/expression_legacy_metric/kibana.jsonc index a49ca80a2fcd2..b0d916119fd73 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_legacy_metric/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ] } } diff --git a/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx b/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx index be9164101202e..3ef9cbd891dd0 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx @@ -9,7 +9,7 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { METRIC_TYPE } from '@kbn/analytics'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ExpressionValueVisDimension, VisualizationContainer, @@ -109,7 +109,7 @@ export const getMetricVisRenderer: ( handlers.event(chartSizeEvent); render( - + - , + , domNode ); }, diff --git a/src/plugins/chart_expressions/expression_legacy_metric/tsconfig.json b/src/plugins/chart_expressions/expression_legacy_metric/tsconfig.json index 4ac3b21cbabc7..ec10eda351ef4 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/tsconfig.json +++ b/src/plugins/chart_expressions/expression_legacy_metric/tsconfig.json @@ -23,9 +23,9 @@ "@kbn/utility-types", "@kbn/kibana-utils-plugin", "@kbn/analytics", - "@kbn/kibana-react-plugin", "@kbn/ui-theme", "@kbn/chart-expressions-common", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_metric/kibana.jsonc b/src/plugins/chart_expressions/expression_metric/kibana.jsonc index a53def7de36ee..c8c6f6b0c8565 100644 --- a/src/plugins/chart_expressions/expression_metric/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_metric/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ] } } diff --git a/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx b/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx index 4ba6076e032fa..2e30f2f03876a 100644 --- a/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; import { css } from '@emotion/react'; import { StartServicesGetter } from '@kbn/kibana-utils-plugin/public'; @@ -85,7 +85,7 @@ export const getMetricVisRenderer = ( const { MetricVis } = await import('../components/metric_vis'); render( - +
-
, + , domNode ); }, diff --git a/src/plugins/chart_expressions/expression_metric/tsconfig.json b/src/plugins/chart_expressions/expression_metric/tsconfig.json index 5c01061d5adc1..5b000f988dfa4 100644 --- a/src/plugins/chart_expressions/expression_metric/tsconfig.json +++ b/src/plugins/chart_expressions/expression_metric/tsconfig.json @@ -23,9 +23,9 @@ "@kbn/coloring", "@kbn/kibana-utils-plugin", "@kbn/ui-theme", - "@kbn/kibana-react-plugin", "@kbn/analytics", "@kbn/chart-expressions-common", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/waffle_vis_function.test.ts.snap b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/waffle_vis_function.test.ts.snap index cb1d724053dfe..edf595c888859 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/waffle_vis_function.test.ts.snap +++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/waffle_vis_function.test.ts.snap @@ -92,6 +92,9 @@ Object { "legendDisplay": "show", "legendPosition": "right", "legendSize": "medium", + "legendStats": Array [ + "values", + ], "maxLegendLines": 2, "metrics": Array [ Object { @@ -108,7 +111,6 @@ Object { "name": "kibana_palette", "type": "system_palette", }, - "showValuesInLegend": true, "splitColumn": undefined, "splitRow": undefined, "truncateLegend": true, diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/i18n.ts b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/i18n.ts index c74669439b2c3..26ff1a06cb5c7 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/i18n.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/i18n.ts @@ -61,6 +61,10 @@ export const strings = { i18n.translate('expressionPartitionVis.reusable.function.args.truncateLegendHelpText', { defaultMessage: 'Defines if the legend items will be truncated or not', }), + getLegendStatsArgHelp: () => + i18n.translate('expressionPartitionVis.reusable.function.args.legendStatsArgHelp', { + defaultMessage: 'Defines the legend stats', + }), getMaxLegendLinesArgHelp: () => i18n.translate('expressionPartitionVis.reusable.function.args.maxLegendLinesHelpText', { defaultMessage: 'Defines the number of lines per legend item', @@ -97,10 +101,6 @@ export const strings = { i18n.translate('expressionPartitionVis.reusable.function.args.labelsHelpText', { defaultMessage: 'Pie labels config', }), - getShowValuesInLegendArgHelp: () => - i18n.translate('expressionPartitionVis.waffle.function.args.showValuesInLegendHelpText', { - defaultMessage: 'Show values in legend', - }), getAriaLabelHelp: () => i18n.translate('expressionPartitionVis.reusable.functions.args.ariaLabelHelpText', { defaultMessage: 'Specifies the aria label of the chart', diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.test.ts b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.test.ts index d84df1d4d0fc3..ba9b49ce51c05 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.test.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.test.ts @@ -13,7 +13,7 @@ import { ValueFormats, LegendDisplay, } from '../types/expression_renderers'; -import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; +import { ExpressionValueVisDimension, LegendStats } from '@kbn/visualizations-plugin/common'; import { Datatable } from '@kbn/expressions-plugin/common/expression_types/specs'; import { waffleVisFunction } from './waffle_vis_function'; import { PARTITION_LABELS_VALUE, PARTITION_VIS_RENDERER_NAME } from '../constants'; @@ -34,7 +34,7 @@ describe('interpreter/functions#waffleVis', () => { const visConfig: WaffleVisConfig = { addTooltip: true, - showValuesInLegend: true, + legendStats: [LegendStats.values], metricsToLabels: JSON.stringify({}), legendDisplay: LegendDisplay.SHOW, legendPosition: 'right', diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.ts b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.ts index 6e23513851b1e..06b675a152682 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/waffle_vis_function.ts @@ -85,6 +85,11 @@ export const waffleVisFunction = (): WaffleVisExpressionFunctionDefinition => ({ ], strict: true, }, + legendStats: { + types: ['string'], + multi: true, + help: strings.getLegendStatsArgHelp(), + }, truncateLegend: { types: ['boolean'], help: strings.getTruncateLegendArgHelp(), @@ -104,11 +109,6 @@ export const waffleVisFunction = (): WaffleVisExpressionFunctionDefinition => ({ help: strings.getLabelsArgHelp(), default: `{${PARTITION_LABELS_FUNCTION}}`, }, - showValuesInLegend: { - types: ['boolean'], - help: strings.getShowValuesInLegendArgHelp(), - default: false, - }, ariaLabel: { types: ['string'], help: strings.getAriaLabelHelp(), diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts index 00667ace39576..896fce1cd61f7 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts @@ -11,7 +11,7 @@ import type { AllowedChartOverrides, AllowedSettingsOverrides } from '@kbn/chart import type { PaletteOutput } from '@kbn/coloring'; import type { Datatable, DatatableColumn } from '@kbn/expressions-plugin/common'; import type { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; -import type { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; +import type { ExpressionValueVisDimension, LegendStats } from '@kbn/visualizations-plugin/common'; import type { LegendSize } from '@kbn/visualizations-plugin/public'; import { type AllowedPartitionOverrides, @@ -80,7 +80,7 @@ export interface PartitionVisParams extends VisCommonParams { labels: LabelsParams; palette: PaletteOutput; isDonut?: boolean; - showValuesInLegend?: boolean; + legendStats?: LegendStats[]; respectSourceOrder?: boolean; emptySizeRatio?: EmptySizeRatios; startFromSecondLargestSlice?: boolean; @@ -110,7 +110,7 @@ export interface MosaicVisConfig export interface WaffleVisConfig extends Omit { bucket?: ExpressionValueVisDimension | string; - showValuesInLegend: boolean; + legendStats?: LegendStats[]; } export interface PartitionChartProps { diff --git a/src/plugins/chart_expressions/expression_partition_vis/kibana.jsonc b/src/plugins/chart_expressions/expression_partition_vis/kibana.jsonc index 0e4c6ca43c322..f69f934fc3005 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_partition_vis/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ], "extraPublicDirs": [ "common" diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/arg_types.ts b/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/arg_types.ts index 7b1b83429ef7b..317a57dfe6c2a 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/arg_types.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/arg_types.ts @@ -8,6 +8,7 @@ import { Position } from '@elastic/charts'; import { ArgTypes } from '@storybook/addons'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { EmptySizeRatios, LegendDisplay } from '../../../common'; import { ChartTypes } from '../../../common/types'; @@ -206,11 +207,12 @@ export const waffleArgTypes: ArgTypes = { control: { type: 'text', disable: true }, }, ...argTypes, - showValuesInLegend: { - name: `${visConfigName}.nestedLegend`, - description: 'Enable displaying values in the legend', - type: { name: 'boolean', required: false }, - table: { type: { summary: 'boolean' }, defaultValue: { summary: false } }, - control: { type: 'boolean' }, + legendStats: { + name: `${visConfigName}.legendStats`, + description: 'Legend stats', + type: { name: 'string', required: false }, + table: { type: { summary: 'string' }, defaultValue: { summary: undefined } }, + options: [LegendStats.values], + control: { type: 'select' }, }, }; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/config.ts b/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/config.ts index c1c8098838624..e259f3f31bf89 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/config.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/__stories__/shared/config.ts @@ -129,5 +129,4 @@ export const waffleConfig: PartitionVisParams = { }, ], }, - showValuesInLegend: false, }; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap b/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap index 441d0d92b56b2..bad3e787de90e 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap +++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap @@ -775,6 +775,7 @@ exports[`PartitionVisComponent should render correct structure for donut 1`] = ` onElementClick={[Function]} onRenderChange={[Function]} showLegend={true} + showLegendExtra={false} theme={ Array [ Object { @@ -1689,6 +1690,7 @@ exports[`PartitionVisComponent should render correct structure for mosaic 1`] = onElementClick={[Function]} onRenderChange={[Function]} showLegend={true} + showLegendExtra={false} theme={ Array [ Object { @@ -2667,6 +2669,7 @@ exports[`PartitionVisComponent should render correct structure for multi-metric onElementClick={[Function]} onRenderChange={[Function]} showLegend={true} + showLegendExtra={false} theme={ Array [ Object { @@ -3645,6 +3648,7 @@ exports[`PartitionVisComponent should render correct structure for pie 1`] = ` onElementClick={[Function]} onRenderChange={[Function]} showLegend={true} + showLegendExtra={false} theme={ Array [ Object { @@ -4559,6 +4563,7 @@ exports[`PartitionVisComponent should render correct structure for treemap 1`] = onElementClick={[Function]} onRenderChange={[Function]} showLegend={true} + showLegendExtra={false} theme={ Array [ Object { diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx index fb2e56771c2e7..d187a88491a0c 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx @@ -39,6 +39,7 @@ import { } from '@kbn/expressions-plugin/public'; import type { FieldFormat } from '@kbn/field-formats-plugin/common'; import { getOverridesFor } from '@kbn/chart-expressions-common'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { consolidateMetricColumns } from '../../common/utils'; import { DEFAULT_PERCENT_DECIMALS } from '../../common/constants'; import { @@ -563,7 +564,7 @@ const PartitionVisComponent = (props: PartitionVisComponentProps) => { legendColorPicker={props.uiState ? LegendColorPickerWrapper : undefined} flatLegend={flatLegend} legendSort={customLegendSort} - showLegendExtra={visParams.showValuesInLegend} + showLegendExtra={visParams.legendStats?.[0] === LegendStats.values} onElementClick={([elementEvent]) => { // this cast is safe because we are rendering a partition chart const [layerValues] = elementEvent as PartitionElementEvent; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx index ac8a053f37ebd..4fe8192018c6f 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx @@ -8,7 +8,6 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { I18nProvider } from '@kbn/i18n-react'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; import type { @@ -18,7 +17,7 @@ import type { } from '@kbn/expressions-plugin/public'; import type { PersistedState } from '@kbn/visualizations-plugin/public'; import { withSuspense } from '@kbn/presentation-util-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { METRIC_TYPE } from '@kbn/analytics'; import { getColumnByAccessor } from '@kbn/visualizations-plugin/common/utils'; import { @@ -130,28 +129,26 @@ export const getPartitionVisRenderer: ( handlers.event(chartSizeEvent); render( - - -
- -
-
-
, + +
+ +
+
, domNode ); }, diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/mocks.ts b/src/plugins/chart_expressions/expression_partition_vis/public/mocks.ts index 89c61b6e7818c..8bee780a93f13 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/mocks.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/mocks.ts @@ -7,6 +7,7 @@ */ import { Datatable } from '@kbn/expressions-plugin/public'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { BucketColumns, PartitionVisParams, @@ -381,6 +382,6 @@ export const createMockWaffleParams = (): PartitionVisParams => { }, ], }, - showValuesInLegend: true, + legendStats: [LegendStats.values], }; }; diff --git a/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json b/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json index 59b7893879ced..7669646f40a6b 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json +++ b/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json @@ -25,11 +25,11 @@ "@kbn/kibana-utils-plugin", "@kbn/test-jest-helpers", "@kbn/i18n-react", - "@kbn/kibana-react-plugin", "@kbn/analytics", "@kbn/chart-icons", "@kbn/chart-expressions-common", "@kbn/cell-actions", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_tagcloud/kibana.jsonc b/src/plugins/chart_expressions/expression_tagcloud/kibana.jsonc index b6bf410e2786f..4cb1898caaf43 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_tagcloud/kibana.jsonc @@ -19,8 +19,7 @@ "usageCollection" ], "requiredBundles": [ - "kibanaUtils", - "kibanaReact" + "kibanaUtils" ], "extraPublicDirs": [ "common" diff --git a/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx b/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx index 8dd3d7eb09358..b6e9a9406a556 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx +++ b/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx @@ -8,10 +8,9 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { I18nProvider } from '@kbn/i18n-react'; import { ClassNames } from '@emotion/react'; import { i18n } from '@kbn/i18n'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { VisualizationContainer } from '@kbn/visualizations-plugin/public'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -91,31 +90,29 @@ export const tagcloudRenderer: ( .unsubscribe(); render( - - - - {({ css, cx }) => ( - + + {({ css, cx }) => ( + + - - - )} - - - , + fireEvent={handlers.event} + syncColors={config.syncColors} + overrides={config.overrides} + isDarkMode={isDarkMode} + /> + + )} + + , domNode ); }, diff --git a/src/plugins/chart_expressions/expression_tagcloud/tsconfig.json b/src/plugins/chart_expressions/expression_tagcloud/tsconfig.json index b737dfb445f09..40caf4e3b00f0 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/tsconfig.json +++ b/src/plugins/chart_expressions/expression_tagcloud/tsconfig.json @@ -23,11 +23,11 @@ "@kbn/coloring", "@kbn/i18n", "@kbn/i18n-react", - "@kbn/kibana-react-plugin", "@kbn/analytics", "@kbn/chart-expressions-common", "@kbn/chart-icons", "@kbn/data-plugin", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_xy/common/__mocks__/index.ts b/src/plugins/chart_expressions/expression_xy/common/__mocks__/index.ts index 3c71b238d64b2..edd03c5f536fe 100644 --- a/src/plugins/chart_expressions/expression_xy/common/__mocks__/index.ts +++ b/src/plugins/chart_expressions/expression_xy/common/__mocks__/index.ts @@ -94,7 +94,6 @@ export const createArgsWithLayers = ( position: Position.Top, }, valueLabels: 'hide', - valuesInLegend: false, xAxisConfig: { type: 'xAxisConfig', position: 'bottom', diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_xy_args.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_xy_args.ts index 6f2d8addc8f79..b0a0d2792fdb0 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_xy_args.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_xy_args.ts @@ -58,11 +58,6 @@ export const commonXYArgs: CommonXYFn['args'] = { default: false, help: strings.getHideEndzonesHelp(), }, - valuesInLegend: { - types: ['boolean'], - default: false, - help: strings.getValuesInLegendHelp(), - }, ariaLabel: { types: ['string'], help: strings.getAriaLabelHelp(), diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/legend_config.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/legend_config.ts index de033565024cb..e83db93c914af 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/legend_config.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/legend_config.ts @@ -99,6 +99,13 @@ export const legendConfigFunction: LegendConfigFn = { ], strict: true, }, + legendStats: { + types: ['string'], + multi: true, + help: i18n.translate('expressionXY.legendConfig.legendStats.help', { + defaultMessage: 'Specifies the legend stats.', + }), + }, }, async fn(input, args, handlers) { const { legendConfigFn } = await import('./legend_config_fn'); diff --git a/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx b/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx index 8eecd2cb1a421..29574ef485989 100644 --- a/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx +++ b/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx @@ -81,9 +81,9 @@ export const strings = { i18n.translate('expressionXY.xyVis.hideEndzones.help', { defaultMessage: 'Hide endzone markers for partial data', }), - getValuesInLegendHelp: () => - i18n.translate('expressionXY.xyVis.valuesInLegend.help', { - defaultMessage: 'Show values in legend', + getLegendStatsArgHelp: () => + i18n.translate('expressionXY.xyVis.legendStats.help', { + defaultMessage: 'Define the stats to show in the legend', }), getAriaLabelHelp: () => i18n.translate('expressionXY.xyVis.ariaLabel.help', { diff --git a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts index 95f75d1d820b2..7f5be444c4632 100644 --- a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts @@ -14,7 +14,7 @@ import type { DatatableColumnMeta, ExpressionFunctionDefinition, } from '@kbn/expressions-plugin/common'; -import { LegendSize } from '@kbn/visualizations-plugin/common'; +import { LegendSize, LegendStats } from '@kbn/visualizations-plugin/common'; import { EventAnnotationOutput } from '@kbn/event-annotation-plugin/common'; import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; @@ -214,6 +214,10 @@ export interface LegendConfig { * Limited to max of 70% of the chart container dimension Vertical legends limited to min of 30% of computed width */ legendSize?: LegendSize; + /** + * metrics to display in the legend + */ + legendStats?: LegendStats[]; } // Arguments to XY chart expression, with computed properties @@ -226,7 +230,6 @@ export interface XYArgs extends DataLayerArgs { fittingFunction?: FittingFunction; fillOpacity?: number; hideEndzones?: boolean; - valuesInLegend?: boolean; ariaLabel?: string; yAxisConfigs?: YAxisConfigResult[]; xAxisConfig?: XAxisConfigResult; @@ -277,7 +280,6 @@ export interface LayeredXYArgs { fittingFunction?: FittingFunction; fillOpacity?: number; hideEndzones?: boolean; - valuesInLegend?: boolean; ariaLabel?: string; yAxisConfigs?: YAxisConfigResult[]; xAxisConfig?: XAxisConfigResult; @@ -302,7 +304,6 @@ export interface XYProps { fittingFunction?: FittingFunction; fillOpacity?: number; hideEndzones?: boolean; - valuesInLegend?: boolean; ariaLabel?: string; yAxisConfigs?: YAxisConfigResult[]; xAxisConfig?: XAxisConfigResult; diff --git a/src/plugins/chart_expressions/expression_xy/kibana.jsonc b/src/plugins/chart_expressions/expression_xy/kibana.jsonc index b26aa60b30ab4..80a414b5e4d0a 100644 --- a/src/plugins/chart_expressions/expression_xy/kibana.jsonc +++ b/src/plugins/chart_expressions/expression_xy/kibana.jsonc @@ -19,8 +19,6 @@ "optionalPlugins": [ "usageCollection" ], - "requiredBundles": [ - "kibanaReact" - ] + "requiredBundles": [] } } diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx index d78bcb34ba975..8e4d4acd6c599 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx @@ -58,7 +58,7 @@ import { XYChart, XYChartRenderProps } from './xy_chart'; import { ExtendedDataLayerConfig, XYProps, AnnotationLayerConfigResult } from '../../common/types'; import { DataLayers } from './data_layers'; import { SplitChart } from './split_chart'; -import { LegendSize } from '@kbn/visualizations-plugin/common'; +import { LegendSize, LegendStats } from '@kbn/visualizations-plugin/common'; import type { LayerCellValueActions } from '../types'; const onClickValue = jest.fn(); @@ -740,7 +740,10 @@ describe('XYChart component', () => { test('ignores legend extra for ordinal chart', () => { const { args } = sampleArgs(); const component = shallow( - + ); expect(component.find(Settings).at(0).prop('showLegendExtra')).toEqual(false); }); @@ -752,8 +755,11 @@ describe('XYChart component', () => { {...defaultProps} args={{ ...args, + legend: { + ...args.legend, + legendStats: [LegendStats.values], + }, layers: [dateHistogramLayer], - valuesInLegend: true, }} /> ); diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx index d00b55ef6442b..88a0d92449728 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx @@ -50,6 +50,7 @@ import { import { DEFAULT_LEGEND_SIZE, LegendSizeToPixels, + LegendStats, } from '@kbn/visualizations-plugin/common/constants'; import { PersistedState } from '@kbn/visualizations-plugin/public'; import { getOverridesFor, ChartSizeSpec } from '@kbn/chart-expressions-common'; @@ -220,7 +221,6 @@ export function XYChart({ emphasizeFitting, valueLabels, hideEndzones, - valuesInLegend, yAxisConfigs, xAxisConfig, splitColumnAccessor, @@ -869,7 +869,7 @@ export function XYChart({ ) : undefined } - showLegendExtra={isHistogramViz && valuesInLegend} + showLegendExtra={isHistogramViz && legend.legendStats?.[0] === LegendStats.values} ariaLabel={args.ariaLabel} ariaUseDefaultSummary={!args.ariaLabel} orderOrdinalBinsBy={ diff --git a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx index 53091eb47acb5..a1537cdd5e3ec 100644 --- a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx @@ -7,8 +7,6 @@ */ import { i18n } from '@kbn/i18n'; -import { I18nProvider } from '@kbn/i18n-react'; -import { ThemeServiceStart } from '@kbn/core/public'; import { css } from '@emotion/react'; import React from 'react'; import ReactDOM from 'react-dom'; @@ -23,7 +21,7 @@ import type { IInterpreterRenderHandlers, } from '@kbn/expressions-plugin/common'; import { FormatFactory } from '@kbn/field-formats-plugin/common'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; import { getColumnByAccessor } from '@kbn/visualizations-plugin/common/utils'; import { @@ -41,6 +39,7 @@ import type { FilterEvent, GetCompatibleCellValueActions, MultiFilterEvent, + StartServices, } from '../types'; export type GetStartDepsFn = () => Promise<{ @@ -51,10 +50,10 @@ export type GetStartDepsFn = () => Promise<{ paletteService: PaletteRegistry; timeZone: string; useLegacyTimeAxis: boolean; - kibanaTheme: ThemeServiceStart; eventAnnotationService: EventAnnotationServiceType; usageCollection?: UsageCollectionStart; timeFormat: string; + startServices: StartServices; }>; interface XyChartRendererDeps { @@ -260,37 +259,35 @@ export const getXyChartRenderer = ({ }); ReactDOM.render( - - -
- -
-
-
, + +
+ +
+
, domNode ); }, diff --git a/src/plugins/chart_expressions/expression_xy/public/plugin.ts b/src/plugins/chart_expressions/expression_xy/public/plugin.ts index c818377896421..59bc49852b3ce 100755 --- a/src/plugins/chart_expressions/expression_xy/public/plugin.ts +++ b/src/plugins/chart_expressions/expression_xy/public/plugin.ts @@ -53,7 +53,7 @@ export function getTimeZone(uiSettings: IUiSettingsClient) { export class ExpressionXyPlugin { public setup( core: CoreSetup, - { expressions, charts }: SetupDeps + { expressions, charts: _charts }: SetupDeps ): ExpressionXyPluginSetup { expressions.registerFunction(yAxisConfigFunction); expressions.registerFunction(dataDecorationConfigFunction); @@ -98,13 +98,14 @@ export class ExpressionXyPlugin { eventAnnotationService, timeZone: getTimeZone(core.uiSettings), timeFormat: core.uiSettings.get('dateFormat'), + startServices: coreStart, }; }; expressions.registerRenderer(getXyChartRenderer({ getStartDeps })); } - public start(core: CoreStart): ExpressionXyPluginStart {} + public start(_core: CoreStart): ExpressionXyPluginStart {} public stop() {} } diff --git a/src/plugins/chart_expressions/expression_xy/public/types.ts b/src/plugins/chart_expressions/expression_xy/public/types.ts index 14aa84768efea..4840566daef48 100755 --- a/src/plugins/chart_expressions/expression_xy/public/types.ts +++ b/src/plugins/chart_expressions/expression_xy/public/types.ts @@ -18,6 +18,7 @@ import type { MultiValueClickContext, } from '@kbn/embeddable-plugin/public'; import { ExpressionsServiceStart, ExpressionsSetup } from '@kbn/expressions-plugin/public'; +import { CoreStart } from '@kbn/core/public'; export interface SetupDeps { expressions: ExpressionsSetup; @@ -30,6 +31,8 @@ export interface StartDeps { expression: ExpressionsServiceStart; } +export type StartServices = Pick; + export type ExpressionXyPluginSetup = void; export type ExpressionXyPluginStart = void; diff --git a/src/plugins/chart_expressions/expression_xy/tsconfig.json b/src/plugins/chart_expressions/expression_xy/tsconfig.json index a0e7e207f92c0..efa65a7f28a7d 100644 --- a/src/plugins/chart_expressions/expression_xy/tsconfig.json +++ b/src/plugins/chart_expressions/expression_xy/tsconfig.json @@ -29,12 +29,12 @@ "@kbn/chart-icons", "@kbn/ui-theme", "@kbn/analytics", - "@kbn/kibana-react-plugin", "@kbn/chart-expressions-common", "@kbn/event-annotation-common", "@kbn/visualization-ui-components", "@kbn/es-query", "@kbn/cell-actions", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/console/public/styles/_index.scss b/src/plugins/console/public/styles/_index.scss index 22dc0e5833d2c..b4b4a1dedb7ed 100644 --- a/src/plugins/console/public/styles/_index.scss +++ b/src/plugins/console/public/styles/_index.scss @@ -7,3 +7,15 @@ @import 'app'; @import 'components/index'; + +.ace_editor.ace_autocomplete { + resize: horizontal; + + // These negative z-index's ensure to expose the resizer on Safari. + .ace_scroller { + z-index: -1; + } + .ace_scrollbar.ace_scrollbar-v { + z-index: -1; + } +} 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 159b5f4f2fed5..7a0509429f059 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 @@ -17,7 +17,7 @@ import { debounceTime, distinctUntilChanged, skip } from 'rxjs'; import { OverlayRef } from '@kbn/core/public'; import { Container, EmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { PersistableControlGroupInput, @@ -563,13 +563,13 @@ export class ControlGroupContainer extends Container< } this.domNode = dom; ReactDOM.render( - + - , + , dom ); } 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 74f32e335be6c..31ac406a83207 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 @@ -26,7 +26,7 @@ import { } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ControlGroupContainer, @@ -465,14 +465,14 @@ export class OptionsListEmbeddable this.node = node; ReactDOM.render( - + - , + , node ); }; 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 681138564e199..52e048fbb0898 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 @@ -25,7 +25,7 @@ import { } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ControlGroupContainer, @@ -444,13 +444,13 @@ export class RangeSliderEmbeddable this.node = node; const ControlsServicesProvider = pluginServices.getContextProvider(); ReactDOM.render( - + - , + , node ); }; diff --git a/src/plugins/controls/public/services/core/core.story.ts b/src/plugins/controls/public/services/core/core.story.ts index dca544758970e..8311d9e607910 100644 --- a/src/plugins/controls/public/services/core/core.story.ts +++ b/src/plugins/controls/public/services/core/core.story.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; +import { analyticsServiceMock, coreMock, themeServiceMock } from '@kbn/core/public/mocks'; import { PluginServiceFactory } from '@kbn/presentation-util-plugin/public'; import { ControlsCoreService } from './types'; @@ -15,6 +15,7 @@ export type CoreServiceFactory = PluginServiceFactory; export const coreServiceFactory: CoreServiceFactory = () => { const corePluginMock = coreMock.createStart(); return { + analytics: analyticsServiceMock.createAnalyticsServiceStart(), theme: themeServiceMock.createSetupContract(), i18n: corePluginMock.i18n, notifications: corePluginMock.notifications, diff --git a/src/plugins/controls/public/services/core/core_service.ts b/src/plugins/controls/public/services/core/core_service.ts index ed63bc54e7a60..97058f6cfea19 100644 --- a/src/plugins/controls/public/services/core/core_service.ts +++ b/src/plugins/controls/public/services/core/core_service.ts @@ -16,9 +16,10 @@ export type CoreServiceFactory = KibanaPluginServiceFactory< >; export const coreServiceFactory: CoreServiceFactory = ({ coreStart }) => { - const { theme, i18n, notifications } = coreStart; + const { analytics, theme, i18n, notifications } = coreStart; return { + analytics, theme, i18n, notifications, diff --git a/src/plugins/controls/public/services/core/types.ts b/src/plugins/controls/public/services/core/types.ts index cd2a167402ec1..7eb649a39adbe 100644 --- a/src/plugins/controls/public/services/core/types.ts +++ b/src/plugins/controls/public/services/core/types.ts @@ -9,6 +9,7 @@ import { CoreStart } from '@kbn/core/public'; export interface ControlsCoreService { + analytics: CoreStart['analytics']; i18n: CoreStart['i18n']; theme: CoreStart['theme']; notifications: CoreStart['notifications']; 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 c17415679e8e7..8eff8bc76c9cd 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 @@ -16,7 +16,7 @@ import { debounceTime, first, map } from 'rxjs'; import { Embeddable, IContainer } from '@kbn/embeddable-plugin/public'; import type { TimeRange } from '@kbn/es-query'; import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { TIME_SLIDER_CONTROL } from '../..'; import { TimeSliderControlEmbeddableInput } from '../../../common/time_slider/types'; @@ -387,7 +387,7 @@ export class TimeSliderControlEmbeddable } this.node = node; ReactDOM.render( - + - , + , node ); }; diff --git a/src/plugins/controls/tsconfig.json b/src/plugins/controls/tsconfig.json index a8c3ed93e8dfd..db72c59aee737 100644 --- a/src/plugins/controls/tsconfig.json +++ b/src/plugins/controls/tsconfig.json @@ -37,8 +37,8 @@ "@kbn/ui-actions-plugin", "@kbn/core-mount-utils-browser", "@kbn/react-kibana-mount", - "@kbn/react-kibana-context-theme", "@kbn/shared-ux-markdown", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", 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 c2f9fd5184b17..97e2e6348b809 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx @@ -516,7 +516,7 @@ export class DashboardContainer }; this.updateInput({ panels: { ...otherPanels, [newId]: newPanel } }); onSuccess(newId, newPanel.explicitInput.title); - return; + return await this.untilReactEmbeddableLoaded(newId); } const embeddableFactory = getEmbeddableFactory(panelPackage.panelType); diff --git a/src/plugins/data/public/search/search_service.ts b/src/plugins/data/public/search/search_service.ts index eded37dd3dd6f..b0bbe073c53b6 100644 --- a/src/plugins/data/public/search/search_service.ts +++ b/src/plugins/data/public/search/search_service.ts @@ -21,7 +21,7 @@ import { RequestAdapter } from '@kbn/inspector-plugin/common/adapters/request'; import { DataViewsContract } from '@kbn/data-views-plugin/common'; import { ExpressionsSetup } from '@kbn/expressions-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { ManagementSetup } from '@kbn/management-plugin/public'; import { ScreenshotModePluginStart } from '@kbn/screenshot-mode-plugin/public'; @@ -226,7 +226,16 @@ export class SearchService implements Plugin { } public start( - { http, theme, uiSettings, chrome, application, notifications, i18n: i18nStart }: CoreStart, + { + analytics, + http, + theme, + uiSettings, + chrome, + application, + notifications, + i18n: i18nStart, + }: CoreStart, { fieldFormats, indexPatterns, @@ -245,6 +254,7 @@ export class SearchService implements Plugin { const aggs = this.aggsService.start({ fieldFormats, indexPatterns }); const warningsServices = { + analytics, i18n: i18nStart, inspector, notifications, @@ -303,7 +313,7 @@ export class SearchService implements Plugin { tourDisabled: screenshotMode.isScreenshotMode(), }) ), - { theme$: theme.theme$ } + { analytics, i18n: i18nStart, theme } ), }); } diff --git a/src/plugins/data/server/kql_telemetry/route.ts b/src/plugins/data/server/kql_telemetry/route.ts index 4d99d469bd097..982f25c76e3cb 100644 --- a/src/plugins/data/server/kql_telemetry/route.ts +++ b/src/plugins/data/server/kql_telemetry/route.ts @@ -31,9 +31,10 @@ export function registerKqlTelemetryRoute( }, response: { '200': { - body: schema.object({ - success: schema.boolean(), - }), + body: () => + schema.object({ + success: schema.boolean(), + }), }, }, }, diff --git a/src/plugins/data/server/query/routes.ts b/src/plugins/data/server/query/routes.ts index 5bed196b6373b..0464238c4f6a1 100644 --- a/src/plugins/data/server/query/routes.ts +++ b/src/plugins/data/server/query/routes.ts @@ -26,11 +26,12 @@ const SAVED_QUERY_ATTRS_CONFIG = schema.object({ timefilter: schema.maybe(schema.any()), }); -const savedQueryResponseSchema = schema.object({ - id: schema.string(), - attributes: SAVED_QUERY_ATTRS_CONFIG, - namespaces: schema.maybe(schema.arrayOf(schema.string())), -}); +const savedQueryResponseSchema = () => + schema.object({ + id: schema.string(), + attributes: SAVED_QUERY_ATTRS_CONFIG, + namespaces: schema.maybe(schema.arrayOf(schema.string())), + }); const access = 'internal'; const version = '1'; @@ -50,9 +51,10 @@ export function registerSavedQueryRoutes({ http }: CoreSetup): void { }, response: { 200: { - body: schema.object({ - isDuplicate: schema.boolean(), - }), + body: () => + schema.object({ + isDuplicate: schema.boolean(), + }), }, }, }, @@ -157,7 +159,7 @@ export function registerSavedQueryRoutes({ http }: CoreSetup): void { request: {}, response: { 200: { - body: schema.number(), + body: () => schema.number(), }, }, }, @@ -187,10 +189,11 @@ export function registerSavedQueryRoutes({ http }: CoreSetup): void { }, response: { 200: { - body: schema.object({ - total: schema.number(), - savedQueries: schema.arrayOf(savedQueryResponseSchema), - }), + body: () => + schema.object({ + total: schema.number(), + savedQueries: schema.arrayOf(savedQueryResponseSchema()), + }), }, }, }, @@ -216,7 +219,7 @@ export function registerSavedQueryRoutes({ http }: CoreSetup): void { }, response: { 200: { - body: schema.never(), + body: () => schema.never(), }, }, }, diff --git a/src/plugins/data/server/scripts/route.ts b/src/plugins/data/server/scripts/route.ts index 6b57280753d78..2a362f762398c 100644 --- a/src/plugins/data/server/scripts/route.ts +++ b/src/plugins/data/server/scripts/route.ts @@ -22,7 +22,7 @@ export function registerScriptsRoute(router: IRouter) { validate: { response: { '200': { - body: schema.arrayOf(schema.string()), + body: () => schema.arrayOf(schema.string()), }, }, }, diff --git a/src/plugins/data/server/search/routes/response_schema.ts b/src/plugins/data/server/search/routes/response_schema.ts index c8ae3a7e44909..00fca6da18f2a 100644 --- a/src/plugins/data/server/search/routes/response_schema.ts +++ b/src/plugins/data/server/search/routes/response_schema.ts @@ -15,58 +15,63 @@ const searchSessionRequestInfoSchema = schema.object({ const serializeableSchema = schema.mapOf(schema.string(), schema.any()); -const searchSessionAttrSchema = schema.object({ - sessionId: schema.string(), - name: schema.maybe(schema.string()), - appId: schema.maybe(schema.string()), - created: schema.string(), - expires: schema.string(), - locatorId: schema.maybe(schema.string()), - initialState: schema.maybe(serializeableSchema), - restoreState: schema.maybe(serializeableSchema), - idMapping: schema.mapOf(schema.string(), searchSessionRequestInfoSchema), - realmType: schema.maybe(schema.string()), - realmName: schema.maybe(schema.string()), - username: schema.maybe(schema.string()), - version: schema.string(), - isCanceled: schema.maybe(schema.boolean()), -}); +const searchSessionAttrSchema = () => + schema.object({ + sessionId: schema.string(), + name: schema.maybe(schema.string()), + appId: schema.maybe(schema.string()), + created: schema.string(), + expires: schema.string(), + locatorId: schema.maybe(schema.string()), + initialState: schema.maybe(serializeableSchema), + restoreState: schema.maybe(serializeableSchema), + idMapping: schema.mapOf(schema.string(), searchSessionRequestInfoSchema), + realmType: schema.maybe(schema.string()), + realmName: schema.maybe(schema.string()), + username: schema.maybe(schema.string()), + version: schema.string(), + isCanceled: schema.maybe(schema.boolean()), + }); -export const searchSessionSchema = schema.object({ - id: schema.string(), - attributes: searchSessionAttrSchema, -}); +export const searchSessionSchema = () => + schema.object({ + id: schema.string(), + attributes: searchSessionAttrSchema(), + }); -export const searchSessionStatusSchema = schema.object({ - status: schema.oneOf([ - schema.literal('in_progress'), - schema.literal('error'), - schema.literal('complete'), - schema.literal('cancelled'), - schema.literal('expired'), - ]), - errors: schema.maybe(schema.arrayOf(schema.string())), -}); +export const searchSessionStatusSchema = () => + schema.object({ + status: schema.oneOf([ + schema.literal('in_progress'), + schema.literal('error'), + schema.literal('complete'), + schema.literal('cancelled'), + schema.literal('expired'), + ]), + errors: schema.maybe(schema.arrayOf(schema.string())), + }); -export const searchSessionsFindSchema = schema.object({ - total: schema.number(), - saved_objects: schema.arrayOf(searchSessionSchema), - statuses: schema.recordOf(schema.string(), searchSessionStatusSchema), -}); +export const searchSessionsFindSchema = () => + schema.object({ + total: schema.number(), + saved_objects: schema.arrayOf(searchSessionSchema()), + statuses: schema.recordOf(schema.string(), searchSessionStatusSchema()), + }); const referencesSchema = schema.arrayOf( schema.object({ id: schema.string(), type: schema.string(), name: schema.string() }) ); -export const searchSessionsUpdateSchema = schema.object({ - id: schema.string(), - type: schema.string(), - updated_at: schema.maybe(schema.string()), - version: schema.maybe(schema.string()), - namespaces: schema.maybe(schema.arrayOf(schema.string())), - references: schema.maybe(referencesSchema), - attributes: schema.object({ - name: schema.maybe(schema.string()), - expires: schema.maybe(schema.string()), - }), -}); +export const searchSessionsUpdateSchema = () => + schema.object({ + id: schema.string(), + type: schema.string(), + updated_at: schema.maybe(schema.string()), + version: schema.maybe(schema.string()), + namespaces: schema.maybe(schema.arrayOf(schema.string())), + references: schema.maybe(referencesSchema), + attributes: schema.object({ + name: schema.maybe(schema.string()), + expires: schema.maybe(schema.string()), + }), + }); diff --git a/src/plugins/data/server/search/routes/session.ts b/src/plugins/data/server/search/routes/session.ts index ad0173a4d677a..5969e173a775c 100644 --- a/src/plugins/data/server/search/routes/session.ts +++ b/src/plugins/data/server/search/routes/session.ts @@ -53,7 +53,7 @@ export function registerSessionRoutes(router: DataPluginRouter, logger: Logger): }, response: { 200: { - body: schema.maybe(searchSessionSchema), + body: () => schema.maybe(searchSessionSchema()), }, }, }, diff --git a/src/plugins/data/tsconfig.json b/src/plugins/data/tsconfig.json index c96442ccae5ed..6b78289c5988a 100644 --- a/src/plugins/data/tsconfig.json +++ b/src/plugins/data/tsconfig.json @@ -54,7 +54,8 @@ "@kbn/es-types", "@kbn/code-editor", "@kbn/core-test-helpers-model-versions", - "@kbn/esql-utils" + "@kbn/esql-utils", + "@kbn/react-kibana-mount" ], "exclude": [ "target/**/*", diff --git a/src/plugins/data_view_editor/public/open_editor.tsx b/src/plugins/data_view_editor/public/open_editor.tsx index 04a60124ad1bf..779f141ab0fdc 100644 --- a/src/plugins/data_view_editor/public/open_editor.tsx +++ b/src/plugins/data_view_editor/public/open_editor.tsx @@ -80,7 +80,7 @@ export const getEditorOpener = showManagementLink={Boolean(editData && editData.isPersisted())} /> , - { theme: core.theme, i18n: core.i18n } + core ), { hideCloseButton: true, diff --git a/src/plugins/data_view_editor/public/plugin.test.tsx b/src/plugins/data_view_editor/public/plugin.test.tsx index bc728a99a9ab7..57e303a1e6e6a 100644 --- a/src/plugins/data_view_editor/public/plugin.test.tsx +++ b/src/plugins/data_view_editor/public/plugin.test.tsx @@ -7,8 +7,8 @@ */ import React from 'react'; -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, @@ -43,7 +43,7 @@ describe('DataViewEditorPlugin', () => { }); test('should expose a handler to open the data view field editor', async () => { - const startApi = await plugin.start(coreStart, pluginStart); + const startApi = plugin.start(coreStart, pluginStart); expect(startApi.openEditor).toBeDefined(); }); @@ -58,13 +58,13 @@ describe('DataViewEditorPlugin', () => { openFlyout, }, }; - const { openEditor } = await plugin.start(coreStartMocked, pluginStart); + const { openEditor } = plugin.start(coreStartMocked, pluginStart); openEditor({ onSave: onSaveSpy }); expect(openFlyout).toHaveBeenCalled(); - const [[{ __reactMount__ }]] = openFlyout.mock.calls; + const [[__reactMount__]] = openFlyout.mock.calls; expect(__reactMount__.props.children.type).toBe(DataViewEditorLazy); // We force call the "onSave" prop from the component @@ -77,7 +77,7 @@ describe('DataViewEditorPlugin', () => { }); test('should return a handler to close the flyout', async () => { - const { openEditor } = await plugin.start(coreStart, pluginStart); + const { openEditor } = plugin.start(coreStart, pluginStart); const closeEditorHandler = openEditor({ onSave: noop }); expect(typeof closeEditorHandler).toBe('function'); diff --git a/src/plugins/data_view_editor/public/shared_imports.ts b/src/plugins/data_view_editor/public/shared_imports.ts index 768c4ea45e887..819e84b42c465 100644 --- a/src/plugins/data_view_editor/public/shared_imports.ts +++ b/src/plugins/data_view_editor/public/shared_imports.ts @@ -13,7 +13,9 @@ export type { } from '@kbn/data-plugin/public'; export type { DataView, DataViewField, DataViewSpec } from '@kbn/data-views-plugin/public'; -export { createKibanaReactContext, toMountPoint, useKibana } from '@kbn/kibana-react-plugin/public'; +export { createKibanaReactContext, useKibana } from '@kbn/kibana-react-plugin/public'; + +export { toMountPoint } from '@kbn/react-kibana-mount'; export { CodeEditor } from '@kbn/code-editor'; diff --git a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.helpers.ts b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.helpers.ts index fe5df81b927f2..feb21f4bc2708 100644 --- a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.helpers.ts +++ b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.helpers.ts @@ -55,7 +55,7 @@ export const getSearchCallMeta = () => { }; export const setSearchResponse = ( - documents: Array<{ _id: string; _index: string; _source: TestDoc }> + documents: Array<{ _id: string; _index: string; fields: TestDoc }> ) => { spySearchQueryResponse.mockResolvedValue({ rawResponse: { diff --git a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts index 0e7e993a3b498..bbe2a00f31e76 100644 --- a/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts +++ b/src/plugins/data_view_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts @@ -92,15 +92,15 @@ describe('Field editor Preview panel', () => { expect(getRenderedIndexPatternFields()).toEqual([ { key: 'title', - value: mockDocuments[0]._source.title, + value: mockDocuments[0].fields.title, }, { key: 'subTitle', - value: mockDocuments[0]._source.subTitle, + value: mockDocuments[0].fields.subTitle, }, { key: 'description', - value: mockDocuments[0]._source.description, + value: mockDocuments[0].fields.description, }, ]); }); @@ -141,15 +141,15 @@ describe('Field editor Preview panel', () => { expect(getRenderedIndexPatternFields()).toEqual([ { key: 'title', - value: mockDocuments[0]._source.title, + value: mockDocuments[0].fields.title, }, { key: 'subTitle', - value: mockDocuments[0]._source.subTitle, + value: mockDocuments[0].fields.subTitle, }, { key: 'description', - value: mockDocuments[0]._source.description, + value: mockDocuments[0].fields.description, }, ]); }); @@ -172,7 +172,7 @@ describe('Field editor Preview panel', () => { const fieldsRendered = getWrapperRenderedIndexPatternFields(); expect(fieldsRendered).not.toBe(null); - expect(fieldsRendered!.length).toBe(Object.keys(doc1._source).length); + expect(fieldsRendered!.length).toBe(Object.keys(doc1.fields).length); // make sure that the last one if the "description" field expect(fieldsRendered!.at(2).text()).toBe('descriptionFirst doc - description'); @@ -528,14 +528,17 @@ describe('Field editor Preview panel', () => { }); describe('Cluster document load and navigation', () => { + const docContent = { + title: 'loaded doc - title', + subTitle: 'loaded doc - subTitle', + description: 'loaded doc - description', + }; + const customLoadedDoc: EsDoc = { _id: '123456', _index: 'otherIndex', - _source: { - title: 'loaded doc - title', - subTitle: 'loaded doc - subTitle', - description: 'loaded doc - description', - }, + fields: docContent, + _source: docContent, }; test('should update the field list when the document changes', async () => { @@ -547,39 +550,39 @@ describe('Field editor Preview panel', () => { expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc1._source.title, + value: doc1.fields.title, }); await goToNextDocument(); expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc2._source.title, + value: doc2.fields.title, }); await goToNextDocument(); expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc3._source.title, + value: doc3.fields.title, }); // Going next we circle back to the first document of the list await goToNextDocument(); expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc1._source.title, + value: doc1.fields.title, }); // Let's go backward await goToPreviousDocument(); expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc3._source.title, + value: doc3.fields.title, }); await goToPreviousDocument(); expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc2._source.title, + value: doc2.fields.title, }); }); @@ -617,7 +620,7 @@ describe('Field editor Preview panel', () => { // and the preview value rendered. expect(getRenderedIndexPatternFields()[0]).toEqual({ key: 'title', - value: doc1._source.title, + value: doc1.fields.title, }); expect(getRenderedFieldsPreview()).toEqual([ { key: 'myRuntimeField', value: 'mockedScriptValue' }, diff --git a/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/mocks.ts b/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/mocks.ts index de29ee7d4cca6..fe83e53ebedd3 100644 --- a/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/mocks.ts +++ b/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/mocks.ts @@ -9,6 +9,7 @@ export interface EsDoc { _id: string; _index: string; + fields: TestDoc; _source: TestDoc; } @@ -36,32 +37,41 @@ export const createPreviewError = ({ }; }; +const firstDoc = { + title: 'First doc - title', + subTitle: 'First doc - subTitle', + description: 'First doc - description', +}; + +const secondDoc = { + title: 'Second doc - title', + subTitle: 'Second doc - subTitle', + description: 'Second doc - description', +}; + +const thirdDoc = { + title: 'Third doc - title', + subTitle: 'Third doc - subTitle', + description: 'Third doc - description', +}; + export const mockDocuments: EsDoc[] = [ { _id: '001', _index: 'testIndex', - _source: { - title: 'First doc - title', - subTitle: 'First doc - subTitle', - description: 'First doc - description', - }, + fields: firstDoc, + _source: firstDoc, }, { _id: '002', _index: 'testIndex', - _source: { - title: 'Second doc - title', - subTitle: 'Second doc - subTitle', - description: 'Second doc - description', - }, + fields: secondDoc, + _source: secondDoc, }, { _id: '003', _index: 'testIndex', - _source: { - title: 'Third doc - title', - subTitle: 'Third doc - subTitle', - description: 'Third doc - description', - }, + fields: thirdDoc, + _source: thirdDoc, }, ]; diff --git a/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/setup_environment.tsx b/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/setup_environment.tsx index e76cf6960cc23..32d1d360f7067 100644 --- a/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/setup_environment.tsx +++ b/src/plugins/data_view_field_editor/__jest__/client_integration/helpers/setup_environment.tsx @@ -149,7 +149,12 @@ export const WithFieldEditorDependencies = }; const mergedDependencies = merge({}, dependencies, overridingDependencies); - const previewController = new PreviewController({ dataView, search, fieldFormats }); + const previewController = new PreviewController({ + dataView, + search, + fieldFormats, + fieldTypeToProcess: 'runtime', + }); return ( diff --git a/src/plugins/data_view_field_editor/public/components/field_editor_flyout_content_container.tsx b/src/plugins/data_view_field_editor/public/components/field_editor_flyout_content_container.tsx index 69847cb2c0d48..28b707da333a4 100644 --- a/src/plugins/data_view_field_editor/public/components/field_editor_flyout_content_container.tsx +++ b/src/plugins/data_view_field_editor/public/components/field_editor_flyout_content_container.tsx @@ -85,7 +85,9 @@ export const FieldEditorFlyoutContentContainer = ({ fieldFormats, uiSettings, }: Props) => { - const [controller] = useState(() => new PreviewController({ dataView, search, fieldFormats })); + const [controller] = useState( + () => new PreviewController({ dataView, search, fieldFormats, fieldTypeToProcess }) + ); const [isSaving, setIsSaving] = useState(false); const { fields } = dataView; diff --git a/src/plugins/data_view_field_editor/public/components/preview/field_list/field_list.tsx b/src/plugins/data_view_field_editor/public/components/preview/field_list/field_list.tsx index 32411bae06ec6..598b6c5b1ab34 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/field_list/field_list.tsx +++ b/src/plugins/data_view_field_editor/public/components/preview/field_list/field_list.tsx @@ -84,7 +84,7 @@ export const PreviewFieldList: React.FC = ({ height, clearSearch, searchV .map((field) => { const { name, displayName } = field; const formatter = dataView.getFormatterForField(field); - const value = get(currentDocument?._source, name); + const value = get(currentDocument?.fields, name); const formattedValue = formatter.convert(value, 'html'); return { @@ -95,7 +95,7 @@ export const PreviewFieldList: React.FC = ({ height, clearSearch, searchV }; }) .filter(({ value }) => value !== undefined), - [dataView, currentDocument?._source] + [dataView, currentDocument?.fields] ); const fieldListWithPinnedFields: DocumentField[] = useMemo(() => { diff --git a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx index 1f00658493f2c..c89473c49b7d1 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx +++ b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx @@ -287,8 +287,12 @@ export const FieldPreviewProvider: FunctionComponent<{ controller: PreviewContro ...prev, fields: fields.map((field) => { const nextValue = - script === null && Boolean(document) - ? get(document?._source, name ?? '') ?? get(document?.fields, name ?? '') // When there is no script we try to read the value from _source/fields + // if its a concrete field, read from the fields + controller.getInternalFieldType() === 'concrete' + ? get(document?.fields, name ?? '') + : // if its a runtime field, look at source or the returned value + script === null && Boolean(document) + ? get(document?._source, name ?? '') : field?.value; const formattedValue = controller.valueFormatter({ value: nextValue, type, format }); diff --git a/src/plugins/data_view_field_editor/public/components/preview/preview_controller.tsx b/src/plugins/data_view_field_editor/public/components/preview/preview_controller.tsx index a861a6aac735e..53d5e68cedb08 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/preview_controller.tsx +++ b/src/plugins/data_view_field_editor/public/components/preview/preview_controller.tsx @@ -19,6 +19,7 @@ import { BehaviorObservable } from '../../state_utils'; import { EsDocument, ScriptErrorCodes, Params, FieldPreview } from './types'; import type { FieldFormatsStart } from '../../shared_imports'; import { valueTypeToSelectedType } from './field_preview_context'; +import { InternalFieldType } from '../../types'; export const defaultValueFormatter = (value: unknown) => { const content = typeof value === 'object' ? JSON.stringify(value) : String(value) ?? '-'; @@ -29,6 +30,7 @@ interface PreviewControllerDependencies { dataView: DataView; search: ISearchStart; fieldFormats: FieldFormatsStart; + fieldTypeToProcess: InternalFieldType; } const previewStateDefault: PreviewState = { @@ -61,10 +63,16 @@ const previewStateDefault: PreviewState = { }; export class PreviewController { - constructor({ dataView, search, fieldFormats }: PreviewControllerDependencies) { + constructor({ + dataView, + search, + fieldFormats, + fieldTypeToProcess, + }: PreviewControllerDependencies) { this.dataView = dataView; this.search = search; this.fieldFormats = fieldFormats; + this.fieldTypeToProcess = fieldTypeToProcess; this.internalState$ = new BehaviorSubject({ ...previewStateDefault, @@ -79,6 +87,7 @@ export class PreviewController { private dataView: DataView; private search: ISearchStart; private fieldFormats: FieldFormatsStart; + private fieldTypeToProcess: InternalFieldType; private internalState$: BehaviorSubject; state$: BehaviorObservable; @@ -99,6 +108,8 @@ export class PreviewController { documentId: undefined, }; + public getInternalFieldType = () => this.fieldTypeToProcess; + togglePinnedField = (fieldName: string) => { const currentState = this.state$.getValue(); const pinnedFields = { diff --git a/src/plugins/data_view_field_editor/public/components/preview/types.ts b/src/plugins/data_view_field_editor/public/components/preview/types.ts index a28a2c8aac2db..6c9db3fa69daf 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/types.ts +++ b/src/plugins/data_view_field_editor/public/components/preview/types.ts @@ -25,7 +25,7 @@ export interface EsDocument { [key: string]: unknown; }; fields: { - [key: string]: unknown; + [key: string]: unknown[]; }; [key: string]: unknown; } diff --git a/src/plugins/data_view_field_editor/public/open_delete_modal.tsx b/src/plugins/data_view_field_editor/public/open_delete_modal.tsx index b2c9bba61b98f..0277563631250 100644 --- a/src/plugins/data_view_field_editor/public/open_delete_modal.tsx +++ b/src/plugins/data_view_field_editor/public/open_delete_modal.tsx @@ -114,7 +114,7 @@ export const getFieldDeleteModalOpener = closeModal={closeModal} confirmDelete={onConfirmDelete} />, - { theme$: core.theme.theme$ } + core ) ); diff --git a/src/plugins/data_view_field_editor/public/open_editor.tsx b/src/plugins/data_view_field_editor/public/open_editor.tsx index 69b9fbf35412e..19bb83f3abfe1 100644 --- a/src/plugins/data_view_field_editor/public/open_editor.tsx +++ b/src/plugins/data_view_field_editor/public/open_editor.tsx @@ -200,7 +200,7 @@ export const getFieldEditorOpener = uiSettings={uiSettings} /> , - { theme: core.theme, i18n: core.i18n } + core ), { className: euiFlyoutClassname, diff --git a/src/plugins/data_view_field_editor/public/plugin.test.tsx b/src/plugins/data_view_field_editor/public/plugin.test.tsx index a6609f0d7a607..a527f3b09de83 100644 --- a/src/plugins/data_view_field_editor/public/plugin.test.tsx +++ b/src/plugins/data_view_field_editor/public/plugin.test.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { registerTestBed } from '@kbn/test-jest-helpers'; -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, @@ -46,7 +46,7 @@ describe('DataViewFieldEditorPlugin', () => { }); test('should expose a handler to open the indexpattern field editor', async () => { - const startApi = await plugin.start(coreStart, pluginStart); + const startApi = plugin.start(coreStart, pluginStart); expect(startApi.openEditor).toBeDefined(); }); @@ -61,13 +61,13 @@ describe('DataViewFieldEditorPlugin', () => { openFlyout, }, }; - const { openEditor } = await plugin.start(coreStartMocked, pluginStart); + const { openEditor } = plugin.start(coreStartMocked, pluginStart); openEditor({ onSave: onSaveSpy, ctx: { dataView: {} as any } }); expect(openFlyout).toHaveBeenCalled(); - const [[{ __reactMount__ }]] = openFlyout.mock.calls; + const [[__reactMount__]] = openFlyout.mock.calls; expect(__reactMount__.props.children.type).toBe(FieldEditorLoader); // We force call the "onSave" prop from the component @@ -80,14 +80,14 @@ describe('DataViewFieldEditorPlugin', () => { }); test('should return a handler to close the flyout', async () => { - const { openEditor } = await plugin.start(coreStart, pluginStart); + const { openEditor } = plugin.start(coreStart, pluginStart); const closeEditorHandler = openEditor({ onSave: noop, ctx: { dataView: {} as any } }); expect(typeof closeEditorHandler).toBe('function'); }); test('should expose a handler to open field deletion modal', async () => { - const startApi = await plugin.start(coreStart, pluginStart); + const startApi = plugin.start(coreStart, pluginStart); expect(startApi.openDeleteModal).toBeDefined(); }); @@ -111,7 +111,7 @@ describe('DataViewFieldEditorPlugin', () => { updateSavedObject: jest.fn(), }, }; - const { openDeleteModal } = await plugin.start(coreStartMocked, pluginStartMocked); + const { openDeleteModal } = plugin.start(coreStartMocked, pluginStartMocked); const indexPatternMock = { removeRuntimeField: removeFieldSpy, @@ -145,14 +145,14 @@ describe('DataViewFieldEditorPlugin', () => { }); test('should return a handler to close the modal', async () => { - const { openDeleteModal } = await plugin.start(coreStart, pluginStart); + const { openDeleteModal } = plugin.start(coreStart, pluginStart); const closeModal = openDeleteModal({ fieldName: ['a'], ctx: { dataView: {} as any } }); expect(typeof closeModal).toBe('function'); }); test('should expose a render props component to delete runtime fields', async () => { - const { DeleteRuntimeFieldProvider } = await plugin.start(coreStart, pluginStart); + const { DeleteRuntimeFieldProvider } = plugin.start(coreStart, pluginStart); const TestComponent = ({ callback }: { callback: (...args: any[]) => void }) => { return ( diff --git a/src/plugins/data_view_field_editor/public/shared_imports.ts b/src/plugins/data_view_field_editor/public/shared_imports.ts index e779fde78d488..62fad495cd22b 100644 --- a/src/plugins/data_view_field_editor/public/shared_imports.ts +++ b/src/plugins/data_view_field_editor/public/shared_imports.ts @@ -27,7 +27,9 @@ export type { } from '@kbn/data-views-plugin/common'; export { KBN_FIELD_TYPES, ES_FIELD_TYPES } from '@kbn/data-plugin/common'; -export { createKibanaReactContext, toMountPoint } from '@kbn/kibana-react-plugin/public'; +export { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; + +export { toMountPoint } from '@kbn/react-kibana-mount'; export { CodeEditor } from '@kbn/code-editor'; diff --git a/src/plugins/data_view_field_editor/server/routes/field_preview.ts b/src/plugins/data_view_field_editor/server/routes/field_preview.ts index 7d2525b273a86..431cee8358a24 100644 --- a/src/plugins/data_view_field_editor/server/routes/field_preview.ts +++ b/src/plugins/data_view_field_editor/server/routes/field_preview.ts @@ -27,12 +27,24 @@ const bodySchema = schema.object({ document: schema.object({}, { unknowns: 'allow' }), }); -const geoPoint = schema.object({ - type: schema.literal('Point'), - coordinates: schema.arrayOf(schema.number(), { minSize: 2, maxSize: 2 }), -}); +const responseSchema = () => { + const geoPoint = schema.object({ + type: schema.literal('Point'), + coordinates: schema.arrayOf(schema.number(), { minSize: 2, maxSize: 2 }), + }); + const valueSchema = schema.oneOf([schema.boolean(), schema.number(), schema.string(), geoPoint]); -const valueSchema = schema.oneOf([schema.boolean(), schema.number(), schema.string(), geoPoint]); + return schema.object({ + values: schema.oneOf([ + // composite field + schema.recordOf(schema.string(), schema.arrayOf(valueSchema)), + // primitive field + schema.arrayOf(valueSchema), + ]), + error: schema.maybe(schema.object({}, { unknowns: 'allow' })), + status: schema.maybe(schema.number()), + }); +}; export const registerFieldPreviewRoute = ({ router }: RouteDependencies): void => { router.versioned.post({ path, access: 'internal' }).addVersion( @@ -44,16 +56,7 @@ export const registerFieldPreviewRoute = ({ router }: RouteDependencies): void = }, response: { 200: { - body: schema.object({ - values: schema.oneOf([ - // composite field - schema.recordOf(schema.string(), schema.arrayOf(valueSchema)), - // primitive field - schema.arrayOf(valueSchema), - ]), - error: schema.maybe(schema.object({}, { unknowns: 'allow' })), - status: schema.maybe(schema.number()), - }), + body: responseSchema, }, }, }, diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx index cc96bfe5ffa91..e3f40560f7c87 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -80,6 +80,7 @@ export const EditIndexPattern = withRouter( IndexPatternEditor, savedObjectsManagement, application, + ...startServices } = useKibana().services; const [fields, setFields] = useState(indexPattern.getNonScriptedFields()); const [compositeRuntimeFields, setCompositeRuntimeFields] = useState< @@ -167,6 +168,7 @@ export const EditIndexPattern = withRouter( onDelete: () => { history.push(''); }, + startServices, }); const isRollup = diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap index cb43403d24a02..04098ebbe9ed7 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap @@ -1,403 +1,281 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`IndexedFieldsTable IndexedFieldsTable with rollup index pattern should render normally 1`] = ` -
- - + "type": "long", + }, + "type": "long", + }, + ], +} `; exports[`IndexedFieldsTable should filter based on the query bar 1`] = ` -
-
- +Object { + "items": Array [ + Object { + "displayName": "Elastic", + "esTypes": Array [ + "keyword", + ], + "excluded": false, + "format": "", + "hasRuntime": false, + "id": "Elastic", + "info": Array [], + "isMapped": false, + "isUserEditable": false, + "kbnType": undefined, + "name": "Elastic", + "searchable": true, + "type": "keyword", + }, + ], +} `; exports[`IndexedFieldsTable should filter based on the schema filter 1`] = ` -
-
- + "type": "long", + }, + "type": "long", + }, + ], +} `; exports[`IndexedFieldsTable should filter based on the type filter 1`] = ` -
-
- +Object { + "items": Array [ + Object { + "displayName": "timestamp", + "esTypes": Array [ + "date", + ], + "excluded": false, + "format": "", + "hasRuntime": false, + "id": "timestamp", + "info": Array [], + "isMapped": false, + "isUserEditable": false, + "kbnType": undefined, + "name": "timestamp", + "type": "date", + }, + ], +} `; exports[`IndexedFieldsTable should render normally 1`] = ` -
-
- + "type": "long", + }, + "type": "long", + }, + ], +} `; diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx index 6da5b8ffd2e61..7ac1ae603759f 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx @@ -11,9 +11,9 @@ import { shallow } from 'enzyme'; import { DataView } from '@kbn/data-views-plugin/public'; import { IndexedFieldItem } from '../../types'; import { Table, renderFieldName, getConflictModalContent, showDelete } from './table'; -import { overlayServiceMock, themeServiceMock } from '@kbn/core/public/mocks'; +import { coreMock, overlayServiceMock } from '@kbn/core/public/mocks'; -const theme = themeServiceMock.createStartContract(); +const coreStart = coreMock.createStart(); const indexPattern = { timeFieldName: 'timestamp', @@ -91,7 +91,7 @@ const renderTable = ( editField={editField} deleteField={() => {}} openModal={overlayServiceMock.createStartContract().openModal} - theme={theme} + startServices={coreStart} /> ); diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx index 898e00886858d..851c7a401df0e 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx @@ -7,7 +7,7 @@ */ import React, { PureComponent } from 'react'; -import { OverlayModalStart, ThemeServiceStart } from '@kbn/core/public'; +import { OverlayModalStart } from '@kbn/core/public'; import { FieldDescription } from '@kbn/field-utils'; import { EuiIcon, @@ -29,9 +29,10 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { DataView } from '@kbn/data-views-plugin/public'; +import { StartServices } from '../../../../../types'; import { IndexedFieldItem } from '../../types'; export const showDelete = (field: IndexedFieldItem) => @@ -205,7 +206,7 @@ interface IndexedFieldProps { editField: (field: IndexedFieldItem) => void; deleteField: (fieldName: string[]) => void; openModal: OverlayModalStart['open']; - theme: ThemeServiceStart; + startServices: StartServices; } const getItems = (conflictDescriptions: IndexedFieldItem['conflictDescriptions']) => { @@ -343,7 +344,7 @@ const getConflictBtn = ( fieldName: string, conflictDescriptions: IndexedFieldItem['conflictDescriptions'], openModal: IndexedFieldProps['openModal'], - theme: ThemeServiceStart + startServices: StartServices ) => { const onClick = () => { const overlayRef = openModal( @@ -355,7 +356,7 @@ const getConflictBtn = ( fieldName, conflictDescriptions, }), - { theme$: theme.theme$ } + startServices ) ); }; @@ -393,7 +394,7 @@ export class Table extends PureComponent { field.name, field.conflictDescriptions, this.props.openModal, - this.props.theme + this.props.startServices ) : ''} @@ -414,7 +415,7 @@ export class Table extends PureComponent { name: nameHeader, dataType: 'string', sortable: true, - render: (value: string, field: IndexedFieldItem) => { + render: (_value: string, field: IndexedFieldItem) => { return renderFieldName(field, indexPattern.timeFieldName); }, width: '38%', diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx index 01ffc9377d8b2..ef15e2c8c9bd2 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { shallow, ShallowWrapper } from 'enzyme'; +import { coreMock } from '@kbn/core/public/mocks'; import { DataViewField, DataView, DataViewType } from '@kbn/data-views-plugin/public'; import { IndexedFieldsTable } from './indexed_fields_table'; import { getFieldInfo } from '../../utils'; @@ -28,8 +29,8 @@ jest.mock('./components/table', () => ({ })); const helpers = { - editField: (fieldName: string) => {}, - deleteField: (fieldName: string[]) => {}, + editField: (_fieldName: string) => {}, + deleteField: (_fieldName: string[]) => {}, // getFieldInfo handles non rollups as well getFieldInfo, }; @@ -99,6 +100,8 @@ const fields = [ }, ].map(mockFieldToIndexPatternField); +const startServices = coreMock.createStart(); + const mockedServices = { userEditPermission: false, openModal: () => ({ onClose: new Promise(() => {}), close: async () => {} }), @@ -119,6 +122,7 @@ describe('IndexedFieldsTable', () => { schemaFieldTypeFilter={[]} fieldFilter="" compositeRuntimeFields={{}} + startServices={startServices} {...mockedServices} /> ); @@ -126,7 +130,7 @@ describe('IndexedFieldsTable', () => { await new Promise((resolve) => process.nextTick(resolve)); component.update(); - expect(component).toMatchSnapshot(); + expect({ items: component.props().children.props.items }).toMatchSnapshot(); }); test('should filter based on the query bar', async () => { @@ -142,6 +146,7 @@ describe('IndexedFieldsTable', () => { schemaFieldTypeFilter={[]} fieldFilter="" compositeRuntimeFields={{}} + startServices={startServices} {...mockedServices} /> ); @@ -150,7 +155,7 @@ describe('IndexedFieldsTable', () => { component.setProps({ fieldFilter: 'Elast' }); component.update(); - expect(component).toMatchSnapshot(); + expect({ items: component.props().children.props.items }).toMatchSnapshot(); }); test('should filter based on the type filter', async () => { @@ -166,6 +171,7 @@ describe('IndexedFieldsTable', () => { schemaFieldTypeFilter={[]} fieldFilter="" compositeRuntimeFields={{}} + startServices={startServices} {...mockedServices} /> ); @@ -174,7 +180,7 @@ describe('IndexedFieldsTable', () => { component.setProps({ indexedFieldTypeFilter: ['date'] }); component.update(); - expect(component).toMatchSnapshot(); + expect({ items: component.props().children.props.items }).toMatchSnapshot(); }); test('should filter based on the schema filter', async () => { @@ -190,6 +196,7 @@ describe('IndexedFieldsTable', () => { schemaFieldTypeFilter={[]} fieldFilter="" compositeRuntimeFields={{}} + startServices={startServices} {...mockedServices} /> ); @@ -198,7 +205,7 @@ describe('IndexedFieldsTable', () => { component.setProps({ schemaFieldTypeFilter: ['runtime'] }); component.update(); - expect(component).toMatchSnapshot(); + expect({ items: component.props().children.props.items }).toMatchSnapshot(); }); describe('IndexedFieldsTable with rollup index pattern', () => { @@ -215,6 +222,7 @@ describe('IndexedFieldsTable', () => { schemaFieldTypeFilter={[]} fieldFilter="" compositeRuntimeFields={{}} + startServices={startServices} {...mockedServices} /> ); @@ -222,7 +230,7 @@ describe('IndexedFieldsTable', () => { await new Promise((resolve) => process.nextTick(resolve)); component.update(); - expect(component).toMatchSnapshot(); + expect({ items: component.props().children.props.items }).toMatchSnapshot(); }); }); }); diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx index 85ed5886163c2..ee4c601005da7 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx @@ -8,10 +8,11 @@ import React, { Component } from 'react'; import { createSelector } from 'reselect'; -import { OverlayStart, ThemeServiceStart } from '@kbn/core/public'; +import { OverlayStart } from '@kbn/core/public'; import { DataViewField, DataView, RuntimeField } from '@kbn/data-views-plugin/public'; import { Table } from './components/table'; import { IndexedFieldItem } from './types'; +import { StartServices } from '../../../types'; interface IndexedFieldsTableProps { fields: DataViewField[]; @@ -27,8 +28,8 @@ interface IndexedFieldsTableProps { fieldWildcardMatcher: (filters: string[] | undefined) => (val: string) => boolean; userEditPermission: boolean; openModal: OverlayStart['openModal']; - theme: ThemeServiceStart; compositeRuntimeFields: Record; + startServices: StartServices; } interface IndexedFieldsTableState { @@ -196,7 +197,7 @@ export class IndexedFieldsTable extends Component< editField={(field) => this.props.helpers.editField(field.name)} deleteField={(fieldNames) => this.props.helpers.deleteField(fieldNames)} openModal={this.props.openModal} - theme={this.props.theme} + startServices={this.props.startServices} /> ); diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx index 7a2d228dcca44..3b747a3a44831 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/remove_data_view.tsx @@ -10,8 +10,9 @@ import { i18n } from '@kbn/i18n'; import type { IUiSettingsClient, OverlayStart } from '@kbn/core/public'; import { asyncForEach } from '@kbn/std'; import { EuiConfirmModalProps } from '@elastic/eui'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { StartServices } from '../../types'; const confirmModalOptionsDelete = { confirmButtonText: i18n.translate('indexPatternManagement.editIndexPattern.deleteButton', { @@ -36,15 +37,18 @@ interface RemoveDataViewDeps { uiSettings: IUiSettingsClient; overlays: OverlayStart; onDelete: () => void; + startServices: StartServices; } export const removeDataView = - ({ dataViews, overlays, onDelete }: RemoveDataViewDeps) => + ({ dataViews, overlays, onDelete, startServices }: RemoveDataViewDeps) => (dataViewArray: RemoveDataViewProps[], msg: JSX.Element) => { - overlays.openConfirm(toMountPoint(msg), confirmModalOptionsDelete).then(async (isConfirmed) => { - if (isConfirmed) { - await asyncForEach(dataViewArray, async ({ id }) => dataViews.delete(id)); - onDelete(); - } - }); + overlays + .openConfirm(toMountPoint(msg, startServices), confirmModalOptionsDelete) + .then(async (isConfirmed) => { + if (isConfirmed) { + await asyncForEach(dataViewArray, async ({ id }) => dataViews.delete(id)); + onDelete(); + } + }); }; diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/tabs/tabs.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/tabs/tabs.tsx index 426442bcfb031..b72ef13a6cfdc 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/tabs/tabs.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/tabs/tabs.tsx @@ -178,11 +178,11 @@ export const Tabs: React.FC = ({ docLinks, dataViewFieldEditor, overlays, - theme, dataViews, http, application, savedObjectsManagement, + ...startServices } = useKibana().services; const [fieldFilter, setFieldFilter] = useState(''); const [syncingStateFunc, setSyncingStateFunc] = useState<{ @@ -377,7 +377,7 @@ export const Tabs: React.FC = ({ isOpen={isIndexedFilterOpen} closePopover={() => setIsIndexedFilterOpen(false)} > - {indexedFieldTypes.map((item, index) => { + {indexedFieldTypes.map((item) => { const isSelected = filteredIndexedFieldTypeFilter.includes(item.value); return ( = ({ getFieldInfo, }} openModal={overlays.openModal} - theme={theme} userEditPermission={dataViews.getCanSaveSync()} + startServices={startServices} /> )} @@ -661,7 +661,7 @@ export const Tabs: React.FC = ({ DeleteRuntimeFieldProvider, refreshFields, overlays, - theme, + startServices, dataViews, compositeRuntimeFields, http, diff --git a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx index 044904d96eea3..e2298d40fe145 100644 --- a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -89,6 +89,7 @@ export const IndexPatternTable = ({ overlays, docLinks, noDataPage, + ...startServices } = useKibana().services; const [query, setQuery] = useState(''); const [showCreateDialog, setShowCreateDialog] = useState(showCreateDialogProp); @@ -128,6 +129,7 @@ export const IndexPatternTable = ({ setSelectedItems([]); dataViewController.loadDataViews(); }, + startServices, }); if (selectedItems.length === 0) { return; @@ -183,6 +185,7 @@ export const IndexPatternTable = ({ uiSettings, overlays, onDelete: () => dataViewController.loadDataViews(), + startServices, }); const alertColumn = { @@ -218,7 +221,7 @@ export const IndexPatternTable = ({ defaultMessage: 'Name', }), width: spaces ? '70%' : '90%', - render: (name: string, dataView: IndexPatternTableItem) => ( + render: (_name: string, dataView: IndexPatternTableItem) => (
{ + render: (_name: string, dataView: IndexPatternTableItem) => { return spaces ? ( + diff --git a/src/plugins/data_view_management/public/mocks.ts b/src/plugins/data_view_management/public/mocks.ts index 4c0f573447a69..47e82c61c2a41 100644 --- a/src/plugins/data_view_management/public/mocks.ts +++ b/src/plugins/data_view_management/public/mocks.ts @@ -25,6 +25,9 @@ import { } from './plugin'; import { IndexPatternManagmentContext } from './types'; +const coreSetup = coreMock.createSetup(); +const coreStart = coreMock.createStart(); + const createSetupContract = (): IndexPatternManagementSetup => ({}); const createStartContract = (): IndexPatternManagementStart => ({}); @@ -32,7 +35,7 @@ const createStartContract = (): IndexPatternManagementStart => ({}); const createInstance = async () => { const plugin = new IndexPatternManagementPlugin({} as PluginInitializerContext); - const setup = plugin.setup(coreMock.createSetup(), { + const setup = plugin.setup(coreSetup, { management: managementPluginMock.createSetupContract(), urlForwarding: urlForwardingPluginMock.createSetupContract(), noDataPage: noDataPagePublicMock.createSetup(), @@ -59,9 +62,6 @@ const docLinks = { const createIndexPatternManagmentContext = (): { [key in keyof IndexPatternManagmentContext]: any; } => { - const { application, chrome, uiSettings, notifications, overlays, theme, settings } = - coreMock.createStart(); - const { http } = coreMock.createSetup(); const data = dataPluginMock.createStartContract(); const dataViewFieldEditor = indexPatternFieldEditorPluginMock.createStartContract(); const dataViews = dataViewPluginMocks.createStartContract(); @@ -69,13 +69,7 @@ const createIndexPatternManagmentContext = (): { const savedObjectsManagement = savedObjectsManagementPluginMock.createStartContract(); return { - application, - chrome, - uiSettings, - settings, - notifications, - overlays, - http, + ...coreStart, docLinks, data, dataViews, @@ -88,7 +82,6 @@ const createIndexPatternManagmentContext = (): { IndexPatternEditor: indexPatternEditorPluginMock.createStartContract().IndexPatternEditorComponent, fieldFormats: fieldFormatsServiceMock.createStartContract(), - theme, savedObjectsManagement, }; }; diff --git a/src/plugins/data_view_management/public/types.ts b/src/plugins/data_view_management/public/types.ts index f26ccefd8ee75..cad4f0bc28832 100644 --- a/src/plugins/data_view_management/public/types.ts +++ b/src/plugins/data_view_management/public/types.ts @@ -8,13 +8,13 @@ import type { ChromeStart, + CoreStart, IUiSettingsClient, OverlayStart, NotificationsStart, DocLinksStart, HttpSetup, ApplicationStart, - ThemeServiceStart, } from '@kbn/core/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; @@ -30,7 +30,9 @@ import type { SettingsStart } from '@kbn/core-ui-settings-browser'; import type { NoDataPagePluginSetup } from '@kbn/no-data-page-plugin/public'; import type { IndexPatternManagementStart } from '.'; -export interface IndexPatternManagmentContext { +export type StartServices = Pick; + +export interface IndexPatternManagmentContext extends StartServices { application: ApplicationStart; chrome: ChromeStart; uiSettings: IUiSettingsClient; @@ -49,7 +51,6 @@ export interface IndexPatternManagmentContext { IndexPatternEditor: DataViewEditorStart['IndexPatternEditorComponent']; fieldFormats: FieldFormatsStart; spaces?: SpacesPluginStart; - theme: ThemeServiceStart; savedObjectsManagement: SavedObjectsManagementPluginStart; noDataPage?: NoDataPagePluginSetup; } diff --git a/src/plugins/data_view_management/tsconfig.json b/src/plugins/data_view_management/tsconfig.json index 2fbe7f1f358a5..5098d92c97bf3 100644 --- a/src/plugins/data_view_management/tsconfig.json +++ b/src/plugins/data_view_management/tsconfig.json @@ -43,6 +43,7 @@ "@kbn/shared-ux-page-analytics-no-data", "@kbn/core-http-browser", "@kbn/code-editor", + "@kbn/react-kibana-mount", ], "exclude": [ "target/**/*", diff --git a/src/plugins/data_views/server/rest_api_routes/internal/existing_indices.ts b/src/plugins/data_views/server/rest_api_routes/internal/existing_indices.ts index 168171501c1fe..daa067a8e60c0 100644 --- a/src/plugins/data_views/server/rest_api_routes/internal/existing_indices.ts +++ b/src/plugins/data_views/server/rest_api_routes/internal/existing_indices.ts @@ -67,7 +67,7 @@ export const registerExistingIndicesPath = (router: IRouter): void => { }, response: { 200: { - body: schema.arrayOf(schema.string()), + body: () => schema.arrayOf(schema.string()), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts b/src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts index 44a41b19c67f7..439dc6795b682 100644 --- a/src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts +++ b/src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts @@ -114,10 +114,11 @@ export const validate: VersionedRouteValidation = { }, response: { 200: { - body: schema.object({ - fields: schema.arrayOf(FieldDescriptorSchema), - indices: schema.arrayOf(schema.string()), - }), + body: () => + schema.object({ + fields: schema.arrayOf(FieldDescriptorSchema), + indices: schema.arrayOf(schema.string()), + }), }, }, }; diff --git a/src/plugins/data_views/server/rest_api_routes/internal/has_data_views.ts b/src/plugins/data_views/server/rest_api_routes/internal/has_data_views.ts index 09595f7f6501f..a91b9f24bc1a1 100644 --- a/src/plugins/data_views/server/rest_api_routes/internal/has_data_views.ts +++ b/src/plugins/data_views/server/rest_api_routes/internal/has_data_views.ts @@ -47,10 +47,11 @@ export const registerHasDataViewsRoute = (router: IRouter): void => { validate: { response: { 200: { - body: schema.object({ - hasDataView: schema.boolean(), - hasUserDataView: schema.boolean(), - }), + body: () => + schema.object({ + hasDataView: schema.boolean(), + hasUserDataView: schema.boolean(), + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/create_data_view.ts b/src/plugins/data_views/server/rest_api_routes/public/create_data_view.ts index 3cb6f448dc258..a37eb4b682b56 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/create_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/create_data_view.ts @@ -71,9 +71,10 @@ const registerCreateDataViewRouteFactory = }, response: { 200: { - body: schema.object({ - [serviceKey]: dataViewSpecSchema, - }), + body: () => + schema.object({ + [serviceKey]: dataViewSpecSchema, + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/default_data_view.ts b/src/plugins/data_views/server/rest_api_routes/public/default_data_view.ts index 5292e3be8af64..00f992dfab334 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/default_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/default_data_view.ts @@ -74,7 +74,7 @@ const manageDefaultIndexPatternRoutesFactory = request: {}, response: { 200: { - body: schema.object({ [`${serviceKey}_id`]: schema.string() }), + body: () => schema.object({ [`${serviceKey}_id`]: schema.string() }), }, }, }, @@ -121,7 +121,7 @@ const manageDefaultIndexPatternRoutesFactory = }, response: { 200: { - body: schema.object({ acknowledged: schema.boolean() }), + body: () => schema.object({ acknowledged: schema.boolean() }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/fields/update_fields.ts b/src/plugins/data_views/server/rest_api_routes/public/fields/update_fields.ts index 725e491b6d6f3..c9c97e4ed8d57 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/fields/update_fields.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/fields/update_fields.ts @@ -152,9 +152,10 @@ const updateFieldsActionRouteFactory = (path: string, serviceKey: string) => { }, response: { 200: { - body: schema.object({ - [serviceKey]: dataViewSpecSchema, - }), + body: () => + schema.object({ + [serviceKey]: dataViewSpecSchema, + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/get_data_view.ts b/src/plugins/data_views/server/rest_api_routes/public/get_data_view.ts index 5f92ecb797fec..d484623059c44 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/get_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/get_data_view.ts @@ -69,9 +69,10 @@ const getDataViewRouteFactory = }, response: { 200: { - body: schema.object({ - [serviceKey]: dataViewSpecSchema, - }), + body: () => + schema.object({ + [serviceKey]: dataViewSpecSchema, + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/get_data_views.ts b/src/plugins/data_views/server/rest_api_routes/public/get_data_views.ts index 223e6bae39671..1314fdd265f74 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/get_data_views.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/get_data_views.ts @@ -33,17 +33,6 @@ export const getDataViews = async ({ return dataViewsService.getIdsWithTitle(); }; -const dataViewListSchema = schema.arrayOf( - schema.object({ - id: schema.string(), - namespaces: schema.maybe(schema.arrayOf(schema.string())), - title: schema.string(), - type: schema.maybe(schema.string()), - typeMeta: schema.maybe(schema.object({}, { unknowns: 'allow' })), - name: schema.maybe(schema.string()), - }) -); - const getDataViewsRouteFactory = (path: string, serviceKey: string) => ( @@ -54,12 +43,26 @@ const getDataViewsRouteFactory = >, usageCollection?: UsageCounter ) => { + const responseValidation = () => { + const dataViewListSchema = schema.arrayOf( + schema.object({ + id: schema.string(), + namespaces: schema.maybe(schema.arrayOf(schema.string())), + title: schema.string(), + type: schema.maybe(schema.string()), + typeMeta: schema.maybe(schema.object({}, { unknowns: 'allow' })), + name: schema.maybe(schema.string()), + }) + ); + return schema.object({ [serviceKey]: dataViewListSchema }); + }; + router.versioned.get({ path, access: 'public' }).addVersion( { version: INITIAL_REST_VERSION, validate: { request: {}, - response: { 200: { body: schema.object({ [serviceKey]: dataViewListSchema }) } }, + response: { 200: { body: responseValidation } }, }, }, router.handleLegacyErrors( diff --git a/src/plugins/data_views/server/rest_api_routes/public/has_user_data_view.ts b/src/plugins/data_views/server/rest_api_routes/public/has_user_data_view.ts index 658e54a93ab8e..c500e03349e29 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/has_user_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/has_user_data_view.ts @@ -49,9 +49,10 @@ const hasUserDataViewRouteFactory = request: {}, response: { 200: { - body: schema.object({ - result: schema.boolean(), - }), + body: () => + schema.object({ + result: schema.boolean(), + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/runtime_fields/delete_runtime_field.ts b/src/plugins/data_views/server/rest_api_routes/public/runtime_fields/delete_runtime_field.ts index 8cebe12e2836a..bbbdb4a914a61 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/runtime_fields/delete_runtime_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/runtime_fields/delete_runtime_field.ts @@ -78,7 +78,7 @@ const deleteRuntimeFieldRouteFactory = }, response: { 200: { - body: schema.never(), + body: () => schema.never(), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/delete_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/delete_scripted_field.ts index 29296c3a0b0d1..27785055da753 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/delete_scripted_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/delete_scripted_field.ts @@ -49,7 +49,7 @@ export const registerDeleteScriptedFieldRoute = ( }, response: { 200: { - body: schema.never(), + body: () => schema.never(), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/get_scripted_field.ts b/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/get_scripted_field.ts index 8d77284c5611f..7023fba31b589 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/get_scripted_field.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/scripted_fields/get_scripted_field.ts @@ -48,9 +48,10 @@ export const registerGetScriptedFieldRoute = ( }, response: { 200: { - body: schema.object({ - field: schema.object(fieldSpecSchemaFields), - }), + body: () => + schema.object({ + field: schema.object(fieldSpecSchemaFields), + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/swap_references.ts b/src/plugins/data_views/server/rest_api_routes/public/swap_references.ts index abeb5a5e4cb4e..ebdea001444be 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/swap_references.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/swap_references.ts @@ -74,15 +74,16 @@ export const swapReferencesRoute = }, response: { 200: { - body: schema.object({ - result: schema.arrayOf(schema.object({ id: idSchema, type: schema.string() })), - deleteStatus: schema.maybe( - schema.object({ - remainingRefs: schema.number(), - deletePerformed: schema.boolean(), - }) - ), - }), + body: () => + schema.object({ + result: schema.arrayOf(schema.object({ id: idSchema, type: schema.string() })), + deleteStatus: schema.maybe( + schema.object({ + remainingRefs: schema.number(), + deletePerformed: schema.boolean(), + }) + ), + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/public/update_data_view.ts b/src/plugins/data_views/server/rest_api_routes/public/update_data_view.ts index c379b854f9880..a551a1b63bc2d 100644 --- a/src/plugins/data_views/server/rest_api_routes/public/update_data_view.ts +++ b/src/plugins/data_views/server/rest_api_routes/public/update_data_view.ts @@ -167,9 +167,10 @@ const updateDataViewRouteFactory = }, response: { 200: { - body: schema.object({ - [serviceKey]: dataViewSpecSchema, - }), + body: () => + schema.object({ + [serviceKey]: dataViewSpecSchema, + }), }, }, }, diff --git a/src/plugins/data_views/server/rest_api_routes/schema.ts b/src/plugins/data_views/server/rest_api_routes/schema.ts index 238d2ffaa027e..c4f4a4c70b826 100644 --- a/src/plugins/data_views/server/rest_api_routes/schema.ts +++ b/src/plugins/data_views/server/rest_api_routes/schema.ts @@ -55,17 +55,17 @@ export const dataViewSpecSchema = schema.object({ allowHidden: schema.maybe(schema.boolean()), }); -export const dataViewsRuntimeResponseSchema = schema.object({ - [SERVICE_KEY]: dataViewSpecSchema, - fields: schema.arrayOf(schema.object(fieldSpecSchemaFields)), -}); +export const dataViewsRuntimeResponseSchema = () => + schema.object({ + [SERVICE_KEY]: dataViewSpecSchema, + fields: schema.arrayOf(schema.object(fieldSpecSchemaFields)), + }); -export const indexPatternsRuntimeResponseSchema = schema.object({ - [SERVICE_KEY_LEGACY]: dataViewSpecSchema, - field: schema.object(fieldSpecSchemaFields), -}); +export const indexPatternsRuntimeResponseSchema = () => + schema.object({ + [SERVICE_KEY_LEGACY]: dataViewSpecSchema, + field: schema.object(fieldSpecSchemaFields), + }); -export const runtimeResponseSchema = schema.oneOf([ - dataViewsRuntimeResponseSchema, - indexPatternsRuntimeResponseSchema, -]); +export const runtimeResponseSchema = () => + schema.oneOf([dataViewsRuntimeResponseSchema(), indexPatternsRuntimeResponseSchema()]); diff --git a/src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx b/src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx index 0b8d6335a99c5..f0feaa2d63230 100644 --- a/src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx +++ b/src/plugins/discover/public/application/context/hooks/use_context_app_fetch.tsx @@ -105,10 +105,7 @@ export function useContextAppFetch({ setState(createError('anchorStatus', FailureReason.UNKNOWN, error)); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint({error.message}, { - theme: services.core.theme, - i18n: services.core.i18n, - }), + text: toMountPoint({error.message}, services), }); } }, [ @@ -160,10 +157,7 @@ export function useContextAppFetch({ setState(createError(statusKey, FailureReason.UNKNOWN, error)); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint({error.message}, { - theme: services.core.theme, - i18n: services.core.i18n, - }), + text: toMountPoint({error.message}, services), }); } }, diff --git a/src/plugins/discover/public/application/discover_router.test.tsx b/src/plugins/discover/public/application/discover_router.test.tsx index a5133be1b764a..e7a20c1e5d823 100644 --- a/src/plugins/discover/public/application/discover_router.test.tsx +++ b/src/plugins/discover/public/application/discover_router.test.tsx @@ -11,7 +11,7 @@ import { Redirect, RouteProps } from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; import { createSearchSessionMock } from '../__mocks__/search_session'; import { discoverServiceMock as mockDiscoverServices } from '../__mocks__/services'; -import { DiscoverRouter } from './discover_router'; +import { DiscoverRoutes } from './discover_router'; import { DiscoverMainRoute } from './main'; import { SingleDocRoute } from './doc'; import { ContextAppRoute } from './context'; @@ -43,7 +43,7 @@ describe('DiscoverRouter', () => { pathMap = {}; const { history } = createSearchSessionMock(); const component = shallow( - & { + customizationContext$: Observable; +}; + +export const DiscoverRouter = ({ + customizationContext$, + services, + history, + ...routeProps +}: DiscoverRouterProps) => { + const customizationContext = useObservable(customizationContext$); + + // The Discover state is not reactive, so we must avoid initialization before + // the first value is emitted + if (customizationContext == null) { + return null; + } -export const DiscoverRouter = ({ services, history, ...routeProps }: DiscoverRouterProps) => { return ( - - - - - ( - - )} - /> - - - - - - - - - - - - - - + ); }; + +export interface DiscoverRoutesProps { + services: DiscoverServices; + customizationContext: DiscoverCustomizationContext; + experimentalFeatures: ExperimentalFeatures; + history: History; +} + +// this exists as a separate component to allow the tests to gather the routes +export const DiscoverRoutes = ({ + customizationContext, + services, + history, + ...routeProps +}: DiscoverRoutesProps) => { + return ( + + + + + ( + + )} + /> + + + + + + + + + + + + + + + ); +}; diff --git a/src/plugins/discover/public/application/index.tsx b/src/plugins/discover/public/application/index.tsx index 8843533b68327..db7d9cb86ff73 100644 --- a/src/plugins/discover/public/application/index.tsx +++ b/src/plugins/discover/public/application/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { toMountPoint } from '@kbn/react-kibana-mount'; +import type { Observable } from 'rxjs'; import { ExperimentalFeatures } from '../../common/config'; import { DiscoverRouter } from './discover_router'; import { DiscoverServices } from '../build_services'; @@ -17,14 +18,14 @@ import type { DiscoverCustomizationContext } from '../customizations'; export interface RenderAppProps { element: HTMLElement; services: DiscoverServices; - customizationContext: DiscoverCustomizationContext; + customizationContext$: Observable; experimentalFeatures: ExperimentalFeatures; } export const renderApp = ({ element, services, - customizationContext, + customizationContext$, experimentalFeatures, }: RenderAppProps) => { const { history, capabilities, chrome, data, core } = services; @@ -43,14 +44,11 @@ export const renderApp = ({ const unmount = toMountPoint( , - { - theme: core.theme, - i18n: core.i18n, - } + core )(element); return () => { diff --git a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx index 3542ad2d55944..afe323b290ad0 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx @@ -145,7 +145,7 @@ const mountComponent = async ({ stateContainer.searchSessionManager = createSearchSessionMock(session).searchSessionManager; const component = mountWithIntl( - + diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx index 06fb828deb54e..c21fc8854c501 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx @@ -128,7 +128,7 @@ const mountComponent = async ({ }; const component = mountWithIntl( - + diff --git a/src/plugins/discover/public/application/main/components/layout/discover_resizable_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_resizable_layout.tsx index 179914b9fb68a..69ed0128e8a72 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_resizable_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_resizable_layout.tsx @@ -42,7 +42,7 @@ export const DiscoverResizableLayout = ({ const { euiTheme } = useEuiTheme(); const minSidebarWidth = euiTheme.base * 13; const defaultSidebarWidth = euiTheme.base * 19; - const minMainPanelWidth = euiTheme.base * 30; + const minMainPanelWidth = euiTheme.base * 24; const [sidebarWidth, setSidebarWidth] = useLocalStorage(SIDEBAR_WIDTH_KEY, defaultSidebarWidth); diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results.test.tsx b/src/plugins/discover/public/application/main/components/no_results/no_results.test.tsx index 6a8f256a2357d..3a3c3e45300f0 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results.test.tsx +++ b/src/plugins/discover/public/application/main/components/no_results/no_results.test.tsx @@ -35,13 +35,14 @@ jest.spyOn(RxApi, 'lastValueFrom').mockImplementation(async () => ({ }, })); +const services = createDiscoverServicesMock(); + async function mountAndFindSubjects( props: Omit< DiscoverNoResultsProps, 'onDisableFilters' | 'data' | 'isTimeBased' | 'stateContainer' > ) { - const services = createDiscoverServicesMock(); const isTimeBased = props.dataView.isTimeBased(); let component: ReactWrapper; @@ -124,6 +125,35 @@ describe('DiscoverNoResults', () => { `); expect(RxApi.lastValueFrom).toHaveBeenCalledTimes(1); }); + + test('passes strict_date_optional_time format to range query', async () => { + await mountAndFindSubjects({ + dataView: stubDataView, + query: { language: 'lucene', query: '' }, + filters: [], + }); + expect(services.data.search.search).toHaveBeenLastCalledWith( + expect.objectContaining({ + params: expect.objectContaining({ + body: expect.objectContaining({ + aggs: expect.objectContaining({ + earliest_timestamp: expect.objectContaining({ + min: expect.objectContaining({ + format: 'strict_date_optional_time', + }), + }), + latest_timestamp: expect.objectContaining({ + max: expect.objectContaining({ + format: 'strict_date_optional_time', + }), + }), + }), + }), + }), + }), + expect.any(Object) + ); + }); }); describe('filter/query', () => { diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts index e5306344f1058..24c6f6e182c55 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts +++ b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts @@ -122,17 +122,20 @@ async function fetchDocumentsTimeRange({ params: { index: dataView.getIndexPattern(), size: 0, + track_total_hits: false, body: { query: dslQuery ?? { match_all: {} }, aggs: { earliest_timestamp: { min: { field: dataView.timeFieldName, + format: 'strict_date_optional_time', }, }, latest_timestamp: { max: { field: dataView.timeFieldName, + format: 'strict_date_optional_time', }, }, }, diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx index 373d874fd0f21..de6e9607c0876 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx @@ -218,7 +218,7 @@ export function openAlertsPopover({ document.body.appendChild(container); const element = ( - + + diff --git a/src/plugins/discover/public/application/not_found/not_found_route.tsx b/src/plugins/discover/public/application/not_found/not_found_route.tsx index 90612394c40a9..43e5f09d60550 100644 --- a/src/plugins/discover/public/application/not_found/not_found_route.tsx +++ b/src/plugins/discover/public/application/not_found/not_found_route.tsx @@ -43,10 +43,7 @@ export function NotFoundRoute() { />

, - { - theme: core.theme, - i18n: core.i18n, - } + core ) ); diff --git a/src/plugins/discover/public/application/view_alert/view_alert_utils.tsx b/src/plugins/discover/public/application/view_alert/view_alert_utils.tsx index 912ab14b90853..a90823c88d9f9 100644 --- a/src/plugins/discover/public/application/view_alert/view_alert_utils.tsx +++ b/src/plugins/discover/public/application/view_alert/view_alert_utils.tsx @@ -84,10 +84,7 @@ export const getAlertUtils = ( }); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint({error.message}, { - theme: core.theme, - i18n: core.i18n, - }), + text: toMountPoint({error.message}, core), }); throw new Error(errorTitle); } @@ -107,10 +104,7 @@ export const getAlertUtils = ( }); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint(, { - theme: core.theme, - i18n: core.i18n, - }), + text: toMountPoint(, core), }); throw new Error(errorTitle); } diff --git a/src/plugins/discover/public/build_services.ts b/src/plugins/discover/public/build_services.ts index d40edd8792885..fc599bd59620e 100644 --- a/src/plugins/discover/public/build_services.ts +++ b/src/plugins/discover/public/build_services.ts @@ -14,6 +14,7 @@ import { CoreStart, DocLinksStart, ToastsStart, + I18nStart, IUiSettingsClient, PluginInitializerContext, HttpStart, @@ -77,6 +78,7 @@ export interface DiscoverServices { application: ApplicationStart; addBasePath: (path: string) => string; analytics: AnalyticsServiceStart; + i18n: I18nStart; capabilities: Capabilities; chrome: ChromeStart; core: CoreStart; @@ -160,6 +162,7 @@ export const buildServices = memoize( data: plugins.data, docLinks: core.docLinks, embeddable: plugins.embeddable, + i18n: core.i18n, theme: core.theme, fieldFormats: plugins.fieldFormats, filterManager: plugins.data.query.filterManager, diff --git a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.test.tsx b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.test.tsx index 6097543c8aeb1..668f4090b3bdd 100644 --- a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.test.tsx +++ b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.test.tsx @@ -49,6 +49,7 @@ jest.mock('@elastic/eui', () => { return original.useIsWithinBreakpoints(breakpoints); }), + useResizeObserver: jest.fn(() => ({ width: 1000, height: 1000 })), }; }); diff --git a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx index ee2a8d0fb3564..4e86f7493f3ba 100644 --- a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx +++ b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx @@ -14,20 +14,25 @@ import type { DataView } from '@kbn/data-views-plugin/public'; import { EuiFlexGroup, EuiFlexItem, - EuiFlyout, + EuiFlyoutResizable, EuiFlyoutBody, + EuiFlyoutFooter, EuiFlyoutHeader, EuiTitle, EuiSpacer, EuiPortal, EuiPagination, keys, + EuiButtonEmpty, + useEuiTheme, + useIsWithinMinBreakpoint, } from '@elastic/eui'; import type { Filter, Query, AggregateQuery } from '@kbn/es-query'; import type { DataTableRecord } from '@kbn/discover-utils/types'; import type { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; import type { DataTableColumnsMeta } from '@kbn/unified-data-table'; import { UnifiedDocViewer } from '@kbn/unified-doc-viewer-plugin/public'; +import useLocalStorage from 'react-use/lib/useLocalStorage'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { isTextBasedQuery } from '../../application/main/utils/is_text_based_query'; import { useFlyoutActions } from './use_flyout_actions'; @@ -55,6 +60,8 @@ function getIndexByDocId(hits: DataTableRecord[], id: string) { return h.id === id; }); } + +export const FLYOUT_WIDTH_KEY = 'discover:flyoutWidth'; /** * Flyout displaying an expanded Elasticsearch document */ @@ -75,6 +82,13 @@ export function DiscoverGridFlyout({ }: DiscoverGridFlyoutProps) { const services = useDiscoverServices(); const flyoutCustomization = useDiscoverCustomization('flyout'); + const { euiTheme } = useEuiTheme(); + const isXlScreen = useIsWithinMinBreakpoint('xl'); + const DEFAULT_WIDTH = euiTheme.base * 34; + const defaultWidth = flyoutCustomization?.size ?? DEFAULT_WIDTH; // Give enough room to search bar to not wrap + const [flyoutWidth, setFlyoutWidth] = useLocalStorage(FLYOUT_WIDTH_KEY, defaultWidth); + const minWidth = euiTheme.base * 24; + const maxWidth = euiTheme.breakpoint.xl; const isPlainRecord = isTextBasedQuery(query); // Get actual hit with updated highlighted searches @@ -204,16 +218,24 @@ export function DiscoverGridFlyout({ defaultMessage: 'Document', }); const flyoutTitle = flyoutCustomization?.title ?? defaultFlyoutTitle; - const flyoutSize = flyoutCustomization?.size ?? 'm'; return ( - {bodyContent} - + + + {i18n.translate('discover.grid.flyout.close', { + defaultMessage: 'Close', + })} + + + ); } diff --git a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout_actions.tsx b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout_actions.tsx index a9b168ef7ae8e..141c0e902a08f 100644 --- a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout_actions.tsx +++ b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout_actions.tsx @@ -17,13 +17,14 @@ import { EuiContextMenuPanel, EuiContextMenuItem, EuiContextMenuItemIcon, - useIsWithinBreakpoints, EuiText, EuiButtonEmpty, EuiButtonIcon, EuiPopoverProps, EuiToolTip, useEuiTheme, + useResizeObserver, + useIsWithinBreakpoints, } from '@elastic/eui'; import type { FlyoutActionItem } from '../../customizations'; @@ -34,11 +35,34 @@ export interface DiscoverGridFlyoutActionsProps { } export function DiscoverGridFlyoutActions({ flyoutActions }: DiscoverGridFlyoutActionsProps) { + const { euiTheme } = useEuiTheme(); + const [ref, setRef] = useState(null); + const dimensions = useResizeObserver(ref); + const isMobileScreen = useIsWithinBreakpoints(['xs', 's']); + const isLargeFlyout = dimensions?.width ? dimensions.width > euiTheme.base * 30 : false; + return ( +
+ +
+ ); +} + +function FlyoutActions({ + flyoutActions, + isMobileScreen, + isLargeFlyout, +}: { + flyoutActions: DiscoverGridFlyoutActionsProps['flyoutActions']; + isMobileScreen: boolean; + isLargeFlyout: boolean; +}) { const { euiTheme } = useEuiTheme(); const [isMoreFlyoutActionsPopoverOpen, setIsMoreFlyoutActionsPopoverOpen] = useState(false); - const isMobileScreen = useIsWithinBreakpoints(['xs', 's']); - const isLargeScreen = useIsWithinBreakpoints(['xl']); if (isMobileScreen) { return ( @@ -72,7 +96,7 @@ export function DiscoverGridFlyoutActions({ flyoutActions }: DiscoverGridFlyoutA flyoutActions.length ); const showFlyoutIconsOnly = - remainingFlyoutActions.length > 0 || (!isLargeScreen && visibleFlyoutActions.length > 1); + remainingFlyoutActions.length > 0 || (!isLargeFlyout && visibleFlyoutActions.length > 1); return ( - - {i18n.translate('discover.grid.tableRow.actionsLabel', { - defaultMessage: 'Actions', - })} - : - + {i18n.translate('discover.grid.tableRow.actionsLabel', { + defaultMessage: 'Actions', + })} + : {visibleFlyoutActions.map((action) => ( diff --git a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx b/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx index 2bb99a0bc93c6..491bdd1166ec7 100644 --- a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx +++ b/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx @@ -7,34 +7,31 @@ */ import React from 'react'; -import { I18nProvider } from '@kbn/i18n-react'; import { DocTableEmbeddable, DocTableEmbeddableProps } from './doc_table_embeddable'; export function DiscoverDocTableEmbeddable(renderProps: DocTableEmbeddableProps) { return ( - - - + ); } diff --git a/examples/embeddable_examples/server/index.ts b/src/plugins/discover/public/customizations/defaults.ts similarity index 60% rename from examples/embeddable_examples/server/index.ts rename to src/plugins/discover/public/customizations/defaults.ts index cb0e20e34042e..a9dc60ac356ff 100644 --- a/examples/embeddable_examples/server/index.ts +++ b/src/plugins/discover/public/customizations/defaults.ts @@ -6,9 +6,12 @@ * Side Public License, v 1. */ -import { PluginInitializer } from '@kbn/core/server'; +import { DiscoverCustomizationContext } from './types'; -export const plugin: PluginInitializer = async () => { - const { EmbeddableExamplesPlugin } = await import('./plugin'); - return new EmbeddableExamplesPlugin(); +export const defaultCustomizationContext: DiscoverCustomizationContext = { + displayMode: 'standalone', + inlineTopNav: { + enabled: false, + showLogsExplorerTabs: false, + }, }; diff --git a/src/plugins/discover/public/customizations/index.ts b/src/plugins/discover/public/customizations/index.ts index 0c9a94ac8adad..b48c76d19f827 100644 --- a/src/plugins/discover/public/customizations/index.ts +++ b/src/plugins/discover/public/customizations/index.ts @@ -8,5 +8,6 @@ export * from './customization_types'; export * from './customization_provider'; +export * from './defaults'; export * from './types'; export type { DiscoverCustomization, DiscoverCustomizationService } from './customization_service'; diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx index 5ce82d642fb62..5a83197818a43 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx @@ -651,10 +651,7 @@ export class SavedSearchEmbeddable Array.isArray(searchProps.columns) ) { ReactDOM.render( - + + void; onCancel: () => void; + startServices: StartRenderServices; }) => { if (isOpenConfirmPanel) { return; @@ -34,32 +38,34 @@ export const showConfirmPanel = ({ document.body.appendChild(container); const element = ( - { - onClose(); - onCancel(); - }} - onConfirm={() => { - onClose(); - onConfirm(); - }} - cancelButtonText={i18n.translate('discover.confirmDataViewSave.cancel', { - defaultMessage: 'Cancel', - })} - confirmButtonText={i18n.translate('discover.confirmDataViewSave.saveAndContinue', { - defaultMessage: 'Save and continue', - })} - defaultFocusedButton="confirm" - > -

- {i18n.translate('discover.confirmDataViewSave.message', { - defaultMessage: 'The action you chose requires a saved data view.', + + - + onCancel={() => { + onClose(); + onCancel(); + }} + onConfirm={() => { + onClose(); + onConfirm(); + }} + cancelButtonText={i18n.translate('discover.confirmDataViewSave.cancel', { + defaultMessage: 'Cancel', + })} + confirmButtonText={i18n.translate('discover.confirmDataViewSave.saveAndContinue', { + defaultMessage: 'Save and continue', + })} + defaultFocusedButton="confirm" + > +

+ {i18n.translate('discover.confirmDataViewSave.message', { + defaultMessage: 'The action you chose requires a saved data view.', + })} +

+
+
); ReactDOM.render(element, container); }; diff --git a/src/plugins/discover/public/mocks.tsx b/src/plugins/discover/public/mocks.tsx index 89dd00e7d591d..8e4c3fc700f8f 100644 --- a/src/plugins/discover/public/mocks.tsx +++ b/src/plugins/discover/public/mocks.tsx @@ -18,6 +18,7 @@ const createSetupContract = (): Setup => { const setupContract: Setup = { locator: sharePluginMock.createLocator(), showInlineTopNav: jest.fn(), + configureInlineTopNav: jest.fn(), }; return setupContract; }; diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index f3396663b8763..46cbf95d299b1 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -7,7 +7,7 @@ */ import React, { ComponentType } from 'react'; -import { BehaviorSubject } from 'rxjs'; +import { BehaviorSubject, map, Observable } from 'rxjs'; import { AppMountParameters, AppUpdater, @@ -66,7 +66,7 @@ import { DiscoverAppLocatorDefinition, DiscoverESQLLocatorDefinition, } from '../common'; -import type { DiscoverCustomizationContext } from './customizations'; +import { defaultCustomizationContext, DiscoverCustomizationContext } from './customizations'; import { SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER } from './embeddable/constants'; import { DiscoverContainerInternal, @@ -111,8 +111,10 @@ export interface DiscoverSetup { * ``` */ readonly locator: undefined | DiscoverAppLocator; - readonly showInlineTopNav: ( - options?: Partial> + readonly showInlineTopNav: () => void; + readonly configureInlineTopNav: ( + projectNavId: string, + options: DiscoverCustomizationContext['inlineTopNav'] ) => void; } @@ -196,6 +198,8 @@ export interface DiscoverStartPlugins { noDataPage?: NoDataPagePluginStart; } +export type StartRenderServices = Pick; + /** * Contains Discover, one of the oldest parts of Kibana * Discover provides embeddables for Dashboards @@ -216,10 +220,9 @@ export class DiscoverPlugin private locator?: DiscoverAppLocator; private contextLocator?: DiscoverContextAppLocator; private singleDocLocator?: DiscoverSingleDocLocator; - private inlineTopNav: DiscoverCustomizationContext['inlineTopNav'] = { - enabled: false, - showLogsExplorerTabs: false, - }; + private inlineTopNav: Map = new Map([ + [null, defaultCustomizationContext.inlineTopNav], + ]); private experimentalFeatures: ExperimentalFeatures = { ruleFormV2Enabled: false, }; @@ -327,14 +330,23 @@ export class DiscoverPlugin // due to EUI bug https://github.com/elastic/eui/pull/5152 params.element.classList.add('dscAppWrapper'); + const customizationContext$: Observable = services.chrome + .getActiveSolutionNavId$() + .pipe( + map((navId) => ({ + ...defaultCustomizationContext, + inlineTopNav: + this.inlineTopNav.get(navId) ?? + this.inlineTopNav.get(null) ?? + defaultCustomizationContext.inlineTopNav, + })) + ); + const { renderApp } = await import('./application'); const unmount = renderApp({ element: params.element, services, - customizationContext: { - displayMode: 'standalone', - inlineTopNav: this.inlineTopNav, - }, + customizationContext$, experimentalFeatures: this.experimentalFeatures, }); @@ -376,9 +388,14 @@ export class DiscoverPlugin return { locator: this.locator, - showInlineTopNav: ({ showLogsExplorerTabs } = {}) => { - this.inlineTopNav.enabled = true; - this.inlineTopNav.showLogsExplorerTabs = showLogsExplorerTabs ?? false; + showInlineTopNav: () => { + this.inlineTopNav.set(null, { + enabled: true, + showLogsExplorerTabs: false, + }); + }, + configureInlineTopNav: (projectNavId, options) => { + this.inlineTopNav.set(projectNavId, options); }, }; } diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index 096869d18ca51..f09d96f150a9b 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -317,12 +317,12 @@ export const getUiSettings: ( value: true, description: i18n.translate('discover.advancedSettings.enableESQLDescription', { defaultMessage: - 'This setting enables ES|QL in Discover. If you have feedback on this experience please reach out to us on {link}', + 'This setting enables ES|QL in Kibana. By switching it off you will hide the ES|QL user interface from various applications. However, users will be able to access existing ES|QL saved searches, visualizations, etc. If you have feedback on this experience please reach out to us on {link}', values: { link: - `` + + `` + i18n.translate('discover.advancedSettings.enableESQL.discussLinkText', { - defaultMessage: 'discuss.elastic.co/c/elastic-stack/kibana', + defaultMessage: 'https://ela.st/esql-feedback', }) + '', }, diff --git a/src/plugins/embeddable/kibana.jsonc b/src/plugins/embeddable/kibana.jsonc index ca247bf7e7104..0af5411af56dd 100644 --- a/src/plugins/embeddable/kibana.jsonc +++ b/src/plugins/embeddable/kibana.jsonc @@ -16,7 +16,7 @@ "contentManagement" ], "optionalPlugins": ["savedObjectsTaggingOss", "usageCollection"], - "requiredBundles": ["savedObjects", "kibanaReact", "kibanaUtils", "presentationPanel"], + "requiredBundles": ["savedObjects", "kibanaUtils", "presentationPanel"], "extraPublicDirs": ["common"] } } diff --git a/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.test.tsx b/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.test.tsx index a32a1fc5c93c4..cbcb9fdb76d00 100644 --- a/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.test.tsx +++ b/src/plugins/embeddable/public/add_panel_flyout/add_panel_flyout.test.tsx @@ -128,10 +128,10 @@ describe('add panel flyout', () => { let container: Container; beforeEach(() => { - const { overlays } = coreMock.createStart(); + const coreStart = coreMock.createStart(); const contactCardEmbeddableFactory = new ContactCardEmbeddableFactory( (() => null) as any, - overlays + coreStart ); embeddableStart.getEmbeddableFactories = jest diff --git a/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx b/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx index 580d9d8b49606..5bda8fd235c77 100644 --- a/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx +++ b/src/plugins/embeddable/public/add_panel_flyout/open_add_panel_flyout.tsx @@ -10,7 +10,7 @@ import React, { Suspense } from 'react'; import { OverlayRef } from '@kbn/core/public'; import { EuiLoadingSpinner } from '@elastic/eui'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { PresentationContainer } from '@kbn/presentation-containers'; import { core } from '../kibana_services'; @@ -35,7 +35,7 @@ export const openAddPanelFlyout = ({ }> , - { theme$: core.theme.theme$ } + core ), { 'data-test-subj': 'dashboardAddPanel', diff --git a/src/plugins/embeddable/public/lib/containers/container.ts b/src/plugins/embeddable/public/lib/containers/container.ts index ed4673acfdd8f..d1a15bb2588f0 100644 --- a/src/plugins/embeddable/public/lib/containers/container.ts +++ b/src/plugins/embeddable/public/lib/containers/container.ts @@ -355,6 +355,31 @@ export abstract class Container< }); } + public async untilReactEmbeddableLoaded(id: string): Promise { + if (!this.input.panels[id]) { + throw new PanelNotFoundError(); + } + + if (this.children$.value[id]) { + return this.children$.value[id] as ApiType; + } + + return new Promise((resolve, reject) => { + const subscription = merge(this.children$, this.getInput$()).subscribe(() => { + if (this.children$.value[id]) { + subscription.unsubscribe(); + resolve(this.children$.value[id] as ApiType); + } + + // If we hit this, the panel was removed before the embeddable finished loading. + if (this.input.panels[id] === undefined) { + subscription.unsubscribe(); + resolve(undefined); + } + }); + }); + } + public async getExplicitInputIsEqual(lastInput: TContainerInput) { const { panels: lastPanels, ...restOfLastInput } = lastInput; const { panels: currentPanels, ...restOfCurrentInput } = this.getExplicitInput(); diff --git a/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx b/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx index b98c61882733c..6123fbed12537 100644 --- a/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx +++ b/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory.tsx @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { CoreStart } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { EmbeddableFactoryDefinition } from '../../../embeddables'; import { Container } from '../../../containers'; import { ContactCardEmbeddable, ContactCardEmbeddableInput } from './contact_card_embeddable'; @@ -31,7 +31,7 @@ export class ContactCardEmbeddableFactory constructor( protected readonly execTrigger: UiActionsStart['executeTriggerActions'], - private readonly overlays: CoreStart['overlays'] + private readonly core: CoreStart ) {} public async isEditable() { @@ -50,7 +50,7 @@ export class ContactCardEmbeddableFactory public getExplicitInput = (): Promise> => { return new Promise((resolve) => { - const modalSession = this.overlays.openModal( + const modalSession = this.core.overlays.openModal( toMountPoint( { @@ -62,7 +62,8 @@ export class ContactCardEmbeddableFactory modalSession.close(); resolve(input); }} - /> + />, + this.core ), { 'data-test-subj': 'createContactCardEmbeddable', diff --git a/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx b/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx index c7b81cd0f2250..5e88080a94a29 100644 --- a/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx +++ b/src/plugins/embeddable/public/lib/test_samples/embeddables/contact_card/contact_card_exportable_embeddable_factory.tsx @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { CoreStart } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { EmbeddableFactoryDefinition } from '../../../embeddables'; import { Container } from '../../../containers'; import { ContactCardEmbeddableInput } from './contact_card_embeddable'; @@ -27,7 +27,7 @@ export class ContactCardExportableEmbeddableFactory constructor( private readonly execTrigger: UiActionsStart['executeTriggerActions'], - private readonly overlays: CoreStart['overlays'] + private readonly core: CoreStart ) {} public async isEditable() { @@ -46,7 +46,7 @@ export class ContactCardExportableEmbeddableFactory public getExplicitInput = (): Promise> => { return new Promise((resolve) => { - const modalSession = this.overlays.openModal( + const modalSession = this.core.overlays.openModal( toMountPoint( { @@ -58,7 +58,8 @@ export class ContactCardExportableEmbeddableFactory modalSession.close(); resolve(input); }} - /> + />, + this.core ), { 'data-test-subj': 'createContactCardEmbeddable', diff --git a/src/plugins/embeddable/tsconfig.json b/src/plugins/embeddable/tsconfig.json index 2815767c9ee25..737034ebe1719 100644 --- a/src/plugins/embeddable/tsconfig.json +++ b/src/plugins/embeddable/tsconfig.json @@ -28,7 +28,8 @@ "@kbn/presentation-panel-plugin", "@kbn/presentation-publishing", "@kbn/presentation-containers", - "@kbn/analytics", + "@kbn/react-kibana-mount", + "@kbn/analytics" ], "exclude": ["target/**/*"] } diff --git a/src/plugins/event_annotation_listing/public/components/group_editor_flyout/lens_attributes.ts b/src/plugins/event_annotation_listing/public/components/group_editor_flyout/lens_attributes.ts index f9e56ded409b9..d26ff0d583ff3 100644 --- a/src/plugins/event_annotation_listing/public/components/group_editor_flyout/lens_attributes.ts +++ b/src/plugins/event_annotation_listing/public/components/group_editor_flyout/lens_attributes.ts @@ -8,7 +8,6 @@ import { EventAnnotationGroupConfig } from '@kbn/event-annotation-common'; import { FieldBasedIndexPatternColumn, TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import { XYPersistedByValueAnnotationLayerConfig } from '@kbn/lens-plugin/public/async_services'; export const DATA_LAYER_ID = 'data-layer-id'; export const DATE_HISTOGRAM_COLUMN_ID = 'date-histogram-column-id'; @@ -64,7 +63,7 @@ export const getLensAttributes = (group: EventAnnotationGroupConfig, timeField: layerType: 'annotations', persistanceType: 'byValue', ...group, - } as XYPersistedByValueAnnotationLayerConfig, + }, ], }, query: { diff --git a/src/plugins/image_embeddable/public/components/image_embeddable.tsx b/src/plugins/image_embeddable/public/components/image_embeddable.tsx index f028ab5e16a62..cd69c602a16b0 100644 --- a/src/plugins/image_embeddable/public/components/image_embeddable.tsx +++ b/src/plugins/image_embeddable/public/components/image_embeddable.tsx @@ -63,7 +63,9 @@ export const ImageEmbeddable = ({ api, filesClient }: ImageEmbeddableProps) => { }} > { views: InspectorViewRegistry | undefined; - constructor(initializerContext: PluginInitializerContext) {} + constructor(_initializerContext: PluginInitializerContext) {} - public setup(core: CoreSetup) { + public setup(_core: CoreSetup) { this.views = new InspectorViewRegistry(); this.views.register(getRequestsViewDescription()); @@ -109,7 +109,7 @@ export class InspectorPublicPlugin implements Plugin { theme: core.theme, }} />, - { theme$: core.theme.theme$ } + core ), { 'data-test-subj': 'inspectorPanel', diff --git a/src/plugins/inspector/tsconfig.json b/src/plugins/inspector/tsconfig.json index 33fada52f7847..f0a23ddf01958 100644 --- a/src/plugins/inspector/tsconfig.json +++ b/src/plugins/inspector/tsconfig.json @@ -17,7 +17,8 @@ "@kbn/std", "@kbn/ui-theme", "@kbn/code-editor", - "@kbn/core-lifecycle-browser" + "@kbn/core-lifecycle-browser", + "@kbn/react-kibana-mount" ], "exclude": [ "target/**/*", diff --git a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts index 0eb9d291337a7..77212225cc14c 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts @@ -27,7 +27,7 @@ interface UiCounterEvent { total: number; } -export interface UiCountersUsage { +export interface UiUsageCounters { dailyEvents: UiCounterEvent[]; } @@ -83,7 +83,7 @@ export async function fetchUiCounters({ soClient }: CollectorFetchContext) { } export function registerUiCountersUsageCollector(usageCollection: UsageCollectionSetup) { - const collector = usageCollection.makeUsageCollector({ + const collector = usageCollection.makeUsageCollector({ type: 'ui_counters', schema: { dailyEvents: { diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts index a46782bf8563a..807f0189a4dd0 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts @@ -24,7 +24,7 @@ interface UsageCounterEvent { total: number; } -export interface UiCountersUsage { +export interface UsageCounters { dailyEvents: UsageCounterEvent[]; } @@ -52,7 +52,7 @@ export function transformRawCounter( } export function registerUsageCountersUsageCollector(usageCollection: UsageCollectionSetup) { - const collector = usageCollection.makeUsageCollector({ + const collector = usageCollection.makeUsageCollector({ type: 'usage_counters', schema: { dailyEvents: { diff --git a/src/plugins/links/public/editor/open_link_editor_flyout.tsx b/src/plugins/links/public/editor/open_link_editor_flyout.tsx index 05a7756e8ea10..f8176d6e7e245 100644 --- a/src/plugins/links/public/editor/open_link_editor_flyout.tsx +++ b/src/plugins/links/public/editor/open_link_editor_flyout.tsx @@ -9,7 +9,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { DashboardContainer } from '@kbn/dashboard-plugin/public/dashboard_container'; import { coreServices } from '../services/kibana_services'; @@ -64,14 +64,14 @@ export async function openLinkEditorFlyout({ }; ReactDOM.render( - + - , +
, ref.current ); }).catch(() => { diff --git a/src/plugins/links/tsconfig.json b/src/plugins/links/tsconfig.json index 3431fdfd78a65..e0a5a1b1d4221 100644 --- a/src/plugins/links/tsconfig.json +++ b/src/plugins/links/tsconfig.json @@ -26,13 +26,13 @@ "@kbn/logging", "@kbn/core-plugins-server", "@kbn/react-kibana-mount", - "@kbn/react-kibana-context-theme", "@kbn/analytics", "@kbn/usage-collection-plugin", "@kbn/visualizations-plugin", "@kbn/core-mount-utils-browser", "@kbn/presentation-containers", - "@kbn/presentation-publishing" + "@kbn/presentation-publishing", + "@kbn/react-kibana-context-render" ], "exclude": ["target/**/*"] } diff --git a/src/plugins/telemetry/server/routes/telemetry_config.ts b/src/plugins/telemetry/server/routes/telemetry_config.ts index 7c056b0cfd519..f3dfbf9fc7ec6 100644 --- a/src/plugins/telemetry/server/routes/telemetry_config.ts +++ b/src/plugins/telemetry/server/routes/telemetry_config.ts @@ -80,14 +80,15 @@ export function registerTelemetryConfigRoutes({ const v2Validations = { response: { 200: { - body: schema.object({ - allowChangingOptInStatus: schema.boolean(), - optIn: schema.oneOf([schema.boolean(), schema.literal(null)]), - sendUsageFrom: schema.oneOf([schema.literal('server'), schema.literal('browser')]), - telemetryNotifyUserAboutOptInDefault: schema.boolean(), - // Declare the `serverless` label as optional in both offerings while we fix https://github.com/elastic/kibana/issues/167862 - labels: labelsSchema.extends({ serverless: schema.maybe(schema.string()) }), - }), + body: () => + schema.object({ + allowChangingOptInStatus: schema.boolean(), + optIn: schema.oneOf([schema.boolean(), schema.literal(null)]), + sendUsageFrom: schema.oneOf([schema.literal('server'), schema.literal('browser')]), + telemetryNotifyUserAboutOptInDefault: schema.boolean(), + // Declare the `serverless` label as optional in both offerings while we fix https://github.com/elastic/kibana/issues/167862 + labels: labelsSchema.extends({ serverless: schema.maybe(schema.string()) }), + }), }, }, }; diff --git a/src/plugins/telemetry/server/routes/telemetry_last_reported.ts b/src/plugins/telemetry/server/routes/telemetry_last_reported.ts index 23c15521d870d..9fd1054b6039f 100644 --- a/src/plugins/telemetry/server/routes/telemetry_last_reported.ts +++ b/src/plugins/telemetry/server/routes/telemetry_last_reported.ts @@ -21,7 +21,9 @@ export function registerTelemetryLastReported( ) { // GET to retrieve const v2GetValidations = { - response: { 200: { body: schema.object({ lastReported: schema.maybe(schema.number()) }) } }, + response: { + 200: { body: () => schema.object({ lastReported: schema.maybe(schema.number()) }) }, + }, }; const v2GetHandler: RequestHandler = async (context, req, res) => { diff --git a/src/plugins/telemetry/server/routes/telemetry_opt_in.ts b/src/plugins/telemetry/server/routes/telemetry_opt_in.ts index 689e0cd06fad8..04c9ad833b0c6 100644 --- a/src/plugins/telemetry/server/routes/telemetry_opt_in.ts +++ b/src/plugins/telemetry/server/routes/telemetry_opt_in.ts @@ -118,9 +118,8 @@ export function registerTelemetryOptInRoutes({ request: { body: schema.object({ enabled: schema.boolean() }) }, response: { 200: { - body: schema.arrayOf( - schema.object({ clusterUuid: schema.string(), stats: schema.string() }) - ), + body: () => + schema.arrayOf(schema.object({ clusterUuid: schema.string(), stats: schema.string() })), }, }, }; diff --git a/src/plugins/telemetry/server/routes/telemetry_opt_in_stats.ts b/src/plugins/telemetry/server/routes/telemetry_opt_in_stats.ts index 378dbdcc9e495..fd0e1523e2d26 100644 --- a/src/plugins/telemetry/server/routes/telemetry_opt_in_stats.ts +++ b/src/plugins/telemetry/server/routes/telemetry_opt_in_stats.ts @@ -80,17 +80,18 @@ export function registerTelemetryOptInStatsRoutes( }, response: { 200: { - body: schema.arrayOf( - schema.object({ - clusterUuid: schema.string(), - stats: schema.object({ - cluster_uuid: schema.string(), - opt_in_status: schema.boolean(), - }), - }) - ), + body: () => + schema.arrayOf( + schema.object({ + clusterUuid: schema.string(), + stats: schema.object({ + cluster_uuid: schema.string(), + opt_in_status: schema.boolean(), + }), + }) + ), }, - 503: { body: schema.string() }, + 503: { body: () => schema.string() }, }, }, }, diff --git a/examples/embeddable_examples/public/migrations/index.ts b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/index.ts similarity index 68% rename from examples/embeddable_examples/public/migrations/index.ts rename to src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/index.ts index 0cb619642f341..69f01c944ad25 100644 --- a/examples/embeddable_examples/public/migrations/index.ts +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/index.ts @@ -5,6 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import { LogsOverview } from './logs_overview'; -export * from './migrations_embeddable'; -export * from './migrations_embeddable_factory'; +// Required for usage in React.lazy +// eslint-disable-next-line import/no-default-export +export default LogsOverview; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx new file mode 100644 index 0000000000000..7b9379654cec1 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx @@ -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 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 { render, screen } from '@testing-library/react'; +import { LogsOverview } from './logs_overview'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; +import { buildDataTableRecord } from '@kbn/discover-utils'; +import { setUnifiedDocViewerServices } from '../../plugin'; +import { mockUnifiedDocViewerServices } from '../../__mocks__'; + +const DATASET_NAME = 'logs.overview'; +const NAMESPACE = 'default'; +const DATA_STREAM_NAME = `logs-${DATASET_NAME}-${NAMESPACE}`; +const NOW = Date.now(); + +const dataView = { + fields: { + getAll: () => + [ + '_index', + 'message', + 'log.level', + 'service.name', + 'host.name', + 'trace.id', + 'orchestrator.cluster.id', + 'orchestrator.cluster.name', + 'orchestrator.resource.id', + 'cloud.provider', + 'cloud.region', + 'cloud.availability_zone', + 'cloud.project.id', + 'cloud.instance.id', + 'agent.name', + ].map((name) => ({ + name, + type: 'string', + scripted: false, + filterable: true, + })), + }, + metaFields: ['_index', '_score'], + getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), +} as unknown as DataView; + +dataView.fields.getByName = (name: string) => { + return dataView.fields.getAll().find((field) => field.name === name); +}; + +const fullHit = buildDataTableRecord( + { + _index: DATA_STREAM_NAME, + _id: DATA_STREAM_NAME, + _score: 1, + _source: { + '@timestamp': NOW + 1000, + message: 'full document', + log: { level: 'info', file: { path: '/logs.overview.log' } }, + data_stream: { + type: 'logs', + dataset: DATASET_NAME, + namespace: NAMESPACE, + }, + 'service.name': DATASET_NAME, + 'host.name': 'gke-edge-oblt-pool', + 'trace.id': 'abcdef', + orchestrator: { + cluster: { + id: 'my-cluster-id', + name: 'my-cluster-name', + }, + resource: { + id: 'orchestratorResourceId', + }, + }, + cloud: { + provider: ['gcp'], + region: 'us-central-1', + availability_zone: 'us-central-1a', + project: { + id: 'elastic-project', + }, + instance: { + id: 'BgfderflkjTheUiGuy', + }, + }, + 'agent.name': 'node', + }, + }, + dataView +); + +setUnifiedDocViewerServices(mockUnifiedDocViewerServices); + +const renderLogsOverview = (props: Partial = {}) => { + const { rerender: baseRerender, ...tools } = render( + + ); + + const rerender = (rerenderProps: Partial) => + baseRerender(); + + return { rerender, ...tools }; +}; + +describe('LogsOverview', () => { + beforeEach(() => renderLogsOverview()); + + describe('Header section', () => { + it('should display a timestamp badge', async () => { + expect(screen.queryByTestId('unifiedDocViewLogsOverviewTimestamp')).toBeInTheDocument(); + }); + + it('should display a log level badge when available', async () => { + expect(screen.queryByTestId('unifiedDocViewLogsOverviewLogLevel')).toBeInTheDocument(); + }); + + it('should display a message code block when available', async () => { + expect(screen.queryByTestId('unifiedDocViewLogsOverviewMessage')).toBeInTheDocument(); + }); + }); + + describe('Highlights section', () => { + it('should load the service container with all fields', async () => { + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewHighlightSectionServiceInfra') + ).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewService')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewTrace')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewHostName')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewClusterName')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewResourceId')).toBeInTheDocument(); + }); + + it('should load the cloud container with all fields', async () => { + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewHighlightSectionCloud') + ).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewCloudProvider')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewCloudRegion')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewCloudAz')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewCloudProjectId')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewCloudInstanceId')).toBeInTheDocument(); + }); + + it('should load the other container with all fields', async () => { + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewHighlightSectionOther') + ).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewLogPathFile')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewNamespace')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewDataset')).toBeInTheDocument(); + expect(screen.queryByTestId('unifiedDocViewLogsOverviewLogShipper')).toBeInTheDocument(); + }); + }); +}); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx new file mode 100644 index 0000000000000..564ce902f7238 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; +import { getLogDocumentOverview } from '@kbn/discover-utils'; +import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; +import { LogsOverviewHeader } from './logs_overview_header'; +import { LogsOverviewHighlights } from './logs_overview_highlights'; +import { FieldActionsProvider } from '../../hooks/use_field_actions'; +import { getUnifiedDocViewerServices } from '../../plugin'; + +export function LogsOverview({ + columns, + dataView, + hit, + filter, + onAddColumn, + onRemoveColumn, +}: DocViewRenderProps) { + const { fieldFormats } = getUnifiedDocViewerServices(); + const parsedDoc = getLogDocumentOverview(hit, { dataView, fieldFormats }); + + return ( + + + + + + + ); +} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_header.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_header.tsx new file mode 100644 index 0000000000000..4bbc2993dedb0 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_header.tsx @@ -0,0 +1,101 @@ +/* + * Copyright 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 { + EuiCodeBlock, + EuiFlexGroup, + EuiFlexItem, + EuiText, + EuiAccordion, + useGeneratedHtmlId, + EuiTitle, +} from '@elastic/eui'; +import { + LogDocumentOverview, + fieldConstants, + getMessageFieldWithFallbacks, +} from '@kbn/discover-utils'; +import { i18n } from '@kbn/i18n'; +import { Timestamp } from './sub_components/timestamp'; +import { HoverActionPopover } from './sub_components/hover_popover_action'; +import { LogLevel } from './sub_components/log_level'; + +export const contentLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.content', { + defaultMessage: 'Content breakdown', +}); + +export function LogsOverviewHeader({ doc }: { doc: LogDocumentOverview }) { + const hasLogLevel = Boolean(doc[fieldConstants.LOG_LEVEL_FIELD]); + const hasTimestamp = Boolean(doc[fieldConstants.TIMESTAMP_FIELD]); + const { field, value } = getMessageFieldWithFallbacks(doc); + const hasBadges = hasTimestamp || hasLogLevel; + const hasMessageField = field && value; + const hasFlyoutHeader = hasMessageField || hasBadges; + + const accordionId = useGeneratedHtmlId({ + prefix: contentLabel, + }); + + const accordionTitle = ( + +

{contentLabel}

+
+ ); + + const logLevelAndTimestamp = hasBadges && ( + + {doc[fieldConstants.LOG_LEVEL_FIELD] && ( + + + + )} + {hasTimestamp && } + + ); + + const contentField = hasMessageField && ( + + + + {field} + + {logLevelAndTimestamp} + + + + {value} + + + + ); + + return hasFlyoutHeader ? ( + + {hasMessageField ? contentField : logLevelAndTimestamp} + + ) : null; +} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_highlights.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_highlights.tsx new file mode 100644 index 0000000000000..a7d998b0f1eba --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_highlights.tsx @@ -0,0 +1,253 @@ +/* + * Copyright 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 { CloudProvider, CloudProviderIcon } from '@kbn/custom-icons'; +import { first } from 'lodash'; +import { i18n } from '@kbn/i18n'; +import { DataTableRecord, LogDocumentOverview, fieldConstants } from '@kbn/discover-utils'; +import { HighlightField } from './sub_components/highlight_field'; +import { HighlightSection } from './sub_components/highlight_section'; + +export function LogsOverviewHighlights({ + formattedDoc, + flattenedDoc, +}: { + formattedDoc: LogDocumentOverview; + flattenedDoc: DataTableRecord['flattened']; +}) { + const getHighlightProps = (field: keyof LogDocumentOverview) => ({ + field, + formattedValue: formattedDoc[field], + value: flattenedDoc[field], + }); + + return ( + <> + {/* Service & Infrastructure highlight */} + + {formattedDoc[fieldConstants.SERVICE_NAME_FIELD] && ( + + )} + {formattedDoc[fieldConstants.HOST_NAME_FIELD] && ( + + )} + {formattedDoc[fieldConstants.TRACE_ID_FIELD] && ( + + )} + {formattedDoc[fieldConstants.ORCHESTRATOR_CLUSTER_NAME_FIELD] && ( + + )} + {formattedDoc[fieldConstants.ORCHESTRATOR_RESOURCE_ID_FIELD] && ( + + )} + + {/* Cloud highlight */} + + {formattedDoc[fieldConstants.CLOUD_PROVIDER_FIELD] && ( + + } + {...getHighlightProps(fieldConstants.CLOUD_PROVIDER_FIELD)} + /> + )} + {formattedDoc[fieldConstants.CLOUD_REGION_FIELD] && ( + + )} + {formattedDoc[fieldConstants.CLOUD_AVAILABILITY_ZONE_FIELD] && ( + + )} + {formattedDoc[fieldConstants.CLOUD_PROJECT_ID_FIELD] && ( + + )} + {formattedDoc[fieldConstants.CLOUD_INSTANCE_ID_FIELD] && ( + + )} + + {/* Other highlights */} + + {formattedDoc[fieldConstants.LOG_FILE_PATH_FIELD] && ( + + )} + {formattedDoc[fieldConstants.DATASTREAM_DATASET_FIELD] && ( + + )} + {formattedDoc[fieldConstants.DATASTREAM_NAMESPACE_FIELD] && ( + + )} + {formattedDoc[fieldConstants.AGENT_NAME_FIELD] && ( + + )} + + + ); +} + +const serviceLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.service', { + defaultMessage: 'Service', +}); + +const traceLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.trace', { + defaultMessage: 'Trace', +}); + +const hostNameLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.hostName', { + defaultMessage: 'Host name', +}); + +const serviceInfraAccordionTitle = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.title.serviceInfra', + { + defaultMessage: 'Service & Infrastructure', + } +); + +const cloudAccordionTitle = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.title.cloud', + { + defaultMessage: 'Cloud', + } +); + +const otherAccordionTitle = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.title.other', + { + defaultMessage: 'Other', + } +); + +const orchestratorClusterNameLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.orchestratorClusterName', + { + defaultMessage: 'Orchestrator cluster Name', + } +); + +const orchestratorResourceIdLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.orchestratorResourceId', + { + defaultMessage: 'Orchestrator resource ID', + } +); + +const cloudProviderLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.cloudProvider', + { + defaultMessage: 'Cloud provider', + } +); + +const cloudRegionLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.cloudRegion', { + defaultMessage: 'Cloud region', +}); + +const cloudAvailabilityZoneLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.cloudAvailabilityZone', + { + defaultMessage: 'Cloud availability zone', + } +); + +const cloudProjectIdLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.cloudProjectId', + { + defaultMessage: 'Cloud project ID', + } +); + +const cloudInstanceIdLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.label.cloudInstanceId', + { + defaultMessage: 'Cloud instance ID', + } +); + +const logPathFileLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.logPathFile', { + defaultMessage: 'Log path file', +}); + +const namespaceLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.namespace', { + defaultMessage: 'Namespace', +}); + +const datasetLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.dataset', { + defaultMessage: 'Dataset', +}); + +const shipperLabel = i18n.translate('unifiedDocViewer.docView.logsOverview.label.shipper', { + defaultMessage: 'Shipper', +}); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field.tsx new file mode 100644 index 0000000000000..176f8cf2b2a77 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field.tsx @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { EuiBadge, EuiFlexGroup, EuiText, EuiTitle } from '@elastic/eui'; +import { css } from '@emotion/react'; +import React, { ReactNode } from 'react'; +import { dynamic } from '@kbn/shared-ux-utility'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { HoverActionPopover } from './hover_popover_action'; + +const HighlightFieldDescription = dynamic(() => import('./highlight_field_description')); + +interface HighlightFieldProps { + field: string; + formattedValue?: string; + icon?: ReactNode; + label: string; + useBadge?: boolean; + value?: unknown; +} + +export function HighlightField({ + field, + formattedValue, + icon, + label, + useBadge = false, + value, + ...props +}: HighlightFieldProps) { + return formattedValue && value ? ( +
+ + + {label} + + + + + + {icon} + {useBadge ? ( + + {formattedValue} + + ) : ( + + )} + + +
+ ) : null; +} + +const fieldNameStyle = css` + color: ${euiThemeVars.euiColorDarkShade}; +`; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field_description.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field_description.tsx similarity index 68% rename from x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field_description.tsx rename to src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field_description.tsx index 0ecf46a527d86..bfe2ef236da97 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field_description.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_field_description.tsx @@ -1,11 +1,12 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 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 { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; +import { EuiFlexGroup, EuiIconTip } from '@elastic/eui'; import { EcsFlat } from '@elastic/ecs'; import { FieldIcon } from '@kbn/react-field'; import React from 'react'; @@ -17,12 +18,8 @@ export function HighlightFieldDescription({ fieldName }: { fieldName: string }) const title = ( - {type && ( - - - - )} - {fieldName} + {type && } + {fieldName} ); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_section.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_section.tsx new file mode 100644 index 0000000000000..f0e6b1cd5943f --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/highlight_section.tsx @@ -0,0 +1,94 @@ +/* + * Copyright 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, { PropsWithChildren, useReducer } from 'react'; +import { + EuiAccordion, + EuiFlexGrid, + EuiHorizontalRule, + EuiTitle, + useGeneratedHtmlId, + EuiButtonEmpty, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; + +interface HighlightSectionProps { + title: string; + visibleItems?: number; +} + +export function HighlightSection({ + children, + title, + visibleItems = 6, + ...props +}: PropsWithChildren) { + const validChildren = React.Children.toArray(children).filter(Boolean); + const childrenLength = validChildren.length; + const shouldRenderSection = childrenLength > 0; + const limitedChildren = validChildren.slice(0, visibleItems - 1); + const [isListExpanded, expandList] = useReducer(() => true, childrenLength <= visibleItems); + + const accordionId = useGeneratedHtmlId({ + prefix: title, + }); + + const showMoreButtonLabel = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.section.showMore', + { + defaultMessage: '+ {count} more', + values: { count: childrenLength - limitedChildren.length }, + } + ); + + const showMoreButton = ( + + {showMoreButtonLabel} + + ); + + limitedChildren.push(showMoreButton); + + const accordionTitle = ( + +

{title}

+
+ ); + + const displayedItems = isListExpanded ? validChildren : limitedChildren; + + return shouldRenderSection ? ( + <> + + + {displayedItems} + + + + + ) : null; +} + +// Applying this custom css rule remove the need for custom runtime js to compute a responsive column layout +const gridStyle = css` + grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); +`; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/hover_popover_action.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/hover_popover_action.tsx similarity index 73% rename from x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/hover_popover_action.tsx rename to src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/hover_popover_action.tsx index 1f9855c28a86b..7df7aa7950e85 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/hover_popover_action.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/hover_popover_action.tsx @@ -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 React, { useRef, useState } from 'react'; @@ -15,13 +16,13 @@ import { PopoverAnchorPosition, type EuiPopoverProps, } from '@elastic/eui'; -import { useHoverActions } from '../../../hooks/use_hover_actions'; +import { useUIFieldActions } from '../../../hooks/use_field_actions'; interface HoverPopoverActionProps { children: React.ReactChild; field: string; - value: string; - title?: string; + value: unknown; + title?: unknown; anchorPosition?: PopoverAnchorPosition; display?: EuiPopoverProps['display']; } @@ -36,7 +37,7 @@ export const HoverActionPopover = ({ }: HoverPopoverActionProps) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const leaveTimer = useRef(null); - const hoverActions = useHoverActions({ field, value }); + const uiFieldActions = useUIFieldActions({ field, value }); // The timeout hack is required because we are using a Popover which ideally should be used with a mouseclick, // but we are using it as a Tooltip. Which means we now need to manually handle the open and close @@ -54,11 +55,12 @@ export const HoverActionPopover = ({ }; return ( -
+ )} - {hoverActions.map((action) => ( - + {uiFieldActions.map((action) => ( + action.onClick()} + aria-label={action.label} + onClick={action.onClick} /> ))} -
+ ); }; + +const closePopoverPlaceholder = () => {}; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/log_level.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/log_level.tsx new file mode 100644 index 0000000000000..5fcfaa871ddf2 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/log_level.tsx @@ -0,0 +1,46 @@ +/* + * Copyright 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 { EuiBadge, useEuiTheme } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { LogDocumentOverview } from '@kbn/discover-utils'; + +const LEVEL_DICT = { + error: 'danger', + warn: 'warning', + info: 'primary', + debug: 'accent', +} as const; + +type Level = keyof typeof LEVEL_DICT; + +interface LogLevelProps { + level: LogDocumentOverview['log.level']; +} + +export function LogLevel({ level }: LogLevelProps) { + const { euiTheme } = useEuiTheme(); + + if (!level) return null; + const colorName = LEVEL_DICT[level as Level]; + const computedColor = colorName ? euiTheme.colors[colorName] : null; + + return ( + + {level} + + ); +} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/timestamp.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/timestamp.tsx similarity index 58% rename from x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/timestamp.tsx rename to src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/timestamp.tsx index da9e656a9f01d..16028be05fb95 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/timestamp.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/sub_components/timestamp.tsx @@ -1,23 +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. + * 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 { EuiBadge } from '@elastic/eui'; -import { FlyoutDoc } from '../../../../common/document'; interface TimestampProps { - timestamp: FlyoutDoc['@timestamp']; + timestamp?: string; } export function Timestamp({ timestamp }: TimestampProps) { if (!timestamp) return null; return ( - + {timestamp} ); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx index b87efe1cad043..33a1b28c7d5b4 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx @@ -23,7 +23,8 @@ import { EuiTablePagination, EuiSelectableMessage, EuiI18n, - useIsWithinBreakpoints, + useEuiTheme, + useResizeObserver, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -118,7 +119,12 @@ export const DocViewerTable = ({ onAddColumn, onRemoveColumn, }: DocViewRenderProps) => { - const showActionsInsideTableCell = useIsWithinBreakpoints(['xl'], true); + const { euiTheme } = useEuiTheme(); + const [ref, setRef] = useState(null); + const dimensions = useResizeObserver(ref); + const showActionsInsideTableCell = dimensions?.width + ? dimensions.width > euiTheme.breakpoint.m + : false; const { fieldFormats, storage, uiSettings } = getUnifiedDocViewerServices(); const showMultiFields = uiSettings.get(SHOW_MULTIFIELDS); @@ -407,7 +413,7 @@ export const DocViewerTable = ({ ]; return ( - + diff --git a/src/plugins/unified_doc_viewer/public/hooks/use_field_actions.tsx b/src/plugins/unified_doc_viewer/public/hooks/use_field_actions.tsx new file mode 100644 index 0000000000000..e703386818f89 --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/hooks/use_field_actions.tsx @@ -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 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 { useMemo } from 'react'; +import createContainer from 'constate'; +import { copyToClipboard, IconType } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; + +interface WithFieldParam { + field: string; +} + +interface WithValueParam { + value: unknown; +} + +interface TFieldActionParams extends WithFieldParam, WithValueParam {} + +export interface TFieldAction { + id: string; + iconType: IconType; + label: string; + onClick: () => void; +} + +type UseFieldActionsDeps = Pick< + DocViewRenderProps, + 'columns' | 'filter' | 'onAddColumn' | 'onRemoveColumn' +>; + +/** + * Higher level hook that wraps the logic for the requires actions on a field. + */ +const useFieldActions = ({ columns, filter, onAddColumn, onRemoveColumn }: UseFieldActionsDeps) => { + return useMemo( + () => ({ + addColumn: onAddColumn, + addFilterExist: ({ field }: WithFieldParam) => filter && filter('_exists_', field, '+'), + addFilterIn: ({ field, value }: TFieldActionParams) => filter && filter(field, value, '+'), + addFilterOut: ({ field, value }: TFieldActionParams) => filter && filter(field, value, '-'), + copyToClipboard, + removeColumn: onRemoveColumn, + toggleFieldColumn: ({ field }: WithFieldParam) => { + if (!columns) return; + const isFieldInTable = columns.includes(field); + if (isFieldInTable && onRemoveColumn) { + onRemoveColumn(field); + } else if (!isFieldInTable && onAddColumn) { + onAddColumn(field); + } + }, + }), + [columns, filter, onAddColumn, onRemoveColumn] + ); +}; + +export const [FieldActionsProvider, useFieldActionsContext] = createContainer(useFieldActions); + +/** + * This is a preset of the UI elements and related actions that can be used to build an action bar anywhere in a DocView + */ +export const useUIFieldActions = ({ field, value }: TFieldActionParams): TFieldAction[] => { + const actions = useFieldActionsContext(); + + return useMemo( + () => [ + { + id: 'addFilterInAction', + iconType: 'plusInCircle', + label: filterForValueLabel, + onClick: () => actions.addFilterIn({ field, value }), + }, + { + id: 'addFilterOutremoveFromFilterAction', + iconType: 'minusInCircle', + label: filterOutValueLabel, + onClick: () => actions.addFilterOut({ field, value }), + }, + { + id: 'addFilterExistAction', + iconType: 'filter', + label: filterForFieldPresentLabel, + onClick: () => actions.addFilterExist({ field }), + }, + { + id: 'toggleFieldColumnAction', + iconType: 'listAdd', + label: toggleColumnLabel, + onClick: () => actions.toggleFieldColumn({ field }), + }, + { + id: 'copyToClipboardAction', + iconType: 'copyClipboard', + label: copyToClipboardLabel, + onClick: () => actions.copyToClipboard(value as string), + }, + ], + [actions, field, value] + ); +}; + +const filterForValueLabel = i18n.translate('unifiedDocViewer.fieldActions.filterForValue', { + defaultMessage: 'Filter for value', +}); + +const filterOutValueLabel = i18n.translate('unifiedDocViewer.fieldActions.filterOutValue', { + defaultMessage: 'Filter out value', +}); + +const filterForFieldPresentLabel = i18n.translate( + 'unifiedDocViewer.fieldActions.filterForFieldPresent', + { defaultMessage: 'Filter for field present' } +); + +const toggleColumnLabel = i18n.translate('unifiedDocViewer.fieldActions.toggleColumn', { + defaultMessage: 'Toggle column in table', +}); + +const copyToClipboardLabel = i18n.translate('unifiedDocViewer.fieldActions.copyToClipboard', { + defaultMessage: 'Copy to clipboard', +}); diff --git a/src/plugins/unified_doc_viewer/public/plugin.tsx b/src/plugins/unified_doc_viewer/public/plugin.tsx index 6dc4527441822..19c0b29a916b3 100644 --- a/src/plugins/unified_doc_viewer/public/plugin.tsx +++ b/src/plugins/unified_doc_viewer/public/plugin.tsx @@ -16,14 +16,26 @@ import { createGetterSetter, Storage } from '@kbn/kibana-utils-plugin/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { CoreStart } from '@kbn/core/public'; +import { dynamic } from '@kbn/shared-ux-utility'; import type { UnifiedDocViewerServices } from './types'; export const [getUnifiedDocViewerServices, setUnifiedDocViewerServices] = createGetterSetter('UnifiedDocViewerServices'); -const DocViewerLegacyTable = React.lazy(() => import('./components/doc_viewer_table/legacy')); -const DocViewerTable = React.lazy(() => import('./components/doc_viewer_table')); -const SourceViewer = React.lazy(() => import('./components/doc_viewer_source')); +const fallback = ( + + + +); + +const LazyDocViewerLogsOverview = dynamic(() => import('./components/doc_viewer_logs_overview'), { + fallback, +}); +const LazyDocViewerLegacyTable = dynamic(() => import('./components/doc_viewer_table/legacy'), { + fallback, +}); +const LazyDocViewerTable = dynamic(() => import('./components/doc_viewer_table'), { fallback }); +const LazySourceViewer = dynamic(() => import('./components/doc_viewer_source'), { fallback }); export interface UnifiedDocViewerSetup { registry: DocViewsRegistry; @@ -44,6 +56,18 @@ export class UnifiedDocViewerPublicPlugin private docViewsRegistry = new DocViewsRegistry(); public setup(core: CoreSetup) { + this.docViewsRegistry.add({ + id: 'doc_view_logs_overview', + title: i18n.translate('unifiedDocViewer.docViews.logsOverview.title', { + defaultMessage: 'Overview', + }), + order: 0, + enabled: false, // Disabled doc view by default, can be programmatically enabled using the DocViewsRegistry.prototype.enableById method. + component: (props) => { + return ; + }, + }); + this.docViewsRegistry.add({ id: 'doc_view_table', title: i18n.translate('unifiedDocViewer.docViews.table.tableTitle', { @@ -53,24 +77,15 @@ export class UnifiedDocViewerPublicPlugin component: (props) => { const { textBasedHits } = props; const { uiSettings } = getUnifiedDocViewerServices(); - const DocView = isLegacyTableEnabled({ + + const LazyDocView = isLegacyTableEnabled({ uiSettings, isTextBasedQueryMode: Array.isArray(textBasedHits), }) - ? DocViewerLegacyTable - : DocViewerTable; + ? LazyDocViewerLegacyTable + : LazyDocViewerTable; - return ( - - - - } - > - - - ); + return ; }, }); @@ -82,22 +97,14 @@ export class UnifiedDocViewerPublicPlugin order: 20, component: ({ hit, dataView, textBasedHits }) => { return ( - - - - } - > - {}} - /> - + {}} + /> ); }, }); diff --git a/src/plugins/unified_doc_viewer/tsconfig.json b/src/plugins/unified_doc_viewer/tsconfig.json index 07139b46059b8..1e641f1bce891 100644 --- a/src/plugins/unified_doc_viewer/tsconfig.json +++ b/src/plugins/unified_doc_viewer/tsconfig.json @@ -25,7 +25,10 @@ "@kbn/core-ui-settings-browser-mocks", "@kbn/field-utils", "@kbn/code-editor", - "@kbn/code-editor-mock" + "@kbn/code-editor-mock", + "@kbn/custom-icons", + "@kbn/react-field", + "@kbn/ui-theme" ], "exclude": [ "target/**/*", diff --git a/src/plugins/unified_search/public/actions/apply_filter_action.ts b/src/plugins/unified_search/public/actions/apply_filter_action.ts index 0ccf1de9f41ae..4b576968f796a 100644 --- a/src/plugins/unified_search/public/actions/apply_filter_action.ts +++ b/src/plugins/unified_search/public/actions/apply_filter_action.ts @@ -7,8 +7,8 @@ */ import { i18n } from '@kbn/i18n'; -import { ThemeServiceSetup } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { CoreSetup } from '@kbn/core/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { IncompatibleActionError, UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; // for cleanup esFilters need to fix the issue https://github.com/elastic/kibana/issues/131292 import { FilterManager, TimefilterContract } from '@kbn/data-plugin/public'; @@ -38,7 +38,7 @@ async function isCompatible(context: ApplyGlobalFilterActionContext) { export function createFilterAction( filterManager: FilterManager, timeFilter: TimefilterContract, - theme: ThemeServiceSetup, + core: CoreSetup, id: string = ACTION_GLOBAL_APPLY_FILTER, type: string = ACTION_GLOBAL_APPLY_FILTER ): UiActionsActionDefinition { @@ -65,6 +65,7 @@ export function createFilterAction( let selectedFilters: Filter[] = filters; if (selectedFilters.length > 1) { + const [coreStart] = await core.getStartServices(); const indexPatterns = await Promise.all( filters.map((filter) => { return getIndexPatterns().get(filter.meta.index!); @@ -86,7 +87,7 @@ export function createFilterAction( resolve(filterSelection); } ), - { theme$: theme.theme$ } + coreStart ), { 'data-test-subj': 'test', diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index e9d8058ff1420..4afa5f84997ee 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -358,7 +358,7 @@ export function ChangeDataView({ }} > {i18n.translate('unifiedSearch.query.queryBar.textBasedLanguagesTryLabel', { - defaultMessage: 'Try ES|QL', + defaultMessage: 'Language: ES|QL', })} diff --git a/src/plugins/unified_search/public/plugin.ts b/src/plugins/unified_search/public/plugin.ts index 7644ff8646c10..0e1b2569470b4 100755 --- a/src/plugins/unified_search/public/plugin.ts +++ b/src/plugins/unified_search/public/plugin.ts @@ -12,7 +12,7 @@ import { APPLY_FILTER_TRIGGER } from '@kbn/data-plugin/public'; import { createQueryStringInput } from './query_string_input/get_query_string_input'; import { UPDATE_FILTER_REFERENCES_TRIGGER, updateFilterReferencesTrigger } from './triggers'; import { ConfigSchema } from '../config'; -import { setIndexPatterns, setTheme, setOverlays } from './services'; +import { setIndexPatterns, setTheme, setOverlays, setAnalytics, setI18n } from './services'; import { AutocompleteService } from './autocomplete/autocomplete_service'; import { createSearchBar } from './search_bar/create_search_bar'; import { createIndexPatternSelect } from './index_pattern_select'; @@ -52,7 +52,7 @@ export class UnifiedSearchPublicPlugin uiActions.registerTrigger(updateFilterReferencesTrigger); uiActions.registerAction( - createFilterAction(query.filterManager, query.timefilter.timefilter, core.theme) + createFilterAction(query.filterManager, query.timefilter.timefilter, core) ); uiActions.registerAction(createUpdateFilterReferencesAction(query.filterManager)); @@ -70,6 +70,8 @@ export class UnifiedSearchPublicPlugin core: CoreStart, { data, dataViews, uiActions, screenshotMode }: UnifiedSearchStartDependencies ): UnifiedSearchPublicPluginStart { + setAnalytics(core.analytics); + setI18n(core.i18n); setTheme(core.theme); setOverlays(core.overlays); setIndexPatterns(dataViews); diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx index 597d5788df60b..04c1dab19c8a8 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx @@ -38,7 +38,7 @@ import { KIBANA_USER_QUERY_LANGUAGE_KEY, KQL_TELEMETRY_ROUTE_LATEST_VERSION, } from '@kbn/data-plugin/common'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; import { buildQueryFromFilters, Filter } from '@kbn/es-query'; @@ -55,7 +55,7 @@ import { SuggestionsComponent } from '../typeahead'; import { onRaf } from '../utils'; import { FilterButtonGroup } from '../filter_bar/filter_button_group/filter_button_group'; import { AutocompleteService, QuerySuggestion, QuerySuggestionTypes } from '../autocomplete'; -import { getTheme } from '../services'; +import { getAnalytics, getI18n, getTheme } from '../services'; import './query_string_input.scss'; export const strings = { @@ -563,7 +563,7 @@ export default class QueryStringInputUI extends PureComponent
, - { theme$: getTheme().theme$ } + { analytics: getAnalytics(), i18n: getI18n(), theme: getTheme() } ), }); } @@ -666,7 +666,7 @@ export default class QueryStringInputUI extends PureComponent { + public onMouseEnterSuggestion = (_suggestion: QuerySuggestion, index: number) => { this.setState({ index }); }; diff --git a/src/plugins/unified_search/public/services.ts b/src/plugins/unified_search/public/services.ts index 4f8937baf8fdf..d99e0681e8396 100644 --- a/src/plugins/unified_search/public/services.ts +++ b/src/plugins/unified_search/public/services.ts @@ -6,13 +6,22 @@ * Side Public License, v 1. */ -import { ThemeServiceStart, OverlayStart } from '@kbn/core/public'; +import { + ThemeServiceStart, + OverlayStart, + AnalyticsServiceStart, + I18nStart, +} from '@kbn/core/public'; import { createGetterSetter } from '@kbn/kibana-utils-plugin/public'; import { DataViewsContract } from '@kbn/data-views-plugin/public'; export const [getIndexPatterns, setIndexPatterns] = createGetterSetter('IndexPatterns'); +export const [getAnalytics, setAnalytics] = createGetterSetter('Analytics'); + +export const [getI18n, setI18n] = createGetterSetter('I18n'); + export const [getTheme, setTheme] = createGetterSetter('Theme'); export const [getOverlays, setOverlays] = createGetterSetter('Overlays'); diff --git a/src/plugins/unified_search/tsconfig.json b/src/plugins/unified_search/tsconfig.json index 8ba4e3cdc002e..d3dfaff1ef6bb 100644 --- a/src/plugins/unified_search/tsconfig.json +++ b/src/plugins/unified_search/tsconfig.json @@ -46,7 +46,8 @@ "@kbn/calculate-width-from-char-count", "@kbn/react-kibana-context-render", "@kbn/data-view-utils", - "@kbn/esql-utils" + "@kbn/esql-utils", + "@kbn/react-kibana-mount" ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_default_editor/public/default_editor.tsx b/src/plugins/vis_default_editor/public/default_editor.tsx index 2f6757a96d252..529dcd500f8b4 100644 --- a/src/plugins/vis_default_editor/public/default_editor.tsx +++ b/src/plugins/vis_default_editor/public/default_editor.tsx @@ -13,6 +13,7 @@ import React, { useEffect, useRef, useState, useCallback } from 'react'; import { EventEmitter } from 'events'; import { EuiResizableContainer } from '@elastic/eui'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { Vis, VisualizeEmbeddableContract, @@ -82,7 +83,7 @@ function DefaultEditor({ const editorInitialWidth = getInitialWidth(vis.type.editorConfig.defaultSize); return ( - + - + ); } diff --git a/src/plugins/vis_default_editor/public/default_editor_controller.tsx b/src/plugins/vis_default_editor/public/default_editor_controller.tsx index 883a87ad789b1..18de5d6ab1a23 100644 --- a/src/plugins/vis_default_editor/public/default_editor_controller.tsx +++ b/src/plugins/vis_default_editor/public/default_editor_controller.tsx @@ -13,8 +13,8 @@ import { EuiErrorBoundary, EuiLoadingChart } from '@elastic/eui'; import { Vis, VisualizeEmbeddableContract } from '@kbn/visualizations-plugin/public'; import { IEditorController, EditorRenderProps } from '@kbn/visualizations-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { getTheme } from './services'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import { getAnalytics, getI18n, getTheme } from './services'; // @ts-ignore const DefaultEditor = lazy(() => import('./default_editor')); @@ -29,7 +29,7 @@ class DefaultEditorController implements IEditorController { render(props: EditorRenderProps) { render( - + - , + , this.el ); } diff --git a/src/plugins/vis_default_editor/public/plugin.ts b/src/plugins/vis_default_editor/public/plugin.ts index 1758fd1b6ff3c..9ec0578818470 100644 --- a/src/plugins/vis_default_editor/public/plugin.ts +++ b/src/plugins/vis_default_editor/public/plugin.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { CoreSetup, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; import type { VisualizationsSetup } from '@kbn/visualizations-plugin/public'; import { DefaultEditorController } from './default_editor_controller'; -import { setTheme } from './services'; +import { setAnalytics, setI18n, setTheme } from './services'; export interface VisDefaultEditorSetupDependencies { visualizations: VisualizationsSetup; @@ -20,13 +20,16 @@ export class VisDefaultEditorPlugin implements Plugin { public setup(core: CoreSetup, { visualizations }: VisDefaultEditorSetupDependencies) { + setAnalytics(core.analytics); setTheme(core.theme); if (visualizations) { visualizations.visEditorsRegistry.registerDefault(DefaultEditorController); } } - public start() {} + public start(core: CoreStart) { + setI18n(core.i18n); + } stop() {} } diff --git a/src/plugins/vis_default_editor/public/services.ts b/src/plugins/vis_default_editor/public/services.ts index 5f637ae0d9eae..d7fc09f0ddb9e 100644 --- a/src/plugins/vis_default_editor/public/services.ts +++ b/src/plugins/vis_default_editor/public/services.ts @@ -6,7 +6,10 @@ * Side Public License, v 1. */ -import { ThemeServiceStart } from '@kbn/core/public'; +import { AnalyticsServiceStart, I18nStart, ThemeServiceStart } from '@kbn/core/public'; import { createGetterSetter } from '@kbn/kibana-utils-plugin/common'; +export const [getAnalytics, setAnalytics] = + createGetterSetter('AnalyticsService'); +export const [getI18n, setI18n] = createGetterSetter('I18nService'); export const [getTheme, setTheme] = createGetterSetter('ThemeService'); diff --git a/src/plugins/vis_default_editor/tsconfig.json b/src/plugins/vis_default_editor/tsconfig.json index 0e4e40c765bc4..e3eef1bdcd326 100644 --- a/src/plugins/vis_default_editor/tsconfig.json +++ b/src/plugins/vis_default_editor/tsconfig.json @@ -28,6 +28,7 @@ "@kbn/utility-types", "@kbn/saved-search-plugin", "@kbn/code-editor", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts index 1f558da376e0f..dbafd35a9e1f3 100644 --- a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts +++ b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { getConfiguration } from '.'; import { samplePieVis } from '../../sample_vis.test.mocks'; @@ -38,7 +39,7 @@ describe('getConfiguration', () => { percentDecimals: 2, primaryGroups: ['bucket-1'], secondaryGroups: [], - showValuesInLegend: true, + legendStats: [LegendStats.values], truncateLegend: true, }, ], diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts index 1ff3148315fac..3378712c133d9 100644 --- a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts +++ b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts @@ -7,6 +7,7 @@ */ import { LegendDisplay, PartitionVisParams } from '@kbn/expression-partition-vis-plugin/common'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { CategoryDisplayTypes, NumberDisplayTypes, @@ -26,8 +27,9 @@ const getLayers = ( const showValuesInLegend = vis.params.labels.values ?? - vis.params.showValuesInLegend ?? - vis.type.visConfig.defaults.showValuesInLegend; + (vis.params.legendStats + ? vis.params.legendStats?.[0] === LegendStats.values + : vis.type.visConfig.defaults.showValuesInLegend); return [ { @@ -48,7 +50,7 @@ const getLayers = ( vis.params.legendDisplay ?? vis.type.visConfig.defaults.legendDisplay, legendPosition: vis.params.legendPosition ?? vis.type.visConfig.defaults.legendPosition, - showValuesInLegend, + legendStats: showValuesInLegend ? [LegendStats.values] : undefined, nestedLegend: vis.params.nestedLegend ?? vis.type.visConfig.defaults.nestedLegend, percentDecimals: vis.params.labels.percentDecimals ?? vis.type.visConfig.defaults.labels.percentDecimals, diff --git a/src/plugins/vis_types/table/public/table_vis_renderer.tsx b/src/plugins/vis_types/table/public/table_vis_renderer.tsx index ab40c5f567c2d..ecda305c837a1 100644 --- a/src/plugins/vis_types/table/public/table_vis_renderer.tsx +++ b/src/plugins/vis_types/table/public/table_vis_renderer.tsx @@ -13,7 +13,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { CoreStart, KibanaExecutionContext } from '@kbn/core/public'; import { VisualizationContainer } from '@kbn/visualizations-plugin/public'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; import { TableVisRenderValue } from './table_vis_fn'; @@ -65,7 +65,7 @@ export const getTableVisRenderer: ( }; render( - + - , + , domNode ); }, diff --git a/src/plugins/vis_types/table/tsconfig.json b/src/plugins/vis_types/table/tsconfig.json index f6e296e0e9ecf..3c68049c0ac36 100644 --- a/src/plugins/vis_types/table/tsconfig.json +++ b/src/plugins/vis_types/table/tsconfig.json @@ -26,6 +26,7 @@ "@kbn/i18n-react", "@kbn/ui-theme", "@kbn/config-schema", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts b/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts index 563d61bb15034..ccf5a36d87010 100644 --- a/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts +++ b/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import type { CoreStart } from '@kbn/core/public'; import type { ISearchStart } from '@kbn/data-plugin/public'; import type { DataViewsContract } from '@kbn/data-views-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; @@ -20,6 +21,8 @@ export const [getDataSearch, setDataSearch] = createGetterSetter(' export const [getCharts, setCharts] = createGetterSetter('Charts'); +export const [getCoreStart, setCoreStart] = createGetterSetter('CoreStart'); + export const [getFieldFormats, setFieldFormats] = createGetterSetter('FieldFormats'); diff --git a/src/plugins/vis_types/timelion/public/plugin.ts b/src/plugins/vis_types/timelion/public/plugin.ts index 22d143db1f6e6..a4c412c12fbd6 100644 --- a/src/plugins/vis_types/timelion/public/plugin.ts +++ b/src/plugins/vis_types/timelion/public/plugin.ts @@ -13,7 +13,6 @@ import type { PluginInitializerContext, IUiSettingsClient, HttpSetup, - ThemeServiceStart, } from '@kbn/core/public'; import type { Plugin as ExpressionsPlugin } from '@kbn/expressions-plugin/public'; import type { @@ -33,6 +32,7 @@ import { setIndexPatterns, setDataSearch, setCharts, + setCoreStart, setFieldFormats, setUsageCollection, } from './helpers/plugin_services'; @@ -47,7 +47,6 @@ export interface TimelionVisDependencies extends Partial { uiSettings: IUiSettingsClient; http: HttpSetup; timefilter: TimefilterContract; - theme: ThemeServiceStart; } /** @internal */ @@ -85,14 +84,13 @@ export class TimelionVisPlugin constructor(public initializerContext: PluginInitializerContext) {} public setup( - { uiSettings, http, theme }: CoreSetup, + { uiSettings, http }: CoreSetup, { expressions, visualizations, data, charts }: TimelionVisSetupDependencies ) { const dependencies: TimelionVisDependencies = { http, uiSettings, timefilter: data.query.timefilter.timefilter, - theme, }; expressions.registerFunction(() => getTimelionVisualizationConfig(dependencies)); @@ -109,6 +107,7 @@ export class TimelionVisPlugin core: CoreStart, { data, charts, dataViews, fieldFormats, usageCollection }: TimelionVisStartDependencies ) { + setCoreStart(core); setIndexPatterns(dataViews); setDataSearch(data.search); setCharts(charts); diff --git a/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx b/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx index 40541a00c4fcb..a6fdbd998dc80 100644 --- a/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx +++ b/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx @@ -11,13 +11,14 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common'; import { RangeFilterParams } from '@kbn/es-query'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { VisualizationContainer } from '@kbn/visualizations-plugin/public'; import { METRIC_TYPE } from '@kbn/analytics'; import { KibanaExecutionContext } from '@kbn/core/public'; import { TimelionVisDependencies } from './plugin'; import { TimelionRenderValue } from './timelion_vis_fn'; -import { getUsageCollection } from './helpers/plugin_services'; +import { getCoreStart, getUsageCollection } from './helpers/plugin_services'; const LazyTimelionVisComponent = lazy(() => import('./async_services').then(({ TimelionVisComponent }) => ({ default: TimelionVisComponent })) @@ -43,7 +44,7 @@ export const getTimelionVisRenderer: ( name: 'timelion_vis', displayName: 'Timelion visualization', reuseDomNode: true, - render: (domNode, { visData, visParams, syncTooltips, syncCursor }, handlers) => { + render: async (domNode, { visData, visParams, syncTooltips, syncCursor }, handlers) => { handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); @@ -89,7 +90,7 @@ export const getTimelionVisRenderer: ( handlers={handlers} showNoResult={showNoResult} > - + {seriesList && ( )} - + , domNode ); diff --git a/src/plugins/vis_types/timelion/tsconfig.json b/src/plugins/vis_types/timelion/tsconfig.json index c58be68e92c75..41fd62d2aad43 100644 --- a/src/plugins/vis_types/timelion/tsconfig.json +++ b/src/plugins/vis_types/timelion/tsconfig.json @@ -33,6 +33,7 @@ "@kbn/timelion-grammar", "@kbn/visualization-utils", "@kbn/code-editor", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx b/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx index d8ab097eedde5..f27ba05bb02e8 100644 --- a/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx +++ b/src/plugins/vis_types/timeseries/public/application/editor_controller.tsx @@ -15,8 +15,8 @@ import type { IEditorController, EditorRenderProps, } from '@kbn/visualizations-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { getUISettings, getI18n, getCoreStart, getDataViewsStart } from '../services'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import { getUISettings, getCoreStart, getDataViewsStart } from '../services'; import { VisEditor } from './components/vis_editor_lazy'; import type { TimeseriesVisParams } from '../types'; @@ -31,25 +31,22 @@ export class EditorController implements IEditorController { ) {} async render({ timeRange, uiState, filters, query }: EditorRenderProps) { - const I18nContext = getI18n().Context; const defaultIndexPattern = (await getDataViewsStart().getDefault()) || undefined; render( - - - - - , + + + , this.el ); } diff --git a/src/plugins/vis_types/timeseries/public/plugin.ts b/src/plugins/vis_types/timeseries/public/plugin.ts index 84d71cdfeddfd..432bce9c367c9 100644 --- a/src/plugins/vis_types/timeseries/public/plugin.ts +++ b/src/plugins/vis_types/timeseries/public/plugin.ts @@ -17,7 +17,6 @@ import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import type { IUiSettingsClient } from '@kbn/core/public'; import type { HttpSetup } from '@kbn/core-http-browser'; -import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { VisTypeTimeseriesPublicConfig } from '../config'; @@ -60,7 +59,6 @@ export interface TimeseriesVisDependencies extends Partial { uiSettings: IUiSettingsClient; http: HttpSetup; timefilter: TimefilterContract; - theme: ThemeServiceStart; appName: string; unifiedSearch: UnifiedSearchPublicPluginStart; notifications: CoreStart['notifications']; @@ -86,7 +84,7 @@ export class MetricsPlugin implements Plugin { expressions.registerRenderer( getTimeseriesVisRenderer({ uiSettings: core.uiSettings, - theme: core.theme, + core, }) ); setUISettings(core.uiSettings); diff --git a/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx b/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx index 065259ce8882c..52e70f59c8aeb 100644 --- a/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx +++ b/src/plugins/vis_types/timeseries/public/timeseries_vis_renderer.tsx @@ -10,13 +10,12 @@ import React, { lazy } from 'react'; import { get } from 'lodash'; import { render, unmountComponentAtNode } from 'react-dom'; import { METRIC_TYPE } from '@kbn/analytics'; -import { I18nProvider } from '@kbn/i18n-react'; -import { IUiSettingsClient, KibanaExecutionContext, ThemeServiceStart } from '@kbn/core/public'; +import { CoreSetup, IUiSettingsClient, KibanaExecutionContext } from '@kbn/core/public'; import { VisualizationContainer, PersistedState } from '@kbn/visualizations-plugin/public'; import type { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { getUsageCollectionStart } from './services'; import { TIME_RANGE_DATA_MODES } from '../common/enums'; import type { TimeseriesVisData } from '../common/types'; @@ -54,11 +53,12 @@ const extractContainerType = (context?: KibanaExecutionContext): string | undefi export const getTimeseriesVisRenderer: (deps: { uiSettings: IUiSettingsClient; - theme: ThemeServiceStart; -}) => ExpressionRenderDefinition = ({ uiSettings, theme }) => ({ + core: CoreSetup; +}) => ExpressionRenderDefinition = ({ uiSettings, core }) => ({ name: 'timeseries_vis', reuseDomNode: true, render: async (domNode, config, handlers) => { + const [startServices] = await core.getStartServices(); handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); @@ -96,30 +96,28 @@ export const getTimeseriesVisRenderer: (deps: { }; render( - - - + + - - - - , + model={model} + visData={visData as TimeseriesVisData} + syncColors={syncColors} + syncTooltips={syncTooltips} + syncCursor={syncCursor} + uiState={handlers.uiState! as PersistedState} + initialRender={renderComplete} + /> + + , domNode ); }, diff --git a/src/plugins/vis_types/timeseries/tsconfig.json b/src/plugins/vis_types/timeseries/tsconfig.json index fae5345527bce..2ac2cc6798ded 100644 --- a/src/plugins/vis_types/timeseries/tsconfig.json +++ b/src/plugins/vis_types/timeseries/tsconfig.json @@ -28,7 +28,6 @@ "@kbn/inspector-plugin", "@kbn/usage-collection-plugin", "@kbn/core-http-browser", - "@kbn/core-theme-browser", "@kbn/core-doc-links-browser", "@kbn/analytics", "@kbn/i18n-react", @@ -48,6 +47,7 @@ "@kbn/visualization-utils", "@kbn/code-editor", "@kbn/shared-ux-markdown", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/vega/public/data_model/url_parser.ts b/src/plugins/vis_types/vega/public/data_model/url_parser.ts index aa1e6c30648ec..5b863a6654294 100644 --- a/src/plugins/vis_types/vega/public/data_model/url_parser.ts +++ b/src/plugins/vis_types/vega/public/data_model/url_parser.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import $ from 'jquery'; import { i18n } from '@kbn/i18n'; import { UrlObject } from './types'; @@ -51,7 +50,11 @@ export class UrlParser { }) ); } else { - url += (url.includes('?') ? '&' : '?') + $.param(query); + const urlParams = new URLSearchParams(); + for (const [name, value] of Object.entries(query)) { + urlParams.append(name, String(value)); + } + url += (url.includes('?') ? '&' : '?') + urlParams.toString(); } obj.url = url; diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts index e7e27e0333653..236cdb3820f14 100644 --- a/src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts +++ b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts @@ -36,8 +36,8 @@ export class VegaBaseView { destroy(): Promise; resize(dimensions?: { height: number; width: number }): Promise; - _$container: any; - _$controls: any; + _container: HTMLDivElement; + _controls: HTMLDivElement; _parser: any; _vegaViewConfig: any; _serviceSettings: VegaViewParams['serviceSettings']; diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js index 387380e54e92d..3762dd226d2c7 100644 --- a/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js +++ b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import $ from 'jquery'; import moment from 'moment'; import dateMath from '@kbn/datemath'; import { scheme, loader, logger, Warn, version as vegaVersion, expressionFunction } from 'vega'; @@ -77,7 +76,7 @@ const getExternalUrlServiceError = (uri) => export class VegaBaseView { constructor(opts) { - this._$parentEl = $(opts.parentEl); + this._parentEl = opts.parentEl; this._parser = opts.vegaParser; this._serviceSettings = opts.serviceSettings; this._filterManager = opts.filterManager; @@ -85,7 +84,7 @@ export class VegaBaseView { this._timefilter = opts.timefilter; this._view = null; this._vegaViewConfig = null; - this._$messages = null; + this._messages = null; this._destroyHandlers = []; this._initialized = false; this._externalUrl = opts.externalUrl; @@ -100,11 +99,13 @@ export class VegaBaseView { try { if (this._parser.useResize) { - this._$parentEl.addClass('vgaVis--autoresize'); + this._parentEl.classList.add('vgaVis--autoresize'); } else { - this._$parentEl.removeClass('vgaVis--autoresize'); + this._parentEl.classList.remove('vgaVis--autoresize'); } - this._$parentEl.empty().addClass(`vgaVis`).css('flex-direction', this._parser.containerDir); + this._parentEl.replaceChildren(); + this._parentEl.classList.add('vgaVis'); + this._parentEl.style.flexDirection = this._parser.containerDir; // bypass the onWarn warning checks - in some cases warnings may still need to be shown despite being disabled for (const warn of this._parser.warnings) { @@ -116,23 +117,29 @@ export class VegaBaseView { return; } - this._$container = $('
').appendTo(this._$parentEl); - this._$controls = $( - `
` - ).appendTo(this._$parentEl); + this._container = document.createElement('div'); + this._container.classList.add('vgaVis__view'); + this._parentEl.append(this._container); + + this._controls = document.createElement('div'); + this._controls.classList.add( + `vgaVis__controls`, + `vgaVis__controls--${this._parser.controlsDir}` + ); + this._parentEl.append(this._controls); this._addDestroyHandler(() => { - if (this._$container) { - this._$container.remove(); - this._$container = null; + if (this._container) { + this._container.remove(); + this._container = null; } - if (this._$controls) { - this._$controls.remove(); - this._$controls = null; + if (this._controls) { + this._controls.remove(); + this._controls = null; } - if (this._$messages) { - this._$messages.remove(); - this._$messages = null; + if (this._messages) { + this._messages.remove(); + this._messages = null; } if (this._view) { const state = this._view.getState(); @@ -253,18 +260,24 @@ export class VegaBaseView { } _addMessage(type, text) { - if (!this._$messages) { - this._$messages = $(`
    `).appendTo(this._$parentEl); + if (!this._messages) { + this._messages = document.createElement('ul'); + this._messages.classList.add('vgaVis__messages'); + this._parentEl.append(this._messages); } - const isMessageAlreadyDisplayed = this._$messages - .find(`pre.vgaVis__messageCode`) - .filter((index, element) => element.textContent === text).length; + const isMessageAlreadyDisplayed = [ + ...this._messages.querySelectorAll(`:scope pre.vgaVis__messageCode`), + ].filter((index, element) => element.textContent === text).length; if (!isMessageAlreadyDisplayed) { - this._$messages.append( - $(`
  • `).append( - $(`
    `).text(text)
    -        )
    -      );
    +      const messageCodeEl = document.createElement('pre');
    +      messageCodeEl.classList.add('vgaVis__messageCode');
    +      messageCodeEl.textContent = text;
    +
    +      const messageItemEl = document.createElement('li');
    +      messageItemEl.classList.add(`vgaVis__message`, `vgaVis__message--${type}`);
    +      messageItemEl.append(messageCodeEl);
    +
    +      this._messages.append(messageItemEl);
         }
       }
     
    @@ -279,8 +292,12 @@ export class VegaBaseView {
       }
     
       updateVegaSize(view, dimensions) {
    -    const width = Math.floor(Math.max(0, dimensions?.width ?? this._$container.width()));
    -    const height = Math.floor(Math.max(0, dimensions?.height ?? this._$container.height()));
    +    const width = Math.floor(
    +      Math.max(0, dimensions?.width ?? this._container.getBoundingClientRect().width)
    +    );
    +    const height = Math.floor(
    +      Math.max(0, dimensions?.height ?? this._container.getBoundingClientRect().height)
    +    );
     
         if (view.width() !== width || view.height() !== height) {
           view.width(width).height(height);
    @@ -305,7 +322,7 @@ export class VegaBaseView {
           if (this._parser.tooltips) {
             // position and padding can be specified with
             // {config:{kibana:{tooltips: {position: 'top', padding: 15 } }}}
    -        const tthandler = new TooltipHandler(this._$container[0], view, this._parser.tooltips);
    +        const tthandler = new TooltipHandler(this._container, view, this._parser.tooltips);
     
             // Vega bug workaround - need to destroy tooltip by hand
             this._addDestroyHandler(() => tthandler.hideTooltip());
    diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts
    index a42d76681c4ff..e413b50bf870b 100644
    --- a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts
    +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts
    @@ -176,7 +176,7 @@ describe('vega_map_view/view', () => {
               layers: [],
             },
             customAttribution: 'tilemap-attribution',
    -        container: vegaMapView._$container.get(0),
    +        container: vegaMapView._container,
             minZoom: 0,
             maxZoom: 20,
             zoom: 3,
    @@ -200,7 +200,7 @@ describe('vega_map_view/view', () => {
               layers: [],
             },
             customAttribution: [''],
    -        container: vegaMapView._$container.get(0),
    +        container: vegaMapView._container,
             minZoom: 0,
             maxZoom: 20,
             zoom: 3,
    diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts
    index 7e4ca5a19dd6a..0c04fcdd732b8 100644
    --- a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts
    +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts
    @@ -136,14 +136,14 @@ export class VegaMapView extends VegaBaseView {
         }
     
         // In some cases, Vega may be initialized twice, e.g. after awaiting...
    -    if (!this._$container) return;
    +    if (!this._container) return;
     
         // For the correct geration of the PDF/PNG report, we must wait until the map is fully rendered.
         return new Promise((resolve) => {
           const mapBoxInstance = new maplibregl.Map({
             style,
             customAttribution,
    -        container: this._$container.get(0),
    +        container: this._container,
             ...this.getMapParams({ ...zoomSettings }),
           });
     
    @@ -206,7 +206,7 @@ export class VegaMapView extends VegaBaseView {
           map: mapBoxInstance,
           context: {
             vegaView,
    -        vegaControls: this._$controls?.get(0),
    +        vegaControls: this._controls,
             updateVegaView,
           },
         });
    diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_view.js b/src/plugins/vis_types/vega/public/vega_view/vega_view.js
    index a5241c9f0f0db..af03b7db08e2a 100644
    --- a/src/plugins/vis_types/vega/public/vega_view/vega_view.js
    +++ b/src/plugins/vis_types/vega/public/vega_view/vega_view.js
    @@ -12,12 +12,12 @@ import { VegaBaseView } from './vega_base_view';
     export class VegaView extends VegaBaseView {
       async _initViewCustomizations() {
         // In some cases, Vega may be initialized twice... TBD
    -    if (!this._$container) return;
    +    if (!this._container) return;
     
         const view = new View(parse(this._parser.spec, undefined, { ast: true }), this._vegaViewConfig);
     
         if (this._parser.useResize) this.updateVegaSize(view);
    -    view.initialize(this._$container.get(0), this._$controls.get(0));
    +    view.initialize(this._container, this._controls);
         // resize again to take controls into account
         if (this._parser.useResize) this.updateVegaSize(view);
     
    diff --git a/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx b/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx
    index 5615dcd811272..6c89affa20f42 100644
    --- a/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx
    +++ b/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx
    @@ -10,7 +10,7 @@ import React, { lazy } from 'react';
     import { render, unmountComponentAtNode } from 'react-dom';
     import { METRIC_TYPE } from '@kbn/analytics';
     import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common';
    -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
    +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
     import { VisualizationContainer } from '@kbn/visualizations-plugin/public';
     import { KibanaExecutionContext } from '@kbn/core-execution-context-common';
     import { VegaVisualizationDependencies } from './plugin';
    @@ -39,7 +39,7 @@ export const getVegaVisRenderer: (
     ) => ExpressionRenderDefinition = (deps) => ({
       name: 'vega_vis',
       reuseDomNode: true,
    -  render: (domNode, { visData }, handlers) => {
    +  render: async (domNode, { visData }, handlers) => {
         handlers.onDestroy(() => {
           unmountComponentAtNode(domNode);
         });
    @@ -62,8 +62,10 @@ export const getVegaVisRenderer: (
           handlers.done();
         };
     
    +    const [startServices] = await deps.core.getStartServices();
    +
         render(
    -      
    +      
             
               
             
    -      ,
    +      ,
           domNode
         );
       },
    diff --git a/src/plugins/vis_types/vega/public/vega_visualization.test.js b/src/plugins/vis_types/vega/public/vega_visualization.test.js
    index 024d935a2f356..02d9564c42c6b 100644
    --- a/src/plugins/vis_types/vega/public/vega_visualization.test.js
    +++ b/src/plugins/vis_types/vega/public/vega_visualization.test.js
    @@ -8,8 +8,6 @@
     
     import 'jest-canvas-mock';
     
    -import $ from 'jquery';
    -
     import { createVegaVisualization } from './vega_visualization';
     
     import vegaliteGraph from './test_utils/vegalite_graph.json';
    @@ -32,9 +30,8 @@ describe('VegaVisualizations', () => {
       let VegaVisualization;
       let vegaVisualizationDependencies;
     
    -  let mockWidth;
    +  let mockGetBoundingClientRect;
       let mockedWidthValue;
    -  let mockHeight;
       let mockedHeightValue;
     
       const coreStart = coreMock.createStart();
    @@ -46,8 +43,9 @@ describe('VegaVisualizations', () => {
         mockedHeightValue = height;
         domNode = document.createElement('div');
     
    -    mockWidth = jest.spyOn($.prototype, 'width').mockImplementation(() => mockedWidthValue);
    -    mockHeight = jest.spyOn($.prototype, 'height').mockImplementation(() => mockedHeightValue);
    +    mockGetBoundingClientRect = jest
    +      .spyOn(Element.prototype, 'getBoundingClientRect')
    +      .mockImplementation(() => ({ width: mockedWidthValue, height: mockedHeightValue }));
       };
     
       const mockGetServiceSettings = () => {
    @@ -78,8 +76,7 @@ describe('VegaVisualizations', () => {
         });
     
         afterEach(() => {
    -      mockWidth.mockRestore();
    -      mockHeight.mockRestore();
    +      mockGetBoundingClientRect.mockRestore();
         });
     
         test('should show vegalite graph and update on resize (may fail in dev env)', async () => {
    diff --git a/src/plugins/vis_types/vega/tsconfig.json b/src/plugins/vis_types/vega/tsconfig.json
    index 7f84ebf85e643..19caa63329abe 100644
    --- a/src/plugins/vis_types/vega/tsconfig.json
    +++ b/src/plugins/vis_types/vega/tsconfig.json
    @@ -39,6 +39,7 @@
         "@kbn/mapbox-gl",
         "@kbn/config-schema",
         "@kbn/code-editor",
    +    "@kbn/react-kibana-context-render",
       ],
       "exclude": [
         "target/**/*",
    diff --git a/src/plugins/vis_types/vislib/kibana.jsonc b/src/plugins/vis_types/vislib/kibana.jsonc
    index 1f805a33a5c98..bb1882e4d860d 100644
    --- a/src/plugins/vis_types/vislib/kibana.jsonc
    +++ b/src/plugins/vis_types/vislib/kibana.jsonc
    @@ -20,8 +20,7 @@
         "requiredBundles": [
           "kibanaUtils",
           "visTypeHeatmap",
    -      "visTypeGauge",
    -      "kibanaReact"
    +      "visTypeGauge"
         ]
       }
     }
    diff --git a/src/plugins/vis_types/vislib/public/plugin.ts b/src/plugins/vis_types/vislib/public/plugin.ts
    index 44d6bf0d6ed02..d53751f0bd6ab 100644
    --- a/src/plugins/vis_types/vislib/public/plugin.ts
    +++ b/src/plugins/vis_types/vislib/public/plugin.ts
    @@ -17,7 +17,7 @@ import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
     import { LEGACY_HEATMAP_CHARTS_LIBRARY } from '@kbn/vis-type-heatmap-plugin/common';
     import { LEGACY_GAUGE_CHARTS_LIBRARY } from '@kbn/vis-type-gauge-plugin/common';
     import { VislibPublicConfig } from '../config';
    -import { setUsageCollectionStart } from './services';
    +import { setAnalytics, setI18n, setUsageCollectionStart } from './services';
     import { heatmapVisTypeDefinition } from './heatmap';
     
     import { createVisTypeVislibVisFn } from './vis_type_vislib_vis_fn';
    @@ -88,6 +88,8 @@ export class VisTypeVislibPlugin
       ) {
         setFormatService(fieldFormats);
         setDataActions(data.actions);
    +    setAnalytics(core.analytics);
    +    setI18n(core.i18n);
         setTheme(core.theme);
         if (usageCollection) {
           setUsageCollectionStart(usageCollection);
    diff --git a/src/plugins/vis_types/vislib/public/services.ts b/src/plugins/vis_types/vislib/public/services.ts
    index 364ac718316f1..abc4ada0732c2 100644
    --- a/src/plugins/vis_types/vislib/public/services.ts
    +++ b/src/plugins/vis_types/vislib/public/services.ts
    @@ -6,7 +6,7 @@
      * Side Public License, v 1.
      */
     
    -import { ThemeServiceStart } from '@kbn/core/public';
    +import { AnalyticsServiceStart, I18nStart, ThemeServiceStart } from '@kbn/core/public';
     import { createGetterSetter } from '@kbn/kibana-utils-plugin/public';
     import { DataPublicPluginStart } from '@kbn/data-plugin/public';
     import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
    @@ -18,6 +18,9 @@ export const [getDataActions, setDataActions] =
     export const [getFormatService, setFormatService] =
       createGetterSetter('FieldFormats');
     
    +export const [getAnalytics, setAnalytics] =
    +  createGetterSetter('vislib theme service');
    +export const [getI18n, setI18n] = createGetterSetter('vislib theme service');
     export const [getTheme, setTheme] = createGetterSetter('vislib theme service');
     
     export const [getUsageCollectionStart, setUsageCollectionStart] =
    diff --git a/src/plugins/vis_types/vislib/public/vis_controller.tsx b/src/plugins/vis_types/vislib/public/vis_controller.tsx
    index cba9e7f0d71da..7a83984e292fd 100644
    --- a/src/plugins/vis_types/vislib/public/vis_controller.tsx
    +++ b/src/plugins/vis_types/vislib/public/vis_controller.tsx
    @@ -9,10 +9,11 @@
     import $ from 'jquery';
     import React, { RefObject } from 'react';
     
    -import { toMountPoint } from '@kbn/kibana-react-plugin/public';
    +import { toMountPoint } from '@kbn/react-kibana-mount';
     import { ChartsPluginSetup } from '@kbn/charts-plugin/public';
     import type { PersistedState } from '@kbn/visualizations-plugin/public';
     import { IInterpreterRenderHandlers } from '@kbn/expressions-plugin/public';
    +import { CoreStart } from '@kbn/core/public';
     import { VisTypeVislibCoreSetup } from './plugin';
     import { VisLegend, CUSTOM_LEGEND_VIS_TYPES } from './vislib/components/legend';
     import { BasicVislibParams } from './types';
    @@ -85,6 +86,7 @@ export const createVislibVisController = (
           this.vislibVis.on('brush', fireEvent);
           this.vislibVis.on('click', fireEvent);
     
    +      const [startServices] = await core.getStartServices();
           this.vislibVis.on('renderComplete', () => {
             // refreshing the legend after the chart is rendered.
             // this is necessary because some visualizations
    @@ -94,7 +96,13 @@ export const createVislibVisController = (
               CUSTOM_LEGEND_VIS_TYPES.includes(this.vislibVis.visConfigArgs.type)
             ) {
               this.unmountLegend?.();
    -          this.mountLegend(esResponse, visParams, fireEvent, uiState as PersistedState);
    +          this.mountLegend(
    +            startServices,
    +            esResponse,
    +            visParams,
    +            fireEvent,
    +            uiState as PersistedState
    +          );
             }
     
             renderComplete?.();
    @@ -109,18 +117,25 @@ export const createVislibVisController = (
     
           if (this.showLegend(visParams)) {
             $(this.container)
    -          .attr('class', (i, cls) => {
    +          .attr('class', (_i, cls) => {
                 return cls.replace(/vislib--legend-\S+/g, '');
               })
               .addClass((legendClassName as any)[visParams.legendPosition]);
     
    -        this.mountLegend(esResponse, visParams, fireEvent, uiState as PersistedState);
    +        this.mountLegend(
    +          startServices,
    +          esResponse,
    +          visParams,
    +          fireEvent,
    +          uiState as PersistedState
    +        );
           }
     
           this.vislibVis.render(esResponse, uiState);
         }
     
         mountLegend(
    +      startServices: Pick,
           visData: unknown,
           visParams: BasicVislibParams,
           fireEvent: IInterpreterRenderHandlers['event'],
    @@ -136,7 +151,8 @@ export const createVislibVisController = (
               fireEvent={fireEvent}
               addLegend={this.showLegend(visParams)}
               position={legendPosition}
    -        />
    +        />,
    +        startServices
           )(this.legendEl);
         }
     
    diff --git a/src/plugins/vis_types/vislib/public/vis_renderer.tsx b/src/plugins/vis_types/vislib/public/vis_renderer.tsx
    index d96e5508a5be3..e2297afeeb3e7 100644
    --- a/src/plugins/vis_types/vislib/public/vis_renderer.tsx
    +++ b/src/plugins/vis_types/vislib/public/vis_renderer.tsx
    @@ -9,7 +9,7 @@
     import React, { lazy } from 'react';
     import { render, unmountComponentAtNode } from 'react-dom';
     
    -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
    +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
     import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/public';
     import { VisualizationContainer } from '@kbn/visualizations-plugin/public';
     import { ChartsPluginSetup } from '@kbn/charts-plugin/public';
    @@ -39,16 +39,17 @@ export const getVislibVisRenderer: (
       displayName: 'Vislib visualization',
       reuseDomNode: true,
       render: async (domNode, config, handlers) => {
    +    const [startServices] = await core.getStartServices();
         const showNoResult = shouldShowNoResultsMessage(config.visData, config.visType);
     
         handlers.onDestroy(() => unmountComponentAtNode(domNode));
     
         render(
    -      
    +      
             
               
             
    -      ,
    +      ,
           domNode
         );
       },
    diff --git a/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx b/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
    index 083af7aabb957..107dc8f17236b 100644
    --- a/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
    +++ b/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
    @@ -9,8 +9,8 @@
     import React from 'react';
     import ReactDOM from 'react-dom/server';
     import { EuiIcon } from '@elastic/eui';
    -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
    -import { getTheme } from '../../services';
    +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
    +import { getAnalytics, getI18n, getTheme } from '../../services';
     
     interface Props {
       wholeBucket: boolean;
    @@ -18,7 +18,7 @@ interface Props {
     
     export const touchdownTemplate = ({ wholeBucket }: Props) => {
       return ReactDOM.renderToStaticMarkup(
    -    
    +    
           

    @@ -26,6 +26,6 @@ export const touchdownTemplate = ({ wholeBucket }: Props) => { time range does not fully cover it.

    -
    + ); }; diff --git a/src/plugins/vis_types/vislib/tsconfig.json b/src/plugins/vis_types/vislib/tsconfig.json index ea14ef572a404..9cbe0dce7e68f 100644 --- a/src/plugins/vis_types/vislib/tsconfig.json +++ b/src/plugins/vis_types/vislib/tsconfig.json @@ -25,7 +25,6 @@ "@kbn/vis-default-editor-plugin", "@kbn/field-formats-plugin", "@kbn/usage-collection-plugin", - "@kbn/kibana-react-plugin", "@kbn/utility-types", "@kbn/i18n", "@kbn/core-execution-context-common", @@ -37,6 +36,8 @@ "@kbn/std", "@kbn/ui-theme", "@kbn/config-schema", + "@kbn/react-kibana-mount", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.test.ts b/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.test.ts index a4f404d182c40..b626958b38435 100644 --- a/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.test.ts +++ b/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.test.ts @@ -149,7 +149,6 @@ describe('getConfiguration', () => { }, tickLabelsVisibilitySettings: { x: true, yLeft: true, yRight: true }, valueLabels: 'hide', - valuesInLegend: false, xTitle: undefined, yLeftExtent: { enforce: true, lowerBound: undefined, mode: 'full', upperBound: undefined }, yLeftScale: 'linear', diff --git a/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.ts b/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.ts index 0c6f3b04131c0..f31acc904829a 100644 --- a/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.ts +++ b/src/plugins/vis_types/xy/public/convert_to_lens/configurations/index.ts @@ -15,6 +15,7 @@ import { XYReferenceLineLayerConfig, } from '@kbn/visualizations-plugin/common/convert_to_lens'; import { Vis } from '@kbn/visualizations-plugin/public'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { Layer } from '..'; import { ChartType } from '../../../common'; import { @@ -235,6 +236,9 @@ export const getConfiguration = ( shouldTruncate: vis.params.truncateLegend ?? vis.type.visConfig.defaults.truncateLegend, maxLines: vis.params.maxLegendLines ?? vis.type.visConfig.defaults.maxLegendLines, showSingleSeries: true, + legendStats: Boolean(vis.params.labels.show ?? vis.type.visConfig.defaults.labels?.show) + ? [LegendStats.values] + : undefined, }, fittingFunction: fittingFunction ? fittingFunction[0].toUpperCase() + fittingFunction.slice(1) @@ -269,7 +273,6 @@ export const getConfiguration = ( xTitle: xAxis.title.text, valueLabels: vis.params.labels.show ?? vis.type.visConfig.defaults.labels?.show ? 'show' : 'hide', - valuesInLegend: Boolean(vis.params.labels.show ?? vis.type.visConfig.defaults.labels?.show), showCurrentTimeMarker: isTimeChart ? Boolean(vis.params.addTimeMarker ?? vis.type.visConfig.defaults.addTimeMarker) : undefined, diff --git a/src/plugins/vis_types/xy/public/to_ast.ts b/src/plugins/vis_types/xy/public/to_ast.ts index b584fbac26bba..7fcf110ed6a6e 100644 --- a/src/plugins/vis_types/xy/public/to_ast.ts +++ b/src/plugins/vis_types/xy/public/to_ast.ts @@ -20,6 +20,7 @@ import { buildExpression, buildExpressionFunction } from '@kbn/expressions-plugi import { BUCKET_TYPES } from '@kbn/data-plugin/public'; import type { TimeRangeBounds } from '@kbn/data-plugin/common'; import type { PaletteOutput } from '@kbn/charts-plugin/common/expressions/palette/types'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { Dimensions, Dimension, @@ -47,6 +48,7 @@ const prepareLengend = (params: VisParams, legendSize?: LegendSize) => { shouldTruncate: params.truncateLegend, showSingleSeries: true, legendSize, + legendStats: params.labels.show ? [LegendStats.values] : undefined, }); return buildExpression([legend]); @@ -434,7 +436,6 @@ export const toExpressionAst: VisToExpressionAst = async (vis, params splitColumnAccessor: dimensions.splitColumn?.map(prepareVisDimension), splitRowAccessor: dimensions.splitRow?.map(prepareVisDimension), valueLabels: vis.params.labels.show ? 'show' : 'hide', - valuesInLegend: vis.params.labels.show, singleTable: true, }); diff --git a/src/plugins/visualizations/common/constants.ts b/src/plugins/visualizations/common/constants.ts index 7b6e18708f3f9..8c35acf9513df 100644 --- a/src/plugins/visualizations/common/constants.ts +++ b/src/plugins/visualizations/common/constants.ts @@ -51,3 +51,7 @@ export const SUPPORTED_AGGREGATIONS = [ ...Object.values(METRIC_TYPES), ...Object.values(BUCKET_TYPES), ] as const; + +export enum LegendStats { + values = 'values', +} diff --git a/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts b/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts index f4974cbd40b68..2a387f5eb35d3 100644 --- a/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts +++ b/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts @@ -10,7 +10,7 @@ import { HorizontalAlignment, LayoutDirection, Position, VerticalAlignment } fro import { $Values } from '@kbn/utility-types'; import type { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; import { KibanaQueryOutput } from '@kbn/data-plugin/common'; -import { LegendSize } from '../../constants'; +import { LegendSize, LegendStats } from '../../constants'; import { CategoryDisplayTypes, PartitionChartTypes, @@ -142,6 +142,7 @@ export interface LegendConfig { maxLines?: number; shouldTruncate?: boolean; legendSize?: LegendSize; + legendStats?: LegendStats[]; } export interface XYConfiguration { @@ -168,7 +169,6 @@ export interface XYConfiguration { fillOpacity?: number; minBarHeight?: number; hideEndzones?: boolean; - valuesInLegend?: boolean; showCurrentTimeMarker?: boolean; } @@ -238,7 +238,7 @@ export interface PartitionLayerState { categoryDisplay: CategoryDisplayType; legendDisplay: LegendDisplayType; legendPosition?: Position; - showValuesInLegend?: boolean; + legendStats?: LegendStats[]; nestedLegend?: boolean; percentDecimals?: number; emptySizeRatio?: number; diff --git a/src/plugins/visualizations/common/index.ts b/src/plugins/visualizations/common/index.ts index 90ea3f6dca0a1..50d3030828e7c 100644 --- a/src/plugins/visualizations/common/index.ts +++ b/src/plugins/visualizations/common/index.ts @@ -16,4 +16,4 @@ export * from './expression_functions'; export * from './convert_to_lens'; export { convertToSchemaConfig } from './vis_schemas'; -export { LegendSize, LegendSizeToPixels, DEFAULT_LEGEND_SIZE } from './constants'; +export { LegendSize, LegendSizeToPixels, DEFAULT_LEGEND_SIZE, LegendStats } from './constants'; diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx index 6f7b08ab3f78f..be006bd1dd438 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx @@ -15,7 +15,7 @@ import { EuiLoadingChart } from '@elastic/eui'; import { Filter, onlyDisabledFiltersChanged, Query, TimeRange } from '@kbn/es-query'; import type { KibanaExecutionContext, SavedObjectAttributes } from '@kbn/core/public'; import type { ErrorLike } from '@kbn/expressions-plugin/common'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { TimefilterContract } from '@kbn/data-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; import { Warnings } from '@kbn/charts-plugin/public'; @@ -46,13 +46,7 @@ import { VisualizationMissedSavedObjectError } from '../components/visualization import VisualizationError from '../components/visualization_error'; import { VISUALIZE_EMBEDDABLE_TYPE } from './constants'; import { SerializedVis, Vis } from '../vis'; -import { - getApplication, - getExecutionContext, - getExpressions, - getTheme, - getUiActions, -} from '../services'; +import { getApplication, getExecutionContext, getExpressions, getUiActions } from '../services'; import { VIS_EVENT_TO_TRIGGER } from './events'; import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory'; import { getSavedVisualization } from '../utils/saved_visualize_utils'; @@ -447,13 +441,14 @@ export class VisualizeEmbeddable this.domNode = div; super.render(this.domNode); + const { core } = this.deps.start(); render( - +
    -
    , + , this.domNode ); @@ -621,7 +616,7 @@ export class VisualizeEmbeddable } if (this.handler && !abortController.signal.aborted) { - await this.handler.update(this.expression, expressionParams); + this.handler.update(this.expression, expressionParams); } } @@ -667,12 +662,14 @@ export class VisualizeEmbeddable }; getInputAsRefType = async (): Promise => { - const { data, spaces, savedObjectsTaggingOss } = await this.deps.start().plugins; + const { plugins, core } = this.deps.start(); + const { data, spaces, savedObjectsTaggingOss } = plugins; const savedVis = await getSavedVisualization({ search: data.search, dataViews: data.dataViews, spaces, savedObjectsTagging: savedObjectsTaggingOss?.getTaggingApi(), + ...core, }); if (!savedVis) { throw new Error('Error creating a saved vis object'); diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx index 0aef85a6ec575..abaee498da2ec 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx @@ -128,12 +128,12 @@ export class VisualizeEmbeddableFactory } public async getCurrentAppId() { - return await this.deps.start().core.application.currentAppId$.pipe(first()).toPromise(); + return this.deps.start().core.application.currentAppId$.pipe(first()).toPromise(); } private async getAttributeService() { if (!this.attributeService) { - this.attributeService = await this.deps + this.attributeService = this.deps .start() .plugins.embeddable.getAttributeService< VisualizeSavedObjectAttributes, @@ -152,7 +152,7 @@ export class VisualizeEmbeddableFactory input: Partial & { id: string }, parent?: IContainer ): Promise { - const startDeps = await this.deps.start(); + const startDeps = this.deps.start(); try { const savedObject = await getSavedVisualization( @@ -161,6 +161,7 @@ export class VisualizeEmbeddableFactory dataViews: startDeps.plugins.data.dataViews, spaces: startDeps.plugins.spaces, savedObjectsTagging: startDeps.plugins.savedObjectsTaggingOss?.getTaggingApi(), + ...startDeps.core, }, savedObjectId ); @@ -239,10 +240,10 @@ export class VisualizeEmbeddableFactory if (visObj) { savedVis.uiStateJSON = visObj?.uiState.toString(); } - const { core, plugins } = await this.deps.start(); + const { core, plugins } = this.deps.start(); const id = await saveVisualization(savedVis, saveOptions, { - overlays: core.overlays, savedObjectsTagging: plugins.savedObjectsTaggingOss?.getTaggingApi(), + ...core, }); if (!id || id === '') { throw new Error( @@ -259,7 +260,7 @@ export class VisualizeEmbeddableFactory } public async checkTitle(props: OnSaveProps): Promise { - const overlays = await this.deps.start().core.overlays; + const { core } = this.deps.start(); return checkForDuplicateTitle( { @@ -270,9 +271,7 @@ export class VisualizeEmbeddableFactory false, props.isTitleDuplicateConfirmed, props.onTitleDuplicate, - { - overlays, - } + core ); } diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 120ef09047b3e..814f55e712e6f 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -105,6 +105,8 @@ import { setEmbeddable, setDocLinks, setSpaces, + setAnalytics, + setI18n, setTheme, setExecutionContext, setFieldFormats, @@ -386,6 +388,7 @@ export class VisualizationsPlugin } setUISettings(core.uiSettings); + setAnalytics(core.analytics); setTheme(core.theme); expressions.registerFunction(rangeExpressionFunction); @@ -464,6 +467,7 @@ export class VisualizationsPlugin ): VisualizationsStart { const types = this.types.start(); setTypes(types); + setI18n(core.i18n); setEmbeddable(embeddable); setApplication(core.application); setCapabilities(core.application.capabilities); diff --git a/src/plugins/visualizations/public/services.ts b/src/plugins/visualizations/public/services.ts index fd4817c0031e7..446ac602365c7 100644 --- a/src/plugins/visualizations/public/services.ts +++ b/src/plugins/visualizations/public/services.ts @@ -18,6 +18,8 @@ import type { DocLinksStart, ThemeServiceStart, ExecutionContextSetup, + AnalyticsServiceStart, + I18nStart, } from '@kbn/core/public'; import type { ContentManagementPublicStart } from '@kbn/content-management-plugin/public'; import type { DataPublicPluginStart, TimefilterContract } from '@kbn/data-plugin/public'; @@ -34,6 +36,8 @@ import type { TypesStart } from './vis_types'; export const [getUISettings, setUISettings] = createGetterSetter('UISettings'); +export const [getAnalytics, setAnalytics] = createGetterSetter('Analytics'); +export const [getI18n, setI18n] = createGetterSetter('I18n'); export const [getTheme, setTheme] = createGetterSetter('Theme'); export const [getCapabilities, setCapabilities] = createGetterSetter('Capabilities'); diff --git a/src/plugins/visualizations/public/types.ts b/src/plugins/visualizations/public/types.ts index 29c8ca2e1b826..add786617208a 100644 --- a/src/plugins/visualizations/public/types.ts +++ b/src/plugins/visualizations/public/types.ts @@ -6,7 +6,11 @@ * Side Public License, v 1. */ -import type { SavedObjectsMigrationVersion, ResolvedSimpleSavedObject } from '@kbn/core/public'; +import type { + CoreStart, + SavedObjectsMigrationVersion, + ResolvedSimpleSavedObject, +} from '@kbn/core/public'; import { IAggConfigs, SerializedSearchSourceFields, @@ -21,6 +25,16 @@ import type { Vis } from './vis'; import type { PersistedState } from './persisted_state'; import type { VisParams, SerializedVis } from '../common'; +export type StartServices = Pick< + CoreStart, + // used extensively in visualizations + | 'overlays' + // used for react rendering utilities + | 'analytics' + | 'i18n' + | 'theme' +>; + export type { Vis, SerializedVis, VisParams }; export interface SavedVisState { title: string; diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts b/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts index c0d4a688027fc..26fd6cd4611f3 100644 --- a/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts +++ b/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -import type { OverlayStart } from '@kbn/core/public'; -import type { VisSavedObject } from '../../types'; +import type { StartServices, VisSavedObject } from '../../types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; import { findObjectByTitle } from './find_object_by_title'; import { displayDuplicateTitleConfirmModal } from './display_duplicate_title_confirm_modal'; @@ -26,11 +25,8 @@ export async function checkForDuplicateTitle( copyOnSave: boolean, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: (() => void) | undefined, - services: { - overlays: OverlayStart; - } + services: StartServices ): Promise { - const { overlays } = services; // Don't check for duplicates if user has already confirmed save with duplicate title if (isTitleDuplicateConfirmed) { return true; @@ -55,5 +51,5 @@ export async function checkForDuplicateTitle( // TODO: make onTitleDuplicate a required prop and remove UI components from this class // Need to leave here until all users pass onTitleDuplicate. - return displayDuplicateTitleConfirmModal(savedObject, overlays); + return displayDuplicateTitleConfirmModal(savedObject, services); } diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx b/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx index 4e8bc7b9e7228..071c5504d06f7 100644 --- a/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx +++ b/src/plugins/visualizations/public/utils/saved_objects_utils/confirm_modal_promise.tsx @@ -8,22 +8,22 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import type { OverlayStart } from '@kbn/core/public'; import { EuiConfirmModal } from '@elastic/eui'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { StartServices } from '../../types'; export function confirmModalPromise( message = '', title = '', confirmBtnText = '', - overlays: OverlayStart + startServices: StartServices ): Promise { return new Promise((resolve, reject) => { const cancelButtonText = i18n.translate('visualizations.confirmModal.cancelButtonLabel', { defaultMessage: 'Cancel', }); - const modal = overlays.openModal( + const modal = startServices.overlays.openModal( toMountPoint( { @@ -39,7 +39,8 @@ export function confirmModalPromise( title={title} > {message} - + , + startServices ) ); }); diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts b/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts index 572f0b7c8127a..6e98eb96a16c2 100644 --- a/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts +++ b/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts @@ -7,14 +7,13 @@ */ import { i18n } from '@kbn/i18n'; -import type { OverlayStart } from '@kbn/core/public'; -import type { VisSavedObject } from '../../types'; +import type { StartServices, VisSavedObject } from '../../types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; import { confirmModalPromise } from './confirm_modal_promise'; export function displayDuplicateTitleConfirmModal( savedObject: Pick, - overlays: OverlayStart + startServices: StartServices ): Promise { const confirmTitle = i18n.translate( 'visualizations.confirmModal.saveDuplicateConfirmationTitle', @@ -36,7 +35,7 @@ export function displayDuplicateTitleConfirmModal( }); try { - return confirmModalPromise(confirmMessage, confirmTitle, confirmButtonText, overlays); + return confirmModalPromise(confirmMessage, confirmTitle, confirmButtonText, startServices); } catch { return Promise.reject(new Error(SAVE_DUPLICATE_REJECTED)); } diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.test.ts b/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.test.ts index b2b2bb2dd2f93..f7021f2a3e192 100644 --- a/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.test.ts +++ b/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.test.ts @@ -6,13 +6,15 @@ * Side Public License, v 1. */ -import type { SavedObjectsCreateOptions, OverlayStart } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import type { SavedObjectsCreateOptions } from '@kbn/core/public'; import { saveWithConfirmation } from './save_with_confirmation'; import { VisSavedObject } from '../../types'; import * as deps from './confirm_modal_promise'; import { OVERWRITE_REJECTED } from './constants'; import { VisualizationSavedObjectAttributes } from '../../../common'; +const coreStart = coreMock.createStart(); const mockFindContent = jest.fn(() => ({ pagination: { total: 0 }, hits: [], @@ -39,7 +41,7 @@ const mockGetContent = jest.fn(() => ({ alias_target_id: null, }, })); -const mockCreateContent = jest.fn(async (input: any) => ({ +const mockCreateContent = jest.fn(async (_input: any) => ({ item: { id: 'test', }, @@ -63,7 +65,6 @@ jest.mock('../../services', () => ({ })); describe('saveWithConfirmation', () => { - const overlays: OverlayStart = {} as OverlayStart; const source: VisualizationSavedObjectAttributes = {} as VisualizationSavedObjectAttributes; const options: SavedObjectsCreateOptions = {} as SavedObjectsCreateOptions; const savedObject = { @@ -78,7 +79,7 @@ describe('saveWithConfirmation', () => { }); test('should call create of savedObjectsClient', async () => { - await saveWithConfirmation(source, savedObject, options, { overlays }); + await saveWithConfirmation(source, savedObject, options, coreStart); expect(mockCreateContent).toHaveBeenCalledWith({ contentTypeId: savedObject.getEsType(), data: source, @@ -93,12 +94,12 @@ describe('saveWithConfirmation', () => { : Promise.reject({ res: { status: 409 } }) ); - await saveWithConfirmation(source, savedObject, options, { overlays }); + await saveWithConfirmation(source, savedObject, options, coreStart); expect(deps.confirmModalPromise).toHaveBeenCalledWith( expect.any(String), expect.any(String), expect.any(String), - overlays + expect.objectContaining(coreStart) ); }); @@ -109,7 +110,7 @@ describe('saveWithConfirmation', () => { : Promise.reject({ res: { status: 409 } }) ); - await saveWithConfirmation(source, savedObject, options, { overlays }); + await saveWithConfirmation(source, savedObject, options, coreStart); expect(mockCreateContent).toHaveBeenLastCalledWith({ contentTypeId: savedObject.getEsType(), data: source, @@ -125,10 +126,8 @@ describe('saveWithConfirmation', () => { jest.spyOn(deps, 'confirmModalPromise').mockReturnValue(Promise.reject()); expect.assertions(1); - await expect( - saveWithConfirmation(source, savedObject, options, { - overlays, - }) - ).rejects.toThrow(OVERWRITE_REJECTED); + await expect(saveWithConfirmation(source, savedObject, options, coreStart)).rejects.toThrow( + OVERWRITE_REJECTED + ); }); }); diff --git a/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts b/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts index da2cae083d051..55cea2a79b37c 100644 --- a/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts +++ b/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts @@ -8,10 +8,10 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import type { SavedObjectsCreateOptions, OverlayStart } from '@kbn/core/public'; +import type { SavedObjectsCreateOptions } from '@kbn/core/public'; import { OVERWRITE_REJECTED } from './constants'; import { confirmModalPromise } from './confirm_modal_promise'; -import type { VisSavedObject } from '../../types'; +import type { StartServices, VisSavedObject } from '../../types'; import { visualizationsClient } from '../../content_management'; import { VisualizationSavedObjectAttributes, VisualizationSavedObject } from '../../../common'; @@ -32,9 +32,8 @@ export async function saveWithConfirmation( source: VisualizationSavedObjectAttributes, savedObject: Pick, options: SavedObjectsCreateOptions, - services: { overlays: OverlayStart } + services: StartServices ): Promise<{ item: VisualizationSavedObject }> { - const { overlays } = services; try { return await visualizationsClient.create({ data: source, options }); } catch (err) { @@ -56,7 +55,7 @@ export async function saveWithConfirmation( defaultMessage: 'Overwrite', }); - return confirmModalPromise(confirmMessage, title, confirmButtonText, overlays) + return confirmModalPromise(confirmMessage, title, confirmButtonText, services) .then(() => visualizationsClient.create({ data: source, diff --git a/src/plugins/visualizations/public/utils/saved_visualize_utils.test.ts b/src/plugins/visualizations/public/utils/saved_visualize_utils.test.ts index 54de776faa624..5cde526031098 100644 --- a/src/plugins/visualizations/public/utils/saved_visualize_utils.test.ts +++ b/src/plugins/visualizations/public/utils/saved_visualize_utils.test.ts @@ -80,7 +80,7 @@ jest.mock('../services', () => ({ const mockParseSearchSourceJSON = jest.fn(); const mockInjectSearchSourceReferences = jest.fn(); -const mockExtractSearchSourceReferences = jest.fn((...args) => [{}, []]); +const mockExtractSearchSourceReferences = jest.fn((..._args) => [{}, []]); jest.mock('@kbn/data-plugin/public', () => ({ extractSearchSourceReferences: jest.fn((...args) => mockExtractSearchSourceReferences(...args)), @@ -110,7 +110,7 @@ jest.mock('./saved_objects_utils/save_with_confirmation', () => ({ })); describe('saved_visualize_utils', () => { - const { overlays } = coreMock.createStart(); + const coreStart = coreMock.createStart(); const { dataViews, search } = dataPluginMock.createStartContract(); describe('getSavedVisualization', () => { @@ -121,6 +121,7 @@ describe('saved_visualize_utils', () => { }); it('should return object with defaults if was not provided id', async () => { const savedVis = await getSavedVisualization({ + ...coreStart, search, dataViews, spaces: Promise.resolve({ @@ -137,6 +138,7 @@ describe('saved_visualize_utils', () => { it('should create search source if saved object has searchSourceJSON', async () => { await getSavedVisualization( { + ...coreStart, search, dataViews, spaces: Promise.resolve({ @@ -155,6 +157,7 @@ describe('saved_visualize_utils', () => { it('should inject references if saved object has references', async () => { await getSavedVisualization( { + ...coreStart, search, dataViews, spaces: Promise.resolve({ @@ -177,6 +180,7 @@ describe('saved_visualize_utils', () => { const mockGetTagIdsFromReferences = jest.fn(() => ['test']); await getSavedVisualization( { + ...coreStart, search, dataViews, spaces: Promise.resolve({ @@ -220,7 +224,7 @@ describe('saved_visualize_utils', () => { }); it('should return id after save', async () => { - const savedVisId = await saveVisualization(vis, {}, { overlays }); + const savedVisId = await saveVisualization(vis, {}, coreStart); expect(mockCreateContent).toHaveBeenCalled(); expect(mockExtractReferences).toHaveBeenCalled(); expect(savedVisId).toBe('test'); @@ -228,7 +232,7 @@ describe('saved_visualize_utils', () => { it('should call extractSearchSourceReferences if we new vis has searchSourceFields', async () => { vis.searchSourceFields = { fields: [] }; - await saveVisualization(vis, {}, { overlays }); + await saveVisualization(vis, {}, coreStart); expect(mockExtractSearchSourceReferences).toHaveBeenCalledWith(vis.searchSourceFields); }); @@ -236,7 +240,7 @@ describe('saved_visualize_utils', () => { vis.searchSource = { serialize: jest.fn(() => ({ searchSourceJSON: '{}', references: [] })), } as unknown as ISearchSource; - await saveVisualization(vis, {}, { overlays }); + await saveVisualization(vis, {}, coreStart); expect(vis.searchSource?.serialize).toHaveBeenCalled(); }); @@ -246,7 +250,7 @@ describe('saved_visualize_utils', () => { vis, {}, { - overlays, + ...coreStart, savedObjectsTagging: { ui: { updateTagsReferences: mockUpdateTagsReferences, @@ -259,7 +263,7 @@ describe('saved_visualize_utils', () => { describe('confirmOverwrite', () => { it('as false we should not call saveWithConfirmation and just do create', async () => { - const savedVisId = await saveVisualization(vis, { confirmOverwrite: false }, { overlays }); + const savedVisId = await saveVisualization(vis, { confirmOverwrite: false }, coreStart); expect(mockCreateContent).toHaveBeenCalled(); expect(mockExtractReferences).toHaveBeenCalled(); expect(mockSaveWithConfirmation).not.toHaveBeenCalled(); @@ -267,7 +271,7 @@ describe('saved_visualize_utils', () => { }); it('as true we should call saveWithConfirmation', async () => { - const savedVisId = await saveVisualization(vis, { confirmOverwrite: true }, { overlays }); + const savedVisId = await saveVisualization(vis, { confirmOverwrite: true }, coreStart); expect(mockCreateContent).not.toHaveBeenCalled(); expect(mockSaveWithConfirmation).toHaveBeenCalled(); expect(savedVisId).toBe('test-after-confirm'); @@ -278,11 +282,7 @@ describe('saved_visualize_utils', () => { it('as false we should not save vis with duplicated title', async () => { isTitleDuplicateConfirmed = false; try { - const savedVisId = await saveVisualization( - vis, - { isTitleDuplicateConfirmed }, - { overlays } - ); + const savedVisId = await saveVisualization(vis, { isTitleDuplicateConfirmed }, coreStart); expect(savedVisId).toBe(''); } catch { // ignore @@ -295,11 +295,7 @@ describe('saved_visualize_utils', () => { it('as true we should save vis with duplicated title', async () => { isTitleDuplicateConfirmed = true; - const savedVisId = await saveVisualization( - vis, - { isTitleDuplicateConfirmed }, - { overlays } - ); + const savedVisId = await saveVisualization(vis, { isTitleDuplicateConfirmed }, coreStart); expect(mockCheckForDuplicateTitle).toHaveBeenCalled(); expect(mockCreateContent).toHaveBeenCalled(); expect(savedVisId).toBe('test'); diff --git a/src/plugins/visualizations/public/utils/saved_visualize_utils.ts b/src/plugins/visualizations/public/utils/saved_visualize_utils.ts index b8fc2c3f1032a..f8a47ba1efa66 100644 --- a/src/plugins/visualizations/public/utils/saved_visualize_utils.ts +++ b/src/plugins/visualizations/public/utils/saved_visualize_utils.ts @@ -7,7 +7,7 @@ */ import _ from 'lodash'; -import type { OverlayStart, SavedObjectAttributes, SavedObjectReference } from '@kbn/core/public'; +import type { SavedObjectAttributes, SavedObjectReference } from '@kbn/core/public'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; import { extractSearchSourceReferences, @@ -26,6 +26,7 @@ import type { ISavedVis, SaveVisOptions, GetVisOptions, + StartServices, } from '../types'; import type { TypesStart, BaseVisType } from '../vis_types'; // @ts-ignore @@ -211,7 +212,7 @@ export async function findListItems( } export async function getSavedVisualization( - services: { + services: StartServices & { search: DataPublicPluginStart['search']; dataViews: DataPublicPluginStart['dataViews']; spaces?: SpacesPluginStart; @@ -305,7 +306,7 @@ export async function getSavedVisualization( savedObject.tags = services.savedObjectsTagging.ui.getTagIdsFromReferences(resp.references); } - savedObject.visState = await updateOldState(savedObject.visState); + savedObject.visState = updateOldState(savedObject.visState); return savedObject; } @@ -318,8 +319,7 @@ export async function saveVisualization( onTitleDuplicate, copyOnSave = false, }: SaveVisOptions, - services: { - overlays: OverlayStart; + services: StartServices & { savedObjectsTagging?: SavedObjectsTaggingApi; } ) { 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 1bd4a14c2e7da..ea44ab431a3f7 100644 --- a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx +++ b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx @@ -104,10 +104,10 @@ const useTableListViewProps = ( history, savedObjects, savedObjectsTagging, - overlays, toastNotifications, visualizeCapabilities, contentManagement, + ...startServices }, } = useKibana(); @@ -182,15 +182,15 @@ const useTableListViewProps = ( tags: args.tags, }, { - overlays, savedObjectsTagging, typesService: getTypes(), contentManagement, + ...startServices, } ); } }, - [overlays, savedObjectsTagging, contentManagement] + [savedObjectsTagging, contentManagement, startServices] ); const contentEditorValidators: OpenContentEditorParams['customValidators'] = useMemo( @@ -213,7 +213,7 @@ const useTableListViewProps = ( false, false, () => {}, - { overlays } + startServices ); } catch (e) { return i18n.translate( @@ -232,7 +232,7 @@ const useTableListViewProps = ( }, ], }), - [overlays] + [startServices] ); const deleteItems = useCallback( diff --git a/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx b/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx index 7fd668594b014..5ce6c5777430a 100644 --- a/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx +++ b/src/plugins/visualizations/public/visualize_app/components/visualize_no_match.tsx @@ -11,7 +11,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; -import { useKibana, toMountPoint, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { VisualizeServices } from '../types'; import { VisualizeConstants } from '../../../common/constants'; @@ -35,23 +36,22 @@ export const VisualizeNoMatch = () => { bannerId = services.overlays.banners.replace( bannerId, toMountPoint( - - -

    - - {services.history.location.pathname} - - ), - }} - /> -

    -
    -
    + +

    + + {services.history.location.pathname} + + ), + }} + /> +

    +
    , + services.core ) ); diff --git a/src/plugins/visualizations/public/visualize_app/index.tsx b/src/plugins/visualizations/public/visualize_app/index.tsx index ed50345208ef0..ad6b4396bed0e 100644 --- a/src/plugins/visualizations/public/visualize_app/index.tsx +++ b/src/plugins/visualizations/public/visualize_app/index.tsx @@ -11,11 +11,8 @@ import ReactDOM from 'react-dom'; import { Router } from '@kbn/shared-ux-router'; import { AppMountParameters } from '@kbn/core/public'; -import { - KibanaContextProvider, - KibanaThemeProvider, - toMountPoint, -} from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider, toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { FormattedRelative } from '@kbn/i18n-react'; import { TableListViewKibanaProvider } from '@kbn/content-management-table-list-view-table'; import { VisualizeApp } from './app'; @@ -34,26 +31,24 @@ export const renderApp = ( } const app = ( - + - - - - - + + + - + ); ReactDOM.render(app, element); 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 bd28304b4a3bb..ec6cd8d4589e0 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 @@ -106,18 +106,17 @@ export const getTopNavConfig = ( data, application, chrome, - overlays, history, share, setActiveUrl, toastNotifications, visualizeCapabilities, dashboardCapabilities, - i18n: { Context: I18nContext }, savedObjectsTagging, presentationUtil, getKibanaVersion, serverless, + ...startServices }: VisualizeServices ) => { const { vis, embeddableHandler } = visInstance; @@ -144,8 +143,8 @@ export const getTopNavConfig = ( try { const id = await saveVisualization(savedVis, saveOptions, { - overlays, savedObjectsTagging, + ...startServices, }); if (id) { diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts b/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts index 443d83541640a..9b3c929e54c69 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts +++ b/src/plugins/visualizations/public/visualize_app/utils/get_visualization_instance.ts @@ -70,7 +70,7 @@ export const getVisualizationInstanceFromInput = async ( visualizeServices: VisualizeServices, input: VisualizeInput ) => { - const { data, spaces, savedObjectsTagging } = visualizeServices; + const { data, spaces, savedObjectsTagging, ...startServices } = visualizeServices; const visState = input.savedVis as SerializedVis; /** @@ -79,9 +79,9 @@ export const getVisualizationInstanceFromInput = async ( */ const savedVis: VisSavedObject = await getSavedVisualization({ search: data.search, - dataViews: data.dataViews, spaces, savedObjectsTagging, + ...startServices, }); if (visState.uiState && Object.keys(visState.uiState).length !== 0) { @@ -121,14 +121,14 @@ export const getVisualizationInstance = async ( */ opts?: Record | string ): Promise => { - const { data, spaces, savedObjectsTagging } = visualizeServices; + const { data, spaces, savedObjectsTagging, ...startServices } = visualizeServices; const savedVis: VisSavedObject = await getSavedVisualization( { search: data.search, - dataViews: data.dataViews, spaces, savedObjectsTagging, + ...startServices, }, opts ); diff --git a/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx b/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx index e78216282c8d2..e7b26fb42b8d0 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx +++ b/src/plugins/visualizations/public/visualize_app/utils/use/use_visualize_app_state.tsx @@ -13,7 +13,7 @@ import { EventEmitter } from 'events'; import { i18n } from '@kbn/i18n'; import { FilterStateStore } from '@kbn/es-query'; -import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { Markdown } from '@kbn/shared-ux-markdown'; import { connectToQueryState } from '@kbn/data-plugin/public'; import { migrateLegacyQuery } from '../migrate_legacy_query'; @@ -128,11 +128,7 @@ export const useVisualizeAppState = ( title: i18n.translate('visualizations.visualizationLoadingFailedErrorMessage', { defaultMessage: 'Failed to load the visualization', }), - text: toMountPoint( - - {error.message} - - ), + text: toMountPoint({error.message}, services.core), }); services.history.replace( diff --git a/src/plugins/visualizations/public/wizard/show_new_vis.tsx b/src/plugins/visualizations/public/wizard/show_new_vis.tsx index b4bfe17b177c4..867af06637ce0 100644 --- a/src/plugins/visualizations/public/wizard/show_new_vis.tsx +++ b/src/plugins/visualizations/public/wizard/show_new_vis.tsx @@ -9,14 +9,15 @@ import React, { lazy, Suspense } from 'react'; import ReactDOM from 'react-dom'; import { EuiPortal, EuiProgress } from '@elastic/eui'; -import { I18nProvider } from '@kbn/i18n-react'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { getHttp, getTypes, getApplication, getEmbeddable, getDocLinks, + getAnalytics, + getI18n, getTheme, getContentManagement, getUISettings, @@ -38,7 +39,7 @@ export interface ShowNewVisModalParams { /** * shows modal dialog that allows you to create new visualization * @param {string[]} editorParams - * @param {function} onClose - function that will be called when dialog is closed + * @param {Function} onClose - function that will be called when dialog is closed */ export function showNewVisModal({ editorParams = [], @@ -62,34 +63,32 @@ export function showNewVisModal({ document.body.appendChild(container); const element = ( - - - - - - } - > - - - - + + + + + } + > + + + ); ReactDOM.render(element, container); diff --git a/src/plugins/visualizations/tsconfig.json b/src/plugins/visualizations/tsconfig.json index 491f3e2914915..56d8275f80eaa 100644 --- a/src/plugins/visualizations/tsconfig.json +++ b/src/plugins/visualizations/tsconfig.json @@ -70,7 +70,9 @@ "@kbn/shared-ux-utility", "@kbn/managed-content-badge", "@kbn/presentation-publishing", - "@kbn/shared-ux-markdown" + "@kbn/shared-ux-markdown", + "@kbn/react-kibana-context-render", + "@kbn/react-kibana-mount" ], "exclude": [ "target/**/*", diff --git a/test/accessibility/apps/discover.ts b/test/accessibility/apps/discover.ts index 4a20261d5bf64..0468bccedde01 100644 --- a/test/accessibility/apps/discover.ts +++ b/test/accessibility/apps/discover.ts @@ -133,11 +133,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('a11y test for actions on a field', async () => { await PageObjects.discover.clickDocViewerTab('doc_view_table'); if (await testSubjects.exists('openFieldActionsButton-Cancelled')) { - await testSubjects.click('openFieldActionsButton-Cancelled'); + await testSubjects.click('openFieldActionsButton-Cancelled'); // Open the actions } else { await testSubjects.existOrFail('fieldActionsGroup-Cancelled'); } await a11y.testAppSnapshot(); + if (await testSubjects.exists('openFieldActionsButton-Cancelled')) { + await testSubjects.click('openFieldActionsButton-Cancelled'); // Close the actions + } }); it('a11y test for data-grid table with columns', async () => { diff --git a/test/api_integration/apis/saved_objects/find.ts b/test/api_integration/apis/saved_objects/find.ts index e5ae6c674ba8d..33aba5a5a171b 100644 --- a/test/api_integration/apis/saved_objects/find.ts +++ b/test/api_integration/apis/saved_objects/find.ts @@ -214,13 +214,9 @@ export default function ({ getService }: FtrProviderContext) { ) .expect(400) .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - 'KQLSyntaxError: Expected AND, OR, end of input, whitespace but "<" found.\ndashboard.' + - 'attributes.title:foo query\n----------^' - ); + const errorText = await errorMessage.getVisibleText(); + expect(errorText).to.match(/Expected[\S\s]+but "n" found/); }); it('should not show the full screen button', async () => { diff --git a/test/functional/apps/discover/group1/_errors.ts b/test/functional/apps/discover/group1/_errors.ts index 6f0a7ba96b7ad..0d3e20fba11ce 100644 --- a/test/functional/apps/discover/group1/_errors.ts +++ b/test/functional/apps/discover/group1/_errors.ts @@ -38,7 +38,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('not found', () => { + // FLAKY: https://github.com/elastic/kibana/issues/166291 + describe.skip('not found', () => { it('should redirect to main page when trying to access invalid route', async () => { await PageObjects.common.navigateToUrl('discover', '#/invalid-route', { useActualUrl: true, diff --git a/test/functional/apps/visualize/group2/_gauge_chart.ts b/test/functional/apps/visualize/group2/_gauge_chart.ts index 1232d84674475..5c35a90d42027 100644 --- a/test/functional/apps/visualize/group2/_gauge_chart.ts +++ b/test/functional/apps/visualize/group2/_gauge_chart.ts @@ -18,7 +18,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']); - describe('gauge chart', function indexPatternCreation() { + // FLAKY: https://github.com/elastic/kibana/issues/181883 + describe.skip('gauge chart', function indexPatternCreation() { before(async () => { await PageObjects.visualize.initTests(); }); diff --git a/test/functional/apps/visualize/group2/_heatmap_chart.ts b/test/functional/apps/visualize/group2/_heatmap_chart.ts index 1c82b66273251..09439635ebc5e 100644 --- a/test/functional/apps/visualize/group2/_heatmap_chart.ts +++ b/test/functional/apps/visualize/group2/_heatmap_chart.ts @@ -15,7 +15,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const inspector = getService('inspector'); const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']); - describe('heatmap chart', function indexPatternCreation() { + // FLAKY: https://github.com/elastic/kibana/issues/181884 + describe.skip('heatmap chart', function indexPatternCreation() { const vizName1 = 'Visualization HeatmapChart'; let isNewChartsLibraryEnabled = false; diff --git a/test/package/Vagrantfile b/test/package/Vagrantfile index 4872da5d2afae..73be8e0a32659 100644 --- a/test/package/Vagrantfile +++ b/test/package/Vagrantfile @@ -36,4 +36,23 @@ Vagrant.configure("2") do |config| end docker.vm.network "private_network", ip: "192.168.56.7" end + + config.vm.define "fips" do |fips| + fips.vm.synced_folder '../../', '/home/vagrant/kibana', SharedFoldersEnableSymlinksCreate: false + fips.vm.provider :virtualbox do |vb| + vb.memory = 4096 + vb.cpus = 2 + end + fips.vm.box = 'generic/rhel9' + fips.vm.provision "shell", inline: <<-SHELL + echo "export OPENSSL_MODULES=/usr/local/lib64/ossl-modules" >> /etc/profile.d/kibana-fips-env.sh + echo "export TEST_BROWSER_HEADLESS=1" >> /etc/profile.d/kibana-fips-env.sh + echo "export ES_TMPDIR=/home/vagrant/kibana/.es/tmp" >> /etc/profile.d/kibana-fips-env.sh + # Remove after https://github.com/elastic/kibana-operations/issues/96 + echo "export FTR_FIPS_MODE=1" >> /etc/profile.d/kibana-fips-env.sh + SHELL + fips.vm.provision "ansible" do |ansible| + ansible.playbook = "fips.yml" + end + end end diff --git a/test/package/fips.yml b/test/package/fips.yml new file mode 100644 index 0000000000000..ae62b386c0cde --- /dev/null +++ b/test/package/fips.yml @@ -0,0 +1,12 @@ +- name: test kibana fips docker package + hosts: fips + vars: + kibana_dist_path: "/usr/share/kibana" + kibana_src_path: "/home/vagrant/kibana" + nvm_ver: "0.39.7" + openssl_sha: "sha256:6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" + openssl_ver: "3.0.8" + roles: + - upgrade_yum_packages + - install_kibana_fips + - assert_fips_enabled diff --git a/test/package/roles/assert_fips_enabled/tasks/main.yml b/test/package/roles/assert_fips_enabled/tasks/main.yml new file mode 100644 index 0000000000000..936d43c49026a --- /dev/null +++ b/test/package/roles/assert_fips_enabled/tasks/main.yml @@ -0,0 +1,11 @@ +- name: register kibana node getFips + command: "{{ kibana_dist_path }}/node/bin/node --enable-fips --openssl-config={{ kibana_dist_path }}/config/nodejs.cnf -p 'crypto.getFips()'" + register: kibana_node_fips + +- debug: + msg: "{{ kibana_node_fips }}" + +- name: assert FIPS enabled + assert: + that: + - kibana_node_fips.stdout == "1" diff --git a/test/package/roles/install_kibana_fips/tasks/main.yml b/test/package/roles/install_kibana_fips/tasks/main.yml new file mode 100644 index 0000000000000..3bfe729f73bd1 --- /dev/null +++ b/test/package/roles/install_kibana_fips/tasks/main.yml @@ -0,0 +1,133 @@ +- name: gather ansible processor facts + setup: + gather_subset: + - "!all" + - "!min" + - "processor_cores" + when: ansible_processor_vcpus is not defined + +- name: fix /var/log permissions for kibana + become: yes + file: + path: /var/log + state: directory + recurse: true + mode: "0777" + +- name: create tmp dir for ES + file: + path: "{{ kibana_src_path }}/.es/tmp" + state: directory + +- name: slurp kibana node version + slurp: + src: "{{ kibana_src_path }}/.node-version" + register: node_ver_file + +- name: set kibana node version + set_fact: + node_version: "{{ node_ver_file['content'] | b64decode | trim }}" + +- name: install nvm + shell: + chdir: "$HOME" + cmd: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v{{ nvm_ver }}/install.sh | bash + +- name: install kibana node version + shell: + chdir: "$HOME/.nvm" + cmd: "source nvm.sh && nvm install {{ node_version }}" + args: + executable: /bin/bash + +- name: "ensure {{ kibana_dist_path }} dir exists" + become: yes + file: + path: "{{ kibana_dist_path }}" + state: directory + mode: "0777" + +- name: find kibana distribution + find: + paths: /packages/ + patterns: kibana-default.tar.gz + register: kibana_tar + +- name: extract kibana distribution + become: yes + unarchive: + src: "{{ kibana_tar.files[0].path }}" + dest: "{{ kibana_dist_path }}" + remote_src: yes + extra_opts: ["--strip-components=1"] + +- name: find kibana plugins distribution + find: + paths: /packages/ + patterns: kibana-default-plugins.tar.gz + register: kibana_plugins_tar + +- name: extract kibana plugins distribution + become: yes + unarchive: + src: "{{ kibana_plugins_tar.files[0].path }}" + dest: "{{ kibana_dist_path }}" + remote_src: yes + +- name: copy kibana yml configuration + become: yes + template: + src: templates/fips/kibana.yml + dest: "{{ kibana_dist_path }}/config/kibana.yml" + register: config + +- name: copy FIPS node.options + become: yes + template: + src: templates/fips/node.options + dest: "{{ kibana_dist_path }}/config/node.options" + +- name: copy FIPS openssl config + become: yes + template: + src: templates/fips/nodejs.cnf + dest: "{{ kibana_dist_path }}/config/nodejs.cnf" + +- name: download FIPS certified OpenSSL + become: yes + retries: 5 + delay: 10 + get_url: + url: "https://www.openssl.org/source/openssl-{{ openssl_ver }}.tar.gz" + dest: "{{ kibana_dist_path }}/openssl-{{ openssl_ver }}.tar.gz" + checksum: "{{ openssl_sha }}" + +- name: extract OpenSSL + become: yes + unarchive: + src: "{{ kibana_dist_path }}/openssl-{{ openssl_ver }}.tar.gz" + dest: "{{ kibana_dist_path }}" + remote_src: yes + +- name: configure OpenSSL for FIPS + become: yes + shell: + chdir: "{{ kibana_dist_path }}/openssl-{{ openssl_ver }}" + cmd: ./Configure enable-fips + +- name: compile OpenSSL with FIPS + become: yes + make: + chdir: "{{ kibana_dist_path }}/openssl-{{ openssl_ver }}" + jobs: "{{ ansible_facts['processor_vcpus'] }}" + +- name: install OpenSSL with FIPS + become: yes + make: + chdir: "{{ kibana_dist_path }}/openssl-{{ openssl_ver }}" + target: install + +- name: link OpenSSL package + become: yes + shell: + cmd: ldconfig /usr/local/lib64/ diff --git a/test/package/templates/fips/kibana.yml b/test/package/templates/fips/kibana.yml new file mode 100644 index 0000000000000..d33cb21c383cb --- /dev/null +++ b/test/package/templates/fips/kibana.yml @@ -0,0 +1,16 @@ +server.host: 0.0.0.0 + +elasticsearch.username: "{{ elasticsearch_username }}" +elasticsearch.password: "{{ elasticsearch_password }}" + +logging: + appenders: + file: + type: file + fileName: /var/log/kibana/kibana.log + layout: + type: json + root: + appenders: + - default + - file diff --git a/test/package/templates/fips/node.options b/test/package/templates/fips/node.options new file mode 100644 index 0000000000000..b01af3c27a7b3 --- /dev/null +++ b/test/package/templates/fips/node.options @@ -0,0 +1,4 @@ +--max-old-space-size=812 +--unhandled-rejections=warn +--enable-fips +--openssl-config=/usr/share/kibana/config/nodejs.cnf \ No newline at end of file diff --git a/test/package/templates/fips/nodejs.cnf b/test/package/templates/fips/nodejs.cnf new file mode 100644 index 0000000000000..bd8fece6674d7 --- /dev/null +++ b/test/package/templates/fips/nodejs.cnf @@ -0,0 +1,28 @@ +########################################################################## +## ## +## This OpenSSL config is only loaded when running Kibana in FIPS mode. ## +## ## +## See: ## +## https://github.com/openssl/openssl/blob/openssl-3.0/README-FIPS.md ## +## https://www.openssl.org/docs/man3.0/man7/fips_module.html ## +## ## +########################################################################## + +nodejs_conf = nodejs_init +.include /usr/local/ssl/fipsmodule.cnf + +[nodejs_init] +providers = provider_sect +alg_section = algorithm_sect + +[provider_sect] +default = default_sect +# The fips section name should match the section name inside the +# included fipsmodule.cnf. +fips = fips_sect + +[default_sect] +activate = 1 + +[algorithm_sect] +default_properties = fips=yes \ No newline at end of file diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index eaa0099213b49..b29b6e7eda491 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -311,6 +311,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { // 'xpack.reporting.poll.jobsRefresh.intervalErrorMultiplier (number)', 'xpack.rollup.ui.enabled (boolean)', 'xpack.saved_object_tagging.cache_refresh_interval (duration)', + 'xpack.searchPlayground.ui.enabled (boolean)', 'xpack.security.loginAssistanceMessage (string)', 'xpack.security.sameSiteCookies (alternatives)', 'xpack.security.showInsecureClusterWarning (boolean)', diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts index 348ac6188514d..86c3b26f200e6 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/capabilities/index.ts @@ -14,6 +14,6 @@ export type AssistantFeatures = { [K in keyof typeof defaultAssistantFeatures]: * Default features available to the elastic assistant */ export const defaultAssistantFeatures = Object.freeze({ - assistantAlertsInsights: false, assistantModelEvaluation: false, + attackDiscoveryEnabled: false, }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts new file mode 100644 index 0000000000000..b492dfe2dc9f2 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.gen.ts @@ -0,0 +1,75 @@ +/* + * Copyright 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: Attack discovery API endpoint + * version: 1 + */ + +import { AnonymizationFieldResponse } from '../anonymization_fields/bulk_crud_anonymization_fields_route.gen'; +import { Replacements, TraceData } from '../conversations/common_attributes.gen'; + +/** + * An attack discovery generated from one or more alerts + */ +export type AttackDiscovery = z.infer; +export const AttackDiscovery = z.object({ + /** + * The alert IDs that the attack discovery is based on + */ + alertIds: z.array(z.string()), + /** + * Details of the attack with bulleted markdown that always uses special syntax for field names and values from the source data. + */ + detailsMarkdown: z.string(), + /** + * A short (no more than a sentence) summary of the attack discovery featuring only the host.name and user.name fields (when they are applicable), using the same syntax + */ + entitySummaryMarkdown: z.string(), + /** + * An array of MITRE ATT&CK tactic for the attack discovery + */ + mitreAttackTactics: z.array(z.string()).optional(), + /** + * A markdown summary of attack discovery, using the same syntax + */ + summaryMarkdown: z.string(), + /** + * A title for the attack discovery, in plain text + */ + title: z.string(), +}); + +export type AttackDiscoveryPostRequestBody = z.infer; +export const AttackDiscoveryPostRequestBody = z.object({ + alertsIndexPattern: z.string(), + anonymizationFields: z.array(AnonymizationFieldResponse), + connectorId: z.string(), + actionTypeId: z.string(), + langSmithProject: z.string().optional(), + langSmithApiKey: z.string().optional(), + model: z.string().optional(), + replacements: Replacements.optional(), + size: z.number(), + subAction: z.enum(['invokeAI', 'invokeStream']), +}); +export type AttackDiscoveryPostRequestBodyInput = z.input; + +export type AttackDiscoveryPostResponse = z.infer; +export const AttackDiscoveryPostResponse = z.object({ + connector_id: z.string().optional(), + attackDiscoveries: z.array(AttackDiscovery).optional(), + replacements: Replacements.optional(), + status: z.string().optional(), + trace_data: TraceData.optional(), +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.schema.yaml similarity index 63% rename from x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.schema.yaml rename to x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.schema.yaml index a4a647784ee29..b32708536f968 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/attack_discovery/post_attack_discovery_route.schema.yaml @@ -1,13 +1,13 @@ openapi: 3.0.0 info: - title: Alerts insights API endpoint + title: Attack discovery API endpoint version: '1' components: x-codegen-enabled: true schemas: - AlertsInsight: + AttackDiscovery: type: object - description: An insight generated from one or more alerts + description: An attack discovery generated from one or more alerts required: - 'alertIds' - 'detailsMarkdown' @@ -16,38 +16,38 @@ components: - 'title' properties: alertIds: - description: The alert IDs that the insight is based on + description: The alert IDs that the attack discovery is based on items: type: string type: array detailsMarkdown: - description: A detailed insight with bulleted markdown that always uses special syntax for field names and values from the source data. + description: Details of the attack with bulleted markdown that always uses special syntax for field names and values from the source data. type: string entitySummaryMarkdown: - description: A short (no more than a sentence) summary of the insight featuring only the host.name and user.name fields (when they are applicable), using the same syntax + description: A short (no more than a sentence) summary of the attack discovery featuring only the host.name and user.name fields (when they are applicable), using the same syntax type: string mitreAttackTactics: - description: An array of MITRE ATT&CK tactic for the insight + description: An array of MITRE ATT&CK tactic for the attack discovery items: type: string type: array summaryMarkdown: - description: A markdown summary of insight, using the same syntax + description: A markdown summary of attack discovery, using the same syntax type: string title: - description: A title for the insight, in plain text + description: A title for the attack discovery, in plain text type: string paths: - /internal/elastic_assistant/insights/alerts: + /internal/elastic_assistant/attack_discovery: post: - operationId: AlertsInsightsPost + operationId: AttackDiscoveryPost x-codegen-enabled: true - description: Generate insights from alerts - summary: Generate insights from alerts via the Elastic Assistant + description: Generate attack discoveries from alerts + summary: Generate attack discoveries from alerts via the Elastic Assistant tags: - - insights + - attack_discovery - alerts requestBody: required: true @@ -67,7 +67,7 @@ paths: type: string anonymizationFields: items: - $ref: '../../anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml#/components/schemas/AnonymizationFieldResponse' + $ref: '../anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml#/components/schemas/AnonymizationFieldResponse' type: array connectorId: type: string @@ -80,7 +80,7 @@ paths: model: type: string replacements: - $ref: '../../conversations/common_attributes.schema.yaml#/components/schemas/Replacements' + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacements' size: type: number subAction: @@ -98,16 +98,16 @@ paths: properties: connector_id: type: string - insights: + attackDiscoveries: type: array items: - $ref: '#/components/schemas/AlertsInsight' + $ref: '#/components/schemas/AttackDiscovery' replacements: - $ref: '../../conversations/common_attributes.schema.yaml#/components/schemas/Replacements' + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacements' status: type: string trace_data: - $ref: '../../conversations/common_attributes.schema.yaml#/components/schemas/TraceData' + $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/TraceData' '400': description: Bad request content: diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts index 5a5eaac37b3a6..6e90724097fc8 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.gen.ts @@ -18,6 +18,6 @@ import { z } from 'zod'; export type GetCapabilitiesResponse = z.infer; export const GetCapabilitiesResponse = z.object({ - assistantAlertsInsights: z.boolean(), assistantModelEvaluation: z.boolean(), + attackDiscoveryEnabled: z.boolean(), }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml index 65e9be9b2eb9c..8d28a6b95d55a 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/capabilities/get_capabilities_route.schema.yaml @@ -19,13 +19,13 @@ paths: schema: type: object properties: - assistantAlertsInsights: - type: boolean assistantModelEvaluation: type: boolean + attackDiscoveryEnabled: + type: boolean required: - - assistantAlertsInsights - assistantModelEvaluation + - attackDiscoveryEnabled '400': description: Generic Error content: diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts index dfa31974fccb1..808cf88fcec7c 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts @@ -262,6 +262,10 @@ export const ConversationUpdateProps = z.object({ export type ConversationCreateProps = z.infer; export const ConversationCreateProps = z.object({ + /** + * The conversation id. + */ + id: z.string().optional(), /** * The conversation title. */ diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml index 25a5b0f91d36f..3f2827b348004 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml @@ -254,6 +254,9 @@ components: required: - title properties: + id: + type: string + description: The conversation id. title: type: string description: The conversation title. 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 c3d635fdf94a7..24d484bdd06c6 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 @@ -18,8 +18,8 @@ export const API_VERSIONS = { export const PUBLIC_API_ACCESS = 'public'; export const INTERNAL_API_ACCESS = 'internal'; -// Alerts Insights Schemas -export * from './insights/alerts/post_alerts_insights_route.gen'; +// Attack discovery Schemas +export * from './attack_discovery/post_attack_discovery_route.gen'; // Evaluation Schemas export * from './evaluation/post_evaluate_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts deleted file mode 100644 index cfae1a004a54d..0000000000000 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/insights/alerts/post_alerts_insights_route.gen.ts +++ /dev/null @@ -1,75 +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 { z } from 'zod'; - -/* - * NOTICE: Do not edit this file manually. - * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. - * - * info: - * title: Alerts insights API endpoint - * version: 1 - */ - -import { AnonymizationFieldResponse } from '../../anonymization_fields/bulk_crud_anonymization_fields_route.gen'; -import { Replacements, TraceData } from '../../conversations/common_attributes.gen'; - -/** - * An insight generated from one or more alerts - */ -export type AlertsInsight = z.infer; -export const AlertsInsight = z.object({ - /** - * The alert IDs that the insight is based on - */ - alertIds: z.array(z.string()), - /** - * A detailed insight with bulleted markdown that always uses special syntax for field names and values from the source data. - */ - detailsMarkdown: z.string(), - /** - * A short (no more than a sentence) summary of the insight featuring only the host.name and user.name fields (when they are applicable), using the same syntax - */ - entitySummaryMarkdown: z.string(), - /** - * An array of MITRE ATT&CK tactic for the insight - */ - mitreAttackTactics: z.array(z.string()).optional(), - /** - * A markdown summary of insight, using the same syntax - */ - summaryMarkdown: z.string(), - /** - * A title for the insight, in plain text - */ - title: z.string(), -}); - -export type AlertsInsightsPostRequestBody = z.infer; -export const AlertsInsightsPostRequestBody = z.object({ - alertsIndexPattern: z.string(), - anonymizationFields: z.array(AnonymizationFieldResponse), - connectorId: z.string(), - actionTypeId: z.string(), - langSmithProject: z.string().optional(), - langSmithApiKey: z.string().optional(), - model: z.string().optional(), - replacements: Replacements.optional(), - size: z.number(), - subAction: z.enum(['invokeAI', 'invokeStream']), -}); -export type AlertsInsightsPostRequestBodyInput = z.input; - -export type AlertsInsightsPostResponse = z.infer; -export const AlertsInsightsPostResponse = z.object({ - connector_id: z.string().optional(), - insights: z.array(AlertsInsight).optional(), - replacements: Replacements.optional(), - status: z.string().optional(), - trace_data: TraceData.optional(), -}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx index 258788a09304f..df1f399dadcc3 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/capabilities/use_capabilities.test.tsx @@ -14,9 +14,9 @@ import { useCapabilities, UseCapabilitiesParams } from './use_capabilities'; import { API_VERSIONS } from '@kbn/elastic-assistant-common'; const statusResponse = { - assistantAlertsInsights: false, assistantModelEvaluation: true, assistantStreamingEnabled: false, + attackDiscoveryEnabled: false, }; const http = { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_animated_icon.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_animated_icon.tsx index 575362796ef5b..eeb6e83368acd 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_animated_icon.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_animated_icon.tsx @@ -18,6 +18,8 @@ const Container = styled.div` display: flex; justify-content: center; align-items: center; + margin-top: ${euiThemeVars.euiSizeXXL}; + margin-bottom: ${euiThemeVars.euiSizeL}; :before, :after { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx index 45d738807d37e..ab7b942476f81 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx @@ -12,13 +12,11 @@ import { TestProviders } from '../../mock/test_providers/test_providers'; jest.mock('./use_chat_send'); -const handleButtonSendMessage = jest.fn(); const handleOnChatCleared = jest.fn(); const handlePromptChange = jest.fn(); const handleSendMessage = jest.fn(); const handleRegenerateResponse = jest.fn(); const testProps: Props = { - handleButtonSendMessage, handleOnChatCleared, handlePromptChange, handleSendMessage, @@ -51,7 +49,7 @@ describe('ChatSend', () => { expect(getByTestId('prompt-textarea')).toHaveTextContent(promptText); fireEvent.click(getByTestId('submit-chat')); await waitFor(() => { - expect(handleButtonSendMessage).toHaveBeenCalledWith(promptText); + expect(handleSendMessage).toHaveBeenCalledWith(promptText); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx index 0ab018263acd2..880d4d5f9f88f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx @@ -26,7 +26,6 @@ export interface Props extends Omit { * Allows the user to clear the chat and switch between different system prompts. */ export const ChatSend: React.FC = ({ - handleButtonSendMessage, handleOnChatCleared, handlePromptChange, handleSendMessage, @@ -46,11 +45,16 @@ export const ChatSend: React.FC = ({ const promptValue = useMemo(() => (isDisabled ? '' : userPrompt ?? ''), [isDisabled, userPrompt]); const onSendMessage = useCallback(() => { - handleButtonSendMessage(promptTextAreaRef.current?.value?.trim() ?? ''); - }, [handleButtonSendMessage, promptTextAreaRef]); + handleSendMessage(promptTextAreaRef.current?.value?.trim() ?? ''); + handlePromptChange(''); + }, [handleSendMessage, promptTextAreaRef, handlePromptChange]); useAutosizeTextArea(promptTextAreaRef?.current, promptValue); + useEffect(() => { + handlePromptChange(promptValue); + }, [handlePromptChange, promptValue]); + return ( { expect(setPromptTextPreview).toHaveBeenCalledWith('new prompt'); expect(setUserPrompt).toHaveBeenCalledWith('new prompt'); }); - it('handleButtonSendMessage sends message with context prompt when a valid prompt text is provided', async () => { + it('handleSendMessage sends message with context prompt when a valid prompt text is provided', async () => { const promptText = 'prompt text'; const { result } = renderHook(() => useChatSend(testProps), { wrapper: TestProviders, }); - result.current.handleButtonSendMessage(promptText); - expect(setUserPrompt).toHaveBeenCalledWith(''); + result.current.handleSendMessage(promptText); await waitFor(() => { expect(sendMessage).toHaveBeenCalled(); @@ -108,7 +107,7 @@ describe('use chat send', () => { ); }); }); - it('handleButtonSendMessage sends message with only provided prompt text and context already exists in convo history', async () => { + it('handleSendMessage sends message with only provided prompt text and context already exists in convo history', async () => { const promptText = 'prompt text'; const { result } = renderHook( () => @@ -118,8 +117,7 @@ describe('use chat send', () => { } ); - result.current.handleButtonSendMessage(promptText); - expect(setUserPrompt).toHaveBeenCalledWith(''); + result.current.handleSendMessage(promptText); await waitFor(() => { expect(sendMessage).toHaveBeenCalled(); @@ -150,8 +148,7 @@ describe('use chat send', () => { const { result } = renderHook(() => useChatSend(testProps), { wrapper: TestProviders, }); - result.current.handleButtonSendMessage(promptText); - expect(setUserPrompt).toHaveBeenCalledWith(''); + result.current.handleSendMessage(promptText); await waitFor(() => { expect(reportAssistantMessageSent).toHaveBeenNthCalledWith(1, { 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 b321c9e897d54..020822821d163 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 @@ -35,7 +35,6 @@ export interface UseChatSendProps { export interface UseChatSend { abortStream: () => void; - handleButtonSendMessage: (m: string) => void; handleOnChatCleared: () => void; handlePromptChange: (prompt: string) => void; handleSendMessage: (promptText: string) => void; @@ -209,14 +208,6 @@ export const useChatSend = ({ }); }, [currentConversation, http, removeLastMessage, sendMessage, setCurrentConversation, toasts]); - const handleButtonSendMessage = useCallback( - (message: string) => { - handleSendMessage(message); - setUserPrompt(''); - }, - [handleSendMessage, setUserPrompt] - ); - const handleOnChatCleared = useCallback(async () => { const defaultSystemPromptId = getDefaultSystemPrompt({ allSystemPrompts, @@ -246,7 +237,6 @@ export const useChatSend = ({ return { abortStream, - handleButtonSendMessage, handleOnChatCleared, handlePromptChange, handleSendMessage, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx index 39a4ddac595e8..179ff7524bd88 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx @@ -425,6 +425,7 @@ export const ConversationSettings: React.FC = React.m isDisabled={isDisabled} onConnectorSelectionChange={handleOnConnectorSelectionChange} selectedConnectorId={selectedConnector?.id} + isFlyoutMode={isFlyoutMode} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts index 33ec10bdb222c..e9a0599ca4fc2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts @@ -16,7 +16,7 @@ export const getMessageFromRawResponse = ( rawResponse: FetchConnectorExecuteResponse ): ClientMessage => { const { response, isStream, isError } = rawResponse; - const dateTimeString = new Date().toLocaleString(); // TODO: Pull from response + const dateTimeString = new Date().toISOString(); // TODO: Pull from response if (rawResponse) { return { role: 'assistant', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index 63568b7ec4377..07f3598101709 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -182,7 +182,7 @@ const AssistantComponent: React.FC = ({ } = useFetchAnonymizationFields(); // Connector details - const { data: connectors, isFetched: areConnectorsFetched } = useLoadConnectors({ + const { data: connectors, isFetchedAfterMount: areConnectorsFetched } = useLoadConnectors({ http, }); const defaultConnector = useMemo(() => getDefaultConnector(connectors), [connectors]); @@ -208,6 +208,10 @@ const AssistantComponent: React.FC = ({ if (conversationId) { const updatedConversation = await getConversation(conversationId); + if (updatedConversation) { + setCurrentConversation(updatedConversation); + } + return updatedConversation; } }, @@ -358,6 +362,12 @@ const AssistantComponent: React.FC = ({ } // when scrollHeight changes, parent is scrolled to bottom parent.scrollTop = parent.scrollHeight; + + if (isFlyoutMode) { + ( + commentsContainerRef.current?.childNodes[0].childNodes[0] as HTMLElement + ).lastElementChild?.scrollIntoView(); + } }); const getWrapper = (children: React.ReactNode, isCommentContainer: boolean) => @@ -390,9 +400,6 @@ const AssistantComponent: React.FC = ({ setEditingSystemPromptId( getDefaultSystemPrompt({ allSystemPrompts, conversation: refetchedConversation })?.id ); - if (refetchedConversation) { - setCurrentConversation(refetchedConversation); - } setCurrentConversationId(cId); } }, @@ -521,7 +528,6 @@ const AssistantComponent: React.FC = ({ const { abortStream, - handleButtonSendMessage, handleOnChatCleared, handlePromptChange, handleSendMessage, @@ -1002,7 +1008,6 @@ const AssistantComponent: React.FC = ({ isDisabled={isSendingDisabled} shouldRefocusPrompt={shouldRefocusPrompt} userPrompt={userPrompt} - handleButtonSendMessage={handleChatSend} handleOnChatCleared={handleOnChatCleared} handlePromptChange={handlePromptChange} handleSendMessage={handleChatSend} @@ -1122,7 +1127,6 @@ const AssistantComponent: React.FC = ({ isDisabled={isSendingDisabled} shouldRefocusPrompt={shouldRefocusPrompt} userPrompt={userPrompt} - handleButtonSendMessage={handleButtonSendMessage} handleOnChatCleared={handleOnChatCleared} handlePromptChange={handlePromptChange} handleSendMessage={handleChatSend} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts index 448ab6aa895b1..bd00058b4bbd3 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts @@ -84,7 +84,7 @@ export function getCombinedMessage({ // trim ensures any extra \n and other whitespace is removed content: content.trim(), role: 'user', // we are combining the system and user messages into one message - timestamp: new Date().toLocaleString(), + timestamp: new Date().toISOString(), replacements, }; } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts index ad1954c0b3b23..233e45049333c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts @@ -57,7 +57,7 @@ export interface PromptContext { id: string; /** - * Replacements associated with the context, i.e. replacements for an insight provided as context + * Replacements associated with the context, i.e. replacements for an attack discovery provided as context */ replacements?: Replacements; @@ -82,7 +82,7 @@ export interface SelectedPromptContext { promptContextId: string; /** this data is not anonymized */ rawData: string | Record; - /** replacements associated with the context, i.e. replacements for an insight provided as context */ + /** replacements associated with the context, i.e. replacements for an attack discovery provided as context */ replacements?: Replacements; } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_textarea/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_textarea/index.tsx index 8d442eedfcce2..5787847043cfc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_textarea/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_textarea/index.tsx @@ -6,7 +6,7 @@ */ import { EuiTextArea } from '@elastic/eui'; -import React, { useCallback, useEffect, forwardRef } from 'react'; +import React, { useCallback, forwardRef } from 'react'; import { css } from '@emotion/react'; import * as i18n from './translations'; @@ -42,10 +42,6 @@ export const PromptTextArea = forwardRef( [value, onPromptSubmit, handlePromptChange] ); - useEffect(() => { - handlePromptChange(value); - }, [handlePromptChange, value]); - return ( { useAssistantContext: () => mockUseAssistantContext, }; }); +jest.mock('../use_conversation', () => { + return { + useConversation: jest.fn(() => ({ + currentConversation: { id: 'conversation-id' }, + })), + }; +}); +jest.mock('../helpers'); +jest.mock('../../connectorland/helpers'); +jest.mock('../../connectorland/use_load_connectors', () => { + return { + useLoadConnectors: jest.fn(() => ({ + data: [], + error: null, + isSuccess: true, + })), + }; +}); describe('useAssistantOverlay', () => { beforeEach(() => { @@ -48,13 +67,15 @@ describe('useAssistantOverlay', () => { ) ); - expect(mockUseAssistantContext.registerPromptContext).toHaveBeenCalledWith({ - category, - description, - getPromptContext, - id, - suggestedUserPrompt, - tooltip, + await waitFor(() => { + expect(mockUseAssistantContext.registerPromptContext).toHaveBeenCalledWith({ + category, + description, + getPromptContext, + id, + suggestedUserPrompt, + tooltip, + }); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx index 40fe463f70836..3e32bc5d7bb60 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx @@ -11,9 +11,13 @@ import { useCallback, useEffect, useMemo } from 'react'; import { useAssistantContext } from '../../assistant_context'; import { getUniquePromptContextId } from '../../assistant_context/helpers'; import type { PromptContext } from '../prompt_context/types'; +import { useConversation } from '../use_conversation'; +import { getDefaultConnector } from '../helpers'; +import { getGenAiConfig } from '../../connectorland/helpers'; +import { useLoadConnectors } from '../../connectorland/use_load_connectors'; interface UseAssistantOverlay { - showAssistantOverlay: (show: boolean) => void; + showAssistantOverlay: (show: boolean, silent?: boolean) => void; promptContextId: string; } @@ -69,10 +73,19 @@ export const useAssistantOverlay = ( tooltip: PromptContext['tooltip'], /** - * Optionally provide a map of replacements associated with the context, i.e. replacements for an insight that's provided as context + * Optionally provide a map of replacements associated with the context, i.e. replacements for an attack discovery that's provided as context */ replacements?: Replacements | null ): UseAssistantOverlay => { + const { http } = useAssistantContext(); + const { data: connectors } = useLoadConnectors({ + http, + }); + const defaultConnector = useMemo(() => getDefaultConnector(connectors), [connectors]); + const apiConfig = useMemo(() => getGenAiConfig(defaultConnector), [defaultConnector]); + + const { getConversation, createConversation } = useConversation(); + // memoize the props so that we can use them in the effect below: const _category: PromptContext['category'] = useMemo(() => category, [category]); const _description: PromptContext['description'] = useMemo(() => description, [description]); @@ -99,8 +112,33 @@ export const useAssistantOverlay = ( } = useAssistantContext(); // proxy show / hide calls to assistant context, using our internal prompt context id: + // silent:boolean doesn't show the toast notification if the conversation is not found const showAssistantOverlay = useCallback( - (showOverlay: boolean) => { + async (showOverlay: boolean, silent?: boolean) => { + let conversation; + try { + conversation = await getConversation(promptContextId, silent); + } catch (e) { + /* empty */ + } + + if (!conversation && defaultConnector) { + try { + conversation = await createConversation({ + apiConfig: { + ...apiConfig, + actionTypeId: defaultConnector?.actionTypeId, + connectorId: defaultConnector?.id, + }, + category: 'assistant', + title: conversationTitle ?? '', + id: promptContextId, + }); + } catch (e) { + /* empty */ + } + } + if (promptContextId != null) { assistantContextShowOverlay({ showOverlay, @@ -109,7 +147,15 @@ export const useAssistantOverlay = ( }); } }, - [assistantContextShowOverlay, conversationTitle, promptContextId] + [ + apiConfig, + assistantContextShowOverlay, + conversationTitle, + createConversation, + defaultConnector, + getConversation, + promptContextId, + ] ); useEffect(() => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx index d4baf12a1dceb..84fa21417ae70 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx @@ -55,7 +55,7 @@ interface UseConversation { apiConfig, }: SetApiConfigProps) => Promise; createConversation: (conversation: Partial) => Promise; - getConversation: (conversationId: string) => Promise; + getConversation: (conversationId: string, silent?: boolean) => Promise; updateConversationTitle: ({ conversationId, updatedTitle, @@ -66,8 +66,12 @@ export const useConversation = (): UseConversation => { const { allSystemPrompts, http, toasts } = useAssistantContext(); const getConversation = useCallback( - async (conversationId: string) => { - return getConversationById({ http, id: conversationId, toasts }); + async (conversationId: string, silent?: boolean) => { + return getConversationById({ + http, + id: conversationId, + toasts: !silent ? toasts : undefined, + }); }, [http, toasts] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx index 61cf86eae9718..d54f6f8b4d28d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx @@ -7,7 +7,7 @@ import { KnowledgeBaseConfig } from '../assistant/types'; -export const AI_INSIGHTS_STORAGE_KEY = 'aiInsights'; +export const ATTACK_DISCOVERY_STORAGE_KEY = 'attackDiscovery'; export const DEFAULT_ASSISTANT_NAMESPACE = 'elasticAssistantDefault'; export const QUICK_PROMPT_LOCAL_STORAGE_KEY = 'quickPrompts'; export const SYSTEM_PROMPT_LOCAL_STORAGE_KEY = 'systemPrompts'; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx index f51a72e314964..7726f54f4637a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx @@ -277,16 +277,16 @@ export const AssistantProvider: React.FC = ({ // Fetch assistant capabilities const { data: capabilities } = useCapabilities({ http, toasts }); - const { assistantAlertsInsights, assistantModelEvaluation: modelEvaluatorEnabled } = + const { assistantModelEvaluation: modelEvaluatorEnabled, attackDiscoveryEnabled } = capabilities ?? defaultAssistantFeatures; const value = useMemo( () => ({ actionTypeRegistry, alertsIndexPattern, - assistantAlertsInsights, assistantAvailability, assistantTelemetry, + attackDiscoveryEnabled, augmentMessageCodeBlocks, allQuickPrompts: localStorageQuickPrompts ?? [], allSystemPrompts: localStorageSystemPrompts ?? [], @@ -324,9 +324,9 @@ export const AssistantProvider: React.FC = ({ [ actionTypeRegistry, alertsIndexPattern, - assistantAlertsInsights, assistantAvailability, assistantTelemetry, + attackDiscoveryEnabled, augmentMessageCodeBlocks, localStorageQuickPrompts, localStorageSystemPrompts, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx index fbc89665b8bdf..c91cf1e094d90 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx @@ -18,6 +18,7 @@ const defaultProps = { onConnectorSelectionChange, selectedConnectorId: 'connectorId', setIsOpen, + isFlyoutMode: false, }; const connectorTwo = mockConnectors[1]; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx index 2e2fb2e4c9ec5..7ab6324052d01 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx @@ -11,6 +11,7 @@ import React, { Suspense, useCallback, useMemo, useState } from 'react'; import { ActionConnector, ActionType } from '@kbn/triggers-actions-ui-plugin/public'; import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/common/openai/constants'; +import { some } from 'lodash'; import { useLoadConnectors } from '../use_load_connectors'; import * as i18n from '../translations'; import { useLoadActionTypes } from '../use_load_action_types'; @@ -27,6 +28,7 @@ interface Props { selectedConnectorId?: string; displayFancy?: (displayText: string) => React.ReactNode; setIsOpen?: (isOpen: boolean) => void; + isFlyoutMode: boolean; } export type AIConnector = ActionConnector & { @@ -42,6 +44,7 @@ export const ConnectorSelector: React.FC = React.memo( selectedConnectorId, onConnectorSelectionChange, setIsOpen, + isFlyoutMode, }) => { const { actionTypeRegistry, http, assistantAvailability } = useAssistantContext(); // Connector Modal State @@ -107,6 +110,11 @@ export const ConnectorSelector: React.FC = React.memo( [actionTypeRegistry, aiConnectors, displayFancy] ); + const connectorExists = useMemo( + () => some(aiConnectors, ['id', selectedConnectorId]), + [aiConnectors, selectedConnectorId] + ); + // Only include add new connector option if user has privilege const allConnectorOptions = useMemo( () => @@ -153,18 +161,29 @@ export const ConnectorSelector: React.FC = React.memo( return ( <> - + {isFlyoutMode && !connectorExists ? ( + setIsConnectorModalVisible(true)} + > + {i18n.ADD_CONNECTOR} + + ) : ( + + )} {isConnectorModalVisible && ( // Crashing management app otherwise diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx index 44e8d1bdb1faa..83437bb7dc69b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx @@ -29,6 +29,8 @@ interface Props { actionTypeSelectorInline: boolean; } const itemClassName = css` + inline-size: 240px; + .euiKeyPadMenuItem__label { white-space: nowrap; overflow: hidden; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx index 2494d35cb1ff3..65e388862bd53 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx @@ -152,6 +152,7 @@ export const ConnectorSelectorInline: React.FC = React.memo( selectedConnectorId={selectedConnectorId} setIsOpen={setIsOpen} onConnectorSelectionChange={onChange} + isFlyoutMode={isFlyoutMode} /> @@ -180,12 +181,12 @@ export const ConnectorSelectorInline: React.FC = React.memo( selectedConnectorId={selectedConnectorId} setIsOpen={setIsOpen} onConnectorSelectionChange={onChange} + isFlyoutMode={isFlyoutMode} /> ) : ( { - type: T extends '1' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_TERMS - : T extends '2' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS - : never; +interface ApiActionAddSignificantItems { + type: typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS; payload: SignificantItem[]; } -export function addSignificantItemsAction( - payload: ApiActionAddSignificantItems['payload'], - version: T -): ApiActionAddSignificantItems { - if (version === '1') { - return { - type: API_ACTION_NAME.ADD_SIGNIFICANT_TERMS, - payload, - } as ApiActionAddSignificantItems; - } - +export function addSignificantItemsAction( + payload: ApiActionAddSignificantItems['payload'] +): ApiActionAddSignificantItems { return { type: API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS, payload, - } as ApiActionAddSignificantItems; + }; } -interface ApiActionAddSignificantItemsHistogram { - type: T extends '1' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_HISTOGRAM - : T extends '2' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_HISTOGRAM - : never; +interface ApiActionAddSignificantItemsHistogram { + type: typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_HISTOGRAM; payload: SignificantItemHistogram[]; } -export function addSignificantItemsHistogramAction( - payload: ApiActionAddSignificantItemsHistogram['payload'], - version: T -): ApiActionAddSignificantItemsHistogram { - if (version === '1') { - return { - type: API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_HISTOGRAM, - payload, - } as ApiActionAddSignificantItemsHistogram; - } - +export function addSignificantItemsHistogramAction( + payload: ApiActionAddSignificantItemsHistogram['payload'] +): ApiActionAddSignificantItemsHistogram { return { type: API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_HISTOGRAM, payload, - } as ApiActionAddSignificantItemsHistogram; + }; } -interface ApiActionAddSignificantItemsGroup { - type: T extends '1' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_GROUP - : T extends '2' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP - : never; +interface ApiActionAddSignificantItemsGroup { + type: typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP; payload: SignificantItemGroup[]; } -export function addSignificantItemsGroupAction( - payload: ApiActionAddSignificantItemsGroup['payload'], - version: T -): ApiActionAddSignificantItemsGroup { - if (version === '1') { - return { - type: API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_GROUP, - payload, - } as ApiActionAddSignificantItemsGroup; - } - +export function addSignificantItemsGroupAction( + payload: ApiActionAddSignificantItemsGroup['payload'] +): ApiActionAddSignificantItemsGroup { return { type: API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP, payload, - } as ApiActionAddSignificantItemsGroup; + }; } -interface ApiActionAddSignificantItemsGroupHistogram { - type: T extends '1' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_GROUP_HISTOGRAM - : T extends '2' - ? typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP_HISTOGRAM - : never; +interface ApiActionAddSignificantItemsGroupHistogram { + type: typeof API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP_HISTOGRAM; payload: SignificantItemGroupHistogram[]; } -export function addSignificantItemsGroupHistogramAction( - payload: ApiActionAddSignificantItemsGroupHistogram['payload'], - version: T -): ApiActionAddSignificantItemsGroupHistogram { - if (version === '1') { - return { - type: API_ACTION_NAME.ADD_SIGNIFICANT_TERMS_GROUP_HISTOGRAM, - payload, - } as ApiActionAddSignificantItemsGroupHistogram; - } - +export function addSignificantItemsGroupHistogramAction( + payload: ApiActionAddSignificantItemsGroupHistogram['payload'] +): ApiActionAddSignificantItemsGroupHistogram { return { type: API_ACTION_NAME.ADD_SIGNIFICANT_ITEMS_GROUP_HISTOGRAM, payload, - } as ApiActionAddSignificantItemsGroupHistogram; + }; } interface ApiActionAddError { @@ -225,11 +168,11 @@ export function setZeroDocsFallback( }; } -export type AiopsLogRateAnalysisApiAction = - | ApiActionAddSignificantItems - | ApiActionAddSignificantItemsGroup - | ApiActionAddSignificantItemsHistogram - | ApiActionAddSignificantItemsGroupHistogram +export type AiopsLogRateAnalysisApiAction = + | ApiActionAddSignificantItems + | ApiActionAddSignificantItemsGroup + | ApiActionAddSignificantItemsHistogram + | ApiActionAddSignificantItemsGroupHistogram | ApiActionAddError | ApiActionPing | ApiActionResetAll diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts index a7fbcfd303b55..fae5d17c67fdb 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts @@ -5,17 +5,12 @@ * 2.0. */ -import type { AiopsLogRateAnalysisSchemaV1 } from './schema_v1'; import type { AiopsLogRateAnalysisSchemaV2 } from './schema_v2'; -export type AiopsLogRateAnalysisApiVersion = '1' | '2'; +export type AiopsLogRateAnalysisApiVersion = '2'; const LATEST_API_VERSION: AiopsLogRateAnalysisApiVersion = '2'; export type AiopsLogRateAnalysisSchema< T extends AiopsLogRateAnalysisApiVersion = typeof LATEST_API_VERSION -> = T extends '1' - ? AiopsLogRateAnalysisSchemaV1 - : T extends '2' - ? AiopsLogRateAnalysisSchemaV2 - : never; +> = T extends '2' ? AiopsLogRateAnalysisSchemaV2 : never; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v1.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v1.ts deleted file mode 100644 index de059bca1235e..0000000000000 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v1.ts +++ /dev/null @@ -1,42 +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 type { TypeOf } from '@kbn/config-schema'; -import { schema } from '@kbn/config-schema'; - -export const aiopsLogRateAnalysisSchemaV1 = schema.object({ - start: schema.number(), - end: schema.number(), - searchQuery: schema.string(), - timeFieldName: schema.string(), - includeFrozen: schema.maybe(schema.boolean()), - grouping: schema.maybe(schema.boolean()), - /** Analysis selection time ranges */ - baselineMin: schema.number(), - baselineMax: schema.number(), - deviationMin: schema.number(), - deviationMax: schema.number(), - /** The index to query for log rate analysis */ - index: schema.string(), - /** Settings to override headers derived compression and flush fix */ - compressResponse: schema.maybe(schema.boolean()), - flushFix: schema.maybe(schema.boolean()), - /** Overrides to skip steps of the analysis with existing data */ - overrides: schema.maybe( - schema.object({ - loaded: schema.maybe(schema.number()), - remainingFieldCandidates: schema.maybe(schema.arrayOf(schema.string())), - // TODO Improve schema - significantTerms: schema.maybe(schema.arrayOf(schema.any())), - regroupOnly: schema.maybe(schema.boolean()), - }) - ), - /** Probability used for the random sampler aggregations */ - sampleProbability: schema.maybe(schema.number()), -}); - -export type AiopsLogRateAnalysisSchemaV1 = TypeOf; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.test.ts index bd318e6de0875..ea1c33e569fce 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.test.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.test.ts @@ -38,24 +38,21 @@ describe('streamReducer', () => { it('adds significant item, then resets all state again', () => { const state1 = streamReducer( initialState, - addSignificantItemsAction( - [ - { - key: 'the-field-name:the-field-value', - type: 'keyword', - fieldName: 'the-field-name', - fieldValue: 'the-field-value', - doc_count: 10, - bg_count: 100, - total_doc_count: 1000, - total_bg_count: 10000, - score: 0.1, - pValue: 0.01, - normalizedScore: 0.123, - }, - ], - '2' - ) + addSignificantItemsAction([ + { + key: 'the-field-name:the-field-value', + type: 'keyword', + fieldName: 'the-field-name', + fieldValue: 'the-field-value', + doc_count: 10, + bg_count: 100, + total_doc_count: 1000, + total_bg_count: 10000, + score: 0.1, + pValue: 0.01, + normalizedScore: 0.123, + }, + ]) ); expect(state1.significantItems).toHaveLength(1); @@ -66,14 +63,14 @@ describe('streamReducer', () => { }); it('adds significant items and groups, then resets groups only', () => { - const state1 = streamReducer(initialState, addSignificantItemsAction(significantTerms, '2')); + const state1 = streamReducer(initialState, addSignificantItemsAction(significantTerms)); expect(state1.significantItems).toHaveLength(4); expect(state1.significantItemsGroups).toHaveLength(0); const state2 = streamReducer( state1, - addSignificantItemsGroupAction(finalSignificantItemGroups, '2') + addSignificantItemsGroupAction(finalSignificantItemGroups) ); expect(state2.significantItems).toHaveLength(4); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts index 2e3117b4326e8..ca6148c133cca 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts @@ -10,7 +10,7 @@ import type { SignificantItem, SignificantItemGroup } from '@kbn/ml-agg-utils'; import type { AiopsLogRateAnalysisApiAction } from './actions'; import { API_ACTION_NAME } from './actions'; -interface StreamState { +export interface StreamState { ccsWarning: boolean; significantItems: SignificantItem[]; significantItemsGroups: SignificantItemGroup[]; @@ -34,7 +34,7 @@ export const initialState: StreamState = { export function streamReducer( state: StreamState, - action: AiopsLogRateAnalysisApiAction<'2'> | Array> + action: AiopsLogRateAnalysisApiAction | AiopsLogRateAnalysisApiAction[] ): StreamState { if (Array.isArray(action)) { return action.reduce(streamReducer, state); diff --git a/x-pack/packages/security-solution/features/src/assistant/kibana_sub_features.ts b/x-pack/packages/security-solution/features/src/assistant/kibana_sub_features.ts index 4bbd8e4221092..f06e6cf55d9ff 100644 --- a/x-pack/packages/security-solution/features/src/assistant/kibana_sub_features.ts +++ b/x-pack/packages/security-solution/features/src/assistant/kibana_sub_features.ts @@ -20,7 +20,7 @@ const updateAnonymizationSubFeature: SubFeatureConfig = { 'securitySolutionPackages.features.featureRegistry.subFeatures.assistant.description', { defaultMessage: - 'Change the default fields that are allowed to be used by the AI Assistant and AI Insights. Anonymize any of the content for the selected fields.', + 'Change the default fields that are allowed to be used by the AI Assistant and Attack discovery. Anonymize any of the content for the selected fields.', } ), privilegeGroups: [ diff --git a/x-pack/packages/security-solution/features/src/product_features_keys.ts b/x-pack/packages/security-solution/features/src/product_features_keys.ts index 9583c3ce9aec6..315dcb2730738 100644 --- a/x-pack/packages/security-solution/features/src/product_features_keys.ts +++ b/x-pack/packages/security-solution/features/src/product_features_keys.ts @@ -12,6 +12,10 @@ export enum ProductFeatureSecurityKey { * Enables Investigation guide in Timeline */ investigationGuide = 'investigation_guide', + /** + * Enables Investigation guide interactions (e.g., osquery, timelines, etc.) + */ + investigationGuideInteractions = 'investigation_guide_interactions', /** * Enables access to the Endpoint List and associated views that allows management of hosts * running endpoint security diff --git a/x-pack/packages/security-solution/features/src/security/product_feature_config.ts b/x-pack/packages/security-solution/features/src/security/product_feature_config.ts index 330cf5a8a0a46..d9f52ebf54192 100644 --- a/x-pack/packages/security-solution/features/src/security/product_feature_config.ts +++ b/x-pack/packages/security-solution/features/src/security/product_feature_config.ts @@ -42,6 +42,16 @@ export const securityDefaultProductFeaturesConfig: DefaultSecurityProductFeature }, }, }, + [ProductFeatureSecurityKey.investigationGuideInteractions]: { + privileges: { + all: { + ui: ['investigation-guide-interactions'], + }, + read: { + ui: ['investigation-guide-interactions'], + }, + }, + }, [ProductFeatureSecurityKey.threatIntelligence]: { privileges: { diff --git a/x-pack/packages/security-solution/upselling/messages/index.tsx b/x-pack/packages/security-solution/upselling/messages/index.tsx index b834c7e6ad4de..722a711995d01 100644 --- a/x-pack/packages/security-solution/upselling/messages/index.tsx +++ b/x-pack/packages/security-solution/upselling/messages/index.tsx @@ -15,6 +15,14 @@ export const UPGRADE_INVESTIGATION_GUIDE = (requiredLicense: string) => }, }); +export const UPGRADE_INVESTIGATION_GUIDE_INTERACTIONS = (requiredLicense: string) => + i18n.translate('securitySolutionPackages.markdown.investigationGuideInteractions.upsell', { + defaultMessage: 'Upgrade to {requiredLicense} to make use of investigation guide interactions', + values: { + requiredLicense, + }, + }); + export const UPGRADE_ALERT_ASSIGNMENTS = (requiredLicense: string) => i18n.translate('securitySolutionPackages.alertAssignments.upsell', { defaultMessage: 'Upgrade to {requiredLicense} to make use of alert assignments', diff --git a/x-pack/packages/security-solution/upselling/service/types.ts b/x-pack/packages/security-solution/upselling/service/types.ts index 31aace488ab97..0b0d5b6e930f5 100644 --- a/x-pack/packages/security-solution/upselling/service/types.ts +++ b/x-pack/packages/security-solution/upselling/service/types.ts @@ -21,6 +21,7 @@ export type UpsellingSectionId = export type UpsellingMessageId = | 'investigation_guide' + | 'investigation_guide_interactions' | 'alert_assignments' | 'alert_suppression_rule_form' | 'alert_suppression_rule_details'; diff --git a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx index d62685ab2bce3..2531a47419dc4 100644 --- a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx +++ b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx @@ -311,7 +311,6 @@ export const LogCategorizationPage: FC = ({ embeddin = ({ - dataView, timeRange, esSearchQuery = DEFAULT_SEARCH_QUERY, stickyHistogram, @@ -93,6 +90,8 @@ export const LogRateAnalysisContent: FC = ({ onWindowParametersChange, embeddingOrigin, }) => { + const { dataView } = useDataSource(); + const [windowParameters, setWindowParameters] = useState(); const [isBrushCleared, setIsBrushCleared] = useState(true); const [logRateAnalysisType, setLogRateAnalysisType] = useState( @@ -272,7 +271,6 @@ export const LogRateAnalysisContent: FC = ({ {showLogRateAnalysisResults && ( = ({ stickyHistogram }) => { = ({ stickyHistogram }) => { /> = ({ - dataView, analysisType = LOG_RATE_ANALYSIS_TYPE.SPIKE, earliest, isBrushCleared, @@ -139,6 +137,7 @@ export const LogRateAnalysisResults: FC = ({ embeddingOrigin, }) => { const { analytics, http } = useAiopsAppContext(); + const { dataView } = useDataSource(); // Store the performance metric's start time using a ref // to be able to track it across rerenders. @@ -485,7 +484,6 @@ export const LogRateAnalysisResults: FC = ({ significantItems={data.significantItems} groupTableItems={groupTableItems} loading={isRunning} - dataView={dataView} timeRangeMs={timeRangeMs} searchQuery={searchQuery} barColorOverride={barColorOverride} @@ -497,7 +495,6 @@ export const LogRateAnalysisResults: FC = ({ = ({ significantItems, - dataView, loading, isExpandedRow, searchQuery, @@ -84,6 +81,7 @@ export const LogRateAnalysisResultsTable: FC = }) => { const euiTheme = useEuiTheme(); const primaryBackgroundColor = useEuiBackgroundColor('primary'); + const { dataView } = useDataSource(); const dataViewId = dataView.id; const { diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx index aefe170fc4b5b..2d5acb8057679 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx @@ -30,10 +30,11 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type { SignificantItem } from '@kbn/ml-agg-utils'; import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker'; -import type { DataView } from '@kbn/data-views-plugin/public'; import { stringHash } from '@kbn/ml-string-hash'; import { useLogRateAnalysisStateContext, type GroupTableItem } from '@kbn/aiops-components'; +import { useDataSource } from '../../hooks/use_data_source'; + import { MiniHistogram } from '../mini_histogram'; import { getFailedTransactionsCorrelationImpactLabel } from './get_failed_transactions_correlation_impact_label'; @@ -60,7 +61,6 @@ interface LogRateAnalysisResultsTableProps { loading: boolean; searchQuery: estypes.QueryDslQueryContainer; timeRangeMs: TimeRangeMs; - dataView: DataView; /** Optional color override for the default bar color for charts */ barColorOverride?: string; /** Optional color override for the highlighted bar color for charts */ @@ -72,13 +72,14 @@ export const LogRateAnalysisResultsGroupsTable: FC { + const { dataView } = useDataSource(); + const [pageIndex, setPageIndex] = useState(0); const [pageSize, setPageSize] = useState(10); const [sortField, setSortField] = useState<'docCount' | 'pValue'>( @@ -125,7 +126,6 @@ export const LogRateAnalysisResultsGroupsTable: FC void; } -export const SearchPanel: FC = ({ - dataView, - searchString, - searchQueryLanguage, - setSearchParams, -}) => { +export const SearchPanel: FC = ({ searchString, searchQueryLanguage, setSearchParams }) => { const { uiSettings, unifiedSearch: { @@ -48,6 +43,7 @@ export const SearchPanel: FC = ({ notifications: { toasts }, data: { query: queryManager }, } = useAiopsAppContext(); + const { dataView } = useDataSource(); // The internal state of the input query bar updated on every key stroke. const [searchInput, setSearchInput] = useState({ diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts index 233aa62985bef..5266858e6d3bc 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts @@ -46,7 +46,6 @@ export const groupingHandlerFactory = logDebugMessage, logger, stateHandler, - version, }: ResponseStreamFetchOptions) => async ( significantCategories: SignificantItem[], @@ -134,7 +133,7 @@ export const groupingHandlerFactory = const maxItems = Math.max(...significantItemGroups.map((g) => g.group.length)); if (maxItems > 1) { - responseStream.push(addSignificantItemsGroupAction(significantItemGroups, version)); + responseStream.push(addSignificantItemsGroupAction(significantItemGroups)); } stateHandler.loaded(PROGRESS_STEP_GROUPING, false); @@ -203,15 +202,6 @@ export const groupingHandlerFactory = doc_count: 0, }; - if (version === '1') { - return { - key: o.key, - key_as_string: o.key_as_string ?? '', - doc_count_significant_term: current.doc_count, - doc_count_overall: Math.max(0, o.doc_count - current.doc_count), - }; - } - return { key: o.key, key_as_string: o.key_as_string ?? '', @@ -221,15 +211,12 @@ export const groupingHandlerFactory = }) ?? []; responseStream.push( - addSignificantItemsGroupHistogramAction( - [ - { - id: cpg.id, - histogram, - }, - ], - version - ) + addSignificantItemsGroupHistogramAction([ + { + id: cpg.id, + histogram, + }, + ]) ); } }, MAX_CONCURRENT_QUERIES); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts index 077c2162a30fd..1a61edde6864b 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts @@ -41,7 +41,6 @@ export const histogramHandlerFactory = requestBody, responseStream, stateHandler, - version, }: ResponseStreamFetchOptions) => async ( fieldValuePairsCount: number, @@ -132,14 +131,6 @@ export const histogramHandlerFactory = ) ?? { doc_count: 0, }; - if (version === '1') { - return { - key: o.key, - key_as_string: o.key_as_string ?? '', - doc_count_significant_term: current.doc_count, - doc_count_overall: Math.max(0, o.doc_count - current.doc_count), - }; - } return { key: o.key, @@ -154,16 +145,13 @@ export const histogramHandlerFactory = stateHandler.loaded((1 / fieldValuePairsCount) * PROGRESS_STEP_HISTOGRAMS, false); pushHistogramDataLoadingState(); responseStream.push( - addSignificantItemsHistogramAction( - [ - { - fieldName, - fieldValue, - histogram, - }, - ], - version - ) + addSignificantItemsHistogramAction([ + { + fieldName, + fieldValue, + histogram, + }, + ]) ); } }, MAX_CONCURRENT_QUERIES); @@ -237,15 +225,6 @@ export const histogramHandlerFactory = doc_count: 0, }; - if (version === '1') { - return { - key: o.key, - key_as_string: o.key_as_string ?? '', - doc_count_significant_term: current.doc_count, - doc_count_overall: Math.max(0, o.doc_count - current.doc_count), - }; - } - return { key: o.key, key_as_string: o.key_as_string ?? '', @@ -259,16 +238,13 @@ export const histogramHandlerFactory = stateHandler.loaded((1 / fieldValuePairsCount) * PROGRESS_STEP_HISTOGRAMS, false); pushHistogramDataLoadingState(); responseStream.push( - addSignificantItemsHistogramAction( - [ - { - fieldName, - fieldValue, - histogram, - }, - ], - version - ) + addSignificantItemsHistogramAction([ + { + fieldName, + fieldValue, + histogram, + }, + ]) ); } } diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts index 6fb9f97cde4ef..aa2aa1944e64a 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts @@ -38,7 +38,6 @@ export const significantItemsHandlerFactory = requestBody, responseStream, stateHandler, - version, }: ResponseStreamFetchOptions) => async ({ fieldCandidates, @@ -54,21 +53,11 @@ export const significantItemsHandlerFactory = const significantCategories: SignificantItem[] = []; - if (version === '1') { - significantCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'1'>).overrides?.significantTerms?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN - ) ?? []) - ); - } - - if (version === '2') { - significantCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN - ) ?? []) - ); - } + significantCategories.push( + ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN + ) ?? []) + ); // Get significant categories of text fields if (textFieldCandidates.length > 0) { @@ -85,27 +74,17 @@ export const significantItemsHandlerFactory = ); if (significantCategories.length > 0) { - responseStream.push(addSignificantItemsAction(significantCategories, version)); + responseStream.push(addSignificantItemsAction(significantCategories)); } } const significantTerms: SignificantItem[] = []; - if (version === '1') { - significantTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'1'>).overrides?.significantTerms?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD - ) ?? []) - ); - } - - if (version === '2') { - significantTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD - ) ?? []) - ); - } + significantTerms.push( + ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD + ) ?? []) + ); const fieldsToSample = new Set(); @@ -157,7 +136,7 @@ export const significantItemsHandlerFactory = }); significantTerms.push(...pValues); - responseStream.push(addSignificantItemsAction(pValues, version)); + responseStream.push(addSignificantItemsAction(pValues)); } responseStream.push( diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts index cc15c8b616995..f29b372116f48 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts @@ -39,7 +39,6 @@ export const topItemsHandlerFactory = requestBody, responseStream, stateHandler, - version, }: ResponseStreamFetchOptions) => async ({ fieldCandidates, @@ -55,21 +54,11 @@ export const topItemsHandlerFactory = const topCategories: SignificantItem[] = []; - if (version === '1') { - topCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'1'>).overrides?.significantTerms?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN - ) ?? []) - ); - } - - if (version === '2') { - topCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN - ) ?? []) - ); - } + topCategories.push( + ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN + ) ?? []) + ); // Get categories of text fields if (textFieldCandidates.length > 0) { @@ -86,27 +75,17 @@ export const topItemsHandlerFactory = ); if (topCategories.length > 0) { - responseStream.push(addSignificantItemsAction(topCategories, version)); + responseStream.push(addSignificantItemsAction(topCategories)); } } const topTerms: SignificantItem[] = []; - if (version === '1') { - topTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'1'>).overrides?.significantTerms?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD - ) ?? []) - ); - } - - if (version === '2') { - topTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( - (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD - ) ?? []) - ); - } + topTerms.push( + ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD + ) ?? []) + ); const fieldsToSample = new Set(); @@ -158,7 +137,7 @@ export const topItemsHandlerFactory = }); topTerms.push(...fetchedTopTerms); - responseStream.push(addSignificantItemsAction(fetchedTopTerms, version)); + responseStream.push(addSignificantItemsAction(fetchedTopTerms)); } responseStream.push( diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts index de9df4aa5bdab..77fedfafb1896 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts @@ -9,7 +9,6 @@ import type { CoreStart, IRouter } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import { aiopsLogRateAnalysisSchemaV1 } from '@kbn/aiops-log-rate-analysis/api/schema_v1'; import { aiopsLogRateAnalysisSchemaV2 } from '@kbn/aiops-log-rate-analysis/api/schema_v2'; import { AIOPS_API_ENDPOINT } from '@kbn/aiops-common/constants'; @@ -35,17 +34,6 @@ export const defineRoute = ( path: AIOPS_API_ENDPOINT.LOG_RATE_ANALYSIS, access: 'internal', }) - .addVersion( - { - version: '1', - validate: { - request: { - body: aiopsLogRateAnalysisSchemaV1, - }, - }, - }, - routeHandlerFactory('1', license, logger, coreStart, usageCounter) - ) .addVersion( { version: '2', diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts index b676836adfa96..57e97ade7fb12 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts @@ -56,7 +56,7 @@ export interface ResponseStreamFetchOptions extends Respon responseStream: { end: () => void; endWithUpdatedLoadingState: () => void; - push: StreamFactoryReturnType>['push']; + push: StreamFactoryReturnType['push']; pushPingWithTimeout: () => void; pushError: (msg: string) => void; }; @@ -97,14 +97,14 @@ export const responseStreamFactory = (options: ResponseStr end: streamEnd, push, responseWithHeaders, - } = streamFactory>( + } = streamFactory( headers, logger, requestBody.compressResponse, requestBody.flushFix ); - const pushPingWithTimeout = streamPushPingWithTimeoutFactory(state, push, logDebugMessage); + const pushPingWithTimeout = streamPushPingWithTimeoutFactory(state, push, logDebugMessage); const end = streamEndFactory(state, streamEnd, logDebugMessage); const endWithUpdatedLoadingState = streamEndWithUpdatedLoadingStateFactory(end, push); const pushError = streamPushErrorFactory(push, logDebugMessage); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_end_with_updated_loading_state.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_end_with_updated_loading_state.ts index 3ecb08fba480b..7765f6679d38d 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_end_with_updated_loading_state.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_end_with_updated_loading_state.ts @@ -13,7 +13,6 @@ import { updateLoadingStateAction, type AiopsLogRateAnalysisApiAction, } from '@kbn/aiops-log-rate-analysis/api/actions'; -import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-log-rate-analysis/api/schema'; /** * Helper function that will push a message to the stream that it's done and @@ -21,9 +20,9 @@ import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-lo * This is implemented as a factory that receives the necessary dependencies * which then returns the actual helper function. */ -export const streamEndWithUpdatedLoadingStateFactory = ( +export const streamEndWithUpdatedLoadingStateFactory = ( streamEndCallback: () => void, - push: StreamFactoryReturnType>['push'] + push: StreamFactoryReturnType['push'] ) => { return function endWithUpdatedLoadingState() { push( diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_error.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_error.ts index 87978b2561a35..92c3fb3661ae8 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_error.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_error.ts @@ -7,7 +7,6 @@ import type { StreamFactoryReturnType } from '@kbn/ml-response-stream/server'; -import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-log-rate-analysis/api/schema'; import { addErrorAction, type AiopsLogRateAnalysisApiAction, @@ -20,8 +19,8 @@ import type { LogDebugMessage } from './log_debug_message'; * This is implemented as a factory that receives the necessary dependencies * which then returns the actual helper function. */ -export const streamPushErrorFactory = ( - push: StreamFactoryReturnType>['push'], +export const streamPushErrorFactory = ( + push: StreamFactoryReturnType['push'], logDebugMessage: LogDebugMessage ) => { return function pushError(m: string) { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_ping_with_timeout.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_ping_with_timeout.ts index d570da39f277e..bcedc82d5f5c4 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_ping_with_timeout.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_utils/stream_push_ping_with_timeout.ts @@ -11,7 +11,6 @@ import { pingAction, type AiopsLogRateAnalysisApiAction, } from '@kbn/aiops-log-rate-analysis/api/actions'; -import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-log-rate-analysis/api/schema'; import type { LogDebugMessage } from './log_debug_message'; import type { StateHandler } from './state_handler'; @@ -24,9 +23,9 @@ const PING_FREQUENCY = 10000; * This is implemented as a factory that receives the necessary dependencies * which then returns the actual helper function. */ -export const streamPushPingWithTimeoutFactory = ( +export const streamPushPingWithTimeoutFactory = ( stateHandler: StateHandler, - push: StreamFactoryReturnType>['push'], + push: StreamFactoryReturnType['push'], logDebugMessage: LogDebugMessage ) => { return function pushPingWithTimeout() { diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts index 55aa3247aaa7a..5f5b069fe75e7 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts @@ -1972,7 +1972,7 @@ describe('Task Runner', () => { expect(loggerCallPrefix[0].trim()).toMatchInlineSnapshot( `"Executing Rule default:test:1 has resulted in Error: GENERIC ERROR MESSAGE"` ); - expect(loggerMeta?.tags).toEqual(['test', '1', 'rule-run-failed']); + expect(loggerMeta?.tags).toEqual(['test', '1', 'rule-run-failed', 'framework-error']); expect(loggerMeta?.error?.stack_trace).toBeDefined(); expect(logger.error).toBeCalledTimes(1); expect(getErrorSource(runnerResult.taskRunError as Error)).toBe(TaskErrorSource.FRAMEWORK); @@ -3353,7 +3353,7 @@ describe('Task Runner', () => { ); expect(logger.error).toHaveBeenCalledWith( 'Executing Rule test:1 has resulted in the following error(s): an error occurred,second error occurred', - { tags: ['test', '1', 'rule-run-failed'] } + { tags: ['test', '1', 'rule-run-failed', 'framework-error'] } ); }); diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index c5993fe8bc560..627f88bab4e69 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -687,18 +687,16 @@ export class TaskRunner< const { errors: errorsFromLastRun } = this.ruleResult.getLastRunResults(); if (errorsFromLastRun.length > 0) { const isUserError = !errorsFromLastRun.some((lastRunError) => !lastRunError.userError); + const errorSource = isUserError ? TaskErrorSource.USER : TaskErrorSource.FRAMEWORK; const lasRunErrorMessages = errorsFromLastRun .map((lastRunError) => lastRunError.message) .join(','); const errorMessage = `Executing Rule ${this.ruleType.id}:${ruleId} has resulted in the following error(s): ${lasRunErrorMessages}`; this.logger.error(errorMessage, { - tags: [this.ruleType.id, ruleId, 'rule-run-failed'], + tags: [this.ruleType.id, ruleId, 'rule-run-failed', `${errorSource}-error`], }); return { - taskRunError: createTaskRunError( - new Error(errorMessage), - isUserError ? TaskErrorSource.USER : TaskErrorSource.FRAMEWORK - ), + taskRunError: createTaskRunError(new Error(errorMessage), errorSource), }; } @@ -711,11 +709,15 @@ export class TaskRunner< (ruleRunStateWithMetrics: RuleTaskStateAndMetrics) => transformRunStateToTaskState(ruleRunStateWithMetrics), (err: ElasticsearchError) => { + const errorSource = `${getErrorSource(err)}-error`; + if (isAlertSavedObjectNotFoundError(err, ruleId)) { const message = `Executing Rule ${spaceId}:${ this.ruleType.id }:${ruleId} has resulted in Error: ${getEsErrorMessage(err)}`; - this.logger.debug(message); + this.logger.debug(message, { + tags: [this.ruleType.id, ruleId, 'rule-run-failed', errorSource], + }); } else { const error = this.stackTraceLog ? this.stackTraceLog.message : err; const stack = this.stackTraceLog ? this.stackTraceLog.stackTrace : err.stack; @@ -723,7 +725,7 @@ export class TaskRunner< this.ruleType.id }:${ruleId} has resulted in Error: ${getEsErrorMessage(error)} - ${stack ?? ''}`; this.logger.error(message, { - tags: [this.ruleType.id, ruleId, 'rule-run-failed'], + tags: [this.ruleType.id, ruleId, 'rule-run-failed', errorSource], error: { stack_trace: stack }, }); } diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/table.stories.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/table.stories.tsx index 6d7539fec5b39..7707e5e49b5d3 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/table.stories.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/table.stories.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; +import { coreMock } from '@kbn/core/public/mocks'; import { getTableRenderer } from '../table'; import { Render } from './render'; @@ -42,5 +43,7 @@ storiesOf('renderers/table', module).add('default', () => { ], }, }; - return ; + return ( + + ); }); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx index 488494193f316..9e468d1702e92 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx @@ -17,7 +17,7 @@ import { ReactEmbeddableRenderer, } from '@kbn/embeddable-plugin/public'; import { PresentationContainer } from '@kbn/presentation-containers'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import React, { FC } from 'react'; import ReactDOM from 'react-dom'; import useObservable from 'react-use/lib/useObservable'; @@ -73,8 +73,7 @@ const renderReactEmbeddable = ({ ); }; -const renderEmbeddableFactory = (core: CoreStart, plugins: StartDeps) => { - const I18nContext = core.i18n.Context; +const renderEmbeddableFactory = (core: CoreStart, _plugins: StartDeps) => { const EmbeddableRenderer: FC<{ embeddable: IEmbeddable }> = ({ embeddable }) => { const currentAppId = useObservable(core.application.currentAppId$, undefined); @@ -99,16 +98,14 @@ const renderEmbeddableFactory = (core: CoreStart, plugins: StartDeps) => { return (embeddableObject: IEmbeddable) => { return ( -
    - - - - - -
    + +
    + +
    +
    ); }; }; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/advanced_filter/index.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/advanced_filter/index.tsx index 2a875ff88f413..288be6861e79b 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/advanced_filter/index.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/advanced_filter/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { StartInitializer } from '../../../plugin'; import { RendererFactory } from '../../../../types'; import { AdvancedFilter } from './component'; @@ -16,7 +16,7 @@ import { RendererStrings } from '../../../../i18n'; const { advancedFilter: strings } = RendererStrings; export const advancedFilterFactory: StartInitializer> = - (core, plugins) => () => ({ + (core, _plugins) => () => ({ name: 'advanced_filter', displayName: strings.getDisplayName(), help: strings.getHelpDescription(), @@ -24,12 +24,12 @@ export const advancedFilterFactory: StartInitializer> = height: 50, render(domNode, _, handlers) { ReactDOM.render( - + handlers.event({ name: 'applyFilterAction', data: filter })} value={handlers.getFilter()} /> - , + , domNode, () => handlers.done() ); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/dropdown_filter/index.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/dropdown_filter/index.tsx index 50f534a658359..7ed912c5e9b7d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/dropdown_filter/index.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/dropdown_filter/index.tsx @@ -9,7 +9,7 @@ import { fromExpression, toExpression, Ast } from '@kbn/interpreter'; import { get } from 'lodash'; import React from 'react'; import ReactDOM from 'react-dom'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { syncFilterExpression } from '../../../../public/lib/sync_filter_expression'; import { RendererFactory } from '../../../../types'; import { StartInitializer } from '../../../plugin'; @@ -41,7 +41,7 @@ const getFilterValue = (filterExpression: string) => { }; export const dropdownFilterFactory: StartInitializer> = - (core, plugins) => () => ({ + (core, _plugins) => () => ({ name: 'dropdown_filter', displayName: strings.getDisplayName(), help: strings.getHelpDescription(), @@ -97,7 +97,7 @@ export const dropdownFilterFactory: StartInitializer> = ); ReactDOM.render( - {filter}, + {filter}, domNode, () => handlers.done() ); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/time_filter/index.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/time_filter/index.tsx index 52ae1e28f7904..216368b038bbd 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/time_filter/index.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/time_filter/index.tsx @@ -9,7 +9,7 @@ import ReactDOM from 'react-dom'; import React from 'react'; import { toExpression } from '@kbn/interpreter'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { syncFilterExpression } from '../../../../public/lib/sync_filter_expression'; import { RendererStrings } from '../../../../i18n'; import { TimeFilter } from './components'; @@ -22,8 +22,8 @@ const { timeFilter: strings } = RendererStrings; const defaultTimeFilterExpression = 'timefilter column=@timestamp from=now-24h to=now'; -export const timeFilterFactory: StartInitializer> = (core, plugins) => { - const { uiSettings, theme } = core; +export const timeFilterFactory: StartInitializer> = (core, _plugins) => { + const { uiSettings } = core; const customQuickRanges = (uiSettings.get(UI_SETTINGS.TIMEPICKER_QUICK_RANGES) || []).map( ({ from, to, display }: { from: string; to: string; display: string }) => ({ @@ -60,14 +60,14 @@ export const timeFilterFactory: StartInitializer> = ( } ReactDOM.render( - + handlers.event({ name: 'applyFilterAction', data: filter })} filter={filterExpression} commonlyUsedRanges={customQuickRanges} dateFormat={customDateFormat} /> - , + , domNode, () => handlers.done() ); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/__stories__/markdown.stories.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/__stories__/markdown.stories.tsx index db12daf4c340c..e7391f4e5e983 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/__stories__/markdown.stories.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/__stories__/markdown.stories.tsx @@ -7,10 +7,11 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; +import { coreMock } from '@kbn/core/public/mocks'; import { getMarkdownRenderer } from '..'; import { Render } from '../../__stories__/render'; -const markdown = getMarkdownRenderer(); +const markdown = getMarkdownRenderer(coreMock.createStart()); storiesOf('renderers/markdown', module) .add('default', () => { const config = { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/index.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/index.tsx index fd1e2415d0589..499cad768270a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/index.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/markdown/index.tsx @@ -7,10 +7,8 @@ import React, { CSSProperties } from 'react'; import ReactDOM from 'react-dom'; -import { CoreTheme } from '@kbn/core/public'; -import { Observable } from 'rxjs'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; -import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; +import { CoreStart } from '@kbn/core/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { Markdown } from '@kbn/kibana-react-plugin/public'; import { StartInitializer } from '../../plugin'; import { RendererStrings } from '../../../i18n'; @@ -20,7 +18,7 @@ import { RendererFactory } from '../../../types'; const { markdown: strings } = RendererStrings; export const getMarkdownRenderer = - (theme$: Observable = defaultTheme$): RendererFactory => + (core: CoreStart): RendererFactory => () => ({ name: 'markdown', displayName: strings.getDisplayName(), @@ -30,14 +28,14 @@ export const getMarkdownRenderer = const fontStyle = config.font ? config.font.spec : {}; ReactDOM.render( - + - , + , domNode, () => handlers.done() ); @@ -46,5 +44,5 @@ export const getMarkdownRenderer = }, }); -export const markdownFactory: StartInitializer> = (core, plugins) => - getMarkdownRenderer(core.theme.theme$); +export const markdownFactory: StartInitializer> = (core, _plugins) => + getMarkdownRenderer(core); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/table.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/table.tsx index 190c2d5b413ea..9440fc23e7fd5 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/table.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/table.tsx @@ -7,10 +7,8 @@ import ReactDOM from 'react-dom'; import React from 'react'; -import { CoreTheme } from '@kbn/core/public'; -import { Observable } from 'rxjs'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; -import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; +import { CoreStart } from '@kbn/core/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { StartInitializer } from '../plugin'; import { Datatable as DatatableComponent } from '../../public/components/datatable'; import { RendererStrings } from '../../i18n'; @@ -26,7 +24,7 @@ export interface TableArguments { } export const getTableRenderer = - (theme$: Observable = defaultTheme$): RendererFactory => + (core: CoreStart): RendererFactory => () => ({ name: 'table', displayName: strings.getDisplayName(), @@ -35,7 +33,7 @@ export const getTableRenderer = render(domNode, config, handlers) { const { datatable, paginate, perPage, font = { spec: {} }, showHeader } = config; ReactDOM.render( - +
    -
    , + , domNode, () => handlers.done() ); @@ -52,5 +50,5 @@ export const getTableRenderer = }, }); -export const tableFactory: StartInitializer> = (core, plugins) => - getTableRenderer(core.theme.theme$); +export const tableFactory: StartInitializer> = (core, _plugins) => + getTableRenderer(core); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/text.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/text.tsx index 9ddc7b32c24d3..6767db64f5469 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/text.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/text.tsx @@ -7,10 +7,8 @@ import ReactDOM from 'react-dom'; import React from 'react'; -import { CoreTheme } from '@kbn/core/public'; -import { Observable } from 'rxjs'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; -import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; +import { CoreStart } from '@kbn/core/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { StartInitializer } from '../plugin'; import { RendererStrings } from '../../i18n'; import { RendererFactory } from '../../types'; @@ -18,7 +16,7 @@ import { RendererFactory } from '../../types'; const { text: strings } = RendererStrings; export const getTextRenderer = - (theme$: Observable = defaultTheme$): RendererFactory<{ text: string }> => + (core: CoreStart): RendererFactory<{ text: string }> => () => ({ name: 'text', displayName: strings.getDisplayName(), @@ -26,9 +24,9 @@ export const getTextRenderer = reuseDomNode: true, render(domNode, { text: textString }, handlers) { ReactDOM.render( - +
    {textString}
    -
    , + , domNode, () => handlers.done() ); @@ -36,5 +34,5 @@ export const getTextRenderer = }, }); -export const textFactory: StartInitializer> = (core, plugins) => - getTextRenderer(core.theme.theme$); +export const textFactory: StartInitializer> = (core, _plugins) => + getTextRenderer(core); diff --git a/x-pack/plugins/canvas/public/application.tsx b/x-pack/plugins/canvas/public/application.tsx index fa544095a8598..d9a279e2d2619 100644 --- a/x-pack/plugins/canvas/public/application.tsx +++ b/x-pack/plugins/canvas/public/application.tsx @@ -8,16 +8,16 @@ import React from 'react'; import { Store } from 'redux'; import ReactDOM from 'react-dom'; -import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { Provider } from 'react-redux'; import { BehaviorSubject } from 'rxjs'; +import '@kbn/flot-charts'; import { includes, remove } from 'lodash'; import { AppMountParameters, CoreStart, CoreSetup, AppUpdater } from '@kbn/core/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { PluginServices } from '@kbn/presentation-util-plugin/public'; @@ -71,21 +71,19 @@ export const renderApp = ({ const ServicesContextProvider = pluginServices.getContextProvider(); ReactDOM.render( - - - - - - - - - - - - - - - , + + + + + + + + + + + + + , element ); return () => { @@ -152,11 +150,11 @@ export const initializeCanvas = async ( ], content: (domNode, { hideHelpMenu }) => { ReactDOM.render( - + - , + , domNode ); return () => ReactDOM.unmountComponentAtNode(domNode); diff --git a/x-pack/plugins/canvas/tsconfig.json b/x-pack/plugins/canvas/tsconfig.json index 1af291ec89e8a..4a0169f9ac65e 100644 --- a/x-pack/plugins/canvas/tsconfig.json +++ b/x-pack/plugins/canvas/tsconfig.json @@ -82,13 +82,13 @@ "@kbn/core-saved-objects-server", "@kbn/discover-utils", "@kbn/content-management-plugin", - "@kbn/react-kibana-context-theme", "@kbn/shared-ux-page-kibana-template", "@kbn/reporting-server", "@kbn/reporting-export-types-pdf-common", "@kbn/code-editor", "@kbn/presentation-containers", "@kbn/presentation-publishing", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx index e544cc905cf72..d1bb46c7b8717 100644 --- a/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx @@ -19,7 +19,8 @@ const LABELS = { inProgress: i18n.STATUS_IN_PROGRESS, }; -describe('StatusFilter', () => { +// FLAKY: https://github.com/elastic/kibana/issues/177334 +describe.skip('StatusFilter', () => { const onChange = jest.fn(); const defaultProps = { selectedOptionKeys: [], diff --git a/x-pack/plugins/cloud_security_posture/common/types/benchmarks/v2.ts b/x-pack/plugins/cloud_security_posture/common/types/benchmarks/v2.ts index f5052d08f9914..efcdd38f4e9b3 100644 --- a/x-pack/plugins/cloud_security_posture/common/types/benchmarks/v2.ts +++ b/x-pack/plugins/cloud_security_posture/common/types/benchmarks/v2.ts @@ -25,26 +25,27 @@ export interface GetBenchmarkResponse { items: Benchmark[]; } -export const benchmarkResponseSchema = schema.object({ - items: schema.arrayOf( - schema.object({ - id: schema.oneOf([ - schema.literal('cis_k8s'), - schema.literal('cis_azure'), - schema.literal('cis_aws'), - schema.literal('cis_eks'), - schema.literal('cis_gcp'), - ]), - name: schema.string(), - version: schema.string(), - score: schema.object({ - postureScore: schema.number({ defaultValue: 0, min: 0 }), - resourcesEvaluated: schema.number({ defaultValue: 0, min: 0 }), - totalFailed: schema.number({ defaultValue: 0, min: 0 }), - totalFindings: schema.number({ defaultValue: 0, min: 0 }), - totalPassed: schema.number({ defaultValue: 0, min: 0 }), - }), - evaluation: schema.number({ defaultValue: 0, min: 0 }), - }) - ), -}); +export const benchmarkResponseSchema = () => + schema.object({ + items: schema.arrayOf( + schema.object({ + id: schema.oneOf([ + schema.literal('cis_k8s'), + schema.literal('cis_azure'), + schema.literal('cis_aws'), + schema.literal('cis_eks'), + schema.literal('cis_gcp'), + ]), + name: schema.string(), + version: schema.string(), + score: schema.object({ + postureScore: schema.number({ defaultValue: 0, min: 0 }), + resourcesEvaluated: schema.number({ defaultValue: 0, min: 0 }), + totalFailed: schema.number({ defaultValue: 0, min: 0 }), + totalFindings: schema.number({ defaultValue: 0, min: 0 }), + totalPassed: schema.number({ defaultValue: 0, min: 0 }), + }), + evaluation: schema.number({ defaultValue: 0, min: 0 }), + }) + ), + }); diff --git a/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx b/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx index 17a914937a060..941b22f364e5e 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx @@ -44,7 +44,7 @@ export const showCreateDetectionRuleSuccessToast = ( color: 'success', iconType: '', 'data-test-subj': 'csp:toast-success', - text: toMountPoint( + title: toMountPoint(
    {ruleResponse.name} @@ -60,6 +60,10 @@ export const showCreateDetectionRuleSuccessToast = ( defaultMessage="Add rule actions to get notified when alerts are generated." /> +
    + ), + text: toMountPoint( +
    + + {isBenchmarkRuleMuted ? ( + + ) : ( + + )} + + + ), text: toMountPoint(
    - - - {isBenchmarkRuleMuted ? ( - - ) : ( - - )} - - {isBenchmarkRuleMuted ? ( templates={templates} onClose={close} />, - { theme$: core.theme.theme$ } + core ), { ownFocus: true, diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx index 0ef5f1c63771e..85f72d23f31c5 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { tracksOverlays, type PresentationContainer, @@ -92,7 +92,7 @@ export class FlyoutEditDrilldownAction implements Action { templates={templates} onClose={close} />, - { theme$: core.theme.theme$ } + core ), { ownFocus: true, diff --git a/x-pack/plugins/dashboard_enhanced/tsconfig.json b/x-pack/plugins/dashboard_enhanced/tsconfig.json index 0125f8c463513..6663b6096e27c 100644 --- a/x-pack/plugins/dashboard_enhanced/tsconfig.json +++ b/x-pack/plugins/dashboard_enhanced/tsconfig.json @@ -5,7 +5,6 @@ }, "include": ["common/**/*", "public/**/*", "server/**/*"], "kbn_references": [ - "@kbn/kibana-react-plugin", "@kbn/kibana-utils-plugin", "@kbn/dashboard-plugin", "@kbn/share-plugin", @@ -21,7 +20,8 @@ "@kbn/image-embeddable-plugin", "@kbn/presentation-util-plugin", "@kbn/presentation-containers", - "@kbn/presentation-publishing" + "@kbn/presentation-publishing", + "@kbn/react-kibana-mount" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx index 98579df0f4db0..c73ac26938e85 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx @@ -95,7 +95,7 @@ export const getChoroplethTopValuesLayer = ( }; interface Props { - stats: FieldVisStats | undefined; + stats: FieldVisStats; suggestion: EMSTermJoinConfig; } @@ -106,15 +106,13 @@ export const ChoroplethMap: FC = ({ stats, suggestion }) => { }, } = useDataVisualizerKibana(); - const { fieldName, isTopValuesSampled, topValues, sampleCount } = stats!; + const { fieldName, isTopValuesSampled, topValues, sampleCount } = stats; const layerList: VectorLayerDescriptor[] = useMemo( () => [getChoroplethTopValuesLayer(fieldName || '', topValues || [], suggestion)], [suggestion, fieldName, topValues] ); - if (!stats) return null; - const totalDocuments = stats.totalDocuments ?? sampleCount ?? 0; const countsElement = totalDocuments ? ( diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx index 5a7b99befff64..44be869c9af97 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx @@ -6,7 +6,7 @@ */ import type { FC } from 'react'; -import React, { useCallback, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import type { EMSTermJoinConfig } from '@kbn/maps-plugin/public'; import type { FieldDataRowProps } from '../../types/field_data_row'; import { TopValues } from '../../../top_values'; @@ -17,31 +17,41 @@ import { ChoroplethMap } from './choropleth_map'; import { ErrorMessageContent } from './error_message'; export const KeywordContent: FC = ({ config, onAddFilter }) => { - const [EMSSuggestion, setEMSSuggestion] = useState(); + const [suggestion, setSuggestion] = useState(null); const { stats, fieldName } = config; const fieldFormat = 'fieldFormat' in config ? config.fieldFormat : undefined; const { services: { maps: mapsPlugin }, } = useDataVisualizerKibana(); - const loadEMSTermSuggestions = useCallback(async () => { + useEffect(() => { if (!mapsPlugin) return; - const suggestion: EMSTermJoinConfig | null = await mapsPlugin.suggestEMSTermJoinConfig({ - sampleValues: Array.isArray(stats?.topValues) - ? stats?.topValues.map((value) => value.key) - : [], - sampleValuesColumnName: fieldName || '', - }); - setEMSSuggestion(suggestion); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [fieldName]); + if (!stats?.topValues) { + setSuggestion(null); + return; + } - useEffect( - function getInitialEMSTermSuggestion() { - loadEMSTermSuggestions(); - }, - [loadEMSTermSuggestions] - ); + let ignore = false; + mapsPlugin + .suggestEMSTermJoinConfig({ + sampleValues: stats.topValues.map((value) => value.key), + sampleValuesColumnName: fieldName || '', + }) + .then((nextSuggestion) => { + if (!ignore) { + setSuggestion(nextSuggestion); + } + }) + .catch(() => { + if (!ignore) { + setSuggestion(null); + } + }); + + return () => { + ignore = true; + }; + }, [fieldName, mapsPlugin, stats?.topValues]); return ( @@ -65,7 +75,7 @@ export const KeywordContent: FC = ({ config, onAddFilter }) = /> ) : null} - {EMSSuggestion && stats && } + {suggestion && stats && } ); }; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts index 599839f3aa78e..cb72592742d44 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts @@ -19,6 +19,7 @@ import { getProcessedFields } from '@kbn/ml-data-grid'; import { buildBaseFilterCriteria } from '@kbn/ml-query-utils'; import { isDefined } from '@kbn/ml-is-defined'; import type { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useDataVisualizerKibana } from '../../kibana_context'; import type { AggregatableFieldOverallStats, @@ -51,6 +52,18 @@ import { fetchDataWithTimeout, rateLimitingForkJoin, } from '../search_strategy/requests/fetch_utils'; + +const getPopulatedFieldsInIndex = ( + populatedFieldsInIndexWithoutRuntimeFields: Set | undefined | null, + runtimeFieldMap: MappingRuntimeFields | undefined +): Set | undefined | null => { + if (!populatedFieldsInIndexWithoutRuntimeFields) return undefined; + const runtimeFields = runtimeFieldMap ? Object.keys(runtimeFieldMap) : undefined; + return runtimeFields && runtimeFields?.length > 0 + ? new Set([...Array.from(populatedFieldsInIndexWithoutRuntimeFields), ...runtimeFields]) + : populatedFieldsInIndexWithoutRuntimeFields; +}; + export function useOverallStats( esql = false, searchStrategyParams: TParams | undefined, @@ -68,7 +81,7 @@ export function useOverallStats(getDefaultPageState().overallStats); - const [populatedFieldsInIndex, setPopulatedFieldsInIndex] = useState< + const [populatedFieldsInIndexWithoutRuntimeFields, setPopulatedFieldsInIndex] = useState< | Set // request to fields caps has not been made yet | undefined @@ -92,10 +105,9 @@ export function useOverallStats { populatedFieldsAbortCtrl.current.abort(); @@ -131,15 +143,7 @@ export function useOverallStats field.name), - // Field caps API don't know about runtime fields - // so by default we expect runtime fields to be populated - // so we can later check as needed - ...Object.keys(runtimeFieldMap ?? {}), - ]) - ); + setPopulatedFieldsInIndex(new Set([...nonEmptyFields.map((field) => field.name)])); } else { setPopulatedFieldsInIndex(null); } @@ -154,25 +158,33 @@ export function useOverallStats { try { searchSubscription$.current?.unsubscribe(); abortCtrl.current.abort(); abortCtrl.current = new AbortController(); - if (!searchStrategyParams || lastRefresh === 0 || populatedFieldsInIndex === undefined) { + if ( + !searchStrategyParams || + lastRefresh === 0 || + populatedFieldsInIndexWithoutRuntimeFields === undefined + ) { return; } + const populatedFieldsInIndex = getPopulatedFieldsInIndex( + populatedFieldsInIndexWithoutRuntimeFields, + searchStrategyParams.runtimeFieldMap + ); + setFetchState({ ...getInitialProgress(), isRunning: true, @@ -391,7 +403,14 @@ export function useOverallStats { searchSubscription$.current?.unsubscribe(); diff --git a/x-pack/plugins/elastic_assistant/common/constants.ts b/x-pack/plugins/elastic_assistant/common/constants.ts index f66d76dac0372..77fd99c7d5eb6 100755 --- a/x-pack/plugins/elastic_assistant/common/constants.ts +++ b/x-pack/plugins/elastic_assistant/common/constants.ts @@ -12,8 +12,8 @@ export const BASE_PATH = '/internal/elastic_assistant'; export const POST_ACTIONS_CONNECTOR_EXECUTE = `${BASE_PATH}/actions/connector/{connectorId}/_execute`; -// Insights -export const INSIGHTS_ALERTS = `${BASE_PATH}/insights/alerts`; +// Attack discovery +export const ATTACK_DISCOVERY = `${BASE_PATH}/attack_discovery`; // Knowledge Base export const KNOWLEDGE_BASE = `${BASE_PATH}/knowledge_base/{resource?}`; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts index 09434d467ebf7..0a5472e79b12c 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts @@ -39,7 +39,7 @@ export const createConversation = async ({ try { const response = await esClient.create({ body, - id: uuidv4(), + id: conversation?.id || uuidv4(), index: conversationIndex, refresh: 'wait_for', }); 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 5976a2ef253a7..133419f45d175 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-common'; import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from '@langchain/core/messages'; import { - AlertsInsightsPostRequestBody, + AttackDiscoveryPostRequestBody, ExecuteConnectorRequestBody, } from '@kbn/elastic-assistant-common'; @@ -36,7 +36,7 @@ export const requestHasRequiredAnonymizationParams = ( request: KibanaRequest< unknown, unknown, - ExecuteConnectorRequestBody | AlertsInsightsPostRequestBody + ExecuteConnectorRequestBody | AttackDiscoveryPostRequestBody > ): boolean => { const { replacements } = request?.body ?? {}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/insights/alerts/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts similarity index 78% rename from x-pack/plugins/elastic_assistant/server/routes/insights/alerts/helpers.ts rename to x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts index 97167ea76bd4a..7fd11c5d52582 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/insights/alerts/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts @@ -8,7 +8,7 @@ import { KibanaRequest } from '@kbn/core/server'; import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { - AlertsInsightsPostRequestBody, + AttackDiscoveryPostRequestBody, ExecuteConnectorRequestBody, Replacements, } from '@kbn/elastic-assistant-common'; @@ -16,9 +16,9 @@ import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/language_mo import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { v4 as uuidv4 } from 'uuid'; -import { AssistantToolParams, ElasticAssistantApiRequestHandlerContext } from '../../../types'; +import { AssistantToolParams, ElasticAssistantApiRequestHandlerContext } from '../../types'; -export const REQUIRED_FOR_INSIGHTS: AnonymizationFieldResponse[] = [ +export const REQUIRED_FOR_ATTACK_DISCOVERY: AnonymizationFieldResponse[] = [ { id: uuidv4(), field: '_id', @@ -52,24 +52,24 @@ export const getAssistantToolParams = ({ request: KibanaRequest< unknown, unknown, - ExecuteConnectorRequestBody | AlertsInsightsPostRequestBody + ExecuteConnectorRequestBody | AttackDiscoveryPostRequestBody >; size: number; }): AssistantToolParams => ({ alertsIndexPattern, - anonymizationFields: [...(anonymizationFields ?? []), ...REQUIRED_FOR_INSIGHTS], - isEnabledKnowledgeBase: false, // not required for insights - chain: undefined, // not required for insights + anonymizationFields: [...(anonymizationFields ?? []), ...REQUIRED_FOR_ATTACK_DISCOVERY], + isEnabledKnowledgeBase: false, // not required for attack discovery + chain: undefined, // not required for attack discovery esClient, llm, - modelExists: false, // not required for insights + modelExists: false, // not required for attack discovery onNewReplacements, replacements: latestReplacements, request, size, }); -export const isInsightsFeatureEnabled = ({ +export const isAttackDiscoveryFeatureEnabled = ({ assistantContext, pluginName, }: { @@ -78,5 +78,5 @@ export const isInsightsFeatureEnabled = ({ }): boolean => { const registeredFeatures = assistantContext.getRegisteredFeatures(pluginName); - return registeredFeatures.assistantAlertsInsights === true; + return registeredFeatures.attackDiscoveryEnabled === true; }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/insights/alerts/post_alerts_insights.ts b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/post_attack_discovery.ts similarity index 73% rename from x-pack/plugins/elastic_assistant/server/routes/insights/alerts/post_alerts_insights.ts rename to x-pack/plugins/elastic_assistant/server/routes/attack_discovery/post_attack_discovery.ts index 248e366646a8e..60c2451ff1f84 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/insights/alerts/post_alerts_insights.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/post_attack_discovery.ts @@ -9,26 +9,28 @@ import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/ import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/language_models'; import { type IKibanaResponse, IRouter, Logger } from '@kbn/core/server'; import { - AlertsInsightsPostRequestBody, - AlertsInsightsPostResponse, + AttackDiscoveryPostRequestBody, + AttackDiscoveryPostResponse, ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, Replacements, } from '@kbn/elastic-assistant-common'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { INSIGHTS_ALERTS } from '../../../../common/constants'; -import { getAssistantToolParams, isInsightsFeatureEnabled } from './helpers'; -import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../../helpers'; -import { getLangSmithTracer } from '../../evaluate/utils'; -import { buildResponse } from '../../../lib/build_response'; -import { ElasticAssistantRequestHandlerContext } from '../../../types'; -import { getLlmType } from '../../utils'; - -export const postAlertsInsightsRoute = (router: IRouter) => { +import { ATTACK_DISCOVERY } from '../../../common/constants'; +import { getAssistantToolParams, isAttackDiscoveryFeatureEnabled } from './helpers'; +import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; +import { getLangSmithTracer } from '../evaluate/utils'; +import { buildResponse } from '../../lib/build_response'; +import { ElasticAssistantRequestHandlerContext } from '../../types'; +import { getLlmType } from '../utils'; + +export const postAttackDiscoveryRoute = ( + router: IRouter +) => { router.versioned .post({ access: 'internal', - path: INSIGHTS_ALERTS, + path: ATTACK_DISCOVERY, options: { tags: ['access:elasticAssistant'], }, @@ -38,16 +40,16 @@ export const postAlertsInsightsRoute = (router: IRouter> => { + async (context, request, response): Promise> => { const resp = buildResponse(response); const assistantContext = await context.elasticAssistant; const logger: Logger = assistantContext.logger; @@ -62,12 +64,12 @@ export const postAlertsInsightsRoute = (router: IRouter tool.id === 'insights-tool'); + const assistantTool = assistantTools.find((tool) => tool.id === 'attack-discovery'); if (!assistantTool) { - return response.notFound(); // insights tool not found + return response.notFound(); // attack discovery tool not found } const traceOptions = { @@ -116,7 +118,7 @@ export const postAlertsInsightsRoute = (router: IRouter { describe('Capabilities', () => { it('returns a 404 if evaluate feature is not registered', async () => { context.elasticAssistant.getRegisteredFeatures.mockReturnValueOnce({ - assistantAlertsInsights: false, assistantModelEvaluation: false, + attackDiscoveryEnabled: false, }); const response = await server.inject( 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 cde838afa8c28..d1bf9dfa26ab1 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 @@ -63,7 +63,7 @@ export const postEvaluateRoute = ( }, response: { 200: { - body: buildRouteValidationWithZod(PostEvaluateResponse), + body: { custom: buildRouteValidationWithZod(PostEvaluateResponse) }, }, }, }, diff --git a/x-pack/plugins/elastic_assistant/server/routes/index.ts b/x-pack/plugins/elastic_assistant/server/routes/index.ts index 32886fe150ee9..352b91624f7fb 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/index.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/index.ts @@ -8,8 +8,8 @@ // Actions Connector Execute (LLM Wrapper) export { postActionsConnectorExecuteRoute } from './post_actions_connector_execute'; -// Alerts Insights -export { postAlertsInsightsRoute } from './insights/alerts/post_alerts_insights'; +// Attack Discovery +export { postAttackDiscoveryRoute } from './attack_discovery/post_attack_discovery'; // Knowledge Base export { deleteKnowledgeBaseRoute } from './knowledge_base/delete_knowledge_base'; 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 a82d20047aa1f..32f5fc47ae770 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 @@ -304,7 +304,7 @@ export const postActionsConnectorExecuteRoute = ( }); const assistantTools = (await context.elasticAssistant) .getRegisteredTools(pluginName) - .filter((x) => x.id !== 'insights-tool'); // we don't (yet) support asking the assistant for NEW insights from a conversation + .filter((x) => x.id !== 'attack-discovery'); // We don't (yet) support asking the assistant for NEW attack discoveries from a conversation // get a scoped esClient for assistant memory const esClient = (await context.core).elasticsearch.client.asCurrentUser; diff --git a/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts index 7c0f970c7f6f9..325f4a84ab8c7 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/register_routes.ts @@ -8,7 +8,7 @@ import type { KibanaRequest, Logger, SavedObjectsClientContract } from '@kbn/core/server'; import { once } from 'lodash/fp'; -import { postAlertsInsightsRoute } from './insights/alerts/post_alerts_insights'; +import { postAttackDiscoveryRoute } from './attack_discovery/post_attack_discovery'; import { ElasticAssistantPluginRouter, ElasticAssistantPluginSetupDependencies, @@ -80,6 +80,6 @@ export const registerRoutes = ( bulkActionAnonymizationFieldsRoute(router, logger); findAnonymizationFieldsRoute(router, logger); - // Alerts Insights - postAlertsInsightsRoute(router); + // Attack Discovery + postAttackDiscoveryRoute(router); }; diff --git a/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts b/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts index 395710931f5ec..aac4e53dfae22 100644 --- a/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts +++ b/x-pack/plugins/elastic_assistant/server/services/app_context.test.ts @@ -53,8 +53,8 @@ describe('AppContextService', () => { it('should return default registered features when stopped ', () => { appContextService.start(mockAppContext); appContextService.registerFeatures('super', { - assistantAlertsInsights: false, assistantModelEvaluation: true, + attackDiscoveryEnabled: false, }); appContextService.stop(); @@ -103,8 +103,8 @@ describe('AppContextService', () => { it('should register and get features for a single plugin', () => { const pluginName = 'pluginName'; const features: AssistantFeatures = { - assistantAlertsInsights: false, assistantModelEvaluation: true, + attackDiscoveryEnabled: false, }; appContextService.start(mockAppContext); @@ -118,13 +118,13 @@ describe('AppContextService', () => { it('should register and get features for multiple plugins', () => { const pluginOne = 'plugin1'; const featuresOne: AssistantFeatures = { - assistantAlertsInsights: false, assistantModelEvaluation: true, + attackDiscoveryEnabled: false, }; const pluginTwo = 'plugin2'; const featuresTwo: AssistantFeatures = { - assistantAlertsInsights: false, assistantModelEvaluation: false, + attackDiscoveryEnabled: false, }; appContextService.start(mockAppContext); @@ -138,12 +138,12 @@ describe('AppContextService', () => { it('should update features if registered again', () => { const pluginName = 'pluginName'; const featuresOne: AssistantFeatures = { - assistantAlertsInsights: false, assistantModelEvaluation: true, + attackDiscoveryEnabled: false, }; const featuresTwo: AssistantFeatures = { - assistantAlertsInsights: false, assistantModelEvaluation: false, + attackDiscoveryEnabled: false, }; appContextService.start(mockAppContext); diff --git a/x-pack/plugins/elastic_assistant/server/types.ts b/x-pack/plugins/elastic_assistant/server/types.ts index 9fe2be7ae1fc6..74b976fd516f7 100755 --- a/x-pack/plugins/elastic_assistant/server/types.ts +++ b/x-pack/plugins/elastic_assistant/server/types.ts @@ -27,7 +27,7 @@ import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/ser import { RetrievalQAChain } from 'langchain/chains'; import { ElasticsearchClient } from '@kbn/core/server'; import { - AlertsInsightsPostRequestBody, + AttackDiscoveryPostRequestBody, AssistantFeatures, ExecuteConnectorRequestBody, Replacements, @@ -218,7 +218,7 @@ export interface AssistantToolParams { request: KibanaRequest< unknown, unknown, - ExecuteConnectorRequestBody | AlertsInsightsPostRequestBody + ExecuteConnectorRequestBody | AttackDiscoveryPostRequestBody >; size?: number; } diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/header_docs_action.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/header_docs_action.tsx index 8fc53b3abcc57..9f834666a6894 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/header_docs_action.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/playground/header_docs_action.tsx @@ -7,25 +7,21 @@ import React from 'react'; -import { EuiButtonEmpty } from '@elastic/eui'; +import { useValues } from 'kea'; -import { i18n } from '@kbn/i18n'; +import { KibanaLogic } from '../../../shared/kibana'; -import { docLinks } from '../../../shared/doc_links'; import { EndpointsHeaderAction } from '../../../shared/layout/endpoints_header_action'; -export const PlaygroundHeaderDocsAction: React.FC = () => ( - - - {i18n.translate('xpack.enterpriseSearch.content.playground.header.docLink', { - defaultMessage: 'Playground Docs', - })} - - -); +export const PlaygroundHeaderDocsAction: React.FC = () => { + const { searchPlayground } = useValues(KibanaLogic); + + if (!searchPlayground) { + return null; + } + return ( + + + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx index 3f05c4d305110..0d114f7cd4191 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx @@ -39,6 +39,7 @@ import { LicensingLogic } from '../../../shared/licensing'; import { EuiButtonTo, EuiLinkTo } from '../../../shared/react_router_helpers'; import { GenerateConnectorApiKeyApiLogic } from '../../api/connector/generate_connector_api_key_api_logic'; import { CONNECTOR_DETAIL_TAB_PATH } from '../../routes'; +import { isAdvancedSyncRuleSnippetEmpty } from '../../utils/sync_rules_helpers'; import { SyncsContextMenu } from '../search_index/components/header_actions/syncs_context_menu'; import { ApiKeyConfig } from '../search_index/connector/api_key_configuration'; @@ -64,6 +65,7 @@ export const ConnectorConfiguration: React.FC = () => { const { hasPlatinumLicense } = useValues(LicensingLogic); const { errorConnectingMessage, http } = useValues(HttpLogic); const { advancedSnippet } = useValues(ConnectorFilteringLogic); + const isAdvancedSnippetEmpty = isAdvancedSyncRuleSnippetEmpty(advancedSnippet); const { connectorTypes } = useValues(KibanaLogic); const BETA_CONNECTORS = useMemo( @@ -264,36 +266,38 @@ export const ConnectorConfiguration: React.FC = () => { /> )} - {connector.status && hasAdvancedFilteringFeature && !!advancedSnippet && ( - - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.advancedSyncRulesDocs', - { defaultMessage: 'Advanced Sync Rules' } - )} - - ), - }} - /> - - )} + {connector.status && + hasAdvancedFilteringFeature && + !isAdvancedSnippetEmpty && ( + + + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.advancedSyncRulesDocs', + { defaultMessage: 'Advanced Sync Rules' } + )} + + ), + }} + /> + + )} ), status: diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx index 925992ab8a287..94723ddaea48b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx @@ -27,6 +27,7 @@ import { HttpLogic } from '../../../../../shared/http'; import { LicensingLogic } from '../../../../../shared/licensing'; import { ConnectorConfigurationApiLogic } from '../../../../api/connector/update_connector_configuration_api_logic'; +import { isAdvancedSyncRuleSnippetEmpty } from '../../../../utils/sync_rules_helpers'; import { ConnectorViewLogic } from '../../../connector_detail/connector_view_logic'; import { ConnectorFilteringLogic } from '../sync_rules/connector_filtering_logic'; @@ -45,6 +46,8 @@ export const NativeConnectorConfigurationConfig: React.FC< const { hasAdvancedFilteringFeature } = useValues(ConnectorViewLogic); const { advancedSnippet } = useValues(ConnectorFilteringLogic); const { http } = useValues(HttpLogic); + const isAdvancedSnippetEmpty = isAdvancedSyncRuleSnippetEmpty(advancedSnippet); + return ( - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.securityDocumentationLinkLabel', { @@ -82,7 +90,12 @@ export const NativeConnectorConfigurationConfig: React.FC< {nativeConnector.externalAuthDocsUrl && ( - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.sourceSecurityDocumentationLinkLabel', { @@ -114,7 +127,7 @@ export const NativeConnectorConfigurationConfig: React.FC< )} - {connector.status && hasAdvancedFilteringFeature && !!advancedSnippet && ( + {connector.status && hasAdvancedFilteringFeature && !isAdvancedSnippetEmpty && ( <> + {i18n.translate( 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.advancedSyncRulesDocs', { defaultMessage: 'Advanced Sync Rules' } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx index 82c0f3c51ca5d..7542acc756ce0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx @@ -15,6 +15,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import { isAdvancedSyncRuleSnippetEmpty } from '../../../../utils/sync_rules_helpers'; + import { ConnectorFilteringLogic } from './connector_filtering_logic'; export const AdvancedSyncRules: React.FC = () => { @@ -24,6 +26,9 @@ export const AdvancedSyncRules: React.FC = () => { advancedSnippet, } = useValues(ConnectorFilteringLogic); const { setLocalAdvancedSnippet } = useActions(ConnectorFilteringLogic); + const isAdvancedSnippetEmpty = isAdvancedSyncRuleSnippetEmpty(advancedSnippet); + const isLocalSnippetEmpty = isAdvancedSyncRuleSnippetEmpty(localAdvancedSnippet); + return ( <> { /> - {(!!advancedSnippet || !!localAdvancedSnippet) && ( + {(!isAdvancedSnippetEmpty || !isLocalSnippetEmpty) && ( { const { advancedSnippet, draftErrors, draftState, filteringRules, hasDraft, isEditing } = useValues(ConnectorFilteringLogic); + const isAdvancedSnippetEmpty = isAdvancedSyncRuleSnippetEmpty(advancedSnippet); + return ( <> {isEditing && ( @@ -92,7 +95,13 @@ export const ConnectorSyncRules: React.FC = () => { })}

    - + {i18n.translate( 'xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel', { @@ -105,6 +114,7 @@ export const ConnectorSyncRules: React.FC = () => { setIsEditing(!isEditing)} @@ -159,7 +169,7 @@ export const ConnectorSyncRules: React.FC = () => { )} - {hasAdvancedFilteringFeature && !!advancedSnippet && ( + {hasAdvancedFilteringFeature && !isAdvancedSnippetEmpty && ( @@ -186,7 +196,13 @@ export const ConnectorSyncRules: React.FC = () => { )}

    - + {i18n.translate( 'xpack.enterpriseSearch.content.index.connector.syncRules.advancedFiltersLinkTitle', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/delete_index_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/delete_index_modal.tsx index 11574f6115747..361b65b8fa9bd 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/delete_index_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/delete_index_modal.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { useActions, useValues } from 'kea'; @@ -39,6 +39,9 @@ export const DeleteIndexModal: React.FC = () => { } = useValues(IndicesLogic); const [inputIndexName, setInputIndexName] = useState(''); + useEffect(() => { + setInputIndexName(''); + }, [isDeleteModalVisible, indexName]); return isDeleteModalVisible ? ( { )} > setInputIndexName(e.target.value)} value={inputIndexName} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts new file mode 100644 index 0000000000000..ccff4bae5afcb --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts @@ -0,0 +1,33 @@ +/* + * Copyright 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 isAdvancedSyncRuleSnippetEmpty = (snippet: string | undefined | null) => { + if (!snippet) { + return true; + } + const trimmedSnippet = snippet.trim(); + + // quick hatch + if (trimmedSnippet === '{}' || trimmedSnippet === '[]') { + return true; + } + + try { + const parsedJson = JSON.parse(trimmedSnippet); + if (Array.isArray(parsedJson)) { + return parsedJson.length === 0; + } else if (typeof parsedJson === 'object') { + return Object.keys(parsedJson).length === 0; + } + } catch (error) { + // we have somewhat invalid JSON in the advanced snippet, + // it is not empty and cause problems somewhere else + // we should handle it here so our pages doesn't crash + return false; + } + return false; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts index 408d131289d7a..228321ef120c1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts @@ -124,7 +124,6 @@ class DocLinks { public licenseManagement: string; public machineLearningStart: string; public mlDocumentEnrichment: string; - public playground: string; public pluginsIngestAttachment: string; public queryDsl: string; public restApis: string; @@ -302,7 +301,6 @@ class DocLinks { this.licenseManagement = ''; this.machineLearningStart = ''; this.mlDocumentEnrichment = ''; - this.playground = ''; this.pluginsIngestAttachment = ''; this.queryDsl = ''; this.restApis = ''; @@ -482,7 +480,6 @@ class DocLinks { this.licenseManagement = docLinks.links.enterpriseSearch.licenseManagement; this.machineLearningStart = docLinks.links.enterpriseSearch.machineLearningStart; this.mlDocumentEnrichment = docLinks.links.enterpriseSearch.mlDocumentEnrichment; - this.playground = docLinks.links.enterpriseSearch.playground; this.pluginsIngestAttachment = docLinks.links.plugins.ingestAttachment; this.queryDsl = docLinks.links.query.queryDsl; this.restApis = docLinks.links.apis.restApis; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index f9ca5fa24226c..10bda3b49bba9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -68,7 +68,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( const { agents: { enabled: isFleetEnabled }, } = useConfig(); - const hasFleetAllPrivileges = useAuthz().fleet.all; + const hasAllAgentPoliciesPrivileges = useAuthz().fleet.allAgentPolicies; const refreshAgentPolicy = useAgentPolicyRefresh(); const [agentPolicy, setAgentPolicy] = useState({ ...originalAgentPolicy, @@ -228,7 +228,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( onClick={onSubmit} isLoading={isLoading} isDisabled={ - !hasFleetAllPrivileges || + !hasAllAgentPoliciesPrivileges || isLoading || Object.keys(validation).length > 0 || hasAdvancedSettingsErrors diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx index c249283150ef5..9ed8939493723 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx @@ -42,6 +42,24 @@ describe('SecretFormRow', () => { expect(queryByText(initialValue)).not.toBeInTheDocument(); }); + it('should not enable the replace button if the row is disabled', () => { + const { getByText } = render( + + + + ); + + expect(getByText('Replace Test Secret').closest('button')).toBeDisabled(); + }); + it('should call the cancelEdit function when the cancel button is clicked', () => { const { getByText } = render( void; label?: JSX.Element; + disabled?: boolean; }> = ({ fullWidth, error, @@ -48,6 +49,7 @@ export const SecretFormRow: React.FC<{ useSecretsStorage, isConvertedToSecret = false, label, + disabled, }) => { const hasInitialValue = !!initialValue; const [editMode, setEditMode] = useState(isConvertedToSecret || !initialValue); @@ -64,6 +66,7 @@ export const SecretFormRow: React.FC<{ setEditMode(true)} color="primary" iconType="refresh" diff --git a/x-pack/plugins/fleet/public/hooks/use_input.ts b/x-pack/plugins/fleet/public/hooks/use_input.ts index 07c81de41c13a..21c04856337e5 100644 --- a/x-pack/plugins/fleet/public/hooks/use_input.ts +++ b/x-pack/plugins/fleet/public/hooks/use_input.ts @@ -128,6 +128,7 @@ export function useSecretInput( error: errors, isInvalid, initialValue, + disabled, clear: () => { setValue(''); }, diff --git a/x-pack/plugins/graph/public/application.tsx b/x-pack/plugins/graph/public/application.tsx index 89ba72b203413..de467d668fd03 100644 --- a/x-pack/plugins/graph/public/application.tsx +++ b/x-pack/plugins/graph/public/application.tsx @@ -31,7 +31,8 @@ import { TableListViewKibanaProvider } from '@kbn/content-management-table-list- import './index.scss'; import { SpacesApi } from '@kbn/spaces-plugin/public'; -import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; import { ContentClient, ContentManagementPublicStart } from '@kbn/content-management-plugin/public'; import { GraphSavePolicy } from './types'; @@ -78,7 +79,6 @@ export type GraphServices = Omit; export const renderApp = ({ history, element, ...deps }: GraphDependencies) => { const { chrome, capabilities, core } = deps; - const { theme$ } = core.theme; if (!capabilities.graph.save) { chrome.setBadge({ @@ -117,7 +117,7 @@ export const renderApp = ({ history, element, ...deps }: GraphDependencies) => { }); const app = ( - + { > {graphRouter(deps)} - + ); ReactDOM.render(app, element); element.setAttribute('class', 'gphAppWrapper'); diff --git a/x-pack/plugins/graph/public/apps/listing_route.tsx b/x-pack/plugins/graph/public/apps/listing_route.tsx index 908a54c58dfd7..157b77bb5b43a 100644 --- a/x-pack/plugins/graph/public/apps/listing_route.tsx +++ b/x-pack/plugins/graph/public/apps/listing_route.tsx @@ -7,7 +7,7 @@ import React, { Fragment, useCallback, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { EuiEmptyPrompt, EuiLink, EuiButton } from '@elastic/eui'; import { ApplicationStart } from '@kbn/core/public'; import { useHistory, useLocation } from 'react-router-dom'; @@ -89,34 +89,32 @@ export function ListingRoute({ ); return ( - - - id="graph" - headingId="graphListingHeading" - createItem={capabilities.graph.save ? createItem : undefined} - findItems={findItems} - deleteItems={capabilities.graph.delete ? deleteItems : undefined} - editItem={capabilities.graph.save ? editItem : undefined} - listingLimit={listingLimit} - initialFilter={initialFilter} - initialPageSize={initialPageSize} - emptyPrompt={getNoItemsMessage( - capabilities.graph.save === false, - createItem, - coreStart.application - )} - entityName={i18n.translate('xpack.graph.listing.table.entityName', { - defaultMessage: 'graph', - })} - entityNamePlural={i18n.translate('xpack.graph.listing.table.entityNamePlural', { - defaultMessage: 'graphs', - })} - title={i18n.translate('xpack.graph.listing.graphsTitle', { - defaultMessage: 'Graphs', - })} - getDetailViewLink={({ id }) => getEditUrl(addBasePath, { id })} - /> - + + id="graph" + headingId="graphListingHeading" + createItem={capabilities.graph.save ? createItem : undefined} + findItems={findItems} + deleteItems={capabilities.graph.delete ? deleteItems : undefined} + editItem={capabilities.graph.save ? editItem : undefined} + listingLimit={listingLimit} + initialFilter={initialFilter} + initialPageSize={initialPageSize} + emptyPrompt={getNoItemsMessage( + capabilities.graph.save === false, + createItem, + coreStart.application + )} + entityName={i18n.translate('xpack.graph.listing.table.entityName', { + defaultMessage: 'graph', + })} + entityNamePlural={i18n.translate('xpack.graph.listing.table.entityNamePlural', { + defaultMessage: 'graphs', + })} + title={i18n.translate('xpack.graph.listing.graphsTitle', { + defaultMessage: 'Graphs', + })} + getDetailViewLink={({ id }) => getEditUrl(addBasePath, { id })} + /> ); } diff --git a/x-pack/plugins/graph/public/apps/workspace_route.tsx b/x-pack/plugins/graph/public/apps/workspace_route.tsx index 192ab8daf065a..a637441c6189f 100644 --- a/x-pack/plugins/graph/public/apps/workspace_route.tsx +++ b/x-pack/plugins/graph/public/apps/workspace_route.tsx @@ -6,7 +6,6 @@ */ import React, { useMemo, useRef, useState } from 'react'; -import { I18nProvider } from '@kbn/i18n-react'; import { Provider } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; @@ -29,7 +28,6 @@ export const WorkspaceRoute = ({ coreStart, contentClient, graphSavePolicy, - chrome, canEditDrillDownUrls, overlays, navigation, @@ -107,15 +105,12 @@ export const WorkspaceRoute = ({ return createdWorkspace; }, getWorkspace: () => workspaceRef.current, - notifications: coreStart.notifications, - http: coreStart.http, - overlays: coreStart.overlays, savePolicy: graphSavePolicy, contentClient, changeUrl: (newUrl) => history.push(newUrl), notifyReact: () => setRenderCounter((cur) => cur + 1), - chrome, handleSearchQueryError, + ...coreStart, }) ); @@ -135,29 +130,27 @@ export const WorkspaceRoute = ({ const { savedWorkspace, sharingSavedObjectProps } = loaded; return ( - - - - - - - + + + + + ); }; diff --git a/x-pack/plugins/graph/public/helpers/saved_objects_utils/check_for_duplicate_title.ts b/x-pack/plugins/graph/public/helpers/saved_objects_utils/check_for_duplicate_title.ts index ca2bfb359b1f9..c4ea22344a459 100644 --- a/x-pack/plugins/graph/public/helpers/saved_objects_utils/check_for_duplicate_title.ts +++ b/x-pack/plugins/graph/public/helpers/saved_objects_utils/check_for_duplicate_title.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { OverlayStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { ContentClient } from '@kbn/content-management-plugin/public'; import type { GraphWorkspaceSavedObject } from '../../types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; @@ -26,11 +26,10 @@ export async function checkForDuplicateTitle( isTitleDuplicateConfirmed: boolean, onTitleDuplicate: (() => void) | undefined, services: { - overlays: OverlayStart; contentClient: ContentClient; - } + } & Pick ): Promise { - const { overlays, contentClient } = services; + const { contentClient, ...startServices } = services; // Don't check for duplicates if user has already confirmed save with duplicate title if (isTitleDuplicateConfirmed) { return true; @@ -55,5 +54,5 @@ export async function checkForDuplicateTitle( // TODO: make onTitleDuplicate a required prop and remove UI components from this class // Need to leave here until all users pass onTitleDuplicate. - return displayDuplicateTitleConfirmModal(savedObject, overlays); + return displayDuplicateTitleConfirmModal(savedObject, startServices); } diff --git a/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx b/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx index 19e236d4d63fc..c1d8899c34076 100644 --- a/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx +++ b/x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx @@ -7,22 +7,22 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import type { OverlayStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { EuiConfirmModal } from '@elastic/eui'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; export function confirmModalPromise( message = '', title = '', confirmBtnText = '', - overlays: OverlayStart + startServices: Pick ): Promise { return new Promise((resolve, reject) => { const cancelButtonText = i18n.translate('xpack.graph.confirmModal.cancelButtonLabel', { defaultMessage: 'Cancel', }); - const modal = overlays.openModal( + const modal = startServices.overlays.openModal( toMountPoint( { @@ -38,7 +38,8 @@ export function confirmModalPromise( title={title} > {message} - + , + startServices ) ); }); diff --git a/x-pack/plugins/graph/public/helpers/saved_objects_utils/display_duplicate_title_confirm_modal.ts b/x-pack/plugins/graph/public/helpers/saved_objects_utils/display_duplicate_title_confirm_modal.ts index 68f9bee87fd75..4256d3bc0267d 100644 --- a/x-pack/plugins/graph/public/helpers/saved_objects_utils/display_duplicate_title_confirm_modal.ts +++ b/x-pack/plugins/graph/public/helpers/saved_objects_utils/display_duplicate_title_confirm_modal.ts @@ -6,14 +6,14 @@ */ import { i18n } from '@kbn/i18n'; -import type { OverlayStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import type { GraphWorkspaceSavedObject } from '../../types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; import { confirmModalPromise } from './confirm_modal_promise'; export function displayDuplicateTitleConfirmModal( savedObject: Pick, - overlays: OverlayStart + startServices: Pick ): Promise { const confirmTitle = i18n.translate('xpack.graph.confirmModal.saveDuplicateConfirmationTitle', { defaultMessage: `This visualization already exists`, @@ -32,7 +32,7 @@ export function displayDuplicateTitleConfirmModal( }); try { - return confirmModalPromise(confirmMessage, confirmTitle, confirmButtonText, overlays); + return confirmModalPromise(confirmMessage, confirmTitle, confirmButtonText, startServices); } catch { return Promise.reject(new Error(SAVE_DUPLICATE_REJECTED)); } diff --git a/x-pack/plugins/graph/public/helpers/saved_objects_utils/save_with_confirmation.ts b/x-pack/plugins/graph/public/helpers/saved_objects_utils/save_with_confirmation.ts index 32fd20d782b96..75b846ca076a3 100644 --- a/x-pack/plugins/graph/public/helpers/saved_objects_utils/save_with_confirmation.ts +++ b/x-pack/plugins/graph/public/helpers/saved_objects_utils/save_with_confirmation.ts @@ -7,7 +7,7 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import type { SavedObjectsCreateOptions, OverlayStart } from '@kbn/core/public'; +import type { CoreStart, SavedObjectsCreateOptions } from '@kbn/core/public'; import { ContentClient } from '@kbn/content-management-plugin/public'; import { CONTENT_ID, GraphCreateIn, GraphCreateOut } from '../../../common/content_management'; import { OVERWRITE_REJECTED } from './constants'; @@ -32,9 +32,12 @@ export async function saveWithConfirmation( source: GraphSavedObjectAttributes, savedObject: Pick, options: SavedObjectsCreateOptions, - services: { overlays: OverlayStart; contentClient: ContentClient } + services: { contentClient: ContentClient } & Pick< + CoreStart, + 'overlays' | 'analytics' | 'i18n' | 'theme' + > ): Promise<{ item: GraphSavedObject }> { - const { overlays, contentClient } = services; + const { contentClient, ...startServices } = services; try { return await contentClient.create({ contentTypeId: CONTENT_ID, @@ -60,7 +63,7 @@ export async function saveWithConfirmation( defaultMessage: 'Overwrite', }); - return confirmModalPromise(confirmMessage, title, confirmButtonText, overlays) + return confirmModalPromise(confirmMessage, title, confirmButtonText, startServices) .then(() => contentClient.create({ contentTypeId: CONTENT_ID, diff --git a/x-pack/plugins/graph/public/helpers/saved_workspace_utils.test.ts b/x-pack/plugins/graph/public/helpers/saved_workspace_utils.test.ts index 5c70d4a06d4a1..ae070ed314954 100644 --- a/x-pack/plugins/graph/public/helpers/saved_workspace_utils.test.ts +++ b/x-pack/plugins/graph/public/helpers/saved_workspace_utils.test.ts @@ -29,10 +29,10 @@ describe('saved_workspace_utils', () => { savedWorkspace, {}, { + ...core, contentClient: { create: jest.fn().mockReturnValue(Promise.resolve({ item: { id: '456' } })), } as unknown as ContentClient, - overlays: core.overlays, } ); expect(savedWorkspace.id).toBe(undefined); diff --git a/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts b/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts index 658e2f9f91709..5a2546d122e58 100644 --- a/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts +++ b/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts @@ -7,7 +7,7 @@ import { cloneDeep, assign, defaults, forOwn } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { IBasePath, OverlayStart, SavedObjectAttributes } from '@kbn/core/public'; +import { CoreStart, IBasePath, SavedObjectAttributes } from '@kbn/core/public'; import { SavedObjectSaveOpts, isErrorNonFatal } from '@kbn/saved-objects-plugin/public'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; @@ -167,8 +167,7 @@ export async function saveSavedWorkspace( }: SavedObjectSaveOpts = {}, services: { contentClient: ContentClient; - overlays: OverlayStart; - } + } & Pick ) { let attributes: SavedObjectAttributes = {}; diff --git a/x-pack/plugins/graph/public/services/save_modal.tsx b/x-pack/plugins/graph/public/services/save_modal.tsx index 735d231a0e2e2..baf6a96405164 100644 --- a/x-pack/plugins/graph/public/services/save_modal.tsx +++ b/x-pack/plugins/graph/public/services/save_modal.tsx @@ -6,15 +6,15 @@ */ import React from 'react'; -import { OverlayStart } from '@kbn/core/public'; import { SaveResult } from '@kbn/saved-objects-plugin/public'; import { showSaveModal } from '@kbn/saved-objects-plugin/public'; import { ContentClient } from '@kbn/content-management-plugin/public'; +import { CoreStart } from '@kbn/core/public'; import { GraphWorkspaceSavedObject, GraphSavePolicy } from '../types'; import { SaveModal, OnSaveGraphProps } from '../components/save_modal'; -export interface SaveWorkspaceServices { - overlays: OverlayStart; +export interface SaveWorkspaceServices + extends Pick { contentClient: ContentClient; } diff --git a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js index be357db36e3ae..81e1d9ce232d5 100644 --- a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js +++ b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js @@ -5,8 +5,6 @@ * 2.0. */ -import $ from 'jquery'; - // Kibana wrapper import d3 from 'd3'; import { getIcon } from '../../helpers/style_choices'; @@ -15,31 +13,25 @@ import { getIcon } from '../../helpers/style_choices'; // for use outside of Kibana server with direct access to elasticsearch let graphExplorer = function (indexName, typeName, request, responseHandler) { const dataForServer = JSON.stringify(request); - $.ajax({ - type: 'POST', - url: 'http://localhost:9200/' + indexName + '/_graph/explore', + fetch(`http://localhost:9200/${indexName}/_graph/explore`, { + method: 'POST', dataType: 'json', contentType: 'application/json;charset=utf-8', - async: true, data: dataForServer, - success: function (data) { - responseHandler(data); - }, - }); + }) + .then((response) => response.json()) + .then(responseHandler); }; let searcher = function (indexName, request, responseHandler) { const dataForServer = JSON.stringify(request); - $.ajax({ - type: 'POST', - url: 'http://localhost:9200/' + indexName + '/_search?rest_total_hits_as_int=true', + fetch(`http://localhost:9200/${indexName}/_search?rest_total_hits_as_int=true`, { + method: 'POST', dataType: 'json', - contentType: 'application/json;charset=utf-8', //Not sure why this was necessary - worked without elsewhere - async: true, + contentType: 'application/json;charset=utf-8', data: dataForServer, - success: function (data) { - responseHandler(data); - }, - }); + }) + .then((response) => response.json()) + .then(responseHandler); }; // ====== Undo operations ============= diff --git a/x-pack/plugins/graph/public/state_management/mocks.ts b/x-pack/plugins/graph/public/state_management/mocks.ts index 23a666a385130..e44d652a0dcd6 100644 --- a/x-pack/plugins/graph/public/state_management/mocks.ts +++ b/x-pack/plugins/graph/public/state_management/mocks.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { coreMock } from '@kbn/core/public/mocks'; import { NotificationsStart, HttpStart, OverlayStart } from '@kbn/core/public'; import createSagaMiddleware from 'redux-saga'; import { createStore, applyMiddleware, AnyAction } from 'redux'; @@ -36,6 +37,7 @@ export function createMockGraphStore({ mockedDepsOverwrites?: Partial>; initialStateOverwrites?: Partial; }): MockedGraphEnvironment { + const coreStart = coreMock.createStart(); const workspaceMock = { runLayout: jest.fn(), simpleSearch: jest.fn(), @@ -46,6 +48,7 @@ export function createMockGraphStore({ } as unknown as Workspace; const mockedDeps: jest.Mocked = { + ...coreStart, basePath: '', addBasePath: jest.fn((url: string) => url), changeUrl: jest.fn(), diff --git a/x-pack/plugins/graph/public/state_management/persistence.ts b/x-pack/plugins/graph/public/state_management/persistence.ts index 71ba688b6dfe3..3f5fd05f96723 100644 --- a/x-pack/plugins/graph/public/state_management/persistence.ts +++ b/x-pack/plugins/graph/public/state_management/persistence.ts @@ -230,9 +230,6 @@ function showModal( hasData: workspace.nodes.length > 0 || workspace.blocklistedNodes.length > 0, workspace: savedWorkspace, saveWorkspace: saveWorkspaceHandler, - services: { - contentClient: deps.contentClient, - overlays: deps.overlays, - }, + services: deps, }); } diff --git a/x-pack/plugins/graph/public/state_management/store.ts b/x-pack/plugins/graph/public/state_management/store.ts index 1592ffda3c29f..60b44ed234e02 100644 --- a/x-pack/plugins/graph/public/state_management/store.ts +++ b/x-pack/plugins/graph/public/state_management/store.ts @@ -7,7 +7,7 @@ import createSagaMiddleware, { SagaMiddleware } from 'redux-saga'; import { combineReducers, createStore, Store, AnyAction, Dispatch, applyMiddleware } from 'redux'; -import { ChromeStart, OverlayStart } from '@kbn/core/public'; +import { ChromeStart } from '@kbn/core/public'; import { CoreStart } from '@kbn/core/public'; import { ContentClient } from '@kbn/content-management-plugin/public'; import { @@ -39,14 +39,14 @@ export interface GraphState { workspace: WorkspaceState; } -export interface GraphStoreDependencies { +export interface GraphStoreDependencies + extends Pick { addBasePath: (url: string) => string; indexPatternProvider: IndexPatternProvider; createWorkspace: (index: string, advancedSettings: AdvancedSettings) => Workspace; getWorkspace: () => Workspace | undefined; notifications: CoreStart['notifications']; http: CoreStart['http']; - overlays: OverlayStart; contentClient: ContentClient; savePolicy: GraphSavePolicy; changeUrl: (newUrl: string) => void; diff --git a/x-pack/plugins/graph/tsconfig.json b/x-pack/plugins/graph/tsconfig.json index 0618744404be4..99868f7e8037c 100644 --- a/x-pack/plugins/graph/tsconfig.json +++ b/x-pack/plugins/graph/tsconfig.json @@ -50,6 +50,7 @@ "@kbn/logging", "@kbn/content-management-table-list-view-common", "@kbn/visualization-utils", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/lens/common/types.ts b/x-pack/plugins/lens/common/types.ts index b329e8e3d2dda..9c9c72c7108ee 100644 --- a/x-pack/plugins/lens/common/types.ts +++ b/x-pack/plugins/lens/common/types.ts @@ -10,7 +10,7 @@ import type { Position } from '@elastic/charts'; import type { $Values } from '@kbn/utility-types'; import { CustomPaletteParams, PaletteOutput, ColorMapping } from '@kbn/coloring'; import type { ColorMode } from '@kbn/charts-plugin/common'; -import type { LegendSize } from '@kbn/visualizations-plugin/common'; +import type { LegendSize, LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { CategoryDisplay, LegendDisplay, NumberDisplay, PieChartTypes } from './constants'; import { layerTypes } from './layer_types'; import { CollapseFunction } from './expressions'; @@ -64,7 +64,7 @@ export interface SharedPieLayerState { categoryDisplay: CategoryDisplayType; legendDisplay: LegendDisplayType; legendPosition?: Position; - showValuesInLegend?: boolean; + legendStats?: LegendStats[]; nestedLegend?: boolean; percentDecimals?: number; emptySizeRatio?: number; @@ -84,6 +84,7 @@ export interface PieVisualizationState { layers: PieLayerState[]; palette?: PaletteOutput; } + export interface LegacyMetricState { autoScaleMetricAlignment?: 'left' | 'right' | 'center'; layerId: string; diff --git a/x-pack/plugins/lens/public/app_plugin/app.tsx b/x-pack/plugins/lens/public/app_plugin/app.tsx index b8a7218cd7364..1168c0d07ea4b 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.tsx @@ -67,9 +67,7 @@ export function App({ contextOriginatingApp, topNavMenuEntryGenerators, initialContext, - theme$, coreStart, - savedObjectStore, }: LensAppProps) { const lensAppServices = useKibana().services; @@ -473,7 +471,7 @@ export function App({ [dataViews, uiActions, http, notifications, uiSettings, initialContext, dispatch] ); - const onTextBasedSavedAndExit = useCallback(async ({ onSave, onCancel }) => { + const onTextBasedSavedAndExit = useCallback(async ({ onSave, onCancel: _onCancel }) => { setIsSaveModalVisible(true); setShouldCloseAndSaveTextBasedQuery(true); saveAndExit.current = () => { @@ -572,11 +570,11 @@ export function App({ initialContextIsEmbedded={initialContextIsEmbedded} topNavMenuEntryGenerators={topNavMenuEntryGenerators} initialContext={initialContext} - theme$={theme$} indexPatternService={indexPatternService} onTextBasedSavedAndExit={onTextBasedSavedAndExit} getUserMessages={getUserMessages} shortUrlService={shortUrlService} + startServices={coreStart} /> {getLegacyUrlConflictCallout()} {(!isLoading || persistedDoc) && ( diff --git a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx index d63036ccfe7fc..554b49d826e4a 100644 --- a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx @@ -279,13 +279,13 @@ export const LensTopNavMenu = ({ initialContextIsEmbedded, topNavMenuEntryGenerators, initialContext, - theme$, indexPatternService, currentDoc, onTextBasedSavedAndExit, getUserMessages, shortUrlService, isCurrentStateDirty, + startServices, }: LensTopNavMenuProps) => { const { data, @@ -746,7 +746,7 @@ export const LensTopNavMenu = ({ toggleSettingsMenuOpen({ lensStore, anchorElement, - theme$, + startServices, }), }, }, @@ -794,8 +794,8 @@ export const LensTopNavMenu = ({ uiSettings, isOnTextBasedMode, lensStore, - theme$, notifications.toasts, + startServices, ]); const onQuerySubmitWrapped = useCallback( @@ -904,7 +904,7 @@ export const LensTopNavMenu = ({ const editField = useMemo( () => canEditDataView - ? async (fieldName?: string, uiAction: 'edit' | 'add' = 'edit') => { + ? async (fieldName?: string, _uiAction: 'edit' | 'add' = 'edit') => { if (currentIndexPattern?.id) { const indexPatternInstance = await data.dataViews.get(currentIndexPattern?.id); closeFieldEditor.current = dataViewFieldEditor.openEditor({ diff --git a/x-pack/plugins/lens/public/app_plugin/mounter.tsx b/x-pack/plugins/lens/public/app_plugin/mounter.tsx index 72b1d742959f2..f5741dbfebe97 100644 --- a/x-pack/plugins/lens/public/app_plugin/mounter.tsx +++ b/x-pack/plugins/lens/public/app_plugin/mounter.tsx @@ -7,7 +7,7 @@ import React, { FC, useCallback, useEffect, useState, useMemo } from 'react'; import { AppMountParameters, CoreSetup, CoreStart } from '@kbn/core/public'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { RouteComponentProps } from 'react-router-dom'; import { HashRouter, Routes, Route } from '@kbn/shared-ux-router'; import { History } from 'history'; @@ -22,7 +22,8 @@ import { import { ACTION_VISUALIZE_LENS_FIELD, VisualizeFieldContext } from '@kbn/ui-actions-plugin/public'; import { ACTION_CONVERT_TO_LENS } from '@kbn/visualizations-plugin/public'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { EuiLoadingSpinner } from '@elastic/eui'; import { syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; import { withSuspense } from '@kbn/shared-ux-utility'; @@ -119,15 +120,7 @@ export async function getLensServices( savedObjectsTagging, attributeService, eventAnnotationService, - executionContext: coreStart.executionContext, - http: coreStart.http, uiActions: startDependencies.uiActions, - chrome: coreStart.chrome, - overlays: coreStart.overlays, - uiSettings: coreStart.uiSettings, - settings: coreStart.settings, - application: coreStart.application, - notifications: coreStart.notifications, savedObjectStore: new SavedObjectIndexStore(startDependencies.contentManagement), presentationUtil: startDependencies.presentationUtil, dataViewEditor: startDependencies.dataViewEditor, @@ -142,9 +135,9 @@ export async function getLensServices( spaces, share, unifiedSearch, - docLinks: coreStart.docLinks, locator, serverless, + ...coreStart, }; } @@ -421,26 +414,24 @@ export async function mountApp( const PresentationUtilContext = getPresentationUtilContext(); render( - - - - - - - - } - /> - - - - - - - - , + + + + + + + } + /> + + + + + + + , params.element ); return () => { diff --git a/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx b/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx index fabd35f034917..2bfd1501fc8fc 100644 --- a/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx +++ b/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx @@ -45,6 +45,9 @@ export type SaveModalContainerProps = { | 'http' | 'chrome' | 'overlays' + | 'analytics' + | 'i18n' + | 'theme' | 'stateTransfer' | 'savedObjectStore' >; @@ -140,14 +143,13 @@ export function SaveModalContainer({ ...lensServices, lastKnownDoc, initialInput, - attributeService, redirectTo, redirectToOrigin, originatingApp, getOriginatingPath, getIsByValueMode: () => false, onAppLeave: () => {}, - savedObjectStore: lensServices.savedObjectStore, + ...lensServices, }, saveProps, options @@ -223,6 +225,9 @@ export const runSaveLensVisualization = async ( | 'application' | 'chrome' | 'overlays' + | 'analytics' + | 'i18n' + | 'theme' | 'notifications' | 'stateTransfer' | 'attributeService' @@ -236,7 +241,6 @@ export const runSaveLensVisualization = async ( initialInput, lastKnownDoc, persistedDoc, - overlays, notifications, stateTransfer, attributeService, @@ -249,6 +253,9 @@ export const runSaveLensVisualization = async ( switchDatasource, application, savedObjectStore, + getOriginatingPath, + originatingApp, + ...startServices } = props; if (!lastKnownDoc) { @@ -298,7 +305,7 @@ export const runSaveLensVisualization = async ( saveProps.onTitleDuplicate, { client: savedObjectStore, - overlays, + ...startServices, } ); } catch (e) { diff --git a/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx b/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx index f4447929d8063..09eb90be2c3c7 100644 --- a/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx +++ b/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx @@ -7,15 +7,13 @@ import React, { useCallback } from 'react'; import ReactDOM from 'react-dom'; -import type { CoreTheme } from '@kbn/core/public'; import { EuiPopoverTitle, EuiSwitch, EuiWrappingPopover } from '@elastic/eui'; -import { Observable } from 'rxjs'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { Store } from 'redux'; import { Provider } from 'react-redux'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { disableAutoApply, enableAutoApply, @@ -26,6 +24,7 @@ import { } from '../state_management'; import { writeToStorage } from '../settings_storage'; import { AUTO_APPLY_DISABLED_STORAGE_KEY } from '../editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper'; +import { StartServices } from '../types'; const container = document.createElement('div'); let isMenuOpen = false; @@ -91,7 +90,7 @@ function closeSettingsMenu() { export function toggleSettingsMenuOpen(props: { lensStore: Store; anchorElement: HTMLElement; - theme$: Observable; + startServices: StartServices; }) { if (isMenuOpen) { closeSettingsMenu(); @@ -102,13 +101,11 @@ export function toggleSettingsMenuOpen(props: { document.body.appendChild(container); const element = ( - - - - - - - + + + + + ); ReactDOM.render(element, container); } diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx index f457d0290fbe1..205aa74aaee24 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx @@ -8,12 +8,12 @@ import React, { useCallback, useState } from 'react'; import { EuiFlyout, EuiLoadingSpinner, EuiOverlayMask } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { I18nProvider } from '@kbn/i18n-react'; import { Provider } from 'react-redux'; import type { MiddlewareAPI, Dispatch, Action } from '@reduxjs/toolkit'; import { css } from '@emotion/react'; import type { CoreStart } from '@kbn/core/public'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { isEqual } from 'lodash'; import { RootDragDropProvider } from '@kbn/dom-drag-drop'; import type { LensPluginStartDependencies } from '../../../plugin'; @@ -224,15 +224,13 @@ export async function getEditLensConfiguration( return getWrapper( - - - - - - - - - + + + + + + + ); }; diff --git a/x-pack/plugins/lens/public/app_plugin/types.ts b/x-pack/plugins/lens/public/app_plugin/types.ts index 774be71d0879b..7bfa16b2ebd77 100644 --- a/x-pack/plugins/lens/public/app_plugin/types.ts +++ b/x-pack/plugins/lens/public/app_plugin/types.ts @@ -20,7 +20,6 @@ import type { HttpStart, IUiSettingsClient, NotificationsStart, - OverlayStart, } from '@kbn/core/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; @@ -54,6 +53,7 @@ import type { LensTopNavMenuEntryGenerator, VisualizationMap, UserMessagesGetter, + StartServices, } from '../types'; import type { LensAttributeService } from '../lens_attribute_service'; import type { LensEmbeddableInput } from '../embeddable/embeddable'; @@ -125,12 +125,12 @@ export interface LensTopNavMenuProps { topNavMenuEntryGenerators: LensTopNavMenuEntryGenerator[]; initialContext?: VisualizeFieldContext | VisualizeEditorContext; currentDoc: Document | undefined; - theme$: Observable; indexPatternService: IndexPatternServiceAPI; onTextBasedSavedAndExit: ({ onSave }: { onSave: () => void }) => Promise; getUserMessages: UserMessagesGetter; shortUrlService: (params: LensAppLocatorParams) => Promise; isCurrentStateDirty: boolean; + startServices: StartServices; } export interface HistoryLocationState { @@ -139,11 +139,10 @@ export interface HistoryLocationState { originatingApp?: string; } -export interface LensAppServices { +export interface LensAppServices extends StartServices { http: HttpStart; executionContext: ExecutionContextStart; chrome: ChromeStart; - overlays: OverlayStart; storage: IStorageWrapper; dataViews: DataViewsPublicPluginStart; fieldFormats: FieldFormatsStart; diff --git a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx index 9a4666788656b..faf00ff6350fb 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx @@ -559,7 +559,7 @@ export function DimensionEditor(props: DimensionEditorProps) { helpPopoverContainer.current = null; } }} - theme={props.core.theme} + startServices={props.core} > diff --git a/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx b/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx index 0959bc7b42287..2eeb3c1c2ee2b 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx @@ -17,10 +17,9 @@ import { EuiPopoverTitle, EuiText, } from '@elastic/eui'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import { StartServices } from '../../types'; import './help_popover.scss'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { I18nProvider } from '@kbn/i18n-react'; -import type { ThemeServiceStart } from '@kbn/core/public'; export const HelpPopoverButton = ({ children, @@ -82,7 +81,7 @@ export const WrappingHelpPopover = ({ closePopover, isOpen, title, - theme, + startServices, }: { anchorPosition?: EuiWrappingPopoverProps['anchorPosition']; button: EuiWrappingPopoverProps['button']; @@ -90,28 +89,26 @@ export const WrappingHelpPopover = ({ closePopover: EuiWrappingPopoverProps['closePopover']; isOpen: EuiWrappingPopoverProps['isOpen']; title?: string; - theme: ThemeServiceStart; + startServices: StartServices; }) => { return ( - - - - {title && {title}} + + + {title && {title}} - - {children} - - - - + + {children} + + + ); }; diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx index c6e69758bca95..0aaf2b01a462c 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/layer_actions.tsx @@ -59,7 +59,7 @@ export const getSharedActions = ({ isTextBasedLanguage?: boolean; hasLayerSettings: boolean; openLayerSettings: () => void; - core: Pick; + core: Pick; customRemoveModalText?: { title?: string; description?: string }; }) => [ getOpenLayerSettingsAction({ diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx index 4a138273c6118..6452efa99216c 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_actions/remove_layer_action.tsx @@ -6,7 +6,6 @@ */ import React, { useCallback, useState } from 'react'; -import type { CoreStart } from '@kbn/core/public'; import { EuiButton, EuiButtonEmpty, @@ -20,10 +19,10 @@ import { EuiModalHeaderTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import type { LayerAction } from '../../../../types'; +import type { LayerAction, StartServices } from '../../../../types'; import { LOCAL_STORAGE_LENS_KEY } from '../../../../settings_storage'; import type { LayerType } from '../../../../../common/types'; import { LAST_ACTION_ORDER } from './order_bounds'; @@ -33,7 +32,7 @@ interface RemoveLayerAction { layerIndex: number; layerType?: LayerType; isOnlyLayer: boolean; - core: Pick; + core: StartServices; customModalText?: { title?: string; description?: string }; } @@ -224,7 +223,8 @@ export const getRemoveLayerAction = (props: RemoveLayerAction): LayerAction => { }; if (!lensLocalStorage.skipDeleteModal) { - const modal = props.core.overlays.openModal( + const { overlays, ...startServices } = props.core; + const modal = overlays.openModal( toMountPoint( { closeModal={() => modal.close()} updateLensLocalStorage={updateLensLocalStorage} />, - { theme$: props.core.theme.theme$ } + startServices ), { 'data-test-subj': 'lnsLayerRemoveModal', diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx index 50ddd1f6cffa1..391201bafad02 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.test.tsx @@ -23,8 +23,8 @@ import type { DataViewsContract } from '@kbn/data-views-plugin/public'; import { Document } from '../persistence'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public/embeddable'; -import { coreMock, httpServiceMock, themeServiceMock } from '@kbn/core/public/mocks'; -import { CoreStart, IBasePath, IUiSettingsClient } from '@kbn/core/public'; +import { coreMock, httpServiceMock } from '@kbn/core/public/mocks'; +import { IBasePath, IUiSettingsClient } from '@kbn/core/public'; import { AttributeService, ViewMode } from '@kbn/embeddable-plugin/public'; import { LensAttributeService } from '../lens_attribute_service'; import { OnSaveProps } from '@kbn/saved-objects-plugin/public/save_modal'; @@ -62,21 +62,21 @@ const defaultDatasourceMap = { }; const defaultSaveMethod = ( - testAttributes: LensSavedObjectAttributes, - savedObjectId?: string + _testAttributes: LensSavedObjectAttributes, + _savedObjectId?: string ): Promise<{ id: string }> => { return new Promise(() => { return { id: '123' }; }); }; const defaultUnwrapMethod = ( - savedObjectId: string + _savedObjectId: string ): Promise<{ attributes: LensSavedObjectAttributes }> => { return new Promise(() => { return { attributes: { ...savedVis } }; }); }; -const defaultCheckForDuplicateTitle = (props: OnSaveProps): Promise => { +const defaultCheckForDuplicateTitle = (_props: OnSaveProps): Promise => { return new Promise(() => { return true; }); @@ -87,7 +87,7 @@ const options = { checkForDuplicateTitle: defaultCheckForDuplicateTitle, }; -const mockInjectFilterReferences: FilterManager['inject'] = (filters, references) => { +const mockInjectFilterReferences: FilterManager['inject'] = (filters, _references) => { return filters.map((filter) => ({ ...filter, meta: { @@ -105,7 +105,7 @@ const attributeServiceMockFromSavedVis = (document: Document): LensAttributeServ LensByReferenceInput, LensUnwrapMetaInfo >('lens', core.notifications.toasts, options); - service.unwrapAttributes = jest.fn((input: LensByValueInput | LensByReferenceInput) => { + service.unwrapAttributes = jest.fn((_input: LensByValueInput | LensByReferenceInput) => { return Promise.resolve({ attributes: { ...document, @@ -124,6 +124,8 @@ const attributeServiceMockFromSavedVis = (document: Document): LensAttributeServ const dataMock = dataPluginMock.createStartContract(); describe('embeddable', () => { + const coreStart = coreMock.createStart(); + let mountpoint: HTMLDivElement; let expressionRenderer: jest.Mock; let getTrigger: jest.Mock; @@ -158,7 +160,7 @@ describe('embeddable', () => { uiSettings: { get: () => undefined } as unknown as IUiSettingsClient, inspector: inspectorPluginMock.createStartContract(), expressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, dataViews: { get: (id: string) => Promise.resolve({ id, isTimeBased: () => false }), @@ -174,7 +176,6 @@ describe('embeddable', () => { visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), - theme: themeServiceMock.createStartContract(), documentToExpression: () => Promise.resolve({ ast: { @@ -240,7 +241,7 @@ describe('embeddable', () => { to: 'now', }, } as LensEmbeddableInput); - await embeddable.reload(); + embeddable.reload(); expect(expressionRenderer).toHaveBeenCalledTimes(0); embeddable.render(mountpoint); expect(expressionRenderer).toHaveBeenCalledTimes(0); @@ -272,7 +273,7 @@ describe('embeddable', () => { it('should not render the vis if loaded saved object conflicts', async () => { attributeService.unwrapAttributes = jest.fn( - (input: LensByValueInput | LensByReferenceInput) => { + (_input: LensByValueInput | LensByReferenceInput) => { return Promise.resolve({ attributes: { ...savedVis, @@ -356,7 +357,7 @@ describe('embeddable', () => { data: dataMock, uiSettings: { get: () => undefined } as unknown as IUiSettingsClient, expressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, inspector: inspectorPluginMock.createStartContract(), dataViews: {} as DataViewsContract, @@ -371,7 +372,6 @@ describe('embeddable', () => { visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), - theme: themeServiceMock.createStartContract(), documentToExpression: () => Promise.resolve({ ast: { @@ -410,7 +410,7 @@ describe('embeddable', () => { data: dataMock, uiSettings: { get: () => undefined } as unknown as IUiSettingsClient, expressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, inspector: inspectorPluginMock.createStartContract(), dataViews: {} as DataViewsContract, @@ -425,7 +425,6 @@ describe('embeddable', () => { visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), - theme: themeServiceMock.createStartContract(), documentToExpression: () => Promise.resolve({ ast: { @@ -940,7 +939,7 @@ describe('embeddable', () => { attributeService: attributeServiceMockFromSavedVis(savedVis), data: dataMock, expressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, dataViews: {} as DataViewsContract, capabilities: { @@ -952,7 +951,6 @@ describe('embeddable', () => { }, inspector: inspectorPluginMock.createStartContract(), getTrigger, - theme: themeServiceMock.createStartContract(), visualizationMap: { [savedVis.visualizationType as string]: { getDisplayOptions: displayOptions ? () => displayOptions : undefined, @@ -1040,7 +1038,7 @@ describe('embeddable', () => { data: dataMock, uiSettings: { get: () => undefined } as unknown as IUiSettingsClient, expressionRenderer: currentExpressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, inspector: inspectorPluginMock.createStartContract(), dataViews: {} as DataViewsContract, @@ -1055,7 +1053,6 @@ describe('embeddable', () => { visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), - theme: themeServiceMock.createStartContract(), documentToExpression: () => Promise.resolve({ ast: { @@ -1145,7 +1142,7 @@ describe('embeddable', () => { data: dataMock, uiSettings: { get: () => undefined } as unknown as IUiSettingsClient, expressionRenderer: currentExpressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, inspector: inspectorPluginMock.createStartContract(), dataViews: {} as DataViewsContract, @@ -1160,7 +1157,6 @@ describe('embeddable', () => { visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), - theme: themeServiceMock.createStartContract(), documentToExpression: () => Promise.resolve({ ast: { @@ -1209,7 +1205,7 @@ describe('embeddable', () => { attributeService, data: dataMock, expressionRenderer, - coreStart: {} as CoreStart, + coreStart, basePath, dataViews: {} as DataViewsContract, capabilities: { @@ -1221,7 +1217,6 @@ describe('embeddable', () => { }, inspector: inspectorPluginMock.createStartContract(), getTrigger, - theme: themeServiceMock.createStartContract(), visualizationMap: defaultVisualizationMap, datasourceMap: defaultDatasourceMap, injectFilterReferences: jest.fn(mockInjectFilterReferences), diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index ebdc0db42953c..d4db046665fc7 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -44,7 +44,7 @@ import { import { map, distinctUntilChanged, skip, debounceTime } from 'rxjs'; import fastIsEqual from 'fast-deep-equal'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ExpressionRendererEvent, ReactExpressionRendererType, @@ -74,7 +74,6 @@ import type { IBasePath, IUiSettingsClient, KibanaExecutionContext, - ThemeServiceStart, } from '@kbn/core/public'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import { @@ -83,7 +82,7 @@ import { MultiClickTriggerEvent, } from '@kbn/charts-plugin/public'; import { DataViewSpec } from '@kbn/data-views-plugin/common'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { useEuiFontSize, useEuiTheme, EuiEmptyPrompt } from '@elastic/eui'; import { canTrackContentfulRender } from '@kbn/presentation-containers'; import { getExecutionContextEvents, trackUiCounterEvents } from '../lens_ui_telemetry'; @@ -236,7 +235,6 @@ export interface LensEmbeddableDeps { coreStart: CoreStart; usageCollection?: UsageCollectionSetup; spaces?: SpacesPluginStart; - theme: ThemeServiceStart; uiSettings: IUiSettingsClient; } @@ -495,7 +493,7 @@ export class Embeddable distinctUntilChanged((a, b) => fastIsEqual(a, b)), skip(1) ) - .subscribe((input) => { + .subscribe((_input) => { this.reload(); }) ); @@ -512,7 +510,7 @@ export class Embeddable distinctUntilChanged(), skip(1) ) - .subscribe((input) => { + .subscribe((_input) => { // only reload if drilldowns are set if (this.getInput().enhancements?.dynamicActions) { this.reload(); @@ -1129,7 +1127,7 @@ export class Embeddable if (this.expression && !blockingErrors.length) { render( <> - + - + { this.badgeDomNode = el; @@ -1205,14 +1203,12 @@ export class Embeddable if (errors.length && this.domNode) { render( <> - - - - - + + + { this.badgeDomNode = el; @@ -1244,10 +1240,10 @@ export class Embeddable if (this.badgeDomNode) { render( - + - , + , this.badgeDomNode ); } diff --git a/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts b/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts index 0522dc976573f..d84aca319a42b 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts +++ b/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts @@ -110,7 +110,6 @@ export class EmbeddableFactory implements EmbeddableFactoryDefinition { dataViews, capabilities, usageCollection, - theme, inspector, spaces, uiSettings, @@ -142,7 +141,6 @@ export class EmbeddableFactory implements EmbeddableFactoryDefinition { }, coreStart, usageCollection, - theme, spaces, uiSettings, }, diff --git a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx index 63a2a6aabe3fe..a8477a549d3ca 100644 --- a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx +++ b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import { I18nProvider } from '@kbn/i18n-react'; import { ExpressionRendererEvent, ReactExpressionRendererProps, @@ -76,42 +75,40 @@ export function ExpressionWrapper({ }: ExpressionWrapperProps) { if (!expression) return null; return ( - -

    - { - const messages = getOriginalRequestErrorMessages(error || null); - addUserMessages(messages); - if (error?.original) { - onRuntimeError(error.original); - } else { - onRuntimeError(new Error(errorMessage ? errorMessage : '')); - } +
    + { + const messages = getOriginalRequestErrorMessages(error || null); + addUserMessages(messages); + if (error?.original) { + onRuntimeError(error.original); + } else { + onRuntimeError(new Error(errorMessage ? errorMessage : '')); + } - return <>; // the embeddable will take care of displaying the messages - }} - onEvent={handleEvent} - hasCompatibleActions={hasCompatibleActions} - getCompatibleCellValueActions={getCompatibleCellValueActions} - /> -
    - + return <>; // the embeddable will take care of displaying the messages + }} + onEvent={handleEvent} + hasCompatibleActions={hasCompatibleActions} + getCompatibleCellValueActions={getCompatibleCellValueActions} + /> +
    ); } diff --git a/x-pack/plugins/lens/public/lens_attribute_service.ts b/x-pack/plugins/lens/public/lens_attribute_service.ts index 69b76669695fe..eb827d87d6416 100644 --- a/x-pack/plugins/lens/public/lens_attribute_service.ts +++ b/x-pack/plugins/lens/public/lens_attribute_service.ts @@ -81,7 +81,6 @@ export function getLensAttributeService( }; }, checkForDuplicateTitle: (props: OnSaveProps) => { - const overlays = core.overlays; return checkForDuplicateTitle( { title: props.newTitle, @@ -93,7 +92,7 @@ export function getLensAttributeService( props.onTitleDuplicate, { client: savedObjectStore, - overlays, + ...core, } ); }, diff --git a/x-pack/plugins/lens/public/mocks/services_mock.tsx b/x-pack/plugins/lens/public/mocks/services_mock.tsx index b18636cb21f76..fa98db785c50e 100644 --- a/x-pack/plugins/lens/public/mocks/services_mock.tsx +++ b/x-pack/plugins/lens/public/mocks/services_mock.tsx @@ -30,7 +30,6 @@ import type { EmbeddableStateTransfer } from '@kbn/embeddable-plugin/public'; import { presentationUtilPluginMock } from '@kbn/presentation-util-plugin/public/mocks'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import type { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; -import { settingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import type { LensAttributeService } from '../lens_attribute_service'; import type { LensByValueInput, @@ -137,14 +136,9 @@ export function makeDefaultServices( } return { - http: core.http, + ...startMock, chrome: core.chrome, - overlays: core.overlays, - uiSettings: core.uiSettings, - settings: settingsServiceMock.createStartContract(), - executionContext: core.executionContext, navigation: navigationStartMock, - notifications: core.notifications, attributeService: makeAttributeService(), inspector: { adapters: getLensInspectorService(inspectorPluginMock.createStartContract()).adapters, @@ -182,7 +176,6 @@ export function makeDefaultServices( dataViewFieldEditor: indexPatternFieldEditorPluginMock.createStartContract(), dataViewEditor: indexPatternEditorPluginMock.createStartContract(), unifiedSearch: unifiedSearchPluginMock.createStartContract(), - docLinks: startMock.docLinks, contentManagement: contentManagementMock.createStartContract(), eventAnnotationService: {} as EventAnnotationServiceType, }; diff --git a/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts b/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts index 3997ab73cc682..8b813ffc66338 100644 --- a/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts +++ b/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { OverlayStart } from '@kbn/core/public'; import { DOC_TYPE } from '../../../common/constants'; +import type { StartServices } from '../../types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; import { findObjectByTitle } from './find_object_by_title'; import { displayDuplicateTitleConfirmModal } from './display_duplicate_title_confirm_modal'; @@ -21,9 +21,9 @@ import { SavedObjectIndexStore } from '..'; export async function checkForDuplicateTitle( savedObjectMeta: ConfirmModalSavedObjectMeta, onTitleDuplicate: (() => void) | undefined, - services: { client: SavedObjectIndexStore; overlays: OverlayStart } + services: StartServices & { client: SavedObjectIndexStore } ): Promise { - const { client, overlays } = services; + const { client, ...startServices } = services; const { id, title, isTitleDuplicateConfirmed, lastSavedTitle, copyOnSave } = savedObjectMeta; // Don't check for duplicates if user has already confirmed save with duplicate title @@ -50,5 +50,5 @@ export async function checkForDuplicateTitle( // TODO: make onTitleDuplicate a required prop and remove UI components from this class // Need to leave here until all users pass onTitleDuplicate. - return displayDuplicateTitleConfirmModal(savedObjectMeta, overlays); + return displayDuplicateTitleConfirmModal(savedObjectMeta, startServices); } diff --git a/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx b/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx index 9b24a2be54ce2..c2b820b2dc299 100644 --- a/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx +++ b/x-pack/plugins/lens/public/persistence/saved_objects_utils/confirm_modal_promise.tsx @@ -6,23 +6,23 @@ */ import React from 'react'; -import type { OverlayStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { EuiConfirmModal } from '@elastic/eui'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import type { StartServices } from '../../types'; export function confirmModalPromise( message = '', title = '', confirmBtnText = '', - overlays: OverlayStart + startServices: StartServices ): Promise { return new Promise((resolve, reject) => { const cancelButtonText = i18n.translate('xpack.lens.confirmModal.cancelButtonLabel', { defaultMessage: 'Cancel', }); - const modal = overlays.openModal( + const modal = startServices.overlays.openModal( toMountPoint( { @@ -38,7 +38,8 @@ export function confirmModalPromise( title={title} > {message} - + , + startServices ) ); }); diff --git a/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts b/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts index e0c61d202da72..36cbc511b3b4b 100644 --- a/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts +++ b/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts @@ -6,14 +6,14 @@ */ import { i18n } from '@kbn/i18n'; -import type { OverlayStart } from '@kbn/core/public'; +import type { StartServices } from '../../types'; import type { ConfirmModalSavedObjectMeta } from './types'; import { SAVE_DUPLICATE_REJECTED } from './constants'; import { confirmModalPromise } from './confirm_modal_promise'; export function displayDuplicateTitleConfirmModal( { title, displayName }: ConfirmModalSavedObjectMeta, - overlays: OverlayStart + startServices: StartServices ): Promise { const confirmMessage = i18n.translate( 'xpack.lens.confirmModal.saveDuplicateConfirmationMessage', @@ -28,7 +28,7 @@ export function displayDuplicateTitleConfirmModal( values: { name: displayName }, }); try { - return confirmModalPromise(confirmMessage, '', confirmButtonText, overlays); + return confirmModalPromise(confirmMessage, '', confirmButtonText, startServices); } catch { return Promise.reject(new Error(SAVE_DUPLICATE_REJECTED)); } diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts index 0ab4e16bb70f1..addbd8e512842 100644 --- a/x-pack/plugins/lens/public/plugin.ts +++ b/x-pack/plugins/lens/public/plugin.ts @@ -638,11 +638,7 @@ export class LensPlugin { visualizeAggBasedVisAction(core.application) ); - const editInLensAction = new ConfigureInLensPanelAction( - startDependencies, - core.overlays, - core.theme - ); + const editInLensAction = new ConfigureInLensPanelAction(startDependencies, core); // dashboard edit panel action startDependencies.uiActions.addTriggerAction('CONTEXT_MENU_TRIGGER', editInLensAction); diff --git a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx index 0add0332d65b6..094f7058ce665 100644 --- a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx @@ -19,6 +19,7 @@ import { import { Position, VerticalAlignment, HorizontalAlignment } from '@elastic/charts'; import { LegendSize } from '@kbn/visualizations-plugin/public'; import { useDebouncedValue } from '@kbn/visualization-ui-components'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { ToolbarPopover, type ToolbarPopoverProps } from '../toolbar_popover'; import { LegendLocationSettings } from './location/legend_location_settings'; import { ColumnsNumberSetting } from './layout/columns_number_setting'; @@ -108,15 +109,15 @@ export interface LegendSettingsPopoverProps { /** * value in legend status */ - valueInLegend?: boolean; + legendStats?: LegendStats[]; /** * Callback on value in legend status change */ - onValueInLegendChange?: (event: EuiSwitchEvent) => void; + onLegendStatsChange?: (legendStats?: LegendStats[]) => void; /** * If true, value in legend switch is rendered */ - renderValueInLegendSwitch?: boolean; + allowLegendStats?: boolean; /** * Button group position */ @@ -197,9 +198,9 @@ export const LegendSettingsPopover: React.FunctionComponent )} - {renderValueInLegendSwitch && ( + {allowLegendStats && ( { + if (ev.target.checked) { + onLegendStatsChange([LegendStats.values]); + } else { + onLegendStatsChange([]); + } + }} /> )} diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts index febb15f4504dd..5173c69c1d3f9 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/create_action_helpers.ts @@ -114,10 +114,9 @@ export async function executeCreateAction({ executeEditAction({ embeddable, startDependencies: deps, - overlays: core.overlays, - theme: core.theme, isNewPanel: true, deletePanel, + ...core, }); } } diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.test.tsx b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.test.tsx index e1ab0f715cac5..13c0bcb23e562 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.test.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.test.tsx @@ -5,18 +5,16 @@ * 2.0. */ import React from 'react'; +import { coreMock } from '@kbn/core/public/mocks'; import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; -import { overlayServiceMock } from '@kbn/core-overlays-browser-mocks'; -import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; import type { LensPluginStartDependencies } from '../../plugin'; import { createMockStartDependencies } from '../../editor_frame_service/mocks'; import { DOC_TYPE } from '../../../common/constants'; import { ConfigureInLensPanelAction } from './edit_action'; describe('open config panel action', () => { - const overlays = overlayServiceMock.createStartContract(); - const theme = themeServiceMock.createStartContract(); + const coreStart = coreMock.createStart(); const mockStartDependencies = createMockStartDependencies() as unknown as LensPluginStartDependencies; describe('compatibility check', () => { @@ -32,8 +30,7 @@ describe('open config panel action', () => { } as unknown as IEmbeddable; const configurablePanelAction = new ConfigureInLensPanelAction( mockStartDependencies, - overlays, - theme + coreStart ); const isCompatible = await configurablePanelAction.isCompatible({ @@ -54,8 +51,7 @@ describe('open config panel action', () => { } as unknown as IEmbeddable; const configurablePanelAction = new ConfigureInLensPanelAction( mockStartDependencies, - overlays, - theme + coreStart ); const isCompatible = await configurablePanelAction.isCompatible({ @@ -78,8 +74,7 @@ describe('open config panel action', () => { } as unknown as IEmbeddable; const configurablePanelAction = new ConfigureInLensPanelAction( mockStartDependencies, - overlays, - theme + coreStart ); const isCompatible = await configurablePanelAction.isCompatible({ @@ -110,10 +105,9 @@ describe('open config panel action', () => { } as unknown as IEmbeddable; const configurablePanelAction = new ConfigureInLensPanelAction( mockStartDependencies, - overlays, - theme + coreStart ); - const spy = jest.spyOn(overlays, 'openFlyout'); + const spy = jest.spyOn(coreStart.overlays, 'openFlyout'); await configurablePanelAction.execute({ embeddable, diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.tsx b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.tsx index c4960532bdd66..4ad23bc953d23 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action.tsx @@ -6,10 +6,10 @@ */ import { i18n } from '@kbn/i18n'; import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; -import { OverlayStart, ThemeServiceStart } from '@kbn/core/public'; import { Action } from '@kbn/ui-actions-plugin/public'; import type { LensPluginStartDependencies } from '../../plugin'; import { isLensEmbeddable } from '../utils'; +import type { StartServices } from '../../types'; const ACTION_CONFIGURE_IN_LENS = 'ACTION_CONFIGURE_IN_LENS'; @@ -26,8 +26,7 @@ export class ConfigureInLensPanelAction implements Action { constructor( protected readonly startDependencies: LensPluginStartDependencies, - protected readonly overlays: OverlayStart, - protected readonly theme: ThemeServiceStart + protected readonly startServices: StartServices ) {} public getDisplayName({ embeddable }: Context): string { @@ -52,8 +51,7 @@ export class ConfigureInLensPanelAction implements Action { return executeEditAction({ embeddable, startDependencies: this.startDependencies, - overlays: this.overlays, - theme: this.theme, + ...this.startServices, }); } } diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts index 476ac6f3e6505..20378c33bf33a 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts @@ -8,17 +8,15 @@ import React from 'react'; import './helpers.scss'; import { tracksOverlays } from '@kbn/presentation-containers'; import { IEmbeddable } from '@kbn/embeddable-plugin/public'; -import type { OverlayStart, ThemeServiceStart } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { isLensEmbeddable } from '../utils'; import type { LensPluginStartDependencies } from '../../plugin'; +import { StartServices } from '../../types'; -interface Context { +interface Context extends StartServices { embeddable: IEmbeddable; startDependencies: LensPluginStartDependencies; - overlays: OverlayStart; - theme: ThemeServiceStart; isNewPanel?: boolean; deletePanel?: () => void; } @@ -33,10 +31,9 @@ export async function isEditActionCompatible(embeddable: IEmbeddable) { export async function executeEditAction({ embeddable, startDependencies, - overlays, - theme, isNewPanel, deletePanel, + ...startServices }: Context) { const isCompatibleAction = await isEditActionCompatible(embeddable); if (!isCompatibleAction || !isLensEmbeddable(embeddable)) { @@ -47,7 +44,7 @@ export async function executeEditAction({ const ConfigPanel = await embeddable.openConfingPanel(startDependencies, isNewPanel, deletePanel); if (ConfigPanel) { - const handle = overlays.openFlyout( + const handle = startServices.overlays.openFlyout( toMountPoint( React.cloneElement(ConfigPanel, { closeFlyout: () => { @@ -55,9 +52,7 @@ export async function executeEditAction({ handle.close(); }, }), - { - theme$: theme.theme$, - } + startServices ), { className: 'lnsConfigPanel__overlay', diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx index e8a695b735d76..168dbebe3ebd2 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/in_app_embeddable_edit/in_app_embeddable_edit_action_helpers.tsx @@ -8,7 +8,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import type { CoreStart } from '@kbn/core/public'; import { isOfAggregateQueryType } from '@kbn/es-query'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import type { LensPluginStartDependencies } from '../../../plugin'; import type { TypedLensByValueInput } from '../../../embeddable/embeddable_component'; @@ -134,9 +134,7 @@ export async function executeEditEmbeddableAction({ handle.close(); }, }), - { - theme$: core.theme.theme$, - } + core ), { className: 'lnsConfigPanel__overlay', diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index c1c7be77b9608..9175dce78ec17 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -66,6 +66,16 @@ import type { DataViewsState } from './state_management/types'; import type { IndexPatternServiceAPI } from './data_views_service/service'; import type { Document } from './persistence/saved_object_store'; +export type StartServices = Pick< + CoreStart, + // used extensively in lens + | 'overlays' + // used for react rendering utilities + | 'analytics' + | 'i18n' + | 'theme' +>; + export interface IndexPatternRef { id: string; title: string; @@ -648,7 +658,14 @@ export type DatasourceDimensionEditorProps = DatasourceDimensionPro >; core: Pick< CoreStart, - 'http' | 'notifications' | 'uiSettings' | 'overlays' | 'theme' | 'docLinks' + | 'http' + | 'notifications' + | 'uiSettings' + | 'overlays' + | 'analytics' + | 'i18n' + | 'theme' + | 'docLinks' >; dateRange: DateRange; dimensionGroups: VisualizationDimensionGroupConfig[]; diff --git a/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx b/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx index 157cc6d980b31..d58f0cbb04208 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx @@ -8,16 +8,15 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { i18n } from '@kbn/i18n'; -import { I18nProvider } from '@kbn/i18n-react'; import type { PaletteRegistry } from '@kbn/coloring'; import type { IAggType } from '@kbn/data-plugin/public'; -import { IUiSettingsClient, ThemeServiceStart } from '@kbn/core/public'; +import { CoreSetup, IUiSettingsClient } from '@kbn/core/public'; import type { Datatable, ExpressionRenderDefinition, IInterpreterRenderHandlers, } from '@kbn/expressions-plugin/common'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { ChartSizeEvent } from '@kbn/chart-expressions-common'; import { trackUiCounterEvents } from '../../lens_ui_telemetry'; import { DatatableComponent } from './components/table_basic'; @@ -86,7 +85,7 @@ export const getDatatableRenderer = (dependencies: { getType: Promise<(name: string) => IAggType | undefined>; paletteService: PaletteRegistry; uiSettings: IUiSettingsClient; - theme: ThemeServiceStart; + core: CoreSetup; }): ExpressionRenderDefinition => ({ name: 'lens_datatable_renderer', displayName: i18n.translate('xpack.lens.datatable.visualizationName', { @@ -128,7 +127,7 @@ export const getDatatableRenderer = (dependencies: { if (hasCompatibleActions) { if (!!config.data) { rowHasRowClickTriggerActions = await Promise.all( - config.data.rows.map(async (row, rowIndex) => { + config.data.rows.map(async (_row, rowIndex) => { try { const hasActions = await hasCompatibleActions({ name: 'tableRowContextMenuClick', @@ -148,30 +147,29 @@ export const getDatatableRenderer = (dependencies: { } } + const [startServices] = await dependencies.core.getStartServices(); const [columnCellValueActions, columnsFilterable] = await Promise.all([ getColumnCellValueActions(config, getCompatibleCellValueActions), getColumnsFilterable(config.data, handlers), ]); ReactDOM.render( - - - - - , + + + , domNode ); }, diff --git a/x-pack/plugins/lens/public/visualizations/datatable/index.ts b/x-pack/plugins/lens/public/visualizations/datatable/index.ts index 0c1f22e73d081..78a8e6e43dfe8 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/index.ts +++ b/x-pack/plugins/lens/public/visualizations/datatable/index.ts @@ -35,7 +35,7 @@ export class DatatableVisualization { expressions.registerRenderer(() => getDatatableRenderer({ formatFactory, - theme: core.theme, + core, getType: core .getStartServices() .then(([_, { data: dataStart }]) => dataStart.search.aggs.types.get), diff --git a/x-pack/plugins/lens/public/visualizations/partition/partition_charts_meta.ts b/x-pack/plugins/lens/public/visualizations/partition/partition_charts_meta.ts index 3a20d5ce1d38c..921586e82dfea 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/partition_charts_meta.ts +++ b/x-pack/plugins/lens/public/visualizations/partition/partition_charts_meta.ts @@ -16,6 +16,7 @@ import { IconChartMosaic, IconChartWaffle, } from '@kbn/chart-icons'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import { SharedPieLayerState, EmptySizeRatios } from '../../../common/types'; import { CategoryDisplay, NumberDisplay } from '../../../common/constants'; import type { PieChartType } from '../../../common/types'; @@ -44,7 +45,7 @@ interface PartitionChartMeta { }; legend: { flat?: boolean; - showValues?: boolean; + defaultLegendStats?: LegendStats[]; hideNestedLegendSwitch?: boolean; getShowLegendDefault?: (bucketColumns: DatatableColumn[]) => boolean; }; @@ -211,7 +212,7 @@ export const PartitionChartsMeta: Record = { }, legend: { flat: true, - showValues: true, + defaultLegendStats: [LegendStats.values], hideNestedLegendSwitch: true, getShowLegendDefault: () => true, }, diff --git a/x-pack/plugins/lens/public/visualizations/partition/persistence.tsx b/x-pack/plugins/lens/public/visualizations/partition/persistence.tsx new file mode 100644 index 0000000000000..5307a17076ca5 --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/partition/persistence.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { cloneDeep } from 'lodash'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; +import { PieLayerState, PieVisualizationState } from '../../../common/types'; + +type PersistedPieLayerState = Omit & { + showValuesInLegend?: boolean; +}; + +export type PersistedPieVisualizationState = Omit & { + layers: PersistedPieLayerState[]; +}; + +export function convertToRuntime(state: PersistedPieVisualizationState) { + let newState = cloneDeep(state) as unknown as PieVisualizationState; + newState = convertToLegendStats(newState); + return newState; +} + +function convertToLegendStats(state: PieVisualizationState) { + state.layers.forEach((l) => { + if ('showValuesInLegend' in l) { + l.legendStats = [ + ...new Set([ + ...(l.showValuesInLegend ? [LegendStats.values] : []), + ...(l.legendStats || []), + ]), + ]; + } + delete (l as PersistedPieLayerState).showValuesInLegend; + }); + + return state; +} + +export function convertToPersistable(state: PieVisualizationState) { + const newState = cloneDeep(state) as unknown as PersistedPieVisualizationState; + + newState.layers.forEach((l) => { + if ('legendStats' in l && Array.isArray(l.legendStats)) { + l.showValuesInLegend = l.legendStats.includes(LegendStats.values); + delete l.legendStats; + } + }); + + return newState; +} diff --git a/x-pack/plugins/lens/public/visualizations/partition/render_helpers.test.ts b/x-pack/plugins/lens/public/visualizations/partition/render_helpers.test.ts index 5a1f36320a3f7..e5efd1bed8b84 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/render_helpers.test.ts +++ b/x-pack/plugins/lens/public/visualizations/partition/render_helpers.test.ts @@ -7,9 +7,10 @@ import type { Datatable } from '@kbn/expressions-plugin/public'; -import { checkTableForContainsSmallValues, shouldShowValuesInLegend } from './render_helpers'; +import { checkTableForContainsSmallValues, getLegendStats } from './render_helpers'; import { PieLayerState } from '../../../common/types'; import { PieChartTypes } from '../../../common/constants'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; describe('render helpers', () => { describe('#checkTableForContainsSmallValues', () => { @@ -68,39 +69,27 @@ describe('render helpers', () => { }); }); - describe('#shouldShowValuesInLegend', () => { + describe('#getLegendStats', () => { it('should firstly read the state value', () => { expect( - shouldShowValuesInLegend( - { showValuesInLegend: true } as PieLayerState, - PieChartTypes.WAFFLE - ) - ).toBeTruthy(); + getLegendStats({ legendStats: [LegendStats.values] } as PieLayerState, PieChartTypes.WAFFLE) + ).toEqual([LegendStats.values]); expect( - shouldShowValuesInLegend( - { showValuesInLegend: false } as PieLayerState, - PieChartTypes.WAFFLE - ) - ).toBeFalsy(); + getLegendStats({ legendStats: [] as LegendStats[] } as PieLayerState, PieChartTypes.WAFFLE) + ).toEqual([]); }); it('should read value from meta in case of value in state is undefined', () => { - expect( - shouldShowValuesInLegend( - { showValuesInLegend: undefined } as PieLayerState, - PieChartTypes.WAFFLE - ) - ).toBeTruthy(); - - expect(shouldShowValuesInLegend({} as PieLayerState, PieChartTypes.WAFFLE)).toBeTruthy(); + expect(getLegendStats({} as PieLayerState, PieChartTypes.WAFFLE)).toEqual([ + LegendStats.values, + ]); expect( - shouldShowValuesInLegend( - { showValuesInLegend: undefined } as PieLayerState, - PieChartTypes.PIE - ) - ).toBeFalsy(); + getLegendStats({ legendStats: undefined } as PieLayerState, PieChartTypes.WAFFLE) + ).toEqual([LegendStats.values]); + + expect(getLegendStats({} as PieLayerState, PieChartTypes.PIE)).toEqual(undefined); }); }); }); diff --git a/x-pack/plugins/lens/public/visualizations/partition/render_helpers.ts b/x-pack/plugins/lens/public/visualizations/partition/render_helpers.ts index 122f6a55c7530..6d759e5d56c65 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/render_helpers.ts +++ b/x-pack/plugins/lens/public/visualizations/partition/render_helpers.ts @@ -6,15 +6,17 @@ */ import type { Datatable } from '@kbn/expressions-plugin/public'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; import type { PieChartType, PieLayerState } from '../../../common/types'; import { PartitionChartsMeta } from './partition_charts_meta'; -export const shouldShowValuesInLegend = (layer: PieLayerState, shape: PieChartType) => { - if ('showValues' in PartitionChartsMeta[shape]?.legend) { - return layer.showValuesInLegend ?? PartitionChartsMeta[shape]?.legend?.showValues ?? true; +export const getLegendStats = (layer: PieLayerState, shape: PieChartType) => { + if ('defaultLegendStats' in PartitionChartsMeta[shape]?.legend) { + return ( + layer.legendStats ?? + PartitionChartsMeta[shape].legend.defaultLegendStats ?? [LegendStats.values] + ); } - - return false; }; export const checkTableForContainsSmallValues = ( diff --git a/x-pack/plugins/lens/public/visualizations/partition/to_expression.ts b/x-pack/plugins/lens/public/visualizations/partition/to_expression.ts index 29e5fd399d148..9f76cecc1f8f2 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/to_expression.ts +++ b/x-pack/plugins/lens/public/visualizations/partition/to_expression.ts @@ -25,7 +25,7 @@ import { ExpressionFunctionVisDimension } from '@kbn/visualizations-plugin/commo import type { CollapseExpressionFunction } from '../../../common/expressions'; import type { Operation, DatasourcePublicAPI, DatasourceLayers } from '../../types'; import { DEFAULT_PERCENT_DECIMALS } from './constants'; -import { shouldShowValuesInLegend } from './render_helpers'; +import { getLegendStats } from './render_helpers'; import { PieLayerState, PieVisualizationState, EmptySizeRatios } from '../../../common/types'; import { CategoryDisplay, @@ -269,7 +269,7 @@ const generateWaffleVisAst: GenerateExpressionAstFunction = (...rest) => { layer, getColumnToLabelMap(layer.metrics, datasourceLayers[layer.layerId]) ), - showValuesInLegend: shouldShowValuesInLegend(layer, state.shape), + legendStats: getLegendStats(layer, state.shape), }), ]).toAst(); }; diff --git a/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx b/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx index 48a9030097940..627072dfda800 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx +++ b/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx @@ -26,7 +26,7 @@ import { LegendDisplay } from '../../../common/constants'; import { VisualizationToolbarProps } from '../../types'; import { ToolbarPopover, LegendSettingsPopover } from '../../shared_components'; import { getDefaultVisualValuesForLayer } from '../../shared_components/datasource_default_values'; -import { shouldShowValuesInLegend } from './render_helpers'; +import { getLegendStats } from './render_helpers'; const legendOptions: Array<{ value: SharedPieLayerState['legendDisplay']; @@ -133,11 +133,14 @@ export function PieToolbar(props: VisualizationToolbarProps { - onStateChange({ - showValuesInLegend: !shouldShowValuesInLegend(layer, state.shape), - }); - }, [layer, state.shape, onStateChange]); + const onLegendStatsChange = useCallback( + (legendStats) => { + onStateChange({ + legendStats, + }); + }, + [onStateChange] + ); const onEmptySizeRatioChange = useCallback( (sizeId) => { @@ -245,11 +248,9 @@ export function PieToolbar(props: VisualizationToolbarProps { }); }); + describe('#initialize', () => { + describe('converting to legendStats', () => { + it('loads a chart with `legendStats` property', () => { + const persistedState = getExampleState(); + persistedState.layers[0].legendStats = ['values' as LegendStats.values]; + + const runtimeState = pieVisualization.initialize(() => 'first', persistedState); + + expect(runtimeState.layers[0].legendStats).toEqual(['values']); + expect('showValuesInLegend' in runtimeState.layers[0]).toEqual(false); + }); + it('loads a xy chart with `showValuesInLegend` property equal to false and converts to legendStats: []', () => { + const persistedState: PersistedPieVisualizationState = getExampleState(); + persistedState.layers[0].showValuesInLegend = false; + + const runtimeState = pieVisualization.initialize(() => 'first', persistedState); + + expect(runtimeState.layers[0].legendStats).toEqual([]); + expect('showValuesInLegend' in runtimeState.layers[0]).toEqual(false); + }); + + it('loads a xy chart with `showValuesInLegend` property equal to true and converts to legendStats: [`values`]', () => { + const persistedState: PersistedPieVisualizationState = getExampleState(); + persistedState.layers[0].showValuesInLegend = true; + + const runtimeState = pieVisualization.initialize(() => 'first', persistedState); + + expect(runtimeState.layers[0].legendStats).toEqual(['values']); + expect('showValuesInLegend' in runtimeState.layers[0]).toEqual(false); + }); + + it('loads a xy chart with undefined `showValuesInLegend` and converts to legendStats: [`values`]', () => { + const runtimeState = pieVisualization.initialize(() => 'first', getExampleState()); + + expect(runtimeState.layers[0].legendStats).toEqual(undefined); + expect('showValuesInLegend' in runtimeState.layers[0]).toEqual(false); + }); + }); + }); + + describe('#getPersistableState', () => { + describe('converting to legend stats', () => { + it('converts `legendStats` to `valuesInLegend`', () => { + const runtimeState = getExampleState(); + // no legend stats at all + const { state } = pieVisualization.getPersistableState!(runtimeState); + expect('legendStats' in state.layers[0]).toBeFalsy(); + expect(state.layers[0].showValuesInLegend).toEqual(undefined); + + // legend stats === ['values'] + runtimeState.layers[0].legendStats = ['values' as LegendStats.values]; + const { state: stateWithShowValuesInLegendTrue } = + pieVisualization.getPersistableState!(runtimeState); + + expect('legendStats' in stateWithShowValuesInLegendTrue.layers[0]).toBeFalsy(); + expect(stateWithShowValuesInLegendTrue.layers[0].showValuesInLegend).toEqual(true); + + // legend stats === ['values'] + runtimeState.layers[0].legendStats = []; + + const { state: stateWithShowValuesInLegendFalse } = + pieVisualization.getPersistableState!(runtimeState); + + expect('legendStats' in stateWithShowValuesInLegendFalse.layers[0]).toBeFalsy(); + expect(stateWithShowValuesInLegendFalse.layers[0].showValuesInLegend).toEqual(false); + }); + }); + }); + describe('#removeDimension', () => { it('removes corresponding collapse function if exists', () => { const state = getExampleState(); diff --git a/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx b/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx index c230f0af9d284..01c4e1f03f82e 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx @@ -53,6 +53,11 @@ import { checkTableForContainsSmallValues } from './render_helpers'; import { DatasourcePublicAPI } from '../..'; import { nonNullable, getColorMappingDefaults } from '../../utils'; import { getColorMappingTelemetryEvents } from '../../lens_ui_telemetry/color_telemetry_helpers'; +import { + PersistedPieVisualizationState, + convertToPersistable, + convertToRuntime, +} from './persistence'; const metricLabel = i18n.translate('xpack.lens.pie.groupMetricLabelSingular', { defaultMessage: 'Metric', @@ -123,7 +128,7 @@ export const getPieVisualization = ({ }: { paletteService: PaletteRegistry; kibanaTheme: ThemeServiceStart; -}): Visualization => ({ +}): Visualization => ({ id: 'lnsPie', visualizationTypes: Object.entries(PartitionChartsMeta).map(([key, meta]) => ({ @@ -163,18 +168,23 @@ export const getPieVisualization = ({ triggers: [VIS_EVENT_TO_TRIGGER.filter], initialize(addNewLayer, state, mainPalette) { - return ( - state || { - shape: PieChartTypes.DONUT, - layers: [ - newLayerState( - addNewLayer(), - mainPalette?.type === 'colorMapping' ? mainPalette.value : getColorMappingDefaults() - ), - ], - palette: mainPalette?.type === 'legacyPalette' ? mainPalette.value : undefined, - } - ); + if (state) { + return convertToRuntime(state); + } + return { + shape: PieChartTypes.DONUT, + layers: [ + newLayerState( + addNewLayer(), + mainPalette?.type === 'colorMapping' ? mainPalette.value : getColorMappingDefaults() + ), + ], + palette: mainPalette?.type === 'legacyPalette' ? mainPalette.value : undefined, + }; + }, + + getPersistableState(state) { + return { savedObjectReferences: [], state: convertToPersistable(state) }; }, getMainPalette: (state) => { diff --git a/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap b/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap index 6c1818c0f94ae..3aa63407721e7 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap +++ b/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap @@ -131,9 +131,6 @@ Object { "valueLabels": Array [ "hide", ], - "valuesInLegend": Array [ - false, - ], "xAxisConfig": Array [ Object { "chain": Array [ diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts index 7d01838da5a6c..8e2c87a951051 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/index.ts @@ -8,13 +8,13 @@ import type { CoreStart } from '@kbn/core/public'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; import { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; -import type { ThemeServiceStart } from '@kbn/core/public'; import { DataViewsContract } from '@kbn/data-views-plugin/public'; import { VISUALIZE_APP_NAME } from '@kbn/visualizations-plugin/common/constants'; import { ANNOTATIONS_LISTING_VIEW_ID } from '@kbn/event-annotation-plugin/common'; import type { LayerAction, RegisterLibraryAnnotationGroupFunction, + StartServices, StateSetter, } from '../../../../types'; import { XYState, XYAnnotationLayerConfig } from '../../types'; @@ -33,7 +33,7 @@ export const createAnnotationActions = ({ eventAnnotationService, savedObjectsTagging, dataViews, - kibanaTheme, + startServices, }: { state: XYState; layer: XYAnnotationLayerConfig; @@ -44,7 +44,7 @@ export const createAnnotationActions = ({ eventAnnotationService: EventAnnotationServiceType; savedObjectsTagging?: SavedObjectTaggingPluginStart; dataViews: DataViewsContract; - kibanaTheme: ThemeServiceStart; + startServices: StartServices; }): LayerAction[] => { const actions = []; @@ -67,7 +67,7 @@ export const createAnnotationActions = ({ core.application.navigateToApp(VISUALIZE_APP_NAME, { path: `#/${ANNOTATIONS_LISTING_VIEW_ID}`, }), - kibanaTheme, + startServices, }) ); } diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx index e39b3f945e4e0..7593374ca83c5 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/revert_changes_action.tsx @@ -17,8 +17,8 @@ import { EuiModalHeaderTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { CoreStart } from '@kbn/core/public'; import { cloneDeep } from 'lodash'; import { OverlayRef } from '@kbn/core-mount-utils-browser'; import { IToasts } from '@kbn/core-notifications-browser'; @@ -36,7 +36,7 @@ export const getRevertChangesAction = ({ state: XYState; layer: XYByReferenceAnnotationLayerConfig; setState: StateSetter; - core: Pick; + core: Pick; }): LayerAction => { return { displayName: i18n.translate('xpack.lens.xyChart.annotations.revertChanges', { @@ -58,9 +58,7 @@ export const getRevertChangesAction = ({ revert({ setState, layer, state, modal, toasts: core.notifications.toasts }); }} />, - { - theme$: core.theme.theme$, - } + core ), { 'data-test-subj': 'lnsAnnotationLayerRevertModal', diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx index 325d540bbcc54..5b782efef5c95 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.test.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import { coreMock } from '@kbn/core/public/mocks'; import { toastsServiceMock } from '@kbn/core-notifications-browser-mocks/src/toasts_service.mock'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; import { @@ -57,7 +58,7 @@ describe('annotation group save action', () => { .prop('options') as React.ReactElement)!.props.onTagsSelected(myTags); // ignore the linter, you need this await statement - await wrapper.find(SavedObjectSaveModal).prop('onSave')({ + wrapper.find(SavedObjectSaveModal).prop('onSave')({ newTitle, newDescription, ...modalSaveArgs, @@ -114,6 +115,7 @@ describe('annotation group save action', () => { }); describe('save routine', () => { + const coreStart = coreMock.createStart(); const layerId = 'mylayerid'; const byValueLayer: XYByValueAnnotationLayerConfig = { @@ -171,6 +173,7 @@ describe('annotation group save action', () => { }, dataViews, goToAnnotationLibrary: () => Promise.resolve(), + startServices: coreStart, }; }; diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx index b99badee88917..4fbeb20c03c16 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions/save_action.tsx @@ -8,16 +8,15 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { render, unmountComponentAtNode } from 'react-dom'; -import type { ThemeServiceStart } from '@kbn/core/public'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; import { ToastsStart } from '@kbn/core-notifications-browser'; import { MountPoint } from '@kbn/core-mount-utils-browser'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { OnSaveProps as SavedObjectOnSaveProps, SavedObjectSaveModal, } from '@kbn/saved-objects-plugin/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import type { EventAnnotationGroupConfig } from '@kbn/event-annotation-common'; import { EuiIcon, EuiLink } from '@elastic/eui'; import { type SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public'; @@ -25,6 +24,7 @@ import { DataViewsContract } from '@kbn/data-views-plugin/public'; import type { LayerAction, RegisterLibraryAnnotationGroupFunction, + StartServices, StateSetter, } from '../../../../types'; import { XYByReferenceAnnotationLayerConfig, XYAnnotationLayerConfig, XYState } from '../../types'; @@ -182,6 +182,7 @@ export const onSave = async ({ }, dataViews, goToAnnotationLibrary, + startServices, }: { state: XYState; layer: XYAnnotationLayerConfig; @@ -195,6 +196,7 @@ export const onSave = async ({ modalOnSaveProps: ModalOnSaveProps; dataViews: DataViewsContract; goToAnnotationLibrary: () => Promise; + startServices: StartServices; }) => { const shouldStop = await shouldStopBecauseDuplicateTitle( newTitle, @@ -264,7 +266,7 @@ export const onSave = async ({ ), text: ((element) => render( - + - , + , element )) as MountPoint, }); @@ -300,7 +302,7 @@ export const getSaveLayerAction = ({ savedObjectsTagging, dataViews, goToAnnotationLibrary, - kibanaTheme, + startServices, }: { state: XYState; layer: XYAnnotationLayerConfig; @@ -311,7 +313,7 @@ export const getSaveLayerAction = ({ savedObjectsTagging?: SavedObjectTaggingPluginStart; dataViews: DataViewsContract; goToAnnotationLibrary: () => Promise; - kibanaTheme: ThemeServiceStart; + startServices: StartServices; }): LayerAction => { const neverSaved = !isByReferenceAnnotationsLayer(layer); @@ -333,29 +335,28 @@ export const getSaveLayerAction = ({ const metadata = getGroupMetadataFromAnnotationLayer(layer); render( - - - { - await onSave({ - state, - layer, - setState, - registerLibraryAnnotationGroup, - eventAnnotationService, - toasts, - modalOnSaveProps: props, - dataViews, - goToAnnotationLibrary, - }); - }} - {...metadata} - showCopyOnSave={!neverSaved} - /> - - , + + { + await onSave({ + state, + layer, + setState, + registerLibraryAnnotationGroup, + eventAnnotationService, + toasts, + modalOnSaveProps: props, + dataViews, + goToAnnotationLibrary, + startServices, + }); + }} + {...metadata} + showCopyOnSave={!neverSaved} + /> + , domElement ); } diff --git a/x-pack/plugins/lens/public/visualizations/xy/persistence.ts b/x-pack/plugins/lens/public/visualizations/xy/persistence.ts new file mode 100644 index 0000000000000..aaa537e5c57d2 --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/xy/persistence.ts @@ -0,0 +1,303 @@ +/* + * Copyright 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 { LegendConfig } from '@kbn/visualizations-plugin/common'; +import { v4 as uuidv4 } from 'uuid'; +import type { SavedObjectReference } from '@kbn/core/public'; +import { EVENT_ANNOTATION_GROUP_TYPE } from '@kbn/event-annotation-common'; +import { cloneDeep } from 'lodash'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; + +import { layerTypes } from '../../../common/layer_types'; +import { AnnotationGroups } from '../../types'; +import { + XYLayerConfig, + XYDataLayerConfig, + XYReferenceLineLayerConfig, + XYState, + XYAnnotationLayerConfig, + XYByReferenceAnnotationLayerConfig, + XYByValueAnnotationLayerConfig, +} from './types'; +import { isAnnotationsLayer, isByReferenceAnnotationsLayer } from './visualization_helpers'; +import { nonNullable } from '../../utils'; +import { annotationLayerHasUnsavedChanges } from './state_helpers'; + +export const isPersistedByReferenceAnnotationsLayer = ( + layer: XYPersistedAnnotationLayerConfig +): layer is XYPersistedByReferenceAnnotationLayerConfig => + isPersistedAnnotationsLayer(layer) && layer.persistanceType === 'byReference'; + +export const isPersistedLinkedByValueAnnotationsLayer = ( + layer: XYPersistedAnnotationLayerConfig +): layer is XYPersistedLinkedByValueAnnotationLayerConfig => + isPersistedAnnotationsLayer(layer) && layer.persistanceType === 'linked'; + +/** + * This is the type of hybrid layer we get after the user has made a change to + * a by-reference annotation layer and saved the visualization without + * first saving the changes to the library annotation layer. + * + * We maintain the link to the library annotation group, but allow the users + * changes (persisted in the visualization state) to override the attributes in + * the library version until the user + * - saves the changes to the library annotation group + * - reverts the changes + * - unlinks the layer from the library annotation group + */ +export type XYPersistedLinkedByValueAnnotationLayerConfig = Omit< + XYPersistedByValueAnnotationLayerConfig, + 'persistanceType' +> & + Omit & { + persistanceType: 'linked'; + }; + +export type XYPersistedByValueAnnotationLayerConfig = Omit< + XYByValueAnnotationLayerConfig, + 'indexPatternId' | 'hide' | 'simpleView' +> & { persistanceType?: 'byValue'; hide?: boolean; simpleView?: boolean }; // props made optional for backwards compatibility since this is how the existing saved objects are + +export type XYPersistedByReferenceAnnotationLayerConfig = Pick< + XYByValueAnnotationLayerConfig, + 'layerId' | 'layerType' +> & { + persistanceType: 'byReference'; + annotationGroupRef: string; +}; + +export type XYPersistedAnnotationLayerConfig = + | XYPersistedByReferenceAnnotationLayerConfig + | XYPersistedByValueAnnotationLayerConfig + | XYPersistedLinkedByValueAnnotationLayerConfig; + +export type XYPersistedLayerConfig = + | XYDataLayerConfig + | XYReferenceLineLayerConfig + | XYPersistedAnnotationLayerConfig; + +export type XYPersistedState = Omit & { + layers: XYPersistedLayerConfig[]; + valuesInLegend?: boolean; + legend: Omit; +}; + +export function convertToRuntime( + state: XYPersistedState, + annotationGroups?: AnnotationGroups, + references?: SavedObjectReference[] +) { + let newState = cloneDeep(injectReferences(state, annotationGroups, references)); + newState = convertToLegendStats(newState); + return newState; +} + +export function convertToPersistable(state: XYState) { + const persistableState: XYPersistedState = convertToValuesInLegend(state); + const savedObjectReferences: SavedObjectReference[] = []; + const persistableLayers: XYPersistedLayerConfig[] = []; + + persistableState.layers.forEach((layer) => { + if (!isAnnotationsLayer(layer)) { + persistableLayers.push(layer); + } else { + if (isByReferenceAnnotationsLayer(layer)) { + const referenceName = `ref-${uuidv4()}`; + savedObjectReferences.push({ + type: EVENT_ANNOTATION_GROUP_TYPE, + id: layer.annotationGroupId, + name: referenceName, + }); + + if (!annotationLayerHasUnsavedChanges(layer)) { + const persistableLayer: XYPersistedByReferenceAnnotationLayerConfig = { + persistanceType: 'byReference', + layerId: layer.layerId, + layerType: layer.layerType, + annotationGroupRef: referenceName, + }; + + persistableLayers.push(persistableLayer); + } else { + const persistableLayer: XYPersistedLinkedByValueAnnotationLayerConfig = { + persistanceType: 'linked', + cachedMetadata: layer.cachedMetadata || { + title: layer.__lastSaved.title, + description: layer.__lastSaved.description, + tags: layer.__lastSaved.tags, + }, + layerId: layer.layerId, + layerType: layer.layerType, + annotationGroupRef: referenceName, + annotations: layer.annotations, + ignoreGlobalFilters: layer.ignoreGlobalFilters, + }; + persistableLayers.push(persistableLayer); + + savedObjectReferences.push({ + type: 'index-pattern', + id: layer.indexPatternId, + name: getLayerReferenceName(layer.layerId), + }); + } + } else { + const { indexPatternId, ...persistableLayer } = layer; + savedObjectReferences.push({ + type: 'index-pattern', + id: indexPatternId, + name: getLayerReferenceName(layer.layerId), + }); + persistableLayers.push({ ...persistableLayer, persistanceType: 'byValue' }); + } + } + }); + return { savedObjectReferences, state: { ...persistableState, layers: persistableLayers } }; +} + +export const isPersistedAnnotationsLayer = ( + layer: XYPersistedLayerConfig +): layer is XYPersistedAnnotationLayerConfig => + layer.layerType === layerTypes.ANNOTATIONS && !('indexPatternId' in layer); + +export const isPersistedByValueAnnotationsLayer = ( + layer: XYPersistedLayerConfig +): layer is XYPersistedByValueAnnotationLayerConfig => + isPersistedAnnotationsLayer(layer) && + (layer.persistanceType === 'byValue' || !layer.persistanceType); + +function getLayerReferenceName(layerId: string) { + return `xy-visualization-layer-${layerId}`; +} + +function needsInjectReferences(state: XYPersistedState | XYState): state is XYPersistedState { + return state.layers.some(isPersistedAnnotationsLayer); +} + +function injectReferences( + state: XYPersistedState, + annotationGroups?: AnnotationGroups, + references?: SavedObjectReference[] +): XYState { + if (!references || !references.length) { + return state as XYState; + } + if (!needsInjectReferences(state)) { + return state as XYState; + } + + if (!annotationGroups) { + throw new Error( + 'xy visualization: injecting references relies on annotation groups but they were not provided' + ); + } + + // called on-demand since indexPattern reference won't be here on the vis if its a by-reference group + const getIndexPatternIdFromReferences = (annotationLayerId: string) => { + const fallbackIndexPatternId = references.find(({ type }) => type === 'index-pattern')!.id; + return ( + references.find(({ name }) => name === getLayerReferenceName(annotationLayerId))?.id || + fallbackIndexPatternId + ); + }; + + return { + ...state, + layers: state.layers + .map((persistedLayer) => { + if (!isPersistedAnnotationsLayer(persistedLayer)) { + return persistedLayer as XYLayerConfig; + } + + let injectedLayer: XYAnnotationLayerConfig; + + if (isPersistedByValueAnnotationsLayer(persistedLayer)) { + injectedLayer = { + ...persistedLayer, + indexPatternId: getIndexPatternIdFromReferences(persistedLayer.layerId), + }; + } else { + const annotationGroupId = references?.find( + ({ name }) => name === persistedLayer.annotationGroupRef + )?.id; + + const annotationGroup = annotationGroupId + ? annotationGroups[annotationGroupId] + : undefined; + + if (!annotationGroupId || !annotationGroup) { + return undefined; // the annotation group this layer was referencing is gone, so remove the layer + } + + // declared as a separate variable for type checking + const commonProps: Pick< + XYByReferenceAnnotationLayerConfig, + 'layerId' | 'layerType' | 'annotationGroupId' | '__lastSaved' + > = { + layerId: persistedLayer.layerId, + layerType: persistedLayer.layerType, + annotationGroupId, + __lastSaved: annotationGroup, + }; + + if (isPersistedByReferenceAnnotationsLayer(persistedLayer)) { + // a clean by-reference layer inherits everything from the library annotation group + injectedLayer = { + ...commonProps, + ignoreGlobalFilters: annotationGroup.ignoreGlobalFilters, + indexPatternId: annotationGroup.indexPatternId, + annotations: cloneDeep(annotationGroup.annotations), + }; + } else { + // a linked by-value layer gets settings from visualization state while + // still maintaining the reference to the library annotation group + injectedLayer = { + ...commonProps, + ignoreGlobalFilters: persistedLayer.ignoreGlobalFilters, + indexPatternId: getIndexPatternIdFromReferences(persistedLayer.layerId), + annotations: cloneDeep(persistedLayer.annotations), + cachedMetadata: persistedLayer.cachedMetadata, + }; + } + } + + return injectedLayer; + }) + .filter(nonNullable), + }; +} + +function convertToLegendStats(state: XYState & { valuesInLegend?: unknown }) { + if ('valuesInLegend' in state) { + const valuesInLegend = state.valuesInLegend; + delete state.valuesInLegend; + const result: XYState = { + ...state, + legend: { + ...state.legend, + legendStats: [ + ...new Set([ + ...(valuesInLegend ? [LegendStats.values] : []), + ...(state.legend.legendStats || []), + ]), + ], + }, + }; + + return result; + } + return state; +} + +function convertToValuesInLegend(state: XYState) { + const newState: XYPersistedState = cloneDeep(state); + + if ('legendStats' in newState.legend && Array.isArray(newState.legend.legendStats)) { + newState.valuesInLegend = newState.legend.legendStats.includes(LegendStats.values); + delete newState.legend.legendStats; + } + return newState; +} diff --git a/x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts b/x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts index 620c1c2e5f6df..5cfea011403a5 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/state_helpers.ts @@ -6,19 +6,15 @@ */ import { EuiIconType } from '@elastic/eui/src/components/icon/icon'; -import type { SavedObjectReference } from '@kbn/core/public'; -import { - EventAnnotationGroupConfig, - EVENT_ANNOTATION_GROUP_TYPE, -} from '@kbn/event-annotation-common'; -import { v4 as uuidv4 } from 'uuid'; + +import { EventAnnotationGroupConfig } from '@kbn/event-annotation-common'; + import { isQueryAnnotationConfig } from '@kbn/event-annotation-components'; import { i18n } from '@kbn/i18n'; import fastIsEqual from 'fast-deep-equal'; -import { cloneDeep } from 'lodash'; import { validateQuery } from '@kbn/visualization-ui-components'; import { DataViewsState } from '../../state_management'; -import { FramePublicAPI, DatasourcePublicAPI, AnnotationGroups } from '../../types'; +import { FramePublicAPI, DatasourcePublicAPI } from '../../types'; import { visualizationTypes, XYLayerConfig, @@ -26,24 +22,14 @@ import { XYReferenceLineLayerConfig, SeriesType, YConfig, - XYState, - XYPersistedState, XYAnnotationLayerConfig, - XYPersistedLayerConfig, - XYByReferenceAnnotationLayerConfig, - XYPersistedByReferenceAnnotationLayerConfig, - XYPersistedLinkedByValueAnnotationLayerConfig, } from './types'; import { getDataLayers, isAnnotationsLayer, isDataLayer, - isPersistedByReferenceAnnotationsLayer, isByReferenceAnnotationsLayer, - isPersistedByValueAnnotationsLayer, - isPersistedAnnotationsLayer, } from './visualization_helpers'; -import { nonNullable } from '../../utils'; export function isHorizontalSeries(seriesType: SeriesType) { return ( @@ -131,10 +117,6 @@ export function hasHistogramSeries( }); } -function getLayerReferenceName(layerId: string) { - return `xy-visualization-layer-${layerId}`; -} - export const annotationLayerHasUnsavedChanges = (layer: XYAnnotationLayerConfig) => { if (!isByReferenceAnnotationsLayer(layer)) { return false; @@ -160,160 +142,6 @@ export const annotationLayerHasUnsavedChanges = (layer: XYAnnotationLayerConfig) return !fastIsEqual(currentConfig, savedConfig); }; -export function getPersistableState(state: XYState) { - const savedObjectReferences: SavedObjectReference[] = []; - const persistableLayers: XYPersistedLayerConfig[] = []; - state.layers.forEach((layer) => { - if (!isAnnotationsLayer(layer)) { - persistableLayers.push(layer); - } else { - if (isByReferenceAnnotationsLayer(layer)) { - const referenceName = `ref-${uuidv4()}`; - savedObjectReferences.push({ - type: EVENT_ANNOTATION_GROUP_TYPE, - id: layer.annotationGroupId, - name: referenceName, - }); - - if (!annotationLayerHasUnsavedChanges(layer)) { - const persistableLayer: XYPersistedByReferenceAnnotationLayerConfig = { - persistanceType: 'byReference', - layerId: layer.layerId, - layerType: layer.layerType, - annotationGroupRef: referenceName, - }; - - persistableLayers.push(persistableLayer); - } else { - const persistableLayer: XYPersistedLinkedByValueAnnotationLayerConfig = { - persistanceType: 'linked', - cachedMetadata: layer.cachedMetadata || { - title: layer.__lastSaved.title, - description: layer.__lastSaved.description, - tags: layer.__lastSaved.tags, - }, - layerId: layer.layerId, - layerType: layer.layerType, - annotationGroupRef: referenceName, - annotations: layer.annotations, - ignoreGlobalFilters: layer.ignoreGlobalFilters, - }; - persistableLayers.push(persistableLayer); - - savedObjectReferences.push({ - type: 'index-pattern', - id: layer.indexPatternId, - name: getLayerReferenceName(layer.layerId), - }); - } - } else { - const { indexPatternId, ...persistableLayer } = layer; - savedObjectReferences.push({ - type: 'index-pattern', - id: indexPatternId, - name: getLayerReferenceName(layer.layerId), - }); - persistableLayers.push({ ...persistableLayer, persistanceType: 'byValue' }); - } - } - }); - return { savedObjectReferences, state: { ...state, layers: persistableLayers } }; -} - -export function isPersistedState(state: XYPersistedState | XYState): state is XYPersistedState { - return state.layers.some(isPersistedAnnotationsLayer); -} - -export function injectReferences( - state: XYPersistedState, - annotationGroups?: AnnotationGroups, - references?: SavedObjectReference[] -): XYState { - if (!references || !references.length) { - return state as XYState; - } - - if (!annotationGroups) { - throw new Error( - 'xy visualization: injecting references relies on annotation groups but they were not provided' - ); - } - - // called on-demand since indexPattern reference won't be here on the vis if its a by-reference group - const getIndexPatternIdFromReferences = (annotationLayerId: string) => { - const fallbackIndexPatternId = references.find(({ type }) => type === 'index-pattern')!.id; - return ( - references.find(({ name }) => name === getLayerReferenceName(annotationLayerId))?.id || - fallbackIndexPatternId - ); - }; - - return { - ...state, - layers: state.layers - .map((persistedLayer) => { - if (!isPersistedAnnotationsLayer(persistedLayer)) { - return persistedLayer as XYLayerConfig; - } - - let injectedLayer: XYAnnotationLayerConfig; - - if (isPersistedByValueAnnotationsLayer(persistedLayer)) { - injectedLayer = { - ...persistedLayer, - indexPatternId: getIndexPatternIdFromReferences(persistedLayer.layerId), - }; - } else { - const annotationGroupId = references?.find( - ({ name }) => name === persistedLayer.annotationGroupRef - )?.id; - - const annotationGroup = annotationGroupId - ? annotationGroups[annotationGroupId] - : undefined; - - if (!annotationGroupId || !annotationGroup) { - return undefined; // the annotation group this layer was referencing is gone, so remove the layer - } - - // declared as a separate variable for type checking - const commonProps: Pick< - XYByReferenceAnnotationLayerConfig, - 'layerId' | 'layerType' | 'annotationGroupId' | '__lastSaved' - > = { - layerId: persistedLayer.layerId, - layerType: persistedLayer.layerType, - annotationGroupId, - __lastSaved: annotationGroup, - }; - - if (isPersistedByReferenceAnnotationsLayer(persistedLayer)) { - // a clean by-reference layer inherits everything from the library annotation group - injectedLayer = { - ...commonProps, - ignoreGlobalFilters: annotationGroup.ignoreGlobalFilters, - indexPatternId: annotationGroup.indexPatternId, - annotations: cloneDeep(annotationGroup.annotations), - }; - } else { - // a linked by-value layer gets settings from visualization state while - // still maintaining the reference to the library annotation group - injectedLayer = { - ...commonProps, - ignoreGlobalFilters: persistedLayer.ignoreGlobalFilters, - indexPatternId: getIndexPatternIdFromReferences(persistedLayer.layerId), - annotations: cloneDeep(persistedLayer.annotations), - cachedMetadata: persistedLayer.cachedMetadata, - }; - } - } - - return injectedLayer; - }) - .filter(nonNullable), - }; -} - export function getAnnotationLayerErrors( layer: XYAnnotationLayerConfig, columnId: string, diff --git a/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts b/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts index bfa761817828b..76e00c892d243 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts @@ -308,6 +308,7 @@ export const buildXYExpression = ( ? Math.min(5, state.legend.floatingColumns) : [], maxLines: state.legend.maxLines, + legendStats: state.legend.legendStats, shouldTruncate: state.legend.shouldTruncate ?? getDefaultVisualValuesForLayer(state, datasourceLayers).truncateText, @@ -341,7 +342,6 @@ export const buildXYExpression = ( hideEndzones: state.hideEndzones ?? false, addTimeMarker: (isTimeChart(validDataLayers, { datasourceLayers }) && state.showCurrentTimeMarker) ?? false, - valuesInLegend: state.valuesInLegend ?? false, yAxisConfigs: [...yAxisConfigsToExpression(yAxisConfigs)], xAxisConfig: buildExpression([xAxisConfigFn]).toAst(), showTooltip: [], diff --git a/x-pack/plugins/lens/public/visualizations/xy/types.ts b/x-pack/plugins/lens/public/visualizations/xy/types.ts index f0bf714093961..34d266c77f965 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/types.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/types.ts @@ -128,58 +128,15 @@ export interface XYByValueAnnotationLayerConfig { }; } -export type XYPersistedByValueAnnotationLayerConfig = Omit< - XYByValueAnnotationLayerConfig, - 'indexPatternId' | 'hide' | 'simpleView' -> & { persistanceType?: 'byValue'; hide?: boolean; simpleView?: boolean }; // props made optional for backwards compatibility since this is how the existing saved objects are - export type XYByReferenceAnnotationLayerConfig = XYByValueAnnotationLayerConfig & { annotationGroupId: string; __lastSaved: EventAnnotationGroupConfig; }; -export type XYPersistedByReferenceAnnotationLayerConfig = Pick< - XYByValueAnnotationLayerConfig, - 'layerId' | 'layerType' -> & { - persistanceType: 'byReference'; - annotationGroupRef: string; -}; - -/** - * This is the type of hybrid layer we get after the user has made a change to - * a by-reference annotation layer and saved the visualization without - * first saving the changes to the library annotation layer. - * - * We maintain the link to the library annotation group, but allow the users - * changes (persisted in the visualization state) to override the attributes in - * the library version until the user - * - saves the changes to the library annotation group - * - reverts the changes - * - unlinks the layer from the library annotation group - */ -export type XYPersistedLinkedByValueAnnotationLayerConfig = Omit< - XYPersistedByValueAnnotationLayerConfig, - 'persistanceType' -> & - Omit & { - persistanceType: 'linked'; - }; - export type XYAnnotationLayerConfig = | XYByReferenceAnnotationLayerConfig | XYByValueAnnotationLayerConfig; -export type XYPersistedAnnotationLayerConfig = - | XYPersistedByReferenceAnnotationLayerConfig - | XYPersistedByValueAnnotationLayerConfig - | XYPersistedLinkedByValueAnnotationLayerConfig; - -export type XYPersistedLayerConfig = - | XYDataLayerConfig - | XYReferenceLineLayerConfig - | XYPersistedAnnotationLayerConfig; - export type XYLayerConfig = | XYDataLayerConfig | XYReferenceLineLayerConfig @@ -218,17 +175,10 @@ export interface XYState { minBarHeight?: number; hideEndzones?: boolean; showCurrentTimeMarker?: boolean; - valuesInLegend?: boolean; } export type State = XYState; -export type XYPersistedState = Omit & { - layers: XYPersistedLayerConfig[]; -}; - -export type PersistedState = XYPersistedState; - const groupLabelForBar = i18n.translate('xpack.lens.xyVisualization.barGroupLabel', { defaultMessage: 'Bar', }); diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx index 9135fc525e3a6..d702b6f6995f7 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.tsx @@ -23,13 +23,9 @@ import { XYDataLayerConfig, XYReferenceLineLayerConfig, SeriesType, - XYPersistedState, XYByValueAnnotationLayerConfig, XYByReferenceAnnotationLayerConfig, - XYPersistedByReferenceAnnotationLayerConfig, - XYPersistedByValueAnnotationLayerConfig, XYAnnotationLayerConfig, - XYPersistedLinkedByValueAnnotationLayerConfig, } from './types'; import { createMockDatasource, createMockFramePublicAPI } from '../../mocks'; import { IconChartBar, IconCircle } from '@kbn/chart-icons'; @@ -58,6 +54,13 @@ import { } from './visualization_helpers'; import { cloneDeep } from 'lodash'; import { DataViewsServicePublic } from '@kbn/data-views-plugin/public'; +import { + XYPersistedByReferenceAnnotationLayerConfig, + XYPersistedByValueAnnotationLayerConfig, + XYPersistedLinkedByValueAnnotationLayerConfig, + XYPersistedState, +} from './persistence'; +import { LegendStats } from '@kbn/visualizations-plugin/common/constants'; const DATE_HISTORGRAM_COLUMN_ID = 'date_histogram_column'; const exampleAnnotation: EventAnnotationConfig = { @@ -602,6 +605,53 @@ describe('xy_visualization', () => { ) ).toHaveLength(1); }); + + describe('transforming to legend stats', () => { + it('loads a xy chart with `legendStats` property', () => { + const persistedState: XYPersistedState = { + ...exampleState(), + legend: { + ...exampleState().legend, + legendStats: ['values' as LegendStats.values], + }, + }; + + const transformedState = xyVisualization.initialize(() => 'first', persistedState); + + expect(transformedState.legend.legendStats).toEqual(['values']); + expect('valuesInLegend' in transformedState).toEqual(false); + }); + it('loads a xy chart with `valuesInLegend` property equal to false and transforms to legendStats: []', () => { + const persistedState = { + ...exampleState(), + valuesInLegend: false, + }; + + const transformedState = xyVisualization.initialize(() => 'first', persistedState); + + expect(transformedState.legend.legendStats).toEqual([]); + expect('valuesInLegend' in transformedState).toEqual(false); + }); + + it('loads a xy chart with `valuesInLegend` property equal to true and transforms to legendStats: [`values`]', () => { + const persistedState = { + ...exampleState(), + valuesInLegend: true, + }; + + const transformedState = xyVisualization.initialize(() => 'first', persistedState); + + expect(transformedState.legend.legendStats).toEqual(['values']); + expect('valuesInLegend' in transformedState).toEqual(false); + }); + + it('loads a xy chart with deprecated undefined `valuesInLegend` and transforms to legendStats: [`values`]', () => { + const transformedState = xyVisualization.initialize(() => 'first', exampleState()); + + expect(transformedState.legend.legendStats).toEqual(undefined); + expect('valuesInLegend' in transformedState).toEqual(false); + }); + }); }); describe('#removeLayer', () => { @@ -3787,6 +3837,23 @@ describe('xy_visualization', () => { }, ]); }); + + it('should transform legendStats to valuesInLegend', () => { + const state = exampleState(); + const { state: noLegendStatsState } = xyVisualization.getPersistableState!(state); + expect(noLegendStatsState.legend.legendStats).not.toBeDefined(); + expect(noLegendStatsState.valuesInLegend).not.toBeDefined(); + + state.legend.legendStats = ['values' as LegendStats.values]; + const { state: legendStatsState } = xyVisualization.getPersistableState!(state); + expect(legendStatsState.legend.legendStats).not.toBeDefined(); + expect(legendStatsState.valuesInLegend).toEqual(true); + + state.legend.legendStats = []; + const { state: legendStatsStateFalsy } = xyVisualization.getPersistableState!(state); + expect(legendStatsStateFalsy.legend.legendStats).not.toBeDefined(); + expect(legendStatsStateFalsy.valuesInLegend).toEqual(false); + }); }); describe('getSupportedActionsForLayer', () => { diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx index 5f64bb3f7de68..02259c5af6276 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.tsx @@ -60,15 +60,11 @@ import { type XYLayerConfig, type XYDataLayerConfig, type SeriesType, - type PersistedState, visualizationTypes, } from './types'; import { - getPersistableState, getAnnotationLayerErrors, - injectReferences, isHorizontalChart, - isPersistedState, annotationLayerHasUnsavedChanges, isHorizontalSeries, } from './state_helpers'; @@ -122,6 +118,7 @@ import { AddLayerButton } from './add_layer'; import { LayerSettings } from './layer_settings'; import { IgnoredGlobalFiltersEntries } from '../../shared_components/ignore_global_filter'; import { getColorMappingTelemetryEvents } from '../../lens_ui_telemetry/color_telemetry_helpers'; +import { XYPersistedState, convertToPersistable, convertToRuntime } from './persistence'; const XY_ID = 'lnsXY'; @@ -151,7 +148,7 @@ export const getXyVisualization = ({ unifiedSearch: UnifiedSearchPublicPluginStart; dataViewsService: DataViewsPublicPluginStart; savedObjectsTagging?: SavedObjectTaggingPluginStart; -}): Visualization => ({ +}): Visualization => ({ id: XY_ID, visualizationTypes, getVisualizationTypeId(state) { @@ -245,7 +242,7 @@ export const getXyVisualization = ({ }, getPersistableState(state) { - return getPersistableState(state); + return convertToPersistable(state); }, getDescription, @@ -273,31 +270,28 @@ export const getXyVisualization = ({ annotationGroups?: AnnotationGroups, references?: SavedObjectReference[] ) { - const finalState = - state && isPersistedState(state) - ? injectReferences(state, annotationGroups!, references) - : state; - return ( - finalState || { - title: 'Empty XY chart', - legend: { isVisible: true, position: Position.Right }, - valueLabels: 'hide', - preferredSeriesType: defaultSeriesType, - layers: [ - { - layerId: addNewLayer(), - accessors: [], - position: Position.Top, - seriesType: defaultSeriesType, - showGridlines: false, - layerType: LayerTypes.DATA, - palette: mainPalette?.type === 'legacyPalette' ? mainPalette.value : undefined, - colorMapping: - mainPalette?.type === 'colorMapping' ? mainPalette.value : getColorMappingDefaults(), - }, - ], - } - ); + if (state) { + return convertToRuntime(state, annotationGroups!, references); + } + return { + title: 'Empty XY chart', + legend: { isVisible: true, position: Position.Right }, + valueLabels: 'hide', + preferredSeriesType: defaultSeriesType, + layers: [ + { + layerId: addNewLayer(), + accessors: [], + position: Position.Top, + seriesType: defaultSeriesType, + showGridlines: false, + layerType: LayerTypes.DATA, + palette: mainPalette?.type === 'legacyPalette' ? mainPalette.value : undefined, + colorMapping: + mainPalette?.type === 'colorMapping' ? mainPalette.value : getColorMappingDefaults(), + }, + ], + }; }, getLayerType(layerId, state) { @@ -334,7 +328,7 @@ export const getXyVisualization = ({ eventAnnotationService, savedObjectsTagging, dataViews: data.dataViews, - kibanaTheme, + startServices: core, }) ); } @@ -750,7 +744,7 @@ export const getXyVisualization = ({ /> ); }, - toExpression: (state, layers, attributes, datasourceExpressionsByLayers = {}) => + toExpression: (state, layers, _attributes, datasourceExpressionsByLayers = {}) => toExpression( state, layers, @@ -984,8 +978,8 @@ export const getXyVisualization = ({ }, isEqual(state1, references1, state2, references2, annotationGroups) { - const injected1 = injectReferences(state1, annotationGroups, references1); - const injected2 = injectReferences(state2, annotationGroups, references2); + const injected1 = convertToRuntime(state1, annotationGroups, references1); + const injected2 = convertToRuntime(state2, annotationGroups, references2); return isEqual(injected1, injected2); }, diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization_helpers.tsx b/x-pack/plugins/lens/public/visualizations/xy/visualization_helpers.tsx index 793b0bb16be84..2a0e7faf1106d 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization_helpers.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization_helpers.tsx @@ -25,11 +25,6 @@ import { XYReferenceLineLayerConfig, SeriesType, XYByReferenceAnnotationLayerConfig, - XYPersistedAnnotationLayerConfig, - XYPersistedByReferenceAnnotationLayerConfig, - XYPersistedLinkedByValueAnnotationLayerConfig, - XYPersistedLayerConfig, - XYPersistedByValueAnnotationLayerConfig, XYByValueAnnotationLayerConfig, } from './types'; import { isHorizontalChart } from './state_helpers'; @@ -154,32 +149,11 @@ export const isAnnotationsLayer = ( ): layer is XYAnnotationLayerConfig => layer.layerType === layerTypes.ANNOTATIONS && 'indexPatternId' in layer; -export const isPersistedAnnotationsLayer = ( - layer: XYPersistedLayerConfig -): layer is XYPersistedAnnotationLayerConfig => - layer.layerType === layerTypes.ANNOTATIONS && !('indexPatternId' in layer); - -export const isPersistedByValueAnnotationsLayer = ( - layer: XYPersistedLayerConfig -): layer is XYPersistedByValueAnnotationLayerConfig => - isPersistedAnnotationsLayer(layer) && - (layer.persistanceType === 'byValue' || !layer.persistanceType); - export const isByReferenceAnnotationsLayer = ( layer: XYLayerConfig ): layer is XYByReferenceAnnotationLayerConfig => 'annotationGroupId' in layer && '__lastSaved' in layer; -export const isPersistedByReferenceAnnotationsLayer = ( - layer: XYPersistedAnnotationLayerConfig -): layer is XYPersistedByReferenceAnnotationLayerConfig => - isPersistedAnnotationsLayer(layer) && layer.persistanceType === 'byReference'; - -export const isPersistedLinkedByValueAnnotationsLayer = ( - layer: XYPersistedAnnotationLayerConfig -): layer is XYPersistedLinkedByValueAnnotationLayerConfig => - isPersistedAnnotationsLayer(layer) && layer.persistanceType === 'linked'; - export const getAnnotationsLayers = (layers: Array>) => (layers || []).filter((layer): layer is XYAnnotationLayerConfig => isAnnotationsLayer(layer)); diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx index df3440e6c6b1f..3c906560a45a4 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/index.tsx @@ -428,12 +428,15 @@ export const XyToolbar = memo(function XyToolbar( legend: { ...state.legend, verticalAlignment, horizontalAlignment }, }); }} - renderValueInLegendSwitch={nonOrdinalXAxis} - valueInLegend={state?.valuesInLegend} - onValueInLegendChange={() => { + allowLegendStats={nonOrdinalXAxis} + legendStats={state?.legend.legendStats} + onLegendStatsChange={(newLegendStats) => { setState({ ...state, - valuesInLegend: !state.valuesInLegend, + legend: { + ...state.legend, + legendStats: newLegendStats, + }, }); }} legendSize={legendSize} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts index 1e6e12cbc8c11..92029e34f856c 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts @@ -598,7 +598,6 @@ function buildSuggestion({ yRightTitle: currentState?.yRightTitle, hideEndzones: currentState?.hideEndzones, showCurrentTimeMarker: currentState?.showCurrentTimeMarker, - valuesInLegend: currentState?.valuesInLegend, yLeftExtent: currentState?.yLeftExtent, yRightExtent: currentState?.yRightExtent, yLeftScale: currentState?.yLeftScale, diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json index 99806418a2605..0f485a3c0c259 100644 --- a/x-pack/plugins/lens/tsconfig.json +++ b/x-pack/plugins/lens/tsconfig.json @@ -65,7 +65,6 @@ "@kbn/safer-lodash-set", "@kbn/shared-ux-router", "@kbn/dom-drag-drop", - "@kbn/core-ui-settings-browser-mocks", "@kbn/visualization-ui-components", "@kbn/content-management-plugin", "@kbn/core-saved-objects-api-server", @@ -73,14 +72,11 @@ "@kbn/config-schema", "@kbn/core-mount-utils-browser", "@kbn/core-notifications-browser", - "@kbn/core-lifecycle-browser", "@kbn/core-notifications-browser-mocks", "@kbn/core-saved-objects-utils-server", "@kbn/core-lifecycle-browser-mocks", "@kbn/unified-field-list", "@kbn/event-annotation-common", - "@kbn/core-overlays-browser-mocks", - "@kbn/core-theme-browser-mocks", "@kbn/event-annotation-components", "@kbn/content-management-utils", "@kbn/serverless", @@ -113,6 +109,8 @@ "@kbn/unified-data-table", "@kbn/shared-ux-markdown", "@kbn/licensing-plugin", + "@kbn/react-kibana-context-render", + "@kbn/react-kibana-mount", ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js index abb7055b41a8f..1f92062715183 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js @@ -55,7 +55,6 @@ import { import { getPartitioningFieldNames } from '../../../../common/util/job_utils'; import { mlJobService } from '../../services/job_service'; import { toastNotificationServiceProvider } from '../../services/toast_notification_service'; -import { ml } from '../../services/ml_api_service'; class RuleEditorFlyoutUI extends Component { static propTypes = { @@ -149,7 +148,7 @@ class RuleEditorFlyoutUI extends Component { if (this.partitioningFieldNames.length > 0 && this.canGetFilters) { // Load the current list of filters. These are used for configuring rule scope. - ml.filters + this.props.kibana.services.mlServices.mlApiServices.filters .filters() .then((filters) => { const filterListIds = filters.map((filter) => filter.filter_id); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx index c333869dd8295..9092eb687e378 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx @@ -286,6 +286,7 @@ export const getAnomalySwimLaneEmbeddableFactory = ( padding: 8px; `} data-test-subj="mlAnomalySwimlaneEmbeddableWrapper" + data-shared-item="" // TODO: Remove data-shared-item as part of https://github.com/elastic/kibana/issues/179376 > & + PublishesDataViews & + PublishesUnifiedSearch & PublishesWritablePanelTitle & AnomalySwimLaneComponentApi; diff --git a/x-pack/plugins/ml/public/embeddables/index.ts b/x-pack/plugins/ml/public/embeddables/index.ts index 0f540f465c973..a5e10788a991a 100644 --- a/x-pack/plugins/ml/public/embeddables/index.ts +++ b/x-pack/plugins/ml/public/embeddables/index.ts @@ -9,8 +9,8 @@ import type { EmbeddableSetup } from '@kbn/embeddable-plugin/public'; import { registerReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import type { MlCoreSetup } from '../plugin'; import { AnomalyChartsEmbeddableFactory } from './anomaly_charts'; +import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from './constants'; import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from './constants'; -import { SingleMetricViewerEmbeddableFactory } from './single_metric_viewer'; export * from './constants'; export { getEmbeddableComponent } from './get_embeddable_component'; @@ -25,6 +25,8 @@ export function registerEmbeddables(embeddable: EmbeddableSetup, core: MlCoreSet const anomalyChartsFactory = new AnomalyChartsEmbeddableFactory(core.getStartServices); embeddable.registerEmbeddableFactory(anomalyChartsFactory.type, anomalyChartsFactory); - const singleMetricViewerFactory = new SingleMetricViewerEmbeddableFactory(core.getStartServices); - embeddable.registerEmbeddableFactory(singleMetricViewerFactory.type, singleMetricViewerFactory); + registerReactEmbeddableFactory(ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE, async () => { + const { getSingleMetricViewerEmbeddableFactory } = await import('./single_metric_viewer'); + return getSingleMetricViewerEmbeddableFactory(core.getStartServices); + }); } diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container.tsx deleted file mode 100644 index 7db1a07bb17bd..0000000000000 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container.tsx +++ /dev/null @@ -1,239 +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 type { FC } from 'react'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { EuiCallOut } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; -import moment from 'moment'; -import { EuiResizeObserver } from '@elastic/eui'; -import type { Observable } from 'rxjs'; -import { throttle } from 'lodash'; -import type { MlJob } from '@elastic/elasticsearch/lib/api/types'; -import usePrevious from 'react-use/lib/usePrevious'; -import { extractErrorMessage } from '@kbn/ml-error-utils'; -import { useToastNotificationService } from '../../application/services/toast_notification_service'; -import { useEmbeddableExecutionContext } from '../common/use_embeddable_execution_context'; -import { useSingleMetricViewerInputResolver } from './use_single_metric_viewer_input_resolver'; -import type { ISingleMetricViewerEmbeddable } from './single_metric_viewer_embeddable'; -import type { - SingleMetricViewerEmbeddableInput, - AnomalyChartsEmbeddableOutput, - SingleMetricViewerEmbeddableServices, -} from '..'; -import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from '..'; -import { TimeSeriesExplorerEmbeddableChart } from '../../application/timeseriesexplorer/timeseriesexplorer_embeddable_chart'; -import { APP_STATE_ACTION } from '../../application/timeseriesexplorer/timeseriesexplorer_constants'; -import { useTimeSeriesExplorerService } from '../../application/util/time_series_explorer_service'; -import './_index.scss'; - -const RESIZE_THROTTLE_TIME_MS = 500; - -interface AppStateZoom { - from?: string; - to?: string; -} - -export interface EmbeddableSingleMetricViewerContainerProps { - id: string; - embeddableContext: InstanceType; - embeddableInput$: Observable; - services: SingleMetricViewerEmbeddableServices; - refresh: Observable; - onInputChange: (input: Partial) => void; - onOutputChange: (output: Partial) => void; - onRenderComplete: () => void; - onLoading: () => void; - onError: (error: Error) => void; -} - -export const EmbeddableSingleMetricViewerContainer: FC< - EmbeddableSingleMetricViewerContainerProps -> = ({ id, embeddableContext, embeddableInput$, services, refresh, onRenderComplete }) => { - useEmbeddableExecutionContext( - services[0].executionContext, - embeddableInput$, - ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE, - id - ); - const [chartWidth, setChartWidth] = useState(0); - const [zoom, setZoom] = useState(); - const [selectedForecastId, setSelectedForecastId] = useState(); - const [selectedJob, setSelectedJob] = useState(); - const [autoZoomDuration, setAutoZoomDuration] = useState(); - const [jobsLoaded, setJobsLoaded] = useState(false); - const [error, setError] = useState(); - - const { mlApiServices, mlJobService } = services[2]; - const { data, bounds, lastRefresh } = useSingleMetricViewerInputResolver( - embeddableInput$, - refresh, - services[1].data.query.timefilter.timefilter, - onRenderComplete - ); - const selectedJobId = data?.jobIds[0]; - // Need to make sure we fall back to `undefined` if `functionDescription` is an empty string, - // otherwise anomaly table data will not be loaded. - const functionDescription = - (data?.functionDescription ?? '') === '' ? undefined : data.functionDescription; - const previousRefresh = usePrevious(lastRefresh ?? 0); - const mlTimeSeriesExplorer = useTimeSeriesExplorerService(); - - // Holds the container height for previously fetched data - const containerHeightRef = useRef(); - const toastNotificationService = useToastNotificationService(); - - useEffect(function setUpJobsLoaded() { - async function loadJobs() { - try { - await mlJobService.loadJobsWrapper(); - setJobsLoaded(true); - } catch (e) { - const errorMessage = extractErrorMessage(e); - setError(errorMessage); - } - } - loadJobs(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect( - function setUpSelectedJob() { - async function fetchSelectedJob() { - if (mlApiServices && selectedJobId !== undefined && error === undefined) { - try { - const { jobs } = await mlApiServices.getJobs({ jobId: selectedJobId }); - const job = jobs[0]; - setSelectedJob(job); - } catch (e) { - const errorMessage = extractErrorMessage(e); - setError(errorMessage); - } - } - } - fetchSelectedJob(); - }, - [selectedJobId, mlApiServices, error] - ); - - useEffect( - function setUpAutoZoom() { - let zoomDuration: number | undefined; - if (selectedJobId !== undefined && selectedJob !== undefined) { - zoomDuration = mlTimeSeriesExplorer.getAutoZoomDuration(selectedJob); - setAutoZoomDuration(zoomDuration); - } - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [selectedJobId, selectedJob?.job_id, mlTimeSeriesExplorer] - ); - - // eslint-disable-next-line react-hooks/exhaustive-deps - const resizeHandler = useCallback( - throttle((e: { width: number; height: number }) => { - // Keep previous container height so it doesn't change the page layout - containerHeightRef.current = e.height; - - if (Math.abs(chartWidth - e.width) > 20) { - setChartWidth(e.width); - } - }, RESIZE_THROTTLE_TIME_MS), - [chartWidth] - ); - - const appStateHandler = useCallback( - (action: string, payload?: any) => { - /** - * Empty zoom indicates that chart hasn't been rendered yet, - * hence any updates prior that should replace the URL state. - */ - - switch (action) { - case APP_STATE_ACTION.SET_FORECAST_ID: - setSelectedForecastId(payload); - setZoom(undefined); - break; - - case APP_STATE_ACTION.SET_ZOOM: - setZoom(payload); - break; - - case APP_STATE_ACTION.UNSET_ZOOM: - setZoom(undefined); - break; - } - }, - - [setZoom, setSelectedForecastId] - ); - - const containerPadding = 10; - - if (error) { - return ( - - } - color="danger" - iconType="warning" - css={{ width: '100%' }} - > -

    {error}

    -
    - ); - } - - return ( - - {(resizeRef) => ( -
    - {data !== undefined && autoZoomDuration !== undefined && jobsLoaded && ( - - )} -
    - )} -
    - ); -}; - -// required for dynamic import using React.lazy() -// eslint-disable-next-line import/no-default-export -export default EmbeddableSingleMetricViewerContainer; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_default_panel_title.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_default_panel_title.ts new file mode 100644 index 0000000000000..9ffd506b37a29 --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_default_panel_title.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import type { JobId } from '../../../common/types/anomaly_detection_jobs'; + +export const getDefaultSingleMetricViewerPanelTitle = (jobIds: JobId[]) => + i18n.translate('xpack.ml.singleMetricViewerEmbeddable.title', { + defaultMessage: 'ML single metric viewer chart for {jobIds}', + values: { jobIds: jobIds.join(', ') }, + }); diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_services.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_services.ts new file mode 100644 index 0000000000000..5e8464f9f9ce5 --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/get_services.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 type { StartServicesAccessor } from '@kbn/core/public'; +import type { MlPluginStart, MlStartDependencies } from '../../plugin'; +import type { MlDependencies } from '../../application/app'; +import { HttpService } from '../../application/services/http_service'; +import { AnomalyExplorerChartsService } from '../../application/services/anomaly_explorer_charts_service'; +import type { SingleMetricViewerEmbeddableServices } from '../types'; + +/** + * Provides the services required by the Anomaly Swimlane Embeddable. + */ +export const getServices = async ( + getStartServices: StartServicesAccessor +): Promise => { + const [ + [coreStart, pluginsStart], + { AnomalyDetectorService }, + { fieldFormatServiceFactory }, + { indexServiceFactory }, + { timeSeriesExplorerServiceFactory }, + { mlApiServicesProvider }, + { mlJobServiceFactory }, + { mlResultsServiceProvider }, + { MlCapabilitiesService }, + { timeSeriesSearchServiceFactory }, + { toastNotificationServiceProvider }, + ] = await Promise.all([ + await getStartServices(), + await import('../../application/services/anomaly_detector_service'), + await import('../../application/services/field_format_service_factory'), + await import('../../application/util/index_service'), + await import('../../application/util/time_series_explorer_service'), + await import('../../application/services/ml_api_service'), + await import('../../application/services/job_service'), + await import('../../application/services/results_service'), + await import('../../application/capabilities/check_capabilities'), + await import( + '../../application/timeseriesexplorer/timeseriesexplorer_utils/time_series_search_service' + ), + await import('../../application/services/toast_notification_service'), + ]); + + const httpService = new HttpService(coreStart.http); + const anomalyDetectorService = new AnomalyDetectorService(httpService); + const mlApiServices = mlApiServicesProvider(httpService); + const toastNotificationService = toastNotificationServiceProvider(coreStart.notifications.toasts); + const mlJobService = mlJobServiceFactory(toastNotificationService, mlApiServices); + const mlResultsService = mlResultsServiceProvider(mlApiServices); + const mlTimeSeriesSearchService = timeSeriesSearchServiceFactory(mlResultsService, mlApiServices); + const mlTimeSeriesExplorerService = timeSeriesExplorerServiceFactory( + coreStart.uiSettings, + mlApiServices, + mlResultsService + ); + const mlCapabilities = new MlCapabilitiesService(mlApiServices); + const anomalyExplorerService = new AnomalyExplorerChartsService( + pluginsStart.data.query.timefilter.timefilter, + mlApiServices, + mlResultsService + ); + + // Note on the following services: + // - `mlIndexUtils` is just instantiated here to be passed on to `mlFieldFormatService`, + // but it's not being made available as part of global services. Since it's just + // some stateless utils `useMlIndexUtils()` should be used from within components. + // - `mlFieldFormatService` is a stateful legacy service that relied on "dependency cache", + // so because of its own state it needs to be made available as a global service. + // In the long run we should again try to get rid of it here and make it available via + // its own context or possibly without having a singleton like state at all, since the + // way this manages its own state right now doesn't consider React component lifecycles. + const mlIndexUtils = indexServiceFactory(pluginsStart.data.dataViews); + const mlFieldFormatService = fieldFormatServiceFactory(mlApiServices, mlIndexUtils); + + return [ + coreStart, + pluginsStart as MlDependencies, + { + anomalyDetectorService, + anomalyExplorerService, + mlApiServices, + mlCapabilities, + mlFieldFormatService, + mlJobService, + mlResultsService, + mlTimeSeriesSearchService, + mlTimeSeriesExplorerService, + toastNotificationService, + }, + ]; +}; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/index.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/index.ts index 9afdbe3d1298c..c5f2a2dc13655 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/index.ts +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { SingleMetricViewerEmbeddableFactory } from './single_metric_viewer_embeddable_factory'; +export { getSingleMetricViewerEmbeddableFactory } from './single_metric_viewer_embeddable_factory'; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_controls_initializer.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_controls_initializer.ts new file mode 100644 index 0000000000000..31ebde515db15 --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_controls_initializer.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 type { StateComparators } from '@kbn/presentation-publishing'; +import type { TitlesApi } from '@kbn/presentation-publishing/interfaces/titles/titles_api'; +import fastIsEqual from 'fast-deep-equal'; +import { BehaviorSubject } from 'rxjs'; +import type { JobId } from '../../../common/types/anomaly_detection_jobs'; +import type { + SingleMetricViewerEmbeddableState, + SingleMetricViewerEmbeddableUserInput, +} from '../types'; + +export type AnomalySwimLaneControlsState = Pick< + SingleMetricViewerEmbeddableState, + 'jobIds' | 'selectedDetectorIndex' | 'selectedEntities' | 'functionDescription' +>; + +export const initializeSingleMetricViewerControls = ( + rawState: SingleMetricViewerEmbeddableState, + titlesApi: TitlesApi +) => { + const functionDescription = new BehaviorSubject(rawState.functionDescription); + const jobIds = new BehaviorSubject(rawState.jobIds); + const selectedDetectorIndex = new BehaviorSubject(rawState.selectedDetectorIndex ?? 0); + const selectedEntities = new BehaviorSubject | undefined>( + rawState.selectedEntities + ); + + const updateUserInput = (update: SingleMetricViewerEmbeddableUserInput) => { + jobIds.next(update.jobIds); + functionDescription.next(update.functionDescription); + selectedDetectorIndex.next(update.selectedDetectorIndex); + selectedEntities.next(update.selectedEntities); + titlesApi.setPanelTitle(update.panelTitle); + }; + + const serializeSingleMetricViewerState = (): AnomalySwimLaneControlsState => { + return { + jobIds: jobIds.value, + selectedDetectorIndex: selectedDetectorIndex.value, + selectedEntities: selectedEntities.value, + functionDescription: functionDescription?.value, + }; + }; + + const singleMetricViewerComparators: StateComparators = { + jobIds: [jobIds, (ids) => jobIds.next(ids), fastIsEqual], + selectedDetectorIndex: [selectedDetectorIndex, (index) => selectedDetectorIndex.next(index)], + selectedEntities: [selectedEntities, (items) => selectedEntities.next(items), fastIsEqual], + functionDescription: [ + functionDescription, + (description) => functionDescription.next(description), + ], + }; + + return { + singleMetricViewerControlsApi: { + jobIds, + selectedDetectorIndex, + selectedEntities, + functionDescription, + updateUserInput, + }, + serializeSingleMetricViewerState, + singleMetricViewerComparators, + onSingleMetricViewerDestroy: () => { + jobIds.complete(); + selectedDetectorIndex.complete(); + selectedEntities.complete(); + functionDescription.complete(); + }, + }; +}; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts new file mode 100644 index 0000000000000..b3c46017e84e2 --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.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 { fetch$ } from '@kbn/presentation-publishing'; +import { type TimefilterContract } from '@kbn/data-plugin/public'; +import type { TimeRangeBounds } from '@kbn/ml-time-buckets'; +import { combineLatest, BehaviorSubject } from 'rxjs'; +import type { + SingleMetricViewerEmbeddableApi, + SingleMetricViewerEmbeddableUserInput, +} from '../types'; + +interface SingleMetricViewerData { + /** + * Config data inputted by the user + */ + singleMetricViewerData: SingleMetricViewerEmbeddableUserInput | undefined; + /** + * Current time range bounds + */ + bounds: TimeRangeBounds | undefined; + /** + * Time of last refresh in ms + */ + lastRefresh: number | undefined; +} + +export const initializeSingleMetricViewerDataFetcher = ( + api: SingleMetricViewerEmbeddableApi, + dataLoading: BehaviorSubject, + blockingError: BehaviorSubject, + timefilter: TimefilterContract +) => { + const singleMetricViewerData$ = new BehaviorSubject({ + singleMetricViewerData: undefined, + bounds: undefined, + lastRefresh: undefined, + }); + + const singleMetricViewerInput$ = combineLatest({ + jobIds: api.jobIds, + selectedDetectorIndex: api.selectedDetectorIndex, + selectedEntities: api.selectedEntities, + functionDescription: api.functionDescription, + }); + + const subscription = combineLatest([singleMetricViewerInput$, fetch$(api)]).subscribe( + ([singleMetricViewerData, fetchContext]) => { + let bounds; + let lastRefresh; + if (timefilter !== undefined && fetchContext.timeRange !== undefined) { + bounds = timefilter.calculateBounds(fetchContext.timeRange); + lastRefresh = Date.now(); + } + singleMetricViewerData$.next({ singleMetricViewerData, bounds, lastRefresh }); + } + ); + + return { + singleMetricViewerData$, + onDestroy: () => { + subscription.unsubscribe(); + }, + }; +}; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx deleted file mode 100644 index c0d7902c5ab66..0000000000000 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable.tsx +++ /dev/null @@ -1,173 +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 React, { Suspense } from 'react'; -import ReactDOM from 'react-dom'; -import { pick } from 'lodash'; - -import { Embeddable, embeddableInputToSubject } from '@kbn/embeddable-plugin/public'; -import { Subject, Subscription, type BehaviorSubject } from 'rxjs'; - -import type { CoreStart } from '@kbn/core/public'; -import { i18n } from '@kbn/i18n'; -import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import type { IContainer } from '@kbn/embeddable-plugin/public'; -import { DatePickerContextProvider, type DatePickerDependencies } from '@kbn/ml-date-picker'; -import { UI_SETTINGS } from '@kbn/data-plugin/common'; -import { EmbeddableSingleMetricViewerContainer } from './embeddable_single_metric_viewer_container_lazy'; -import type { JobId } from '../../../common/types/anomaly_detection_jobs'; -import type { MlDependencies } from '../../application/app'; -import type { - SingleMetricViewerEmbeddableInput, - AnomalyChartsEmbeddableOutput, - SingleMetricViewerServices, -} from '..'; -import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from '..'; -import { EmbeddableLoading } from '../common/components/embeddable_loading_fallback'; -import type { MlEntity } from '..'; - -export const getDefaultSingleMetricViewerPanelTitle = (jobIds: JobId[]) => - i18n.translate('xpack.ml.singleMetricViewerEmbeddable.title', { - defaultMessage: 'ML single metric viewer chart for {jobIds}', - values: { jobIds: jobIds.join(', ') }, - }); - -export type ISingleMetricViewerEmbeddable = typeof SingleMetricViewerEmbeddable; - -export class SingleMetricViewerEmbeddable extends Embeddable< - SingleMetricViewerEmbeddableInput, - AnomalyChartsEmbeddableOutput -> { - private node?: HTMLElement; - private reload$ = new Subject(); - public readonly type: string = ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE; - - // API - public readonly functionDescription: BehaviorSubject; - public readonly jobIds: BehaviorSubject; - public readonly selectedDetectorIndex: BehaviorSubject; - public readonly selectedEntities: BehaviorSubject; - - private apiSubscriptions = new Subscription(); - - constructor( - initialInput: SingleMetricViewerEmbeddableInput, - public services: [CoreStart, MlDependencies, SingleMetricViewerServices], - parent?: IContainer - ) { - super(initialInput, {} as AnomalyChartsEmbeddableOutput, parent); - - this.jobIds = embeddableInputToSubject( - this.apiSubscriptions, - this, - 'jobIds' - ); - - this.functionDescription = embeddableInputToSubject< - string | undefined, - SingleMetricViewerEmbeddableInput - >(this.apiSubscriptions, this, 'functionDescription'); - - this.selectedDetectorIndex = embeddableInputToSubject< - number | undefined, - SingleMetricViewerEmbeddableInput - >(this.apiSubscriptions, this, 'selectedDetectorIndex'); - - this.selectedEntities = embeddableInputToSubject< - MlEntity | undefined, - SingleMetricViewerEmbeddableInput - >(this.apiSubscriptions, this, 'selectedEntities'); - } - - public updateUserInput(update: SingleMetricViewerEmbeddableInput) { - this.updateInput(update); - } - - public reportsEmbeddableLoad() { - return true; - } - - public onLoading() { - this.renderComplete.dispatchInProgress(); - this.updateOutput({ loading: true, error: undefined }); - } - - public onError(error: Error) { - this.renderComplete.dispatchError(); - this.updateOutput({ loading: false, error: { name: error.name, message: error.message } }); - } - - public onRenderComplete() { - this.renderComplete.dispatchComplete(); - this.updateOutput({ loading: false, rendered: true, error: undefined }); - } - - public render(node: HTMLElement) { - super.render(node); - this.node = node; - - // required for the export feature to work - this.node.setAttribute('data-shared-item', ''); - - const startServices = pick(this.services[0], 'analytics', 'i18n', 'theme'); - const datePickerDeps: DatePickerDependencies = { - ...pick(this.services[0], ['http', 'notifications', 'theme', 'uiSettings', 'i18n']), - data: this.services[1].data, - uiSettingsKeys: UI_SETTINGS, - showFrozenDataTierChoice: false, - }; - - ReactDOM.render( - - - - }> - - - - - , - node - ); - } - - public destroy() { - this.apiSubscriptions.unsubscribe(); - super.destroy(); - if (this.node) { - ReactDOM.unmountComponentAtNode(this.node); - } - } - - public reload() { - this.reload$.next(); - } - - public supportedTriggers() { - return []; - } -} diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.ts deleted file mode 100644 index c5c6514c7f5dc..0000000000000 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.ts +++ /dev/null @@ -1,159 +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'; - -import type { StartServicesAccessor } from '@kbn/core/public'; -import type { EmbeddableFactoryDefinition, IContainer } from '@kbn/embeddable-plugin/public'; - -import { PLUGIN_ICON, PLUGIN_ID, ML_APP_NAME } from '../../../common/constants/app'; -import type { SingleMetricViewerEmbeddableInput, SingleMetricViewerEmbeddableServices } from '..'; -import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from '..'; -import type { MlPluginStart, MlStartDependencies } from '../../plugin'; -import type { MlDependencies } from '../../application/app'; -import { HttpService } from '../../application/services/http_service'; -import { AnomalyExplorerChartsService } from '../../application/services/anomaly_explorer_charts_service'; -import type { ISingleMetricViewerEmbeddable } from './single_metric_viewer_embeddable'; - -export class SingleMetricViewerEmbeddableFactory - implements EmbeddableFactoryDefinition -{ - public readonly type = ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE; - - public readonly grouping = [ - { - id: PLUGIN_ID, - getDisplayName: () => ML_APP_NAME, - getIconType: () => PLUGIN_ICON, - }, - ]; - - constructor( - private getStartServices: StartServicesAccessor - ) {} - - public async isEditable() { - return true; - } - - public getDisplayName() { - return i18n.translate('xpack.ml.components.mlSingleMetricViewerEmbeddable.displayName', { - defaultMessage: 'Single metric viewer', - }); - } - - public getDescription() { - return i18n.translate('xpack.ml.components.mlSingleMetricViewerEmbeddable.description', { - defaultMessage: 'View anomaly detection single metric results in a chart.', - }); - } - - public async getExplicitInput(): Promise> { - const [coreStart, pluginStart, singleMetricServices] = await this.getServices(); - - try { - const { resolveEmbeddableSingleMetricViewerUserInput } = await import( - './single_metric_viewer_setup_flyout' - ); - const userInput = await resolveEmbeddableSingleMetricViewerUserInput( - coreStart, - pluginStart, - singleMetricServices.mlApiServices - ); - - return { - ...userInput, - title: userInput.panelTitle, - }; - } catch (e) { - return Promise.reject(); - } - } - - private async getServices(): Promise { - const [ - [coreStart, pluginsStart], - { AnomalyDetectorService }, - { fieldFormatServiceFactory }, - { indexServiceFactory }, - { mlApiServicesProvider }, - { mlJobServiceFactory }, - { mlResultsServiceProvider }, - { MlCapabilitiesService }, - { timeSeriesSearchServiceFactory }, - { toastNotificationServiceProvider }, - ] = await Promise.all([ - await this.getStartServices(), - await import('../../application/services/anomaly_detector_service'), - await import('../../application/services/field_format_service_factory'), - await import('../../application/util/index_service'), - await import('../../application/services/ml_api_service'), - await import('../../application/services/job_service'), - await import('../../application/services/results_service'), - await import('../../application/capabilities/check_capabilities'), - await import( - '../../application/timeseriesexplorer/timeseriesexplorer_utils/time_series_search_service' - ), - await import('../../application/services/toast_notification_service'), - ]); - - const httpService = new HttpService(coreStart.http); - const anomalyDetectorService = new AnomalyDetectorService(httpService); - const mlApiServices = mlApiServicesProvider(httpService); - const mlJobService = mlJobServiceFactory( - toastNotificationServiceProvider(coreStart.notifications.toasts), - mlApiServices - ); - const mlResultsService = mlResultsServiceProvider(mlApiServices); - const mlTimeSeriesSearchService = timeSeriesSearchServiceFactory( - mlResultsService, - mlApiServices - ); - const mlCapabilities = new MlCapabilitiesService(mlApiServices); - const anomalyExplorerService = new AnomalyExplorerChartsService( - pluginsStart.data.query.timefilter.timefilter, - mlApiServices, - mlResultsService - ); - - // Note on the following services: - // - `mlIndexUtils` is just instantiated here to be passed on to `mlFieldFormatService`, - // but it's not being made available as part of global services. Since it's just - // some stateless utils `useMlIndexUtils()` should be used from within components. - // - `mlFieldFormatService` is a stateful legacy service that relied on "dependency cache", - // so because of its own state it needs to be made available as a global service. - // In the long run we should again try to get rid of it here and make it available via - // its own context or possibly without having a singleton like state at all, since the - // way this manages its own state right now doesn't consider React component lifecycles. - const mlIndexUtils = indexServiceFactory(pluginsStart.data.dataViews); - const mlFieldFormatService = fieldFormatServiceFactory(mlApiServices, mlIndexUtils); - - return [ - coreStart, - pluginsStart as MlDependencies, - { - anomalyDetectorService, - anomalyExplorerService, - mlApiServices, - mlCapabilities, - mlFieldFormatService, - mlJobService, - mlResultsService, - mlTimeSeriesSearchService, - }, - ]; - } - - public async create( - initialInput: SingleMetricViewerEmbeddableInput, - parent?: IContainer - ): Promise> { - const services = await this.getServices(); - const { SingleMetricViewerEmbeddable } = await import('./single_metric_viewer_embeddable'); - return new SingleMetricViewerEmbeddable(initialInput, services, parent); - } -} diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx new file mode 100644 index 0000000000000..3ed124d5db40f --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx @@ -0,0 +1,316 @@ +/* + * Copyright 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 { StartServicesAccessor } from '@kbn/core/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { pick } from 'lodash'; +import { i18n } from '@kbn/i18n'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; + +import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { EuiResizeObserver } from '@elastic/eui'; +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import useUnmount from 'react-use/lib/useUnmount'; +import moment from 'moment'; +import { + apiHasExecutionContext, + initializeTimeRange, + initializeTitles, + useStateFromPublishingSubject, +} from '@kbn/presentation-publishing'; +import { DatePickerContextProvider, type DatePickerDependencies } from '@kbn/ml-date-picker'; +import { UI_SETTINGS } from '@kbn/data-plugin/common'; +import type { MlJob } from '@elastic/elasticsearch/lib/api/types'; +import usePrevious from 'react-use/lib/usePrevious'; +import { throttle } from 'lodash'; +import { BehaviorSubject, Subscription } from 'rxjs'; +import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from '..'; +import type { MlPluginStart, MlStartDependencies } from '../../plugin'; +import type { SingleMetricViewerEmbeddableApi, SingleMetricViewerEmbeddableState } from '../types'; +import { initializeSingleMetricViewerControls } from './single_metric_viewer_controls_initializer'; +import { initializeSingleMetricViewerDataFetcher } from './single_metric_viewer_data_fetcher'; +import { TimeSeriesExplorerEmbeddableChart } from '../../application/timeseriesexplorer/timeseriesexplorer_embeddable_chart'; +import { APP_STATE_ACTION } from '../../application/timeseriesexplorer/timeseriesexplorer_constants'; +import { getServices } from './get_services'; +import { useReactEmbeddableExecutionContext } from '../common/use_embeddable_execution_context'; +import './_index.scss'; + +const RESIZE_THROTTLE_TIME_MS = 500; +const containerPadding = 10; +const minElemAndChartDiff = 20; +interface AppStateZoom { + from?: string; + to?: string; +} + +const errorMessage = i18n.translate('xpack.ml.singleMetricViewerEmbeddable.errorMessage"', { + defaultMessage: 'Unable to load the ML single metric viewer data', +}); + +export const getSingleMetricViewerEmbeddableFactory = ( + getStartServices: StartServicesAccessor +) => { + const factory: ReactEmbeddableFactory< + SingleMetricViewerEmbeddableState, + SingleMetricViewerEmbeddableApi + > = { + type: ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE, + deserializeState: (state) => { + return state.rawState as SingleMetricViewerEmbeddableState; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const services = await getServices(getStartServices); + const subscriptions = new Subscription(); + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + + const { + api: timeRangeApi, + comparators: timeRangeComparators, + serialize: serializeTimeRange, + } = initializeTimeRange(state); + + const { + singleMetricViewerControlsApi, + serializeSingleMetricViewerState, + singleMetricViewerComparators, + onSingleMetricViewerDestroy, + } = initializeSingleMetricViewerControls(state, titlesApi); + + const dataLoading = new BehaviorSubject(true); + const blockingError = new BehaviorSubject(undefined); + + const api = buildApi( + { + ...titlesApi, + ...timeRangeApi, + ...singleMetricViewerControlsApi, + dataLoading, + blockingError, + serializeState: () => { + return { + rawState: { + ...serializeTitles(), + ...serializeTimeRange(), + ...serializeSingleMetricViewerState(), + }, + references: [], + }; + }, + }, + { + ...timeRangeComparators, + ...titleComparators, + ...singleMetricViewerComparators, + } + ); + + const { singleMetricViewerData$, onDestroy } = initializeSingleMetricViewerDataFetcher( + api, + dataLoading, + blockingError, + services[1].data.query.timefilter.timefilter + ); + + return { + api, + Component: () => { + const [chartWidth, setChartWidth] = useState(0); + const [zoom, setZoom] = useState(); + const [selectedForecastId, setSelectedForecastId] = useState(); + const [selectedJob, setSelectedJob] = useState(); + const [jobsLoaded, setJobsLoaded] = useState(false); + + const isMounted = useRef(true); + + const { + mlApiServices, + mlJobService, + mlTimeSeriesExplorerService, + toastNotificationService, + } = services[2]; + const startServices = pick(services[0], 'analytics', 'i18n', 'theme'); + const datePickerDeps: DatePickerDependencies = { + ...pick(services[0], ['http', 'notifications', 'theme', 'uiSettings', 'i18n']), + data: services[1].data, + uiSettingsKeys: UI_SETTINGS, + showFrozenDataTierChoice: false, + }; + + if (!apiHasExecutionContext(parentApi)) { + throw new Error('Parent API does not have execution context'); + } + + const { singleMetricViewerData, bounds, lastRefresh } = + useStateFromPublishingSubject(singleMetricViewerData$); + + useReactEmbeddableExecutionContext( + services[0].executionContext, + parentApi.executionContext, + ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE, + uuid + ); + + useUnmount(() => { + onSingleMetricViewerDestroy(); + onDestroy(); + subscriptions.unsubscribe(); + }); + + const selectedJobId = singleMetricViewerData?.jobIds[0]; + // Need to make sure we fall back to `undefined` if `functionDescription` is an empty string, + // otherwise anomaly table data will not be loaded. + const functionDescription = + (singleMetricViewerData?.functionDescription ?? '') === '' + ? undefined + : singleMetricViewerData?.functionDescription; + const previousRefresh = usePrevious(lastRefresh ?? 0); + + useEffect(function setUpJobsLoaded() { + async function loadJobs() { + try { + await mlJobService.loadJobsWrapper(); + setJobsLoaded(true); + } catch (e) { + blockingError.next(new Error(errorMessage)); + } + } + if (isMounted.current === false) { + return; + } + loadJobs(); + + return () => { + isMounted.current = false; + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + useEffect( + function setUpSelectedJob() { + async function fetchSelectedJob() { + if (mlApiServices && selectedJobId !== undefined) { + try { + const { jobs } = await mlApiServices.getJobs({ jobId: selectedJobId }); + const job = jobs[0]; + setSelectedJob(job); + } catch (e) { + blockingError.next(new Error(errorMessage)); + } + } + } + if (isMounted.current === false) { + return; + } + fetchSelectedJob(); + }, + [selectedJobId, mlApiServices] + ); + + const autoZoomDuration = useMemo(() => { + if (!selectedJob) return; + return mlTimeSeriesExplorerService?.getAutoZoomDuration(selectedJob); + }, [mlTimeSeriesExplorerService, selectedJob]); + + // eslint-disable-next-line react-hooks/exhaustive-deps + const resizeHandler = useCallback( + throttle((e: { width: number; height: number }) => { + if (Math.abs(chartWidth - e.width) > minElemAndChartDiff) { + setChartWidth(e.width); + } + }, RESIZE_THROTTLE_TIME_MS), + [chartWidth] + ); + + const appStateHandler = useCallback( + (action: string, payload?: any) => { + /** + * Empty zoom indicates that chart hasn't been rendered yet, + * hence any updates prior that should replace the URL state. + */ + switch (action) { + case APP_STATE_ACTION.SET_FORECAST_ID: + setSelectedForecastId(payload); + setZoom(undefined); + break; + + case APP_STATE_ACTION.SET_ZOOM: + setZoom(payload); + break; + + case APP_STATE_ACTION.UNSET_ZOOM: + setZoom(undefined); + break; + } + }, + + [setZoom, setSelectedForecastId] + ); + + return ( + + + + + {(resizeRef) => ( +
    + {singleMetricViewerData !== undefined && + autoZoomDuration !== undefined && + jobsLoaded && ( + + )} +
    + )} +
    +
    +
    +
    + ); + }, + }; + }, + }; + + return factory; +}; diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx index e3d35fa472b98..ba7171badeadf 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx @@ -29,14 +29,14 @@ import { APP_STATE_ACTION, type TimeseriesexplorerActionType, } from '../../application/timeseriesexplorer/timeseriesexplorer_constants'; -import type { SingleMetricViewerEmbeddableCustomInput, MlEntity } from '..'; +import type { SingleMetricViewerEmbeddableUserInput, MlEntity } from '..'; export interface SingleMetricViewerInitializerProps { bounds: TimeRangeBounds; defaultTitle: string; initialInput?: Partial; job: MlJob; - onCreate: (props: Partial) => void; + onCreate: (props: Partial) => void; onCancel: () => void; } diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_setup_flyout.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_setup_flyout.tsx index 92e77f788fc3f..6473d4818d93f 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_setup_flyout.tsx +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_setup_flyout.tsx @@ -9,27 +9,27 @@ import React from 'react'; import type { CoreStart } from '@kbn/core/public'; import { toMountPoint } from '@kbn/react-kibana-mount'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { getDefaultSingleMetricViewerPanelTitle } from './single_metric_viewer_embeddable'; -import type { SingleMetricViewerEmbeddableInput } from '..'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { SingleMetricViewerEmbeddableUserInput, SingleMetricViewerEmbeddableInput } from '..'; import { resolveJobSelection } from '../common/resolve_job_selection'; import { SingleMetricViewerInitializer } from './single_metric_viewer_initializer'; -import type { MlStartDependencies } from '../../plugin'; import type { MlApiServices } from '../../application/services/ml_api_service'; +import { getDefaultSingleMetricViewerPanelTitle } from './get_default_panel_title'; export async function resolveEmbeddableSingleMetricViewerUserInput( coreStart: CoreStart, - pluginStart: MlStartDependencies, + data: DataPublicPluginStart, mlApiServices: MlApiServices, - input?: SingleMetricViewerEmbeddableInput -): Promise> { + input?: Partial +): Promise> { const { overlays, ...startServices } = coreStart; - const timefilter = pluginStart.data.query.timefilter.timefilter; + const timefilter = data.query.timefilter.timefilter; return new Promise(async (resolve, reject) => { try { const { jobIds } = await resolveJobSelection( coreStart, - pluginStart.data.dataViews, + data.dataViews, input?.jobIds ? input.jobIds : undefined, true ); @@ -45,7 +45,7 @@ export async function resolveEmbeddableSingleMetricViewerUserInput( }} > , - refresh: Observable, - timefilter: TimefilterContract, - onRenderComplete: () => void -) { - const [data, setData] = useState(); - const [bounds, setBounds] = useState(); - const [lastRefresh, setLastRefresh] = useState(); - - useEffect(function subscribeToEmbeddableInput() { - const subscription = combineLatest([embeddableInput, refresh.pipe(startWith(null))]).subscribe( - (input) => { - if (input !== undefined) { - setData(input[0]); - if (timefilter !== undefined) { - const { timeRange } = input[0]; - const currentBounds = timefilter.calculateBounds(timeRange); - setBounds(currentBounds); - setLastRefresh(Date.now()); - } - onRenderComplete(); - } - } - ); - - return () => subscription.unsubscribe(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - return { data, bounds, lastRefresh }; -} diff --git a/x-pack/plugins/ml/public/embeddables/types.ts b/x-pack/plugins/ml/public/embeddables/types.ts index 33213b104dfe2..3f36e76ef3281 100644 --- a/x-pack/plugins/ml/public/embeddables/types.ts +++ b/x-pack/plugins/ml/public/embeddables/types.ts @@ -20,10 +20,11 @@ import type { EmbeddableApiContext, HasParentApi, HasType, - PublishesDataViews, PublishesUnifiedSearch, - PublishesWritablePanelTitle, PublishingSubject, + PublishesTimeRange, + PublishesWritablePanelTitle, + SerializedTitles, } from '@kbn/presentation-publishing'; import type { JobId } from '../../common/types/anomaly_detection_jobs'; import type { MlDependencies } from '../application/app'; @@ -38,6 +39,8 @@ import type { MlJobService } from '../application/services/job_service'; import type { MlApiServices } from '../application/services/ml_api_service'; import type { MlResultsService } from '../application/services/results_service'; import type { MlTimeSeriesSearchService } from '../application/timeseriesexplorer/timeseriesexplorer_utils/time_series_search_service'; +import type { TimeSeriesExplorerService } from '../application/util/time_series_explorer_service'; +import type { ToastNotificationService } from '../application/services/toast_notification_service'; import type { AnomalyExplorerChartsEmbeddableType, AnomalySwimLaneEmbeddableType, @@ -54,8 +57,7 @@ export type { */ export interface MlEmbeddableBaseApi extends DefaultEmbeddableApi, - PublishesDataViews, - PublishesUnifiedSearch {} + PublishesTimeRange {} export type MlEntity = Record; @@ -131,36 +133,48 @@ export interface AnomalyChartsEmbeddableCustomInput { export type AnomalyChartsEmbeddableInput = EmbeddableInput & AnomalyChartsEmbeddableCustomInput; -export interface SingleMetricViewerEmbeddableCustomInput { +/** Manual input by the user */ +export interface SingleMetricViewerEmbeddableUserInput { jobIds: JobId[]; - title: string; functionDescription?: string; - panelTitle: string; selectedDetectorIndex: number; selectedEntities?: MlEntity; - // Embeddable inputs which are not included in the default interface - filters: Filter[]; - query: Query; - refreshConfig: RefreshInterval; - timeRange: TimeRange; + panelTitle?: string; +} + +export interface SingleMetricViewerEmbeddableCustomInput + extends Omit { + id?: string; + filters?: Filter[]; + query?: Query; + refreshConfig?: RefreshInterval; + timeRange: TimeRange | undefined; } export type SingleMetricViewerEmbeddableInput = EmbeddableInput & SingleMetricViewerEmbeddableCustomInput; +/** + * Persisted state for the Single Metric Embeddable. + */ +export interface SingleMetricViewerEmbeddableState + extends SerializedTitles, + SingleMetricViewerEmbeddableCustomInput {} + +export type SingleMetricViewerEmbeddableApi = + MlEmbeddableBaseApi & + PublishesWritablePanelTitle & + SingleMetricViewerComponentApi; + export interface SingleMetricViewerComponentApi { - functionDescription?: PublishingSubject; + functionDescription: PublishingSubject; jobIds: PublishingSubject; selectedDetectorIndex: PublishingSubject; - selectedEntities?: PublishingSubject; + selectedEntities: PublishingSubject; - updateUserInput: (input: Partial) => void; + updateUserInput: (input: SingleMetricViewerEmbeddableUserInput) => void; } -export type SingleMetricViewerEmbeddableApi = MlEmbeddableBaseApi & - PublishesWritablePanelTitle & - SingleMetricViewerComponentApi; - export interface AnomalyChartsServices { anomalyDetectorService: AnomalyDetectorService; anomalyExplorerService: AnomalyExplorerChartsService; @@ -178,6 +192,8 @@ export interface SingleMetricViewerServices { mlJobService: MlJobService; mlResultsService: MlResultsService; mlTimeSeriesSearchService?: MlTimeSeriesSearchService; + mlTimeSeriesExplorerService?: TimeSeriesExplorerService; + toastNotificationService?: ToastNotificationService; } export type AnomalyChartsEmbeddableServices = [CoreStart, MlDependencies, AnomalyChartsServices]; diff --git a/x-pack/plugins/ml/public/ui_actions/create_single_metric_viewer.tsx b/x-pack/plugins/ml/public/ui_actions/create_single_metric_viewer.tsx new file mode 100644 index 0000000000000..209ef648f3721 --- /dev/null +++ b/x-pack/plugins/ml/public/ui_actions/create_single_metric_viewer.tsx @@ -0,0 +1,89 @@ +/* + * Copyright 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 type { PresentationContainer } from '@kbn/presentation-containers'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; +import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; +import { HttpService } from '../application/services/http_service'; +import type { MlApiServices } from '../application/services/ml_api_service'; +import { ML_APP_NAME, PLUGIN_ICON, PLUGIN_ID } from '../../common/constants/app'; +import { ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE } from '../embeddables'; +import type { SingleMetricViewerEmbeddableApi } from '../embeddables/types'; +import type { MlCoreSetup } from '../plugin'; + +export type CreateSingleMetricViewerPanelActionContext = EmbeddableApiContext & { + embeddable: SingleMetricViewerEmbeddableApi; +}; + +const parentApiIsCompatible = async ( + parentApi: unknown +): Promise => { + const { apiIsPresentationContainer } = await import('@kbn/presentation-containers'); + // we cannot have an async type check, so return the casted parentApi rather than a boolean + return apiIsPresentationContainer(parentApi) ? (parentApi as PresentationContainer) : undefined; +}; + +export function createAddSingleMetricViewerPanelAction( + getStartServices: MlCoreSetup['getStartServices'] +): UiActionsActionDefinition { + // @ts-ignore + return { + id: 'create-single-metric-viewer', + grouping: [ + { + id: PLUGIN_ID, + getDisplayName: () => ML_APP_NAME, + getIconType: () => PLUGIN_ICON, + }, + ], + getDisplayName: () => + i18n.translate('xpack.ml.components.singleMetricViewerEmbeddable.displayName', { + defaultMessage: 'Single metric viewer', + }), + getDisplayNameTooltip: () => + i18n.translate('xpack.ml.components.singleMetricViewerEmbeddable.description', { + defaultMessage: + 'View anomaly detection results for a single metric on a focused date range.', + }), + async isCompatible(context: EmbeddableApiContext) { + return Boolean(await parentApiIsCompatible(context.embeddable)); + }, + async execute(context) { + const presentationContainerParent = await parentApiIsCompatible(context.embeddable); + if (!presentationContainerParent) throw new IncompatibleActionError(); + + const [coreStart, { data }] = await getStartServices(); + + try { + const { resolveEmbeddableSingleMetricViewerUserInput } = await import( + '../embeddables/single_metric_viewer/single_metric_viewer_setup_flyout' + ); + const { mlApiServicesProvider } = await import('../application/services/ml_api_service'); + const httpService = new HttpService(coreStart.http); + const mlApiServices: MlApiServices = mlApiServicesProvider(httpService); + + const initialState = await resolveEmbeddableSingleMetricViewerUserInput( + coreStart, + data, + mlApiServices + ); + + presentationContainerParent.addNewPanel({ + panelType: ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE, + initialState: { + ...initialState, + title: initialState.panelTitle, + }, + }); + } catch (e) { + return Promise.reject(); + } + }, + }; +} diff --git a/x-pack/plugins/ml/public/ui_actions/edit_single_metric_viewer_panel_action.tsx b/x-pack/plugins/ml/public/ui_actions/edit_single_metric_viewer_panel_action.tsx index 454460e9849a4..2122cec2877e4 100644 --- a/x-pack/plugins/ml/public/ui_actions/edit_single_metric_viewer_panel_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/edit_single_metric_viewer_panel_action.tsx @@ -6,8 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { EmbeddableApiContext, ViewMode } from '@kbn/presentation-publishing'; -import { apiPublishesViewMode } from '@kbn/presentation-publishing'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { isSingleMetricViewerEmbeddableContext } from './open_in_single_metric_viewer_action'; @@ -43,7 +42,7 @@ export function createEditSingleMetricViewerPanelAction( throw new IncompatibleActionError(); } - const [coreStart, pluginStart] = await getStartServices(); + const [coreStart, { data }] = await getStartServices(); try { const { resolveEmbeddableSingleMetricViewerUserInput } = await import( @@ -58,7 +57,7 @@ export function createEditSingleMetricViewerPanelAction( const result = await resolveEmbeddableSingleMetricViewerUserInput( coreStart, - pluginStart, + data, mlApiServices, { jobIds: jobIds.getValue(), @@ -68,18 +67,17 @@ export function createEditSingleMetricViewerPanelAction( } as SingleMetricViewerEmbeddableInput ); - context.embeddable.updateUserInput(result); + context.embeddable.updateUserInput(result as SingleMetricViewerEmbeddableInput); context.embeddable.setPanelTitle(result.panelTitle); } catch (e) { return Promise.reject(); } }, async isCompatible(context: EmbeddableApiContext) { - let viewMode: ViewMode | undefined; - if (apiPublishesViewMode(context.embeddable)) { - viewMode = context.embeddable.viewMode.getValue(); - } - return isSingleMetricViewerEmbeddableContext(context) && viewMode === 'edit'; + return ( + isSingleMetricViewerEmbeddableContext(context) && + context.embeddable.parentApi?.viewMode?.getValue() === 'edit' + ); }, }; } diff --git a/x-pack/plugins/ml/public/ui_actions/index.ts b/x-pack/plugins/ml/public/ui_actions/index.ts index 7cbca84061382..15014205b8c83 100644 --- a/x-pack/plugins/ml/public/ui_actions/index.ts +++ b/x-pack/plugins/ml/public/ui_actions/index.ts @@ -18,6 +18,7 @@ import { createAddSwimlanePanelAction } from './create_swim_lane'; import { createEditAnomalyChartsPanelAction } from './edit_anomaly_charts_panel_action'; import { createEditSwimlanePanelAction } from './edit_swimlane_panel_action'; import { createEditSingleMetricViewerPanelAction } from './edit_single_metric_viewer_panel_action'; +import { createAddSingleMetricViewerPanelAction } from './create_single_metric_viewer'; import { createCategorizationADJobAction, createCategorizationADJobTrigger, @@ -45,6 +46,9 @@ export function registerMlUiActions( core: CoreSetup ) { // Initialize actions + const addSingleMetricViewerPanelAction = createAddSingleMetricViewerPanelAction( + core.getStartServices + ); const addSwimlanePanelAction = createAddSwimlanePanelAction(core.getStartServices); const editSwimlanePanelAction = createEditSwimlanePanelAction(core.getStartServices); const editSingleMetricViewerPanelAction = createEditSingleMetricViewerPanelAction( @@ -68,8 +72,8 @@ export function registerMlUiActions( uiActions.registerAction(categorizationADJobAction); // Assign triggers + uiActions.addTriggerAction('ADD_PANEL_TRIGGER', addSingleMetricViewerPanelAction); uiActions.addTriggerAction('ADD_PANEL_TRIGGER', addSwimlanePanelAction); - uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editSwimlanePanelAction); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editSingleMetricViewerPanelAction); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editExplorerPanelAction); diff --git a/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx b/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx index cc6db4dbbe82d..adb3e23132f76 100644 --- a/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx @@ -55,7 +55,7 @@ export function createOpenInSingleMetricViewerAction( if (isSingleMetricViewerEmbeddableContext(context)) { const { embeddable } = context; - const { jobIds, query$, selectedEntities, selectedDetectorIndex } = embeddable; + const { jobIds, selectedEntities, selectedDetectorIndex } = embeddable; return locator.getUrl( { @@ -69,7 +69,7 @@ export function createOpenInSingleMetricViewerAction( value: 0, }, jobIds: jobIds.getValue(), - query: query$?.getValue(), + query: {}, entities: selectedEntities?.getValue(), detectorIndex: selectedDetectorIndex?.getValue(), }, diff --git a/x-pack/plugins/monitoring/public/components/index.ts b/x-pack/plugins/monitoring/public/components/index.ts index b8e9adbf27fa3..053efbea212a6 100644 --- a/x-pack/plugins/monitoring/public/components/index.ts +++ b/x-pack/plugins/monitoring/public/components/index.ts @@ -5,10 +5,13 @@ * 2.0. */ +/** Import this dependency here to load it async rather than on startup */ +import '@kbn/flot-charts'; /* * This file should only export page-level components for view controllers to * mount React to the DOM */ + export { NoData } from './no_data'; export { License } from './license'; export { PageLoading } from './page_loading'; diff --git a/x-pack/plugins/monitoring/tsconfig.json b/x-pack/plugins/monitoring/tsconfig.json index 6361f5beea6f0..862a32a623af4 100644 --- a/x-pack/plugins/monitoring/tsconfig.json +++ b/x-pack/plugins/monitoring/tsconfig.json @@ -46,6 +46,7 @@ "@kbn/rule-data-utils", "@kbn/react-kibana-mount", "@kbn/react-kibana-context-render", + "@kbn/flot-charts", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.test.ts b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.test.ts index ec1c5e93321b5..4660ac85f092c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.test.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.test.ts @@ -10,24 +10,26 @@ import { IBasePath } from '@kbn/core/public'; import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { getSections } from './sections'; import { apmRouter as apmRouterBase, ApmRouter } from '../../routing/apm_route_config'; -import { - logsLocatorsMock, - observabilityLogsExplorerLocatorsMock, -} from '../../../context/apm_plugin/mock_apm_plugin_context'; +import { logsLocatorsMock } from '../../../context/apm_plugin/mock_apm_plugin_context'; +import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; const apmRouter = { ...apmRouterBase, link: (...args: [any]) => `some-basepath/app/apm${apmRouterBase.link(...args)}`, } as ApmRouter; -const { allDatasetsLocator } = observabilityLogsExplorerLocatorsMock; const { nodeLogsLocator, traceLogsLocator } = logsLocatorsMock; +const uptimeLocator = sharePluginMock.createLocator(); const expectLogsLocatorsToBeCalled = () => { expect(nodeLogsLocator.getRedirectUrl).toBeCalledTimes(3); expect(traceLogsLocator.getRedirectUrl).toBeCalledTimes(1); }; +const expectUptimeLocatorToBeCalled = () => { + expect(uptimeLocator.getRedirectUrl).toBeCalledTimes(1); +}; + describe('Transaction action menu', () => { const basePath = { prepend: (url: string) => { @@ -60,8 +62,8 @@ describe('Transaction action menu', () => { basePath, location, apmRouter, - allDatasetsLocator, logsLocators: logsLocatorsMock, + uptimeLocator, infraLinksAvailable: false, rangeFrom: 'now-24h', rangeTo: 'now', @@ -110,6 +112,7 @@ describe('Transaction action menu', () => { }, ], ]); + expectUptimeLocatorToBeCalled(); expectLogsLocatorsToBeCalled(); }); @@ -127,7 +130,7 @@ describe('Transaction action menu', () => { basePath, location, apmRouter, - allDatasetsLocator, + uptimeLocator, logsLocators: logsLocatorsMock, infraLinksAvailable: true, rangeFrom: 'now-24h', @@ -195,6 +198,7 @@ describe('Transaction action menu', () => { }, ], ]); + expectUptimeLocatorToBeCalled(); expectLogsLocatorsToBeCalled(); }); @@ -212,7 +216,7 @@ describe('Transaction action menu', () => { basePath, location, apmRouter, - allDatasetsLocator, + uptimeLocator, logsLocators: logsLocatorsMock, infraLinksAvailable: true, rangeFrom: 'now-24h', @@ -280,6 +284,7 @@ describe('Transaction action menu', () => { }, ], ]); + expectUptimeLocatorToBeCalled(); expectLogsLocatorsToBeCalled(); }); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.ts b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.ts index 4f3ffbe9602c6..781a992e1f612 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/sections.ts @@ -10,18 +10,16 @@ import { Location } from 'history'; import { IBasePath } from '@kbn/core/public'; import { isEmpty, pickBy } from 'lodash'; import moment from 'moment'; -import url from 'url'; import type { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { LocatorPublic } from '@kbn/share-plugin/common'; -import { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability/locators'; import type { ProfilingLocators } from '@kbn/observability-shared-plugin/public'; +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; import { Environment } from '../../../../common/environment_rt'; import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { getDiscoverHref } from '../links/discover_links/discover_link'; import { getDiscoverQuery } from '../links/discover_links/discover_transaction_link'; import { getInfraHref } from '../links/infra_link'; -import { fromQuery } from '../links/url_helpers'; import { SectionRecord, getNonEmptySections, Action } from './sections_helper'; import { HOST_NAME, TRACE_ID } from '../../../../common/es_fields/apm'; import { ApmRouter } from '../../routing/apm_route_config'; @@ -42,11 +40,11 @@ export const getSections = ({ location, apmRouter, infraLinksAvailable, + uptimeLocator, profilingLocators, rangeFrom, rangeTo, environment, - allDatasetsLocator, logsLocators, dataViewId, }: { @@ -55,11 +53,11 @@ export const getSections = ({ location: Location; apmRouter: ApmRouter; infraLinksAvailable: boolean; + uptimeLocator?: LocatorPublic; profilingLocators?: ProfilingLocators; rangeFrom: string; rangeTo: string; environment: Environment; - allDatasetsLocator: LocatorPublic; logsLocators: ReturnType; dataViewId?: string; }) => { @@ -72,19 +70,16 @@ export const getSections = ({ const time = Math.round(transaction.timestamp.us / 1000); const infraMetricsQuery = getInfraMetricsQuery(transaction); - const uptimeLink = url.format({ - pathname: basePath.prepend('/app/uptime'), - search: `?${fromQuery( - pickBy( - { - dateRangeStart: rangeFrom, - dateRangeEnd: rangeTo, - search: `url.domain:"${transaction.url?.domain}"`, - }, - (val) => !isEmpty(val) - ) - )}`, - }); + const uptimeLink = uptimeLocator?.getRedirectUrl( + pickBy( + { + dateRangeStart: rangeFrom, + dateRangeEnd: rangeTo, + search: `url.domain:"${transaction.url?.domain}"`, + }, + (val) => !isEmpty(val) + ) + ); // Logs hrefs const podLogsHref = logsLocators.nodeLogsLocator.getRedirectUrl({ @@ -231,7 +226,7 @@ export const getSections = ({ defaultMessage: 'Status', }), href: uptimeLink, - condition: !!transaction.url?.domain, + condition: !!transaction.url?.domain && !!uptimeLink, }, ]; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx index c1dda85e8ae71..29e5da6842165 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx @@ -30,6 +30,8 @@ import * as Transactions from './__fixtures__/mock_data'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import * as useAdHocApmDataView from '../../../hooks/use_adhoc_apm_data_view'; import { useProfilingIntegrationSetting } from '../../../hooks/use_profiling_integration_setting'; +import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; +import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; const apmContextMock = { ...mockApmPluginContextValue, @@ -52,6 +54,15 @@ const apmContextMock = { if (id === TRACE_LOGS_LOCATOR_ID) { return logsLocatorsMock.traceLogsLocator; } + if (id === uptimeOverviewLocatorID) { + return { + ...sharePluginMock.createLocator(), + getRedirectUrl: jest.fn( + () => + 'http://localhost/basepath/app/uptime?dateRangeStart=now-24h&dateRangeEnd=now&search=url.domain:%22example.com%22' + ), + }; + } }, }, }, diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx index aa73c9c5eb6fe..05aaa7ccdad73 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx @@ -21,12 +21,9 @@ import { import React, { useState } from 'react'; import { useLocation } from 'react-router-dom'; import useAsync from 'react-use/lib/useAsync'; -import { - AllDatasetsLocatorParams, - ALL_DATASETS_LOCATOR_ID, -} from '@kbn/deeplinks-observability/locators'; import type { ProfilingLocators } from '@kbn/observability-shared-plugin/public'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; +import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { ApmFeatureFlagName } from '../../../../common/apm_feature_flags'; import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; @@ -124,10 +121,10 @@ function ActionMenuSections({ const apmRouter = useApmRouter(); const { dataView } = useAdHocApmDataView(); - const allDatasetsLocator = - share.url.locators.get(ALL_DATASETS_LOCATOR_ID)!; const logsLocators = getLogsLocatorsFromUrlService(share.url); + const uptimeLocator = share.url.locators.get(uptimeOverviewLocatorID); + const infraLinksAvailable = useApmFeatureFlag(ApmFeatureFlagName.InfraUiAvailable); const { @@ -145,11 +142,11 @@ function ActionMenuSections({ location, apmRouter, infraLinksAvailable, + uptimeLocator, profilingLocators, rangeFrom, rangeTo, environment, - allDatasetsLocator, logsLocators, dataViewId: dataView?.id, }); diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/constants.ts b/x-pack/plugins/observability_solution/dataset_quality/common/constants.ts index a5be06438d3c8..ed984ae856a38 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/constants.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/constants.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { QualityIndicators } from './types'; + export const DATASET_QUALITY_APP_ID = 'dataset_quality'; export const DEFAULT_DATASET_TYPE = 'logs'; export const DEFAULT_LOGS_DATA_VIEW = 'logs-*-*'; @@ -20,7 +22,11 @@ export const NONE = 'none'; export const DEFAULT_TIME_RANGE = { from: 'now-24h', to: 'now' }; export const DEFAULT_DATEPICKER_REFRESH = { value: 60000, pause: false }; -export const DEFAULT_DEGRADED_DOCS = { percentage: 0, count: 0 }; +export const DEFAULT_DEGRADED_DOCS = { + percentage: 0, + count: 0, + quality: 'good' as QualityIndicators, +}; export const NUMBER_FORMAT = '0,0.[000]'; export const BYTE_NUMBER_FORMAT = '0.0 b'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts index 7b1a171356a61..0cf0a40b1b45b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts @@ -6,8 +6,8 @@ */ import { DEFAULT_DEGRADED_DOCS } from '../constants'; -import { DataStreamType } from '../types'; -import { indexNameToDataStreamParts } from '../utils'; +import { DataStreamType, QualityIndicators } from '../types'; +import { indexNameToDataStreamParts, mapPercentageToQuality } from '../utils'; import { Integration } from './integration'; import { DegradedDocsStat } from './malformed_docs_stat'; import { DataStreamStatType } from './types'; @@ -25,6 +25,7 @@ export class DataStreamStat { degradedDocs: { percentage: number; count: number; + quality: QualityIndicators; }; private constructor(dataStreamStat: DataStreamStat) { @@ -40,6 +41,7 @@ export class DataStreamStat { this.degradedDocs = { percentage: dataStreamStat.degradedDocs.percentage, count: dataStreamStat.degradedDocs.count, + quality: dataStreamStat.degradedDocs.quality, }; } @@ -63,10 +65,10 @@ export class DataStreamStat { public static fromDegradedDocStat({ degradedDocStat, - integrationMap, + datasetIntegrationMap, }: { degradedDocStat: DegradedDocsStat; - integrationMap: Record; + datasetIntegrationMap: Record; }) { const { type, dataset, namespace } = indexNameToDataStreamParts(degradedDocStat.dataset); @@ -74,12 +76,13 @@ export class DataStreamStat { rawName: degradedDocStat.dataset, type, name: dataset, - title: integrationMap[dataset]?.title || dataset, + title: datasetIntegrationMap[dataset]?.title || dataset, namespace, - integration: integrationMap[dataset]?.integration, + integration: datasetIntegrationMap[dataset]?.integration, degradedDocs: { percentage: degradedDocStat.percentage, count: degradedDocStat.count, + quality: mapPercentageToQuality(degradedDocStat.percentage), }, }; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts index 7f422a0d703e0..abff1adabf543 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts @@ -5,20 +5,25 @@ * 2.0. */ +import { QualityIndicators } from '../types'; +import { mapPercentageToQuality } from '../utils'; import { DegradedDocsStatType } from './types'; export class DegradedDocsStat { dataset: DegradedDocsStatType['dataset']; percentage: DegradedDocsStatType['percentage']; count: DegradedDocsStatType['count']; + quality: QualityIndicators; private constructor(degradedDocsStat: DegradedDocsStat) { this.dataset = degradedDocsStat.dataset; this.percentage = degradedDocsStat.percentage; this.count = degradedDocsStat.count; + this.quality = degradedDocsStat.quality; } public static create(degradedDocsStat: DegradedDocsStatType) { - return new DegradedDocsStat(degradedDocsStat); + const quality = mapPercentageToQuality(degradedDocsStat.percentage); + return new DegradedDocsStat({ ...degradedDocsStat, quality }); } } diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts index 66fbffd452dc6..0c9456c2d7257 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts @@ -6,7 +6,6 @@ */ import { APIClientRequestParamsOf, APIReturnType } from '../rest'; -import { DataStreamStat } from './data_stream_stat'; export type GetDataStreamsStatsParams = APIClientRequestParamsOf<`GET /internal/dataset_quality/data_streams/stats`>['params']; @@ -14,7 +13,7 @@ export type GetDataStreamsStatsQuery = GetDataStreamsStatsParams['query']; export type GetDataStreamsStatsResponse = APIReturnType<`GET /internal/dataset_quality/data_streams/stats`>; export type DataStreamStatType = GetDataStreamsStatsResponse['dataStreamsStats'][0]; -export type DataStreamStatServiceResponse = DataStreamStat[]; +export type DataStreamStatServiceResponse = DataStreamStatType[]; export type GetIntegrationsParams = APIClientRequestParamsOf<`GET /internal/dataset_quality/integrations`>['params']; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/types/index.ts b/x-pack/plugins/observability_solution/dataset_quality/common/types/index.ts index 12303f8b81bb5..143556e5a519f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/types/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/types/index.ts @@ -6,3 +6,4 @@ */ export * from './dataset_types'; +export * from './quality_types'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/common/types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/types/quality_types.ts similarity index 100% rename from x-pack/plugins/observability_solution/dataset_quality/public/components/common/types.ts rename to x-pack/plugins/observability_solution/dataset_quality/common/types/quality_types.ts diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/utils/index.ts b/x-pack/plugins/observability_solution/dataset_quality/common/utils/index.ts index 780c040fd9b1c..615854c02bd5b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/utils/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/utils/index.ts @@ -6,3 +6,4 @@ */ export * from './dataset_name'; +export * from './quality_helpers'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/utils/quality_helpers.ts b/x-pack/plugins/observability_solution/dataset_quality/common/utils/quality_helpers.ts new file mode 100644 index 0000000000000..62e0411e541b0 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/common/utils/quality_helpers.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { POOR_QUALITY_MINIMUM_PERCENTAGE, DEGRADED_QUALITY_MINIMUM_PERCENTAGE } from '../constants'; +import { QualityIndicators } from '../types'; + +export const mapPercentageToQuality = (percentage: number): QualityIndicators => { + return percentage > POOR_QUALITY_MINIMUM_PERCENTAGE + ? 'poor' + : percentage > DEGRADED_QUALITY_MINIMUM_PERCENTAGE + ? 'degraded' + : 'good'; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/common/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/common/index.ts index ceae5f1ed44d9..36c9d7f744a58 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/common/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/common/index.ts @@ -6,4 +6,3 @@ */ export * from './integration_icon'; -export * from './types'; 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 c1bbb72c8fbf3..75c9f6e72b9e0 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 @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFilterGroup, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { EuiSuperDatePicker } from '@elastic/eui'; import { UI_SETTINGS } from '@kbn/data-service'; import { TimePickerQuickRange } from '@kbn/observability-shared-plugin/public/hooks/use_quick_time_ranges'; @@ -15,6 +15,7 @@ import { useKibanaContextForPlugin } from '../../../utils/use_kibana'; import { FilterBar } from './filter_bar'; import { IntegrationsSelector } from './integrations_selector'; import { NamespacesSelector } from './namespaces_selector'; +import { QualitiesSelector } from './qualities_selector'; // Allow for lazy loading // eslint-disable-next-line import/no-default-export @@ -27,8 +28,10 @@ export default function Filters() { isLoading, integrations, namespaces, + qualities, onIntegrationsChange, onNamespacesChange, + onQualitiesChange, selectedQuery, onQueryChange, } = useDatasetQualityFilters(); @@ -56,20 +59,23 @@ export default function Filters() { - + - - - + + - + renderOption(option)} > - renderOption(option)} - > - {(list, search) => ( -
    - {search} - {list} -
    - )} -
    -
    - + {(list, search) => ( +
    + {search} + {list} +
    + )} + + ); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/namespaces_selector.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/namespaces_selector.tsx index f32e4062d1a60..d4e9ad90cc5f4 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/namespaces_selector.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/namespaces_selector.tsx @@ -5,14 +5,7 @@ * 2.0. */ -import { - EuiFilterButton, - EuiFilterGroup, - EuiPopover, - EuiPopoverTitle, - EuiSelectable, - EuiText, -} from '@elastic/eui'; +import { EuiFilterButton, EuiPopover, EuiPopoverTitle, EuiSelectable, EuiText } from '@elastic/eui'; import React, { useState } from 'react'; import type { EuiSelectableOptionCheckedType } from '@elastic/eui/src/components/selectable/selectable_option'; import { i18n } from '@kbn/i18n'; @@ -90,37 +83,35 @@ export function NamespacesSelector({ ); return ( - - + renderOption(option)} > - renderOption(option)} - > - {(list, search) => ( -
    - {search} - {list} -
    - )} -
    -
    -
    + {(list, search) => ( +
    + {search} + {list} +
    + )} + + ); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/qualities_selector.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/qualities_selector.tsx new file mode 100644 index 0000000000000..5c7682df08e4e --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/qualities_selector.tsx @@ -0,0 +1,111 @@ +/* + * Copyright 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 { EuiFilterButton, EuiPopover, EuiSelectable, EuiText } from '@elastic/eui'; +import React, { useState } from 'react'; +import type { EuiSelectableOptionCheckedType } from '@elastic/eui/src/components/selectable/selectable_option'; +import { i18n } from '@kbn/i18n'; +import { capitalize } from 'lodash'; +import { QualityIndicators } from '../../../../common/types'; +import { QualityIndicator } from '../../quality_indicator'; + +const qualitiesSelectorLabel = i18n.translate('xpack.datasetQuality.qualitiesSelectorLabel', { + defaultMessage: 'Qualities', +}); + +const qualitiesSelectorLoading = i18n.translate('xpack.datasetQuality.qualitiesSelectorLoading', { + defaultMessage: 'Loading qualities', +}); + +const qualitiesSelectorNoneAvailable = i18n.translate( + 'xpack.datasetQuality.qualitiesSelectorNoneAvailable', + { + defaultMessage: 'No qualities available', + } +); + +const qualitiesSelectorNoneMatching = i18n.translate( + 'xpack.datasetQuality.qualitiesSelectorNoneMatching', + { + defaultMessage: 'No qualities found', + } +); + +interface QualitiesSelectorProps { + isLoading: boolean; + qualities: QualityItem[]; + onQualitiesChange: (qualities: QualityItem[]) => void; +} + +export interface QualityItem { + label: QualityIndicators; + checked?: EuiSelectableOptionCheckedType; +} + +export function QualitiesSelector({ + isLoading, + qualities, + onQualitiesChange, +}: QualitiesSelectorProps) { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const onButtonClick = () => { + setIsPopoverOpen(!isPopoverOpen); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const renderOption = (quality: QualityItem) => ( + + + + ); + + const button = ( + item.checked === 'on')} + numActiveFilters={qualities.filter((item) => item.checked === 'on').length} + > + {qualitiesSelectorLabel} + + ); + + return ( + + renderOption(option)} + > + {(list) =>
    {list}
    } +
    +
    + ); +} 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 91dbee88ecd1e..7bb4acc8d450d 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 @@ -19,6 +19,7 @@ import { EuiIconTip, EuiSkeletonTitle, } from '@elastic/eui'; +import { InfoIndicators } from '../../../../common/types'; import { useSummaryPanelContext } from '../../../hooks'; import { summaryPanelQualityDegradedText, @@ -28,7 +29,6 @@ import { summaryPanelQualityTooltipText, } from '../../../../common/translations'; import { mapPercentagesToQualityCounts } from '../../quality_indicator'; -import { InfoIndicators } from '../../common'; export function DatasetsQualityIndicators() { const { datasetsQuality, isDatasetsQualityLoading, datasetsActivity } = useSummaryPanelContext(); 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 1558e2ce50615..ba7fd971352ed 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 @@ -31,7 +31,7 @@ import { BYTE_NUMBER_FORMAT, } from '../../../../common/constants'; import { DataStreamStat } from '../../../../common/data_streams_stats/data_stream_stat'; -import { QualityIndicator } from '../../quality_indicator'; +import { DatasetQualityIndicator, QualityIndicator } from '../../quality_indicator'; import { IntegrationIcon } from '../../common'; import { useLinkToLogsExplorer } from '../../../hooks'; import { FlyoutDataset } from '../../../state_machines/dataset_quality_controller'; @@ -56,7 +56,11 @@ const sizeColumnName = i18n.translate('xpack.datasetQuality.sizeColumnName', { }); const degradedDocsColumnName = i18n.translate('xpack.datasetQuality.degradedDocsColumnName', { - defaultMessage: 'Degraded Docs', + defaultMessage: 'Degraded Docs (%)', +}); + +const datasetQualityColumnName = i18n.translate('xpack.datasetQuality.datasetQualityColumnName', { + defaultMessage: 'Dataset Quality', }); const lastActivityColumnName = i18n.translate('xpack.datasetQuality.lastActivityColumnName', { @@ -85,38 +89,65 @@ const inactiveDatasetActivityColumnTooltip = i18n.translate( } ); -const degradedDocsDescription = (minimimPercentage: number) => +const degradedDocsDescription = ( + quality: string, + minimimPercentage: number, + comparator: string = '' +) => i18n.translate('xpack.datasetQuality.degradedDocsQualityDescription', { - defaultMessage: 'greater than {minimimPercentage}%', - values: { minimimPercentage }, + defaultMessage: '{quality} -{comparator} {minimimPercentage}%', + values: { quality, minimimPercentage, comparator }, }); const degradedDocsColumnTooltip = ( _ignored ), + }} + /> +); + +const datasetQualityColumnTooltip = ( + - +
    ), @@ -150,7 +181,7 @@ export const getDatasetQualityTableColumns = ({ return ( openFlyout(dataStreamStat as FlyoutDataset)} iconType={isExpanded ? 'minimize' : 'expand'} @@ -213,6 +244,22 @@ export const getDatasetQualityTableColumns = ({ ), width: '100px', }, + { + name: ( + + + {`${datasetQualityColumnName} `} + + + + ), + field: 'degradedDocs.percentage', + sortable: true, + render: (_, dataStreamStat: DataStreamStat) => ( + + ), + width: '140px', + }, { name: ( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts index c731c8f3cb77e..a44b9a562a428 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts @@ -5,22 +5,15 @@ * 2.0. */ -import type { DataView } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import { GenericIndexPatternColumn, TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import { v4 as uuidv4 } from 'uuid'; -import { DEFAULT_LOGS_DATA_VIEW } from '../../../../common/constants'; import { flyoutDegradedDocsPercentageText, flyoutDegradedDocsTrendText, } from '../../../../common/translations'; -const defaultDataView = { - id: `${DEFAULT_LOGS_DATA_VIEW}-id`, - title: DEFAULT_LOGS_DATA_VIEW, - timeFieldName: '@timestamp', -} as DataView; - enum DatasetQualityLensColumn { Date = 'date_column', DegradedDocs = 'degraded_docs_column', @@ -34,17 +27,19 @@ const MAX_BREAKDOWN_SERIES = 5; interface GetLensAttributesParams { color: string; - dataView: DataView; - query: string; + dataStream: string; + datasetTitle: string; breakdownFieldName?: string; } export function getLensAttributes({ color, - dataView = defaultDataView, - query = '', + dataStream, + datasetTitle, breakdownFieldName, }: GetLensAttributesParams) { + const dataViewId = uuidv4(); + const columnOrder = [ DatasetQualityLensColumn.Date, DatasetQualityLensColumn.CountIgnored, @@ -58,30 +53,19 @@ export function getLensAttributes({ } const columns = getChartColumns(breakdownFieldName); - return { visualizationType: 'lnsXY', title: flyoutDegradedDocsTrendText, - references: [ - { - id: dataView.id!, - name: 'indexpattern-datasource-current-indexpattern', - type: 'index-pattern', - }, - { - id: dataView.id!, - name: 'indexpattern-datasource-layer-layer1', - type: 'index-pattern', - }, - ], + references: [], state: { + ...getAdHocDataViewState(dataViewId, dataStream, datasetTitle), datasourceStates: { formBased: { layers: { layer1: { columnOrder, columns, - indexPatternId: dataView.id!, + indexPatternId: dataViewId, }, }, }, @@ -89,7 +73,7 @@ export function getLensAttributes({ filters: [], query: { language: 'kuery', - query, + query: '', }, visualization: { axisTitlesVisibilitySettings: { @@ -145,6 +129,36 @@ export function getLensAttributes({ } as TypedLensByValueInput['attributes']; } +function getAdHocDataViewState(id: string, dataStream: string, title: string) { + return { + internalReferences: [ + { + id, + name: 'indexpattern-datasource-current-indexpattern', + type: 'index-pattern', + }, + { + id, + name: 'indexpattern-datasource-layer-layer1', + type: 'index-pattern', + }, + ], + adHocDataViews: { + [id]: { + id, + title: dataStream, + timeFieldName: '@timestamp', + sourceFilters: [], + fieldFormats: {}, + runtimeFieldMap: {}, + fieldAttrs: {}, + allowNoIndex: false, + name: title, + }, + }, + }; +} + function getChartColumns(breakdownField?: string): Record { return { [DatasetQualityLensColumn.Date]: { @@ -237,7 +251,7 @@ function getChartColumns(breakdownField?: string): Record +const getFlyoutDegradedDocsTopNText = (count: number, fieldName: string) => i18n.translate('xpack.datasetQuality.flyoutDegradedDocsTopNValues', { defaultMessage: 'Top {count} values of {fieldName}', values: { count, fieldName }, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx index f377f139eb099..66aa5e2e1daf7 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx @@ -36,6 +36,7 @@ export function FlyoutSummaryKpis({ const logsExplorerLinkProps = useLinkToLogsExplorer({ dataStreamStat, query: { language: 'kuery', query: `${_IGNORED}: *` }, + timeRangeConfig: timeRange, }); const kpis = useMemo( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts index fb47ddcddbfa7..4768fc1b09d5a 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts @@ -81,10 +81,7 @@ describe('getSummaryKpis', () => { { title: flyoutHostsText, value: '3', - link: { - label: flyoutShowAllText, - href: hostsRedirectUrl, - }, + link: undefined, }, { title: flyoutDegradedDocsText, @@ -138,10 +135,7 @@ describe('getSummaryKpis', () => { { title: flyoutHostsText, value: '54+', - link: { - label: flyoutShowAllText, - href: hostsRedirectUrl, - }, + link: undefined, }, { title: flyoutDegradedDocsText, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts index 25d0bf0584bfa..a0aa0163411c4 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts @@ -109,6 +109,8 @@ function getHostsKpi( dateRange: { from: timeRange.from, to: timeRange.to }, limit: countOfHosts.count, }); + + // @ts-ignore // TODO: Add link to Infra Hosts page when possible const hostsLink = hostsUrl ? { label: flyoutShowAllText, @@ -123,7 +125,7 @@ function getHostsKpi( countOfHosts.count, NUMBER_FORMAT ), - link: hostsLink, + link: undefined, }; } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/dataset_quality_indicator.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/dataset_quality_indicator.tsx new file mode 100644 index 0000000000000..419a13272dbc8 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/dataset_quality_indicator.tsx @@ -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 { EuiSkeletonRectangle, EuiFlexGroup } from '@elastic/eui'; +import React from 'react'; +import { capitalize } from 'lodash'; +import { i18n } from '@kbn/i18n'; +import { QualityIndicator } from '.'; +import { DataStreamStat } from '../../../common/data_streams_stats/data_stream_stat'; + +export const DatasetQualityIndicator = ({ + isLoading, + dataStreamStat, +}: { + isLoading: boolean; + dataStreamStat: DataStreamStat; +}) => { + const { + degradedDocs: { quality }, + } = dataStreamStat; + + const translatedQuality = i18n.translate('xpack.datasetQuality.datasetQualityIdicator', { + defaultMessage: '{quality}', + values: { quality: capitalize(quality) }, + }); + + return ( + + + + + + ); +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/helpers.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/helpers.ts index 33e4046920478..c9588da392d96 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/helpers.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/helpers.ts @@ -6,19 +6,8 @@ */ import { countBy } from 'lodash'; -import { - POOR_QUALITY_MINIMUM_PERCENTAGE, - DEGRADED_QUALITY_MINIMUM_PERCENTAGE, -} from '../../../common/constants'; -import { QualityIndicators } from '../common'; - -export const mapPercentageToQuality = (percentage: number): QualityIndicators => { - return percentage > POOR_QUALITY_MINIMUM_PERCENTAGE - ? 'poor' - : percentage > DEGRADED_QUALITY_MINIMUM_PERCENTAGE - ? 'degraded' - : 'good'; -}; +import { QualityIndicators } from '../../../common/types'; +import { mapPercentageToQuality } from '../../../common/utils'; export const mapPercentagesToQualityCounts = ( percentages: number[] diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/index.ts index f895c02988f71..4f41732ca5259 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/index.ts @@ -8,3 +8,4 @@ export * from './indicator'; export * from './percentage_indicator'; export * from './helpers'; +export * from './dataset_quality_indicator'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/indicator.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/indicator.tsx index 47570c430c2ad..137c558dfbdd7 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/indicator.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/indicator.tsx @@ -5,16 +5,18 @@ * 2.0. */ -import { EuiHealth } from '@elastic/eui'; +import { EuiHealth, EuiText } from '@elastic/eui'; import React, { ReactNode } from 'react'; -import { InfoIndicators, QualityIndicators } from '../common'; +import { QualityIndicators, InfoIndicators } from '../../../common/types'; export function QualityIndicator({ quality, description, + isColoredDescription, }: { quality: QualityIndicators; description: string | ReactNode; + isColoredDescription?: boolean; }) { const qualityColors: Record = { poor: 'danger', @@ -22,5 +24,11 @@ export function QualityIndicator({ good: 'success', }; - return {description}; + return ( + + + {description} + + + ); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx index e0010b84fc9f1..d99a47dcf1ada 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx @@ -9,8 +9,6 @@ import { EuiIcon, EuiText, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedNumber } from '@kbn/i18n-react'; import React from 'react'; -import { mapPercentageToQuality } from './helpers'; -import { QualityIndicator } from './indicator'; const FEW_DEGRADED_DOCS_THRESHOLD = 0.0005; @@ -21,17 +19,13 @@ export function QualityPercentageIndicator({ percentage: number; degradedDocsCount?: number; }) { - const quality = mapPercentageToQuality(percentage); - const isFewDegradedDocsAvailable = percentage && percentage < FEW_DEGRADED_DOCS_THRESHOLD; - const description = isFewDegradedDocsAvailable ? ( + return isFewDegradedDocsAvailable ? ( ) : ( ); - - return ; } const DatasetWithFewDegradedDocs = ({ degradedDocsCount }: { degradedDocsCount?: number }) => { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_filters.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_filters.tsx index f6dc0920a8813..a4d7be4fca46e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_filters.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_filters.tsx @@ -8,10 +8,12 @@ import { OnRefreshChangeProps } from '@elastic/eui'; import { useSelector } from '@xstate/react'; import { useCallback, useMemo } from 'react'; +import { QualityIndicators } from '../../common/types'; import { Integration } from '../../common/data_streams_stats/integration'; import { useDatasetQualityContext } from '../components/dataset_quality/context'; import { IntegrationItem } from '../components/dataset_quality/filters/integrations_selector'; import { NamespaceItem } from '../components/dataset_quality/filters/namespaces_selector'; +import { QualityItem } from '../components/dataset_quality/filters/qualities_selector'; export const useDatasetQualityFilters = () => { const { service } = useDatasetQualityContext(); @@ -27,12 +29,31 @@ export const useDatasetQualityFilters = () => { timeRange, integrations: selectedIntegrations, namespaces: selectedNamespaces, + qualities: selectedQualities, query: selectedQuery, } = useSelector(service, (state) => state.context.filters); - const datasets = useSelector(service, (state) => state.context.datasets); - const namespaces = useSelector(service, (state) => state.context.datasets).map( - (dataset) => dataset.namespace + interface Filters { + namespaces: string[]; + qualities: QualityIndicators[]; + filteredIntegrations: string[]; + } + + const datasets = useSelector(service, (state) => state.context.datasets); + const integrations = useSelector(service, (state) => state.context.integrations); + const { namespaces, qualities, filteredIntegrations } = useMemo( + () => + datasets.reduce( + (acc: Filters, dataset) => ({ + namespaces: [...new Set([...acc.namespaces, dataset.namespace])], + qualities: [...new Set([...acc.qualities, dataset.degradedDocs.quality])], + filteredIntegrations: [ + ...new Set([...acc.filteredIntegrations, dataset.integration?.name ?? 'none']), + ], + }), + { namespaces: [], qualities: [], filteredIntegrations: [] } + ), + [datasets] ); const onTimeChange = useCallback( @@ -76,21 +97,23 @@ export const useDatasetQualityFilters = () => { ); const integrationItems: IntegrationItem[] = useMemo(() => { - const integrations = [ - ...datasets - .map((dataset) => dataset.integration) - .filter((integration): integration is Integration => !!integration), - ...(datasets.some((dataset) => !dataset.integration) - ? [Integration.create({ name: 'none', title: 'None' })] - : []), - ]; - - return integrations.map((integration) => ({ - ...integration, - label: integration.title, - checked: selectedIntegrations.includes(integration.name) ? 'on' : undefined, + const integrationsMap = + integrations?.reduce( + (acc, integration) => ({ + ...acc, + [integration.name]: integration, + }), + {} as { [key: string]: Integration } + ) ?? {}; + + integrationsMap.none = Integration.create({ name: 'none', title: 'None' }); + + return filteredIntegrations.map((name) => ({ + ...integrationsMap[name], + label: integrationsMap[name]?.title, + checked: selectedIntegrations.includes(name) ? 'on' : undefined, })); - }, [datasets, selectedIntegrations]); + }, [integrations, filteredIntegrations, selectedIntegrations]); const onIntegrationsChange = useCallback( (newIntegrationItems: IntegrationItem[]) => { @@ -125,6 +148,27 @@ export const useDatasetQualityFilters = () => { [service] ); + const qualityItems: QualityItem[] = useMemo(() => { + const uniqueQualities = [...new Set(qualities)]; + + return uniqueQualities.map((quality) => ({ + label: quality, + checked: selectedQualities.includes(quality) ? 'on' : undefined, + })); + }, [qualities, selectedQualities]); + + const onQualitiesChange = useCallback( + (newQualityItems: QualityItem[]) => { + service.send({ + type: 'UPDATE_QUALITIES', + qualities: newQualityItems + .filter((quality) => quality.checked === 'on') + .map((quality) => quality.label), + }); + }, + [service] + ); + const onQueryChange = useCallback( (query: string) => { service.send({ @@ -142,8 +186,10 @@ export const useDatasetQualityFilters = () => { onRefreshChange, integrations: integrationItems, namespaces: namespaceItems, + qualities: qualityItems, onIntegrationsChange, onNamespacesChange, + onQualitiesChange, 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 2d1980c74daee..eaac36d016de6 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 @@ -40,6 +40,7 @@ export const useDatasetQualityTable = () => { timeRange, integrations, namespaces, + qualities, query, } = useSelector(service, (state) => state.context.filters); @@ -130,26 +131,25 @@ export const useDatasetQualityTable = () => { ? datasets : filterInactiveDatasets({ datasets, timeRange }); - const filteredByIntegrations = - integrations.length > 0 - ? visibleDatasets.filter((dataset) => { - if (!dataset.integration && integrations.includes(NONE)) { - return true; - } - - return dataset.integration && integrations.includes(dataset.integration.name); - }) - : visibleDatasets; - - const filteredByNamespaces = - namespaces.length > 0 - ? filteredByIntegrations.filter((dataset) => namespaces.includes(dataset.namespace)) - : filteredByIntegrations; - - return query - ? filteredByNamespaces.filter((dataset) => dataset.rawName.includes(query)) - : filteredByNamespaces; - }, [showInactiveDatasets, datasets, timeRange, integrations, namespaces, query]); + return visibleDatasets.filter((dataset) => { + const passesIntegrationFilter = + integrations.length === 0 || + (!dataset.integration && integrations.includes(NONE)) || + (dataset.integration && integrations.includes(dataset.integration.name)); + + const passesNamespaceFilter = + namespaces.length === 0 || namespaces.includes(dataset.namespace); + + const passesQualityFilter = + qualities.length === 0 || qualities.includes(dataset.degradedDocs.quality); + + const passesQueryFilter = !query || dataset.rawName.includes(query); + + return ( + passesIntegrationFilter && passesNamespaceFilter && passesQualityFilter && passesQueryFilter + ); + }); + }, [showInactiveDatasets, datasets, timeRange, integrations, namespaces, qualities, query]); const pagination = { pageIndex: page, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx index 6a92249477cb2..84a09f8cbf5f1 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx @@ -62,7 +62,6 @@ export const useDegradedDocsChart = ({ dataStream }: DegradedDocsChartDeps) => { () => getDataViewField(dataView, breakdownField), [breakdownField, dataView] ); - const filterQuery = `_index: ${dataStream ?? 'match-none'}`; const handleChartLoading = (isLoading: boolean) => { setIsChartLoading(isLoading); @@ -79,16 +78,22 @@ export const useDegradedDocsChart = ({ dataStream }: DegradedDocsChartDeps) => { ); useEffect(() => { - if (dataView) { - const lensAttributes = getLensAttributes({ - color: euiTheme.colors.danger, - dataView, - query: filterQuery, - breakdownFieldName: breakdownDataViewField?.name, - }); - setAttributes(lensAttributes); - } - }, [breakdownDataViewField?.name, dataView, euiTheme.colors.danger, filterQuery, setAttributes]); + const dataStreamName = dataStream ?? DEFAULT_LOGS_DATA_VIEW; + + const lensAttributes = getLensAttributes({ + color: euiTheme.colors.danger, + dataStream: dataStreamName, + datasetTitle: dataStreamStat?.title ?? dataStreamName, + breakdownFieldName: breakdownDataViewField?.name, + }); + setAttributes(lensAttributes); + }, [ + breakdownDataViewField?.name, + euiTheme.colors.danger, + setAttributes, + dataStream, + dataStreamStat?.title, + ]); const openInLensCallback = useCallback(() => { if (attributes) { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts index 2fc2b388f3a8d..d908c8665c1f4 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts @@ -27,7 +27,6 @@ import { GetIntegrationsParams, IntegrationsResponse, } from '../../../common/data_streams_stats'; -import { DataStreamStat } from '../../../common/data_streams_stats/data_stream_stat'; import { IDataStreamsStatsClient } from './types'; export class DataStreamsStatsClient implements IDataStreamsStatsClient { @@ -50,7 +49,7 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { new GetDataStreamsStatsError(`Failed to decode data streams stats response: ${message}`) )(response); - return dataStreamsStats.map(DataStreamStat.create); + return dataStreamsStats; } public async getDataStreamsDegradedStats(params: GetDataStreamsDegradedDocsStatsQuery) { 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 b2a839e4f1dfb..da376fa8ca252 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 @@ -37,6 +37,7 @@ export const DEFAULT_CONTEXT: DefaultDatasetQualityControllerState = { }, integrations: [], namespaces: [], + qualities: [], }, 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 f13e2c7340851..7d54e268bb5df 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 @@ -8,13 +8,13 @@ import { IToasts } from '@kbn/core/public'; import { getDateISORange } from '@kbn/timerange'; import { assign, createMachine, DoneInvokeEvent, InterpreterFrom } from 'xstate'; +import { DataStreamStat } from '../../../../common/api_types'; import { Integration } from '../../../../common/data_streams_stats/integration'; import { IDataStreamDetailsClient } from '../../../services/data_stream_details'; import { DashboardType, DataStreamSettings, DataStreamDetails, - DataStreamStat, GetDataStreamsStatsQuery, GetIntegrationsParams, } from '../../../../common/data_streams_stats'; @@ -164,6 +164,10 @@ export const createPureDatasetQualityControllerStateMachine = ( target: 'integrations.loaded', actions: ['storeNamespaces'], }, + UPDATE_QUALITIES: { + target: 'integrations.loaded', + actions: ['storeQualities'], + }, UPDATE_QUERY: { actions: ['storeQuery'], }, @@ -342,6 +346,16 @@ export const createPureDatasetQualityControllerStateMachine = ( } : {}; }), + storeQualities: assign((context, event) => { + return 'qualities' in event + ? { + filters: { + ...context.filters, + qualities: event.qualities, + }, + } + : {}; + }), 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 3cfb3e9c5a548..10c08f8fa0bfc 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 @@ -7,6 +7,7 @@ import { DoneInvokeEvent } from 'xstate'; import { RefreshInterval, TimeRange } from '@kbn/data-plugin/common'; +import { QualityIndicators } from '../../../../common/types'; import { Integration } from '../../../../common/data_streams_stats/integration'; import { Direction, SortField } from '../../../hooks'; import { DegradedDocsStat } from '../../../../common/data_streams_stats/malformed_docs_stat'; @@ -18,6 +19,7 @@ import { DataStreamStatServiceResponse, IntegrationsResponse, DataStreamStat, + DataStreamStatType, } from '../../../../common/data_streams_stats'; export type FlyoutDataset = Omit< @@ -44,6 +46,7 @@ interface FiltersCriteria { timeRange: TimeRangeConfig; integrations: string[]; namespaces: string[]; + qualities: QualityIndicators[]; query?: string; } @@ -66,7 +69,7 @@ export interface WithFilters { } export interface WithDataStreamStats { - dataStreamStats: DataStreamStat[]; + dataStreamStats: DataStreamStatType[]; } export interface WithDegradedDocs { @@ -177,6 +180,10 @@ export type DatasetQualityControllerEvent = type: 'UPDATE_NAMESPACES'; namespaces: string[]; } + | { + type: 'UPDATE_QUALITIES'; + qualities: QualityIndicators[]; + } | { type: 'UPDATE_QUERY'; query: string; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts index cc48eb1dfdcb5..9b9a007f0c54b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts @@ -6,9 +6,9 @@ */ import { indexNameToDataStreamParts } from '../../common/utils'; -import { DataStreamStat } from '../../common/data_streams_stats/data_stream_stat'; import { Integration } from '../../common/data_streams_stats/integration'; import { generateDatasets } from './generate_datasets'; +import { DataStreamStatType } from '../../common/data_streams_stats/types'; describe('generateDatasets', () => { const integrations: Integration[] = [ @@ -34,34 +34,19 @@ describe('generateDatasets', () => { }, ]; - const dataStreamStats: DataStreamStat[] = [ + const dataStreamStats: DataStreamStatType[] = [ { - name: 'system.application', - title: 'system.application', - type: 'logs', - namespace: 'default', + name: 'logs-system.application-default', lastActivity: 1712911241117, size: '82.1kb', sizeBytes: 84160, - rawName: 'logs-system.application-default', - degradedDocs: { - percentage: 0, - count: 0, - }, + integration: 'system', }, { - name: 'synth', - title: 'synth', - type: 'logs', - namespace: 'default', + name: 'logs-synth-default', lastActivity: 1712911241117, - rawName: 'logs-synth-default', size: '62.5kb', sizeBytes: 64066, - degradedDocs: { - percentage: 0, - count: 0, - }, }, ]; @@ -70,11 +55,13 @@ describe('generateDatasets', () => { dataset: 'logs-system.application-default', percentage: 0, count: 0, + quality: 'good' as const, }, { dataset: 'logs-synth-default', percentage: 11.320754716981131, count: 6, + quality: 'poor' as const, }, ]; @@ -84,11 +71,31 @@ describe('generateDatasets', () => { expect(datasets).toEqual([ { ...dataStreamStats[0], - title: integrations[0].datasets[dataStreamStats[0].name], + name: indexNameToDataStreamParts(dataStreamStats[0].name).dataset, + namespace: indexNameToDataStreamParts(dataStreamStats[0].name).namespace, + title: + integrations[0].datasets[indexNameToDataStreamParts(dataStreamStats[0].name).dataset], + type: indexNameToDataStreamParts(dataStreamStats[0].name).type, + rawName: dataStreamStats[0].name, integration: integrations[0], + degradedDocs: { + percentage: degradedDocs[0].percentage, + count: degradedDocs[0].count, + quality: degradedDocs[0].quality, + }, }, { ...dataStreamStats[1], + name: indexNameToDataStreamParts(dataStreamStats[1].name).dataset, + namespace: indexNameToDataStreamParts(dataStreamStats[1].name).namespace, + title: indexNameToDataStreamParts(dataStreamStats[1].name).dataset, + type: indexNameToDataStreamParts(dataStreamStats[1].name).type, + rawName: dataStreamStats[1].name, + degradedDocs: { + count: 0, + percentage: 0, + quality: 'good', + }, }, ]); }); @@ -111,6 +118,7 @@ describe('generateDatasets', () => { degradedDocs: { percentage: degradedDocs[0].percentage, count: degradedDocs[0].count, + quality: degradedDocs[0].quality, }, }, { @@ -126,6 +134,7 @@ describe('generateDatasets', () => { degradedDocs: { percentage: degradedDocs[1].percentage, count: degradedDocs[1].count, + quality: degradedDocs[1].quality, }, }, ]); @@ -137,18 +146,61 @@ describe('generateDatasets', () => { expect(datasets).toEqual([ { ...dataStreamStats[0], - title: integrations[0].datasets[dataStreamStats[0].name], + name: indexNameToDataStreamParts(dataStreamStats[0].name).dataset, + namespace: indexNameToDataStreamParts(dataStreamStats[0].name).namespace, + title: + integrations[0].datasets[indexNameToDataStreamParts(dataStreamStats[0].name).dataset], + type: indexNameToDataStreamParts(dataStreamStats[0].name).type, + rawName: dataStreamStats[0].name, integration: integrations[0], degradedDocs: { percentage: degradedDocs[0].percentage, count: degradedDocs[0].count, + quality: degradedDocs[0].quality, }, }, { ...dataStreamStats[1], + name: indexNameToDataStreamParts(dataStreamStats[1].name).dataset, + namespace: indexNameToDataStreamParts(dataStreamStats[1].name).namespace, + title: indexNameToDataStreamParts(dataStreamStats[1].name).dataset, + type: indexNameToDataStreamParts(dataStreamStats[1].name).type, + rawName: dataStreamStats[1].name, degradedDocs: { percentage: degradedDocs[1].percentage, count: degradedDocs[1].count, + quality: degradedDocs[1].quality, + }, + }, + ]); + }); + + it('merges integration information with dataStreamStats when dataset is not an integration default one', () => { + const dataset = 'logs-system.custom-default'; + + const nonDefaultDataset = { + name: dataset, + lastActivity: 1712911241117, + size: '82.1kb', + sizeBytes: 84160, + integration: 'system', + }; + + const datasets = generateDatasets([nonDefaultDataset], undefined, integrations); + + expect(datasets).toEqual([ + { + ...nonDefaultDataset, + title: indexNameToDataStreamParts(dataset).dataset, + name: indexNameToDataStreamParts(dataset).dataset, + namespace: indexNameToDataStreamParts(dataset).namespace, + type: indexNameToDataStreamParts(dataset).type, + rawName: nonDefaultDataset.name, + integration: integrations[0], + degradedDocs: { + count: 0, + percentage: 0, + quality: 'good', }, }, ]); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.ts b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.ts index 951ba9ccafc8b..e2f85d8846c99 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.ts @@ -5,39 +5,52 @@ * 2.0. */ +import { DataStreamStatType } from '../../common/data_streams_stats/types'; +import { mapPercentageToQuality } from '../../common/utils'; import { Integration } from '../../common/data_streams_stats/integration'; import { DataStreamStat } from '../../common/data_streams_stats/data_stream_stat'; import { DegradedDocsStat } from '../../common/data_streams_stats/malformed_docs_stat'; export function generateDatasets( - dataStreamStats: DataStreamStat[] = [], + dataStreamStats: DataStreamStatType[] = [], degradedDocStats: DegradedDocsStat[] = [], integrations: Integration[] -) { +): DataStreamStat[] { if (!dataStreamStats.length && !integrations.length) { return []; } - const integrationMap: Record = - integrations.reduce((integrationMapAcc, integration) => { + const { + datasetIntegrationMap, + integrationsMap, + }: { + datasetIntegrationMap: Record; + integrationsMap: Record; + } = integrations.reduce( + (acc, integration) => { return { - ...integrationMapAcc, - ...Object.keys(integration.datasets).reduce( - (datasetsAcc, dataset) => - Object.assign(datasetsAcc, { - [dataset]: { - integration, - title: integration.datasets[dataset], - }, - }), - {} - ), + datasetIntegrationMap: { + ...acc.datasetIntegrationMap, + ...Object.keys(integration.datasets).reduce( + (datasetsAcc, dataset) => + Object.assign(datasetsAcc, { + [dataset]: { + integration, + title: integration.datasets[dataset], + }, + }), + {} + ), + }, + integrationsMap: { ...acc.integrationsMap, [integration.name]: integration }, }; - }, {}); + }, + { datasetIntegrationMap: {}, integrationsMap: {} } + ); if (!dataStreamStats.length) { return degradedDocStats.map((degradedDocStat) => - DataStreamStat.fromDegradedDocStat({ degradedDocStat, integrationMap }) + DataStreamStat.fromDegradedDocStat({ degradedDocStat, datasetIntegrationMap }) ); } @@ -46,17 +59,30 @@ export function generateDatasets( { percentage: DegradedDocsStat['percentage']; count: DegradedDocsStat['count']; + quality: DegradedDocsStat['quality']; } > = degradedDocStats.reduce( - (degradedMapAcc, { dataset, percentage, count }) => - Object.assign(degradedMapAcc, { [dataset]: { percentage, count } }), + (degradedMapAcc, { dataset, percentage, count, quality }) => + Object.assign(degradedMapAcc, { + [dataset]: { + percentage, + count, + quality: mapPercentageToQuality(percentage), + }, + }), {} ); - return dataStreamStats?.map((dataStream) => ({ - ...dataStream, - title: integrationMap[dataStream.name]?.title || dataStream.title, - integration: integrationMap[dataStream.name]?.integration, - degradedDocs: degradedMap[dataStream.rawName] || dataStream.degradedDocs, - })); + return dataStreamStats?.map((dataStream) => { + const dataset = DataStreamStat.create(dataStream); + + return { + ...dataset, + title: datasetIntegrationMap[dataset.name]?.title || dataset.title, + integration: + datasetIntegrationMap[dataset.name]?.integration ?? + integrationsMap[dataStream.integration ?? ''], + degradedDocs: degradedMap[dataset.rawName] || dataset.degradedDocs, + }; + }); } diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx index 447b0d52cddda..e95314668e80c 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx @@ -24,6 +24,7 @@ import { import { findInventoryModel, findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; +import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; import { AlertFlyout } from '../../../../../alerting/inventory/components/alert_flyout'; import { InfraWaffleMapNode, InfraWaffleMapOptions } from '../../../../../lib/lib'; @@ -46,6 +47,7 @@ export const NodeContextMenu: React.FC = withTheme const { services } = useKibanaContextForPlugin(); const { application, share } = services; const { nodeLogsLocator } = getLogsLocatorsFromUrlService(share.url); + const uptimeLocator = share.url.locators.get(uptimeOverviewLocatorID); const uiCapabilities = application?.capabilities; // Due to the changing nature of the fields between APM and this UI, // We need to have some exceptions until 7.0 & ECS is finalized. Reference @@ -60,7 +62,8 @@ export const NodeContextMenu: React.FC = withTheme inventoryModel.crosslinkSupport.apm && uiCapabilities?.apm && uiCapabilities?.apm.show; const showUptimeLink = inventoryModel.crosslinkSupport.uptime && - (['pod', 'container'].includes(nodeType) || node.ip); + (['pod', 'container'].includes(nodeType) || node.ip) && + !!uptimeLocator; const showCreateAlertLink = uiCapabilities?.infrastructure?.save; const inventoryId = useMemo(() => { @@ -144,7 +147,7 @@ export const NodeContextMenu: React.FC = withTheme defaultMessage: '{inventoryName} in Uptime', values: { inventoryName: inventoryModel.singularDisplayName }, }), - onClick: () => navigateToUptime(share.url.locators, nodeType, node), + onClick: () => (showUptimeLink ? navigateToUptime({ uptimeLocator, nodeType, node }) : {}), isDisabled: !showUptimeLink, }; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts index 6996bbd50fe32..75a824b2bf571 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts @@ -5,15 +5,19 @@ * 2.0. */ -import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/public'; -import { LocatorClient } from '@kbn/share-plugin/common/url_service/locators'; +import { LocatorPublic } from '@kbn/share-plugin/common/url_service/locators'; import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; import { InfraWaffleMapNode } from '../../../../lib/lib'; -export const navigateToUptime = ( - locators: LocatorClient, - nodeType: InventoryItemType, - node: InfraWaffleMapNode -) => { - return locators.get(uptimeOverviewLocatorID)!.navigate({ [nodeType]: node.id, ip: node.ip }); +export const navigateToUptime = ({ + uptimeLocator, + nodeType, + node, +}: { + uptimeLocator: LocatorPublic; + nodeType: InventoryItemType; + node: InfraWaffleMapNode; +}) => { + return uptimeLocator.navigate({ [nodeType]: node.id, ip: node.ip }); }; diff --git a/x-pack/plugins/observability_solution/logs_explorer/common/constants.ts b/x-pack/plugins/observability_solution/logs_explorer/common/constants.ts index aec0ad3b3adea..ae8eff46fe7e2 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/common/constants.ts +++ b/x-pack/plugins/observability_solution/logs_explorer/common/constants.ts @@ -5,44 +5,12 @@ * 2.0. */ +import { fieldConstants } from '@kbn/discover-utils'; import { SmartFieldGridColumnOptions } from './display_options'; -export const LOGS_EXPLORER_PROFILE_ID = 'logs-explorer'; - -// Fields constants -export const TIMESTAMP_FIELD = '@timestamp'; -export const HOST_NAME_FIELD = 'host.name'; -export const LOG_LEVEL_FIELD = 'log.level'; -export const MESSAGE_FIELD = 'message'; -export const ERROR_MESSAGE_FIELD = 'error.message'; -export const EVENT_ORIGINAL_FIELD = 'event.original'; -export const TRACE_ID_FIELD = 'trace.id'; - -export const LOG_FILE_PATH_FIELD = 'log.file.path'; -export const DATASTREAM_NAMESPACE_FIELD = 'data_stream.namespace'; -export const DATASTREAM_DATASET_FIELD = 'data_stream.dataset'; +export * from '@kbn/discover-utils/src/field_constants'; -// Resource Fields -export const AGENT_NAME_FIELD = 'agent.name'; -export const CLOUD_PROVIDER_FIELD = 'cloud.provider'; -export const CLOUD_REGION_FIELD = 'cloud.region'; -export const CLOUD_AVAILABILITY_ZONE_FIELD = 'cloud.availability_zone'; -export const CLOUD_PROJECT_ID_FIELD = 'cloud.project.id'; -export const CLOUD_INSTANCE_ID_FIELD = 'cloud.instance.id'; -export const SERVICE_NAME_FIELD = 'service.name'; -export const ORCHESTRATOR_CLUSTER_NAME_FIELD = 'orchestrator.cluster.name'; -export const ORCHESTRATOR_RESOURCE_ID_FIELD = 'orchestrator.resource.id'; -export const ORCHESTRATOR_NAMESPACE_FIELD = 'orchestrator.namespace'; -export const CONTAINER_NAME_FIELD = 'container.name'; -export const CONTAINER_ID_FIELD = 'container.id'; - -// Degraded Docs -export const DEGRADED_DOCS_FIELD = 'ignored_field_values'; - -// Error Stacktrace -export const ERROR_STACK_TRACE = 'error.stack_trace'; -export const ERROR_EXCEPTION_STACKTRACE = 'error.exception.stacktrace'; -export const ERROR_LOG_STACKTRACE = 'error.log.stacktrace'; +export const LOGS_EXPLORER_PROFILE_ID = 'logs-explorer'; // Virtual column fields export const CONTENT_FIELD = 'content'; @@ -56,14 +24,14 @@ export const ACTIONS_COLUMN_WIDTH = 80; export const RESOURCE_FIELD_CONFIGURATION: SmartFieldGridColumnOptions = { type: 'smart-field', smartField: RESOURCE_FIELD, - fallbackFields: [HOST_NAME_FIELD, SERVICE_NAME_FIELD], + fallbackFields: [fieldConstants.HOST_NAME_FIELD, fieldConstants.SERVICE_NAME_FIELD], width: DATA_GRID_COLUMN_WIDTH_MEDIUM, }; export const CONTENT_FIELD_CONFIGURATION: SmartFieldGridColumnOptions = { type: 'smart-field', smartField: CONTENT_FIELD, - fallbackFields: [MESSAGE_FIELD], + fallbackFields: [fieldConstants.MESSAGE_FIELD], }; export const SMART_FALLBACK_FIELDS = { diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx index 834fdc9182fca..dad1944e6b667 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx @@ -88,7 +88,7 @@ export const noDataRetryLabel = i18n.translate( ); export const tryEsql = i18n.translate('xpack.logsExplorer.dataSourceSelector.TryEsql', { - defaultMessage: 'Try ES|QL', + defaultMessage: 'Language: ES|QL', }); export const technicalPreview = i18n.translate('xpack.logsExplorer.TechPreview', { diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_detail.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_detail.tsx deleted file mode 100644 index 6beda5e75b022..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_detail.tsx +++ /dev/null @@ -1,24 +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 React from 'react'; -import { LogsExplorerFlyoutContentProps } from '../../customizations/types'; -import { useDocDetail } from '../../hooks/use_doc_detail'; -import { FlyoutHeader } from './flyout_header'; -import { FlyoutHighlights } from './flyout_highlights'; -import { DiscoverActionsProvider } from '../../hooks/use_discover_action'; - -export function FlyoutDetail({ dataView, doc, actions }: LogsExplorerFlyoutContentProps) { - const parsedDoc = useDocDetail(doc, { dataView }); - - return ( - - - - - ); -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_header.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_header.tsx deleted file mode 100644 index b26f90145b6a5..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_header.tsx +++ /dev/null @@ -1,120 +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 React from 'react'; -import { - EuiCodeBlock, - EuiFlexGroup, - EuiFlexItem, - EuiText, - EuiAccordion, - useGeneratedHtmlId, - EuiTitle, -} from '@elastic/eui'; -import { FlyoutDoc } from '../../../common/document'; -import { getMessageWithFallbacks } from '../../hooks/use_doc_detail'; -import { LogLevel } from '../common/log_level'; -import { Timestamp } from './sub_components/timestamp'; -import * as constants from '../../../common/constants'; -import { flyoutContentLabel } from '../common/translations'; -import { HoverActionPopover } from './sub_components/hover_popover_action'; - -export function FlyoutHeader({ doc }: { doc: FlyoutDoc }) { - const hasTimestamp = Boolean(doc[constants.TIMESTAMP_FIELD]); - const hasLogLevel = Boolean(doc[constants.LOG_LEVEL_FIELD]); - const hasBadges = hasTimestamp || hasLogLevel; - const { field, value } = getMessageWithFallbacks(doc); - const hasMessageField = field && value; - const hasFlyoutHeader = hasMessageField || hasBadges; - - const accordionId = useGeneratedHtmlId({ - prefix: flyoutContentLabel, - }); - - const accordionTitle = ( - -

    {flyoutContentLabel}

    -
    - ); - - const logLevelAndTimestamp = ( - - {hasBadges && ( - - {doc[constants.LOG_LEVEL_FIELD] && ( - - - - - - )} - {hasTimestamp && ( - - - - )} - - )} - - ); - - const contentField = hasMessageField && ( - - - - - - - {field} - - - {logLevelAndTimestamp} - - - - - - {value} - - - - - - ); - - return hasFlyoutHeader ? ( - - - {hasMessageField ? contentField : logLevelAndTimestamp} - - - ) : null; -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_highlights.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_highlights.tsx deleted file mode 100644 index 5e8af29566372..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/flyout_highlights.tsx +++ /dev/null @@ -1,219 +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 React from 'react'; -import { CloudProvider, CloudProviderIcon } from '@kbn/custom-icons'; -import { useMeasure } from 'react-use/lib'; -import { first } from 'lodash'; -import { FlyoutDoc, LogDocument } from '../../../common/document'; -import * as constants from '../../../common/constants'; -import { HighlightField } from './sub_components/highlight_field'; -import { - cloudAccordionTitle, - flyoutCloudAvailabilityZoneLabel, - flyoutCloudInstanceIdLabel, - flyoutCloudProjectIdLabel, - flyoutCloudProviderLabel, - flyoutCloudRegionLabel, - flyoutDatasetLabel, - flyoutHostNameLabel, - flyoutLogPathFileLabel, - flyoutNamespaceLabel, - flyoutOrchestratorClusterNameLabel, - flyoutOrchestratorResourceIdLabel, - flyoutServiceLabel, - flyoutShipperLabel, - flyoutTraceLabel, - otherAccordionTitle, - serviceInfraAccordionTitle, -} from '../common/translations'; -import { HighlightSection } from './sub_components/highlight_section'; -import { HighlightContainer } from './sub_components/highlight_container'; -import { useFlyoutColumnWidth } from '../../hooks/use_flyouot_column_width'; - -export function FlyoutHighlights({ - formattedDoc, - flattenedDoc, -}: { - formattedDoc: FlyoutDoc; - flattenedDoc: LogDocument['flattened']; -}) { - const [ref, dimensions] = useMeasure(); - const { columns, fieldWidth } = useFlyoutColumnWidth(dimensions.width); - return ( - - {/* Service & Infrastructure highlight */} - - {formattedDoc[constants.SERVICE_NAME_FIELD] && ( - - )} - {formattedDoc[constants.HOST_NAME_FIELD] && ( - - )} - {formattedDoc[constants.TRACE_ID_FIELD] && ( - - )} - {formattedDoc[constants.ORCHESTRATOR_CLUSTER_NAME_FIELD] && ( - - )} - {formattedDoc[constants.ORCHESTRATOR_RESOURCE_ID_FIELD] && ( - - )} - - {/* Cloud highlight */} - - {formattedDoc[constants.CLOUD_PROVIDER_FIELD] && ( - - } - label={flyoutCloudProviderLabel} - value={flattenedDoc[constants.CLOUD_PROVIDER_FIELD]} - width={fieldWidth} - /> - )} - {formattedDoc[constants.CLOUD_REGION_FIELD] && ( - - )} - {formattedDoc[constants.CLOUD_AVAILABILITY_ZONE_FIELD] && ( - - )} - {formattedDoc[constants.CLOUD_PROJECT_ID_FIELD] && ( - - )} - {formattedDoc[constants.CLOUD_INSTANCE_ID_FIELD] && ( - - )} - - {/* Other highlights */} - - {formattedDoc[constants.LOG_FILE_PATH_FIELD] && ( - - )} - {formattedDoc[constants.DATASTREAM_DATASET_FIELD] && ( - - )} - {formattedDoc[constants.DATASTREAM_NAMESPACE_FIELD] && ( - - )} - {formattedDoc[constants.AGENT_NAME_FIELD] && ( - - )} - - - ); -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_container.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_container.tsx deleted file mode 100644 index 4cef6f7b0850c..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_container.tsx +++ /dev/null @@ -1,40 +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 React from 'react'; -import { EuiHorizontalRule } from '@elastic/eui'; - -interface HighlightContainerProps { - children: React.ReactNode; -} - -const hasNonUndefinedSubChild = (children: React.ReactNode[]): boolean => { - return children.some((child) => { - if (React.isValidElement(child)) { - const subChildren = React.Children.toArray(child.props.children); - return subChildren.some((subChild) => subChild !== undefined && subChild !== null); - } - return false; - }); -}; - -export const HighlightContainer = React.forwardRef( - ({ children }, ref) => { - const validChildren = React.Children.toArray(children).filter(Boolean); - const hasChildren = validChildren.length > 0; - const shouldRender = hasChildren && hasNonUndefinedSubChild(validChildren); - - const flexChildren = validChildren.map((child, idx) =>
    {child}
    ); - - return shouldRender ? ( -
    - - {flexChildren} -
    - ) : null; - } -); diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field.tsx deleted file mode 100644 index 338643b3f302f..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_field.tsx +++ /dev/null @@ -1,94 +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 { - EuiBadge, - EuiFlexGroup, - EuiFlexItem, - EuiText, - EuiTextTruncate, - EuiTitle, - useEuiTheme, -} from '@elastic/eui'; -import { css } from '@emotion/react'; -import React, { ReactNode } from 'react'; -import { dynamic } from '@kbn/shared-ux-utility'; -import { HoverActionPopover } from './hover_popover_action'; - -const HighlightFieldDescription = dynamic(() => import('./highlight_field_description')); - -interface HighlightFieldProps { - useBadge?: boolean; - field: string; - formattedValue: string; - icon?: ReactNode; - label: string; - value?: string; - width: number; -} - -export function HighlightField({ - useBadge = false, - field, - formattedValue, - icon, - label, - value, - width, - ...props -}: HighlightFieldProps) { - const { euiTheme } = useEuiTheme(); - - return formattedValue && value ? ( - - - - - - {label} - - - - - - - - - - - {icon && {icon}} - - - {(truncatedText: string) => - useBadge ? ( - {truncatedText} - ) : ( - - ) - } - - - - - - - ) : null; -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_section.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_section.tsx deleted file mode 100644 index 80260a6cff11c..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/sub_components/highlight_section.tsx +++ /dev/null @@ -1,84 +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 React, { useState } from 'react'; -import { - EuiAccordion, - EuiFlexGrid, - EuiHorizontalRule, - EuiTitle, - EuiFlexItem, - useGeneratedHtmlId, - EuiButtonEmpty, -} from '@elastic/eui'; -import { flyoutAccordionShowMoreText } from '../../common/translations'; - -interface HighlightSectionProps { - title: string; - children: React.ReactNode; - columns: 1 | 2 | 3; -} - -const CHILDREN_PER_SECTION: 3 | 6 | 9 = 6; - -export function HighlightSection({ title, children, columns, ...props }: HighlightSectionProps) { - const validChildren = React.Children.toArray(children).filter(Boolean); - const childLength = validChildren.length; - const shouldRenderSection = childLength > 0; - const limitedChildren = validChildren.slice(0, CHILDREN_PER_SECTION - 1); - const [showMore, setShowMore] = useState(childLength > CHILDREN_PER_SECTION); - - const accordionId = useGeneratedHtmlId({ - prefix: title, - }); - - const hiddenCount = childLength - limitedChildren.length; - - const showMoreButtonLabel = flyoutAccordionShowMoreText(hiddenCount); - const showMoreButton = ( - { - setShowMore(false); - }} - > - {showMoreButtonLabel} - - ); - - limitedChildren.push(showMoreButton); - - const accordionTitle = ( - -

    {title}

    -
    - ); - - const flexChildren = (showMore ? limitedChildren : validChildren).map((child, idx) => ( - {child} - )); - - return shouldRenderSection ? ( - <> - - - {flexChildren} - - - - - ) : null; -} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/content.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/content.tsx index 073d18068d650..b13cacec025f3 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/content.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/virtual_columns/content.tsx @@ -10,12 +10,14 @@ import { css } from '@emotion/css'; import { EuiButtonIcon, EuiText } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; import type { DataGridCellValueElementProps } from '@kbn/unified-data-table'; -import { getShouldShowFieldHandler } from '@kbn/discover-utils'; +import { + getLogDocumentOverview, + getMessageFieldWithFallbacks, + getShouldShowFieldHandler, +} from '@kbn/discover-utils'; import { i18n } from '@kbn/i18n'; import type { DataTableRecord } from '@kbn/discover-utils/src/types'; import { dynamic } from '@kbn/shared-ux-utility'; -import { useDocDetail, getMessageWithFallbacks } from '../../hooks/use_doc_detail'; -import { LogDocument } from '../../../common/document'; import { LogLevel } from '../common/log_level'; import * as constants from '../../../common/constants'; @@ -85,8 +87,8 @@ export const Content = ({ columnId, closePopover, }: DataGridCellValueElementProps) => { - const parsedDoc = useDocDetail(row as LogDocument, { dataView }); - const { field, value } = getMessageWithFallbacks(parsedDoc); + const documentOverview = getLogDocumentOverview(row, { dataView, fieldFormats }); + const { field, value } = getMessageFieldWithFallbacks(documentOverview); const renderLogMessage = field && value; const shouldShowFieldHandler = useMemo(() => { @@ -106,8 +108,8 @@ export const Content = ({ return ( - {parsedDoc[constants.LOG_LEVEL_FIELD] && ( - + {documentOverview[constants.LOG_LEVEL_FIELD] && ( + )} {renderLogMessage ? ( diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_flyout_content.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_flyout_content.tsx index 5f496fb8d189b..9b60c5eabc5ae 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_flyout_content.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/customizations/custom_flyout_content.tsx @@ -8,7 +8,6 @@ import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; -import { FlyoutDetail } from '../components/flyout_detail/flyout_detail'; import { LogsExplorerFlyoutContentProps } from './types'; import { useLogsExplorerControllerContext } from '../controller'; import { LogDocument } from '../../common/document'; @@ -55,7 +54,8 @@ const CustomFlyoutContent = ({ const renderContent = ({ actions, dataView, doc }: LogsExplorerFlyoutContentProps) => ( - + {/* TOREMOVE */} + {/* */} ); 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 6935ac17fbff9..4b49e3f579f15 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 @@ -5,8 +5,6 @@ * 2.0. */ -/* eslint-disable react-hooks/rules-of-hooks */ - import React from 'react'; import type { CoreStart } from '@kbn/core/public'; import type { CustomizationCallback } from '@kbn/discover-plugin/public'; @@ -14,7 +12,6 @@ import { i18n } from '@kbn/i18n'; import { waitFor } from 'xstate/lib/waitFor'; import { dynamic } from '@kbn/shared-ux-utility'; import type { LogsExplorerController } from '../controller'; -import { LogsExplorerControllerProvider } from '../controller/provider'; import type { LogsExplorerStartDeps } from '../types'; import { useKibanaContextForPluginProvider } from '../utils/use_kibana'; import { createCustomSearchBar } from './custom_search_bar'; @@ -25,7 +22,6 @@ import { createCustomUnifiedHistogram } from './custom_unified_histogram'; const LazyCustomDataSourceFilters = dynamic(() => import('./custom_data_source_filters')); const LazyCustomDataSourceSelector = dynamic(() => import('./custom_data_source_selector')); -const LazyCustomFlyoutContent = dynamic(() => import('./custom_flyout_content')); export interface CreateLogsExplorerProfileCustomizationsDeps { core: CoreStart; @@ -120,7 +116,12 @@ export const createLogsExplorerProfileCustomizations = }); /** - * Hide flyout actions to prevent rendering hard-coded actions. + * Flyout customization. + * The latest changes moved the implementation of the flyout overview tab into the unified_doc_viewer presets. + * To keep control over the overview tab and enable it only on the Logs Explorer, + * the docViewsRegistry is updated to allow enable/disable of any doc view. + * In a close future, when the contextual awareness for Discover will be in place, + * this configuration will be moved into a flavored logs experience directly defined in Discover. */ customizations.set({ id: 'flyout', @@ -135,24 +136,7 @@ export const createLogsExplorerProfileCustomizations = }, }, docViewsRegistry: (registry) => { - registry.add({ - id: 'doc_view_log_overview', - title: i18n.translate('xpack.logsExplorer.flyoutDetail.docViews.overview', { - defaultMessage: 'Overview', - }), - order: 0, - component: (props) => { - const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(core, plugins); - - return ( - - - - - - ); - }, - }); + registry.enableById('doc_view_logs_overview'); return registry; }, diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_discover_action.ts b/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_discover_action.ts deleted file mode 100644 index 68db3d6b932d6..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_discover_action.ts +++ /dev/null @@ -1,17 +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 createContainer from 'constate'; -import type { LogsExplorerFlyoutContentProps } from '../customizations/types'; - -interface UseFlyoutActionsDeps { - value: LogsExplorerFlyoutContentProps['actions']; -} - -const useDiscoverActions = ({ value }: UseFlyoutActionsDeps) => value; - -export const [DiscoverActionsProvider, useDiscoverActionsContext] = - createContainer(useDiscoverActions); diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_doc_detail.ts b/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_doc_detail.ts deleted file mode 100644 index 6b59b0ac5e4f5..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_doc_detail.ts +++ /dev/null @@ -1,105 +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 { formatFieldValue } from '@kbn/discover-utils'; -import * as constants from '../../common/constants'; -import { useKibanaContextForPlugin } from '../utils/use_kibana'; -import { LogsExplorerFlyoutContentProps } from '../customizations/types'; -import { FlyoutDoc, LogDocument } from '../../common/document'; - -export function useDocDetail( - doc: LogDocument, - { dataView }: Pick -): FlyoutDoc { - const { services } = useKibanaContextForPlugin(); - - const formatField = (field: F) => { - return ( - doc.flattened[field] && - formatFieldValue( - doc.flattened[field], - doc.raw, - services.fieldFormats, - dataView, - dataView.fields.getByName(field) - ) - ); - }; - - // Flyout Headers - const levelArray = doc.flattened[constants.LOG_LEVEL_FIELD]; - const level = levelArray && levelArray.length ? levelArray[0]?.toLowerCase() : undefined; - const messageArray = doc.flattened[constants.MESSAGE_FIELD]; - const message = messageArray && messageArray.length ? messageArray[0] : undefined; - const errorMessageArray = doc.flattened[constants.ERROR_MESSAGE_FIELD]; - const errorMessage = - errorMessageArray && errorMessageArray.length ? errorMessageArray[0] : undefined; - const eventOriginalArray = doc.flattened[constants.EVENT_ORIGINAL_FIELD]; - const eventOriginal = - eventOriginalArray && eventOriginalArray.length ? eventOriginalArray[0] : undefined; - const timestamp = formatField(constants.TIMESTAMP_FIELD); - - // Service Highlights - const serviceName = formatField(constants.SERVICE_NAME_FIELD); - const traceId = formatField(constants.TRACE_ID_FIELD); - - // Infrastructure Highlights - const hostname = formatField(constants.HOST_NAME_FIELD); - const orchestratorClusterName = formatField(constants.ORCHESTRATOR_CLUSTER_NAME_FIELD); - const orchestratorResourceId = formatField(constants.ORCHESTRATOR_RESOURCE_ID_FIELD); - - // Cloud Highlights - const cloudProvider = formatField(constants.CLOUD_PROVIDER_FIELD); - const cloudRegion = formatField(constants.CLOUD_REGION_FIELD); - const cloudAz = formatField(constants.CLOUD_AVAILABILITY_ZONE_FIELD); - const cloudProjectId = formatField(constants.CLOUD_PROJECT_ID_FIELD); - const cloudInstanceId = formatField(constants.CLOUD_INSTANCE_ID_FIELD); - - // Other Highlights - const logFilePath = formatField(constants.LOG_FILE_PATH_FIELD); - const namespace = formatField(constants.DATASTREAM_NAMESPACE_FIELD); - const dataset = formatField(constants.DATASTREAM_DATASET_FIELD); - const agentName = formatField(constants.AGENT_NAME_FIELD); - - return { - [constants.LOG_LEVEL_FIELD]: level, - [constants.TIMESTAMP_FIELD]: timestamp, - [constants.MESSAGE_FIELD]: message, - [constants.ERROR_MESSAGE_FIELD]: errorMessage, - [constants.EVENT_ORIGINAL_FIELD]: eventOriginal, - [constants.SERVICE_NAME_FIELD]: serviceName, - [constants.TRACE_ID_FIELD]: traceId, - [constants.HOST_NAME_FIELD]: hostname, - [constants.ORCHESTRATOR_CLUSTER_NAME_FIELD]: orchestratorClusterName, - [constants.ORCHESTRATOR_RESOURCE_ID_FIELD]: orchestratorResourceId, - [constants.CLOUD_PROVIDER_FIELD]: cloudProvider, - [constants.CLOUD_REGION_FIELD]: cloudRegion, - [constants.CLOUD_AVAILABILITY_ZONE_FIELD]: cloudAz, - [constants.CLOUD_PROJECT_ID_FIELD]: cloudProjectId, - [constants.CLOUD_INSTANCE_ID_FIELD]: cloudInstanceId, - [constants.LOG_FILE_PATH_FIELD]: logFilePath, - [constants.DATASTREAM_NAMESPACE_FIELD]: namespace, - [constants.DATASTREAM_DATASET_FIELD]: dataset, - [constants.AGENT_NAME_FIELD]: agentName, - }; -} - -export const getMessageWithFallbacks = (doc: FlyoutDoc) => { - const rankingOrder = [ - constants.MESSAGE_FIELD, - constants.ERROR_MESSAGE_FIELD, - constants.EVENT_ORIGINAL_FIELD, - ] as const; - - for (const rank of rankingOrder) { - if (doc[rank] !== undefined && doc[rank] !== null) { - return { field: rank, value: doc[rank] }; - } - } - - // If none of the ranks (fallbacks) are present - return { field: undefined }; -}; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_flyouot_column_width.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_flyouot_column_width.tsx deleted file mode 100644 index 1ea4250de49bf..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_flyouot_column_width.tsx +++ /dev/null @@ -1,26 +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 { useEuiTheme } from '@elastic/eui'; - -interface FlyoutColumnWidth { - columns: 1 | 2 | 3; - fieldWidth: number; -} - -export const useFlyoutColumnWidth = (width: number): FlyoutColumnWidth => { - const { euiTheme } = useEuiTheme(); - - const numberOfColumns = width > euiTheme.breakpoint.m ? 3 : width > euiTheme.breakpoint.s ? 2 : 1; - const WIDTH_FACTOR = 1.25; - const fieldWidth = width / (numberOfColumns * WIDTH_FACTOR); - - return { - columns: numberOfColumns, - fieldWidth, - }; -}; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_hover_actions.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_hover_actions.tsx deleted file mode 100644 index d8459215dc366..0000000000000 --- a/x-pack/plugins/observability_solution/logs_explorer/public/hooks/use_hover_actions.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useMemo, useState } from 'react'; -import { copyToClipboard, IconType } from '@elastic/eui'; -import { - flyoutHoverActionCopyToClipboardText, - flyoutHoverActionFilterForFieldPresentText, - actionFilterForText, - actionFilterOutText, - flyoutHoverActionToggleColumnText, -} from '../components/common/translations'; -import { useDiscoverActionsContext } from './use_discover_action'; - -interface HoverActionProps { - field: string; - value: string; -} - -export interface HoverActionType { - id: string; - tooltipContent: string; - iconType: IconType; - onClick: () => void; - display: boolean; -} - -export const useHoverActions = ({ field, value }: HoverActionProps): HoverActionType[] => { - const filterForText = actionFilterForText(value); - const filterOutText = actionFilterOutText(value); - const actions = useDiscoverActionsContext(); - const [columnAdded, setColumnAdded] = useState(false); - - return useMemo( - () => [ - { - id: 'addToFilterAction', - tooltipContent: filterForText, - iconType: 'plusInCircle', - onClick: () => actions?.addFilter && actions.addFilter(field, value, '+'), - display: true, - }, - { - id: 'removeFromFilterAction', - tooltipContent: filterOutText, - iconType: 'minusInCircle', - onClick: () => actions?.addFilter && actions.addFilter(field, value, '-'), - display: true, - }, - { - id: 'filterForFieldPresentAction', - tooltipContent: flyoutHoverActionFilterForFieldPresentText, - iconType: 'filter', - onClick: () => actions?.addFilter && actions.addFilter('_exists_', field, '+'), - display: true, - }, - { - id: 'toggleColumnAction', - tooltipContent: flyoutHoverActionToggleColumnText, - iconType: 'listAdd', - onClick: () => { - if (actions) { - if (columnAdded) { - actions?.removeColumn?.(field); - } else { - actions?.addColumn?.(field); - } - setColumnAdded(!columnAdded); - } - }, - display: true, - }, - { - id: 'copyToClipboardAction', - tooltipContent: flyoutHoverActionCopyToClipboardText, - iconType: 'copyClipboard', - onClick: () => copyToClipboard(value as string), - display: true, - }, - ], - [filterForText, filterOutText, actions, field, value, columnAdded] - ); -}; diff --git a/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json b/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json index e8c54c344ac51..7c4224eadac19 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json +++ b/x-pack/plugins/observability_solution/logs_explorer/tsconfig.json @@ -37,7 +37,6 @@ "@kbn/kibana-utils-plugin", "@kbn/management-settings-ids", "@kbn/navigation-plugin", - "@kbn/react-field", "@kbn/router-utils", "@kbn/share-plugin", "@kbn/shared-ux-utility", diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx index 7057b687ed1c2..b91f393343233 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx @@ -70,13 +70,8 @@ export function LogRateAnalysis({ // The default time ranges for `initialAnalysisStart` are suitable for a `1m` lookback. // If an alert would have a `5m` lookback, this would result in a factor of `5`. const lookbackDuration = - alert.fields['kibana.alert.rule.parameters'] && - alert.fields['kibana.alert.rule.parameters'].timeSize && - alert.fields['kibana.alert.rule.parameters'].timeUnit - ? moment.duration( - alert.fields['kibana.alert.rule.parameters'].timeSize as number, - alert.fields['kibana.alert.rule.parameters'].timeUnit as any - ) + rule.params.criteria[0]?.timeSize && rule.params.criteria[0]?.timeUnit + ? moment.duration(rule.params.criteria[0].timeSize, rule.params.criteria[0].timeUnit) : moment.duration(1, 'm'); const intervalFactor = Math.max(1, lookbackDuration.asSeconds() / 60); 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 4b7267e336923..738b95d09ea6e 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 @@ -70,6 +70,7 @@ export const filtersRT = rt.exact( timeRange: timeRangeRT, integrations: rt.array(rt.string), namespaces: rt.array(rt.string), + qualities: rt.array(rt.union([rt.literal('poor'), rt.literal('degraded'), rt.literal('good')])), query: rt.string, }) ); diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/logs_explorer_top_nav_menu.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/logs_explorer_top_nav_menu.tsx index ed3598bad4671..5d94c88251445 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/logs_explorer_top_nav_menu.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/logs_explorer_top_nav_menu.tsx @@ -30,13 +30,15 @@ import { AlertsPopover } from './alerts_popover'; export const LogsExplorerTopNavMenu = () => { const { - services: { serverless }, + services: { chrome }, } = useKibanaContextForPlugin(); - return Boolean(serverless) ? : ; + const chromeStyle = useObservable(chrome.getChromeStyle$()); + + return chromeStyle === 'project' ? : ; }; -const ServerlessTopNav = () => { +const ProjectTopNav = () => { const { services } = useKibanaContextForPlugin(); return ( @@ -82,7 +84,7 @@ const ServerlessTopNav = () => { ); }; -const StatefulTopNav = () => { +const ClassicTopNav = () => { const { services: { appParams: { setHeaderActionMenu }, diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts b/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts index 044cd7f470a42..a014535fa10cf 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts @@ -45,7 +45,7 @@ export class ObservabilityLogsExplorerPlugin core: CoreSetup, _pluginsSetup: ObservabilityLogsExplorerSetupDeps ) { - const { share } = _pluginsSetup; + const { discover, share } = _pluginsSetup; const useHash = core.uiSettings.get('state:storeInSessionStorage'); core.application.register({ @@ -72,6 +72,12 @@ export class ObservabilityLogsExplorerPlugin }, }); + // ensure the tabs are shown when in the observability nav mode + discover.configureInlineTopNav('oblt', { + enabled: true, + showLogsExplorerTabs: true, + }); + // App used solely to redirect from "/app/observability-log-explorer" to "/app/observability-logs-explorer" core.application.register({ id: 'observability-log-explorer', diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/header.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/header.tsx index a8abbfc84884c..e05c8cfdd0be2 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/header.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/header.tsx @@ -13,7 +13,7 @@ export const Header = () => { return ( - +

    {i18n.translate( 'xpack.observability_onboarding.experimentalOnboardingFlow.addObservabilityDataTitleLabel', diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx index 197435a396432..3a813d7c10560 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx @@ -90,7 +90,7 @@ export const OnboardingFlowForm: FunctionComponent = () => { setHasPackageListLoaded(true); }, []); const packageListRef = useRef(null); - const customCardsRef = useRef(null); + const formRef = useRef(null); const [integrationSearch, setIntegrationSearch] = useState(searchParams.get('search') ?? ''); const selectedCategory: Category | null = searchParams.get('category') as Category | null; @@ -100,7 +100,7 @@ export const OnboardingFlowForm: FunctionComponent = () => { } const timeout = setTimeout(() => { - customCardsRef.current?.scrollIntoView({ + formRef.current?.scrollIntoView({ behavior: 'smooth', block: 'end', }); @@ -144,7 +144,7 @@ export const OnboardingFlowForm: FunctionComponent = () => { const virtualSearchResults = useVirtualSearchResults(); return ( - + { {options.map((option) => ( - + @@ -197,7 +199,6 @@ export const OnboardingFlowForm: FunctionComponent = () => { {Array.isArray(customCards) && ( ; searchQuery?: string; @@ -48,7 +48,7 @@ type WrapperProps = Props & { const Loading = () => ; const PackageListGridWrapper = ({ - selectedCategory = 'observability', + selectedCategory = ['observability', 'os_system'], useAvailablePackages, showSearchBar = false, packageListRef, @@ -114,12 +114,13 @@ const PackageListGridWrapper = ({ showSearchTools={false} // we either don't need these properties (yet) or handle them upstream, but // they are marked as required in the original API. - selectedCategory={selectedCategory} + selectedCategory="" setSearchTerm={() => {}} setCategory={() => {}} categories={[]} setUrlandReplaceHistory={() => {}} setUrlandPushHistory={() => {}} + showCardLabels={false} /> )}

    diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.test.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.test.ts index 076f4585e2667..cb86eebf8bb5a 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.test.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.test.ts @@ -13,30 +13,30 @@ describe('useIntegratrionCardList', () => { expect(toOnboardingPath({})).toBeNull(); }); it('returns just the `basePath` if no category or search is defined', () => { - expect(toOnboardingPath({ basePath: '' })).toBe('/app/experimental-onboarding'); + expect(toOnboardingPath({ basePath: '' })).toBe('/app/observabilityOnboarding'); expect(toOnboardingPath({ basePath: '/s/custom_space_name' })).toBe( - '/s/custom_space_name/app/experimental-onboarding' + '/s/custom_space_name/app/observabilityOnboarding' ); }); it('includes category in the URL', () => { expect(toOnboardingPath({ basePath: '/s/custom_space_name', category: 'logs' })).toBe( - '/s/custom_space_name/app/experimental-onboarding?category=logs' + '/s/custom_space_name/app/observabilityOnboarding?category=logs' ); expect(toOnboardingPath({ basePath: '', category: 'infra' })).toBe( - '/app/experimental-onboarding?category=infra' + '/app/observabilityOnboarding?category=infra' ); }); it('includes search in the URL', () => { expect(toOnboardingPath({ basePath: '/s/custom_space_name', search: 'search' })).toBe( - '/s/custom_space_name/app/experimental-onboarding?search=search' + '/s/custom_space_name/app/observabilityOnboarding?search=search' ); }); it('includes category and search in the URL', () => { expect( toOnboardingPath({ basePath: '/s/custom_space_name', category: 'logs', search: 'search' }) - ).toBe('/s/custom_space_name/app/experimental-onboarding?category=logs&search=search'); + ).toBe('/s/custom_space_name/app/observabilityOnboarding?category=logs&search=search'); expect(toOnboardingPath({ basePath: '', category: 'infra', search: 'search' })).toBe( - '/app/experimental-onboarding?category=infra&search=search' + '/app/observabilityOnboarding?category=infra&search=search' ); }); }); @@ -45,10 +45,10 @@ describe('useIntegratrionCardList', () => { expect( addPathParamToUrl( '/app/integrations?query-1', - '/app/experimental-onboarding?search=aws&category=infra' + '/app/observabilityOnboarding?search=aws&category=infra' ) ).toBe( - '/app/integrations?query-1&observabilityOnboardingLink=%2Fapp%2Fexperimental-onboarding%3Fsearch%3Daws%26category%3Dinfra' + '/app/integrations?query-1&observabilityOnboardingLink=%2Fapp%2FobservabilityOnboarding%3Fsearch%3Daws%26category%3Dinfra' ); }); it('adds the onboarding link to url without existing params', () => { diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.ts index 9532826cd96e7..baf6bf9dd46d0 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/use_integration_card_list.ts @@ -9,7 +9,6 @@ import { useMemo } from 'react'; import { IntegrationCardItem } from '@kbn/fleet-plugin/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { CustomCard } from './types'; -import { EXPERIMENTAL_ONBOARDING_APP_ROUTE } from '../../common'; import { toCustomCard } from './utils'; export function toOnboardingPath({ @@ -22,7 +21,7 @@ export function toOnboardingPath({ search?: string; }): string | null { if (typeof basePath !== 'string' && !basePath) return null; - const path = `${basePath}${EXPERIMENTAL_ONBOARDING_APP_ROUTE}`; + const path = `${basePath}/app/observabilityOnboarding`; if (!category && !search) return path; const params = new URLSearchParams(); if (category) params.append('category', category); @@ -80,12 +79,12 @@ function formatCustomCards( function useFilteredCards( rewriteUrl: (card: IntegrationCardItem) => IntegrationCardItem, integrationsList: IntegrationCardItem[], - selectedCategory: string, + selectedCategory: string[], customCards?: CustomCard[] ) { return useMemo(() => { const integrationCards = integrationsList - .filter((card) => card.categories.includes(selectedCategory)) + .filter((card) => card.categories.some((category) => selectedCategory.includes(category))) .map(rewriteUrl) .map(toCustomCard); @@ -113,7 +112,7 @@ function useFilteredCards( */ export function useIntegrationCardList( integrationsList: IntegrationCardItem[], - selectedCategory = 'observability', + selectedCategory: string[], customCards?: CustomCard[], flowCategory?: string | null, flowSearch?: string, diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/utils.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/utils.ts index 08f8e2654d52f..52e9a0f09c807 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/utils.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/packages_list/utils.ts @@ -12,7 +12,6 @@ export const QUICKSTART_FLOWS = ['system-logs-virtual']; export const toCustomCard = (card: IntegrationCardItem) => ({ ...card, isQuickstart: QUICKSTART_FLOWS.includes(card.name), - showCardLabels: false, }); export const isQuickstart = (cardName: string) => QUICKSTART_FLOWS.includes(cardName); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts index fd17f18085331..acaa03b1b1187 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts @@ -27,7 +27,6 @@ import { ObservabilityOnboardingLocatorDefinition } from './locators/onboarding_ import { ObservabilityOnboardingPluginLocators } from './locators'; import { ConfigSchema } from '.'; import { OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT } from '../common/telemetry_events'; -import { EXPERIMENTAL_ONBOARDING_APP_ROUTE } from './common'; export type ObservabilityOnboardingPluginSetup = void; export type ObservabilityOnboardingPluginStart = void; @@ -90,60 +89,17 @@ export class ObservabilityOnboardingPlugin createCallApi(core); - const experimentalOnboardingFlowEnabled = - isServerless && - !!(await ( - corePlugins as ObservabilityOnboardingPluginStartDeps - ).cloudExperiments?.getVariation( - 'observability_onboarding.experimental_onboarding_flow_enabled', - false - )); - return renderApp({ core: coreStart, deps: pluginSetupDeps, appMountParameters, - experimentalOnboardingFlowEnabled, + experimentalOnboardingFlowEnabled: isServerless, corePlugins: corePlugins as ObservabilityOnboardingPluginStartDeps, config, }); }, visibleIn: [], }); - - // Register the experimental version of the onboarding app on a dedicated path `/app/experimental-onboarding` for testing - if (isServerless) { - core.application.register({ - id: `${PLUGIN_ID}_EXPERIMENTAL`, - title: 'Observability Onboarding (Beta)', - appRoute: EXPERIMENTAL_ONBOARDING_APP_ROUTE, - order: 8500, - euiIconType: 'logoObservability', - category: DEFAULT_APP_CATEGORIES.observability, - keywords: [], - async mount(appMountParameters: AppMountParameters) { - // Load application bundle and Get start service - const [{ renderApp }, [coreStart, corePlugins]] = await Promise.all([ - import('./application/app'), - core.getStartServices(), - ]); - - const { createCallApi } = await import('./services/rest/create_call_api'); - - createCallApi(core); - - return renderApp({ - core: coreStart, - deps: pluginSetupDeps, - appMountParameters, - experimentalOnboardingFlowEnabled: true, - corePlugins: corePlugins as ObservabilityOnboardingPluginStartDeps, - config, - }); - }, - visibleIn: [], - }); - } } this.locators = { diff --git a/x-pack/plugins/observability_solution/profiling/common/frame_type_colors.ts b/x-pack/plugins/observability_solution/profiling/common/frame_type_colors.ts index a2827f307feb1..95de74b32ab96 100644 --- a/x-pack/plugins/observability_solution/profiling/common/frame_type_colors.ts +++ b/x-pack/plugins/observability_solution/profiling/common/frame_type_colors.ts @@ -39,6 +39,7 @@ export const FRAME_TYPE_COLOR_MAP = { [FrameType.Perl]: [0xf98bb9, 0xfaa2c7, 0xfbb9d5, 0xfdd1e3], [FrameType.JavaScript]: [0xcbc3e3, 0xd5cfe8, 0xdfdbee, 0xeae7f3], [FrameType.PHPJIT]: [0xccfc82, 0xd1fc8e, 0xd6fc9b, 0xdbfca7], + [FrameType.DotNET]: [0x7014eb, 0x7e2ced, 0x8d43ef, 0x9b5bf1], [FrameType.ErrorFlag]: [0x0, 0x0, 0x0, 0x0], // This is a special case, it's not a real frame type [FrameType.Error]: [0xfd8484, 0xfd9d9d, 0xfeb5b5, 0xfecece], }; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/index.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/locators/index.ts index c96858d1cc9da..4e09cc7bc2977 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/index.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/locators/index.ts @@ -6,13 +6,11 @@ */ import { LocatorPublic } from '@kbn/share-plugin/public'; import { SerializableRecord } from '@kbn/utility-types'; -import { uptimeOverviewNavigatorParams } from './overview'; import { monitorDetailNavigatorParams } from './monitor_detail'; import { editMonitorNavigatorParams } from './edit_monitor'; import { syntheticsSettingsNavigatorParams } from './settings'; export const locators: Array, 'id' | 'getLocation'>> = [ - uptimeOverviewNavigatorParams, monitorDetailNavigatorParams, editMonitorNavigatorParams, syntheticsSettingsNavigatorParams, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.ts deleted file mode 100644 index 785668d8e8c74..0000000000000 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.ts +++ /dev/null @@ -1,50 +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 { uptimeOverviewLocatorID } from '@kbn/observability-plugin/public'; -import { OVERVIEW_ROUTE } from '../../../common/constants/ui'; - -const formatSearchKey = (key: string, value: string) => `${key}: "${value}"`; - -async function navigate({ - ip, - host, - container, - pod, -}: { - ip?: string; - host?: string; - container?: string; - pod?: string; -}) { - const searchParams: string[] = []; - - if (host) searchParams.push(formatSearchKey('host.name', host)); - if (container) searchParams.push(formatSearchKey('container.id', container)); - if (pod) searchParams.push(formatSearchKey('kubernetes.pod.uid', pod)); - - if (ip) { - searchParams.push(formatSearchKey(`host.ip`, ip)); - searchParams.push(formatSearchKey(`monitor.ip`, ip)); - } - - const searchString = searchParams.join(' OR '); - - const path = - searchParams.length === 0 ? OVERVIEW_ROUTE : OVERVIEW_ROUTE + `?search=${searchString}`; - - return { - app: 'uptime', - path, - state: {}, - }; -} - -export const uptimeOverviewNavigatorParams = { - id: uptimeOverviewLocatorID, - getLocation: navigate, -}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.test.ts b/x-pack/plugins/observability_solution/uptime/public/locators/overview.test.ts similarity index 62% rename from x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.test.ts rename to x-pack/plugins/observability_solution/uptime/public/locators/overview.test.ts index a8ca60077bdf6..6487fd052e450 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/locators/overview.test.ts +++ b/x-pack/plugins/observability_solution/uptime/public/locators/overview.test.ts @@ -5,34 +5,36 @@ * 2.0. */ -import { OVERVIEW_ROUTE } from '../../../common/constants'; -import { uptimeOverviewNavigatorParams } from './overview'; +import { OVERVIEW_ROUTE } from '../../common/constants'; +import { UptimeOverviewLocatorDefinition } from './overview'; describe('uptimeOverviewNavigatorParams', () => { + const uptimeOverviewNavigator = new UptimeOverviewLocatorDefinition(); + it('supplies the correct app name', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({}); + const location = await uptimeOverviewNavigator.getLocation({}); expect(location.app).toEqual('uptime'); }); it('creates the expected path when no params specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({}); + const location = await uptimeOverviewNavigator.getLocation({}); expect(location.path).toEqual(OVERVIEW_ROUTE); }); it('creates a path with expected search when ip is specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({ ip: '127.0.0.1' }); + const location = await uptimeOverviewNavigator.getLocation({ ip: '127.0.0.1' }); expect(location.path).toEqual( `${OVERVIEW_ROUTE}?search=host.ip: "127.0.0.1" OR monitor.ip: "127.0.0.1"` ); }); it('creates a path with expected search when hostname is specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({ host: 'elastic.co' }); + const location = await uptimeOverviewNavigator.getLocation({ host: 'elastic.co' }); expect(location.path).toEqual(`${OVERVIEW_ROUTE}?search=host.name: "elastic.co"`); }); it('creates a path with expected search when multiple host keys are specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({ + const location = await uptimeOverviewNavigator.getLocation({ host: 'elastic.co', ip: '127.0.0.1', }); @@ -42,7 +44,7 @@ describe('uptimeOverviewNavigatorParams', () => { }); it('creates a path with expected search when multiple kubernetes pod is specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({ + const location = await uptimeOverviewNavigator.getLocation({ pod: 'foo', ip: '10.0.0.1', }); @@ -52,9 +54,20 @@ describe('uptimeOverviewNavigatorParams', () => { }); it('creates a path with expected search when docker container is specified', async () => { - const location = await uptimeOverviewNavigatorParams.getLocation({ + const location = await uptimeOverviewNavigator.getLocation({ container: 'foo', }); expect(location.path).toEqual(`${OVERVIEW_ROUTE}?search=container.id: "foo"`); }); + + it('creates a path with expected search and date range', async () => { + const location = await uptimeOverviewNavigator.getLocation({ + search: 'foo', + dateRangeStart: 'now-15m', + dateRangeEnd: 'now', + }); + expect(location.path).toEqual( + `${OVERVIEW_ROUTE}?search=foo&dateRangeStart=now-15m&dateRangeEnd=now` + ); + }); }); diff --git a/x-pack/plugins/observability_solution/uptime/public/locators/overview.ts b/x-pack/plugins/observability_solution/uptime/public/locators/overview.ts new file mode 100644 index 0000000000000..15a1c52406eb1 --- /dev/null +++ b/x-pack/plugins/observability_solution/uptime/public/locators/overview.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 { uptimeOverviewLocatorID } from '@kbn/observability-plugin/public'; +import type { LocatorDefinition } from '@kbn/share-plugin/common'; +import type { SerializableRecord } from '@kbn/utility-types'; +import { OVERVIEW_ROUTE } from '../../common/constants'; + +const formatSearchKey = (key: string, value: string) => `${key}: "${value}"`; + +export interface UptimeOverviewLocatorInfraParams extends SerializableRecord { + ip?: string; + host?: string; + container?: string; + pod?: string; +} + +export interface UptimeOverviewLocatorParams extends SerializableRecord { + dateRangeStart?: string; + dateRangeEnd?: string; + search?: string; +} + +function isUptimeOverviewLocatorParams( + args: UptimeOverviewLocatorInfraParams | UptimeOverviewLocatorParams +): args is UptimeOverviewLocatorParams { + return ( + (args as UptimeOverviewLocatorParams).search !== undefined || + (args as UptimeOverviewLocatorParams).dateRangeEnd !== undefined || + (args as UptimeOverviewLocatorParams).dateRangeStart !== undefined + ); +} + +export class UptimeOverviewLocatorDefinition + implements LocatorDefinition +{ + public readonly id = uptimeOverviewLocatorID; + + public readonly getLocation = async ( + params: UptimeOverviewLocatorInfraParams | UptimeOverviewLocatorParams + ) => { + let qs = ''; + + if (isUptimeOverviewLocatorParams(params)) { + qs = Object.entries(params) + .map(([key, value]) => { + if (value) { + return `${key}=${value}`; + } + }) + .join('&'); + } else { + const searchParams: string[] = []; + if (params.host) searchParams.push(formatSearchKey('host.name', params.host)); + if (params.container) searchParams.push(formatSearchKey('container.id', params.container)); + if (params.pod) searchParams.push(formatSearchKey('kubernetes.pod.uid', params.pod)); + if (params.ip) { + searchParams.push(formatSearchKey(`host.ip`, params.ip)); + searchParams.push(formatSearchKey(`monitor.ip`, params.ip)); + } + if (searchParams.length > 0) { + qs = `search=${searchParams.join(' OR ')}`; + } + } + + const path = `${OVERVIEW_ROUTE}${qs ? `?${qs}` : ''}`; + + return { + app: 'uptime', + path, + state: {}, + }; + }; +} diff --git a/x-pack/plugins/observability_solution/uptime/public/plugin.ts b/x-pack/plugins/observability_solution/uptime/public/plugin.ts index a94fdcad3ba78..1e0c967d0ef27 100644 --- a/x-pack/plugins/observability_solution/uptime/public/plugin.ts +++ b/x-pack/plugins/observability_solution/uptime/public/plugin.ts @@ -241,6 +241,9 @@ export class UptimePlugin function registerUptimeRoutesWithNavigation(coreStart: CoreStart, plugins: ClientPluginsStart) { async function getUptimeSections() { if (coreStart.application.capabilities.uptime?.show) { + const { UptimeOverviewLocatorDefinition } = await import('./locators/overview'); + plugins.share.url.locators.create(new UptimeOverviewLocatorDefinition()); + return [ { label: 'Uptime', diff --git a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts index 07041a3c8f008..528de02bb4ea5 100644 --- a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts +++ b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts @@ -103,7 +103,7 @@ export const initUptimeServer = ( }, response: { 200: { - body: DynamicSettingsSchema, + body: () => DynamicSettingsSchema, }, }, }, @@ -129,7 +129,7 @@ export const initUptimeServer = ( }, response: { 200: { - body: DynamicSettingsSchema, + body: () => DynamicSettingsSchema, }, }, }, diff --git a/x-pack/plugins/observability_solution/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx b/x-pack/plugins/observability_solution/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx index efb0477219440..f8e5cadec2d23 100644 --- a/x-pack/plugins/observability_solution/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx +++ b/x-pack/plugins/observability_solution/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx @@ -6,11 +6,11 @@ */ import React, { useCallback, useMemo, useState } from 'react'; +import { i18n } from '@kbn/i18n'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { CountIndexPatternColumn, PersistedIndexPatternLayer, - PieVisualizationState, TermsIndexPatternColumn, TypedLensByValueInput, } from '@kbn/lens-plugin/public'; @@ -77,7 +77,13 @@ export function VisitorBreakdownChart({ ); if (!LensEmbeddableComponent) { - return No lens component; + return ( + + {i18n.translate('xpack.ux.visitorBreakdownChart.noLensComponentTextLabel', { + defaultMessage: 'No lens component', + })} + + ); } return ( @@ -97,7 +103,7 @@ export function VisitorBreakdownChart({ ); } -const visConfig: PieVisualizationState = { +const visConfig = { layers: [ { layerId: 'layer1', diff --git a/x-pack/plugins/search_connectors/common/constants.ts b/x-pack/plugins/search_connectors/common/constants.ts index 1fc64f6837e1d..ce2ac89a40d33 100644 --- a/x-pack/plugins/search_connectors/common/constants.ts +++ b/x-pack/plugins/search_connectors/common/constants.ts @@ -8,7 +8,9 @@ import { ConnectorClientSideDefinition } from './types'; import { docLinks } from './doc_links'; -export const CONNECTORS_DICT: Record = { +// needs to be a function because, docLinks are only populated with actual +// documentation links in browser after SearchConnectorsPlugin starts +export const getConnectorsDict = (): Record => ({ azure_blob_storage: { docsUrl: docLinks.connectorsAzureBlobStorage, externalAuthDocsUrl: 'https://learn.microsoft.com/azure/storage/common/authorize-data-access', @@ -177,4 +179,4 @@ export const CONNECTORS_DICT: Record = { externalDocsUrl: '', platinumOnly: true, }, -}; +}); diff --git a/x-pack/plugins/search_connectors/common/lib/connector_types.ts b/x-pack/plugins/search_connectors/common/lib/connector_types.ts index d068ca868edbd..4924d561c102f 100644 --- a/x-pack/plugins/search_connectors/common/lib/connector_types.ts +++ b/x-pack/plugins/search_connectors/common/lib/connector_types.ts @@ -7,7 +7,8 @@ import { IStaticAssets } from '@kbn/core-http-browser'; import { ConnectorServerSideDefinition, CONNECTOR_DEFINITIONS } from '../connectors'; -import { CONNECTORS_DICT } from '../constants'; +import { getConnectorsDict } from '../constants'; + import { ConnectorDefinition } from '../types'; // used on server and in browser before plugin start when we don't have docLinks yet @@ -22,6 +23,8 @@ export function getConnectorTypes(staticAssets: IStaticAssets): ConnectorServerS // used in browser after pluginStart, when docLinks has been populated export function getConnectorFullTypes(staticAssets: IStaticAssets): ConnectorDefinition[] { + const CONNECTORS_DICT = getConnectorsDict(); + const CONNECTORS = CONNECTOR_DEFINITIONS.map((connector) => ({ ...connector, ...(connector.serviceType && CONNECTORS_DICT[connector.serviceType] diff --git a/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts b/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts index 471d02ee9a468..d1bde7eaf53a5 100644 --- a/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts +++ b/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts @@ -14,6 +14,7 @@ const createStartMock = (): Start => { PlaygroundProvider: jest.fn(), PlaygroundToolbar: jest.fn(), Playground: jest.fn(), + PlaygroundHeaderDocs: jest.fn(), }; return startContract; diff --git a/x-pack/plugins/search_playground/common/doc_links.ts b/x-pack/plugins/search_playground/common/doc_links.ts new file mode 100644 index 0000000000000..6e499dd205b7b --- /dev/null +++ b/x-pack/plugins/search_playground/common/doc_links.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DocLinks } from '@kbn/doc-links'; + +class PlaygroundDocLinks { + public chatPlayground: string = ''; + + constructor() {} + + setDocLinks(newDocLinks: DocLinks) { + this.chatPlayground = newDocLinks.playground.chatPlayground; + } +} + +export const docLinks = new PlaygroundDocLinks(); diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container_lazy.tsx b/x-pack/plugins/search_playground/common/is_not_nullish.ts similarity index 61% rename from x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container_lazy.tsx rename to x-pack/plugins/search_playground/common/is_not_nullish.ts index 0a69aaf2c2deb..d492dad5d52c2 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/embeddable_single_metric_viewer_container_lazy.tsx +++ b/x-pack/plugins/search_playground/common/is_not_nullish.ts @@ -5,8 +5,6 @@ * 2.0. */ -import React from 'react'; - -export const EmbeddableSingleMetricViewerContainer = React.lazy( - () => import('./embeddable_single_metric_viewer_container') -); +export function isNotNullish(value: T | null | undefined): value is T { + return value !== null && value !== undefined; +} diff --git a/x-pack/plugins/search_playground/common/types.ts b/x-pack/plugins/search_playground/common/types.ts index 58d6e07518fd7..d2279633423ad 100644 --- a/x-pack/plugins/search_playground/common/types.ts +++ b/x-pack/plugins/search_playground/common/types.ts @@ -25,6 +25,7 @@ export enum APIRoutes { POST_API_KEY = '/internal/search_playground/api_key', POST_CHAT_MESSAGE = '/internal/search_playground/chat', POST_QUERY_SOURCE_FIELDS = '/internal/search_playground/query_source_fields', + GET_INDICES = '/internal/search_playground/indices', } export enum LLMs { @@ -43,3 +44,9 @@ export interface ChatRequestData { source_fields: string; doc_size: number; } + +export interface SearchPlaygroundConfigType { + ui: { + enabled: boolean; + }; +} diff --git a/x-pack/plugins/search_playground/kibana.jsonc b/x-pack/plugins/search_playground/kibana.jsonc index a76967f25ea93..07c5866b34029 100644 --- a/x-pack/plugins/search_playground/kibana.jsonc +++ b/x-pack/plugins/search_playground/kibana.jsonc @@ -14,6 +14,7 @@ "actions", "encryptedSavedObjects", "navigation", + "share", "security", "stackConnectors", "triggersActionsUi", diff --git a/x-pack/plugins/search_playground/public/application.tsx b/x-pack/plugins/search_playground/public/application.tsx index ef132487a493b..4073c8c70601c 100644 --- a/x-pack/plugins/search_playground/public/application.tsx +++ b/x-pack/plugins/search_playground/public/application.tsx @@ -7,53 +7,26 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { CoreStart, AppMountParameters } from '@kbn/core/public'; +import { CoreStart } from '@kbn/core/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { I18nProvider } from '@kbn/i18n-react'; -import { BrowserRouter as Router } from '@kbn/shared-ux-router'; -import { i18n } from '@kbn/i18n'; -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; -import { PLUGIN_ID } from '../common'; +import { Router } from '@kbn/shared-ux-router'; import { AppPluginStartDependencies } from './types'; -import { App } from './components/app'; -import { PlaygroundProvider } from './providers/playground_provider'; -export const renderApp = ( +export const renderApp = async ( core: CoreStart, services: AppPluginStartDependencies, - { appBasePath, element }: AppMountParameters + element: HTMLElement ) => { - const navigation = services.navigation; + const { PlaygroundRouter } = await import('./playground_router'); ReactDOM.render( - - - - - - - + + diff --git a/x-pack/plugins/search_playground/public/chat_playground_overview.tsx b/x-pack/plugins/search_playground/public/chat_playground_overview.tsx new file mode 100644 index 0000000000000..98d608565f8ca --- /dev/null +++ b/x-pack/plugins/search_playground/public/chat_playground_overview.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 { i18n } from '@kbn/i18n'; +import React from 'react'; +import { EuiPageTemplate } from '@elastic/eui'; +import { PlaygroundProvider } from './providers/playground_provider'; + +import { App } from './components/app'; +import { PlaygroundToolbar } from './embeddable'; +import { PlaygroundHeaderDocs } from './components/playground_header_docs'; + +export const ChatPlaygroundOverview: React.FC = () => { + return ( + + + , ]} + /> + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/playground_header_docs.tsx b/x-pack/plugins/search_playground/public/components/playground_header_docs.tsx new file mode 100644 index 0000000000000..fe1f715a29f99 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/playground_header_docs.tsx @@ -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 React from 'react'; + +import { EuiButtonEmpty } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { docLinks } from '../../common/doc_links'; + +export const PlaygroundHeaderDocs: React.FC = () => ( + + {i18n.translate('xpack.searchPlayground.pageTitle.header.docLink', { + defaultMessage: 'Playground Docs', + })} + +); diff --git a/x-pack/plugins/search_playground/public/embeddable.tsx b/x-pack/plugins/search_playground/public/embeddable.tsx index ce8d92b92421d..f21c0c0f667eb 100644 --- a/x-pack/plugins/search_playground/public/embeddable.tsx +++ b/x-pack/plugins/search_playground/public/embeddable.tsx @@ -23,6 +23,10 @@ export const PlaygroundProvider = dynamic(async () => ({ default: (await import('./providers/playground_provider')).PlaygroundProvider, })); +export const PlaygroundHeaderDocs = dynamic(async () => ({ + default: (await import('./components/playground_header_docs')).PlaygroundHeaderDocs, +})); + export const getPlaygroundProvider = (core: CoreStart, services: AppPluginStartDependencies) => (props: React.ComponentProps) => diff --git a/x-pack/plugins/search_playground/public/hooks/use_management_link.ts b/x-pack/plugins/search_playground/public/hooks/use_management_link.ts index 025472719b75f..b13a62078350a 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_management_link.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_management_link.ts @@ -14,7 +14,7 @@ export const useManagementLink = (connectorId: string) => { } = useKibana(); const managementLocator = useMemo( () => share.url.locators.get('MANAGEMENT_APP_LOCATOR'), - [share] + [share.url.locators] ); const [managementLink, setManagementLink] = useState(''); useEffect(() => { diff --git a/x-pack/plugins/search_playground/public/hooks/use_query_indices.test.ts b/x-pack/plugins/search_playground/public/hooks/use_query_indices.test.ts new file mode 100644 index 0000000000000..f94bccba2bcbd --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_query_indices.test.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 { renderHook } from '@testing-library/react-hooks'; +import { useQueryIndices } from './use_query_indices'; + +jest.mock('./use_kibana', () => ({ + useKibana: jest.fn().mockReturnValue({ + services: { + services: { + http: {}, + }, + }, + }), +})); + +jest.mock('./use_query_indices', () => ({ + useQueryIndices: jest.fn(), +})); + +describe('useQueryIndices Hook', () => { + afterEach(jest.clearAllMocks); + + it('successfully loads indices', async () => { + const mockUseQueryIndices = (data: string[]) => { + (useQueryIndices as jest.Mock).mockReturnValue({ indices: data, isLoading: false }); + }; + const mockIndices = ['index-1', 'index-2']; + mockUseQueryIndices(mockIndices); + + const { result } = renderHook(() => useQueryIndices()); + expect(result.current).toEqual({ indices: ['index-1', 'index-2'], isLoading: false }); + }); +}); diff --git a/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts b/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts index a5806c1412f28..6740928ac903c 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts @@ -8,7 +8,7 @@ import { useQuery } from '@tanstack/react-query'; import { IndexName } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useKibana } from './use_kibana'; -import { ElasticsearchIndex } from '../types'; +import { APIRoutes } from '../types'; export const useQueryIndices = ( query: string = '' @@ -19,18 +19,15 @@ export const useQueryIndices = ( queryKey: ['indices', query], queryFn: async () => { const response = await services.http.get<{ - indices: ElasticsearchIndex[]; - }>('/internal/enterprise_search/indices', { + indices: string[]; + }>(APIRoutes.GET_INDICES, { query: { - from: 0, - only_show_search_optimized_indices: false, - return_hidden_indices: false, search_query: query, - size: 20, + size: 10, }, }); - return response.indices.map((index) => index.name); + return response.indices; }, }); diff --git a/x-pack/plugins/search_playground/public/index.ts b/x-pack/plugins/search_playground/public/index.ts index b7fc5397bf51e..c6d31b75b07fe 100644 --- a/x-pack/plugins/search_playground/public/index.ts +++ b/x-pack/plugins/search_playground/public/index.ts @@ -5,10 +5,12 @@ * 2.0. */ +import { PluginInitializerContext } from '@kbn/core/public'; + import { SearchPlaygroundPlugin } from './plugin'; -export function plugin() { - return new SearchPlaygroundPlugin(); +export function plugin(initializerContext: PluginInitializerContext) { + return new SearchPlaygroundPlugin(initializerContext); } export type { SearchPlaygroundPluginSetup, SearchPlaygroundPluginStart } from './types'; diff --git a/x-pack/plugins/search_playground/public/playground_router.tsx b/x-pack/plugins/search_playground/public/playground_router.tsx new file mode 100644 index 0000000000000..b32232dcd80cd --- /dev/null +++ b/x-pack/plugins/search_playground/public/playground_router.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 { Route, Routes } from '@kbn/shared-ux-router'; +import React from 'react'; +import { Redirect } from 'react-router-dom'; +import { ChatPlaygroundOverview } from './chat_playground_overview'; + +import { ROOT_PATH, SEARCH_PLAYGROUND_CHAT_PATH } from './routes'; + +export const PlaygroundRouter: React.FC = () => { + return ( + + + + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/plugin.ts b/x-pack/plugins/search_playground/public/plugin.ts index 1b71fcdbad017..bb8403366a6ed 100644 --- a/x-pack/plugins/search_playground/public/plugin.ts +++ b/x-pack/plugins/search_playground/public/plugin.ts @@ -5,11 +5,20 @@ * 2.0. */ -import { CoreSetup, Plugin, CoreStart, AppMountParameters } from '@kbn/core/public'; +import { + CoreSetup, + Plugin, + CoreStart, + AppMountParameters, + PluginInitializerContext, +} from '@kbn/core/public'; import { PLUGIN_ID, PLUGIN_NAME } from '../common'; +import { docLinks } from '../common/doc_links'; +import { PlaygroundHeaderDocs } from './components/playground_header_docs'; import { PlaygroundToolbar, Playground, getPlaygroundProvider } from './embeddable'; import { AppPluginStartDependencies, + SearchPlaygroundConfigType, SearchPlaygroundPluginSetup, SearchPlaygroundPluginStart, } from './types'; @@ -17,27 +26,43 @@ import { export class SearchPlaygroundPlugin implements Plugin { - public setup(core: CoreSetup): SearchPlaygroundPluginSetup { - return {}; + private config: SearchPlaygroundConfigType; + + constructor(initializerContext: PluginInitializerContext) { + this.config = initializerContext.config.get(); + } + + public setup( + core: CoreSetup + ): SearchPlaygroundPluginSetup { + if (!this.config.ui?.enabled) return {}; core.application.register({ id: PLUGIN_ID, appRoute: '/app/search_playground', title: PLUGIN_NAME, - async mount(params: AppMountParameters) { + async mount({ element, history }: AppMountParameters) { const { renderApp } = await import('./application'); const [coreStart, depsStart] = await core.getStartServices(); + const startDeps: AppPluginStartDependencies = { + ...depsStart, + history, + }; - return renderApp(coreStart, depsStart as AppPluginStartDependencies, params); + return renderApp(coreStart, startDeps, element); }, }); + + return {}; } public start(core: CoreStart, deps: AppPluginStartDependencies): SearchPlaygroundPluginStart { + docLinks.setDocLinks(core.docLinks.links); return { PlaygroundProvider: getPlaygroundProvider(core, deps), PlaygroundToolbar, Playground, + PlaygroundHeaderDocs, }; } diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/index.ts b/x-pack/plugins/search_playground/public/routes.ts similarity index 73% rename from x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/index.ts rename to x-pack/plugins/search_playground/public/routes.ts index 78f7d3ac35c50..afb279ed15bb3 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/flyout_detail/index.ts +++ b/x-pack/plugins/search_playground/public/routes.ts @@ -5,4 +5,5 @@ * 2.0. */ -export * from './flyout_detail'; +export const ROOT_PATH = '/'; +export const SEARCH_PLAYGROUND_CHAT_PATH = `${ROOT_PATH}chat`; diff --git a/x-pack/plugins/search_playground/public/types.ts b/x-pack/plugins/search_playground/public/types.ts index f3079bc56bb06..72e13feaa696c 100644 --- a/x-pack/plugins/search_playground/public/types.ts +++ b/x-pack/plugins/search_playground/public/types.ts @@ -19,10 +19,12 @@ import React, { ComponentType } from 'react'; import { SharePluginStart } from '@kbn/share-plugin/public'; import { CloudSetup } from '@kbn/cloud-plugin/public'; import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import { AppMountParameters } from '@kbn/core/public'; import { ChatRequestData } from '../common/types'; import type { App } from './components/app'; import type { PlaygroundProvider as PlaygroundProviderComponent } from './providers/playground_provider'; import type { Toolbar } from './components/toolbar'; +import { PlaygroundHeaderDocs } from './components/playground_header_docs'; export * from '../common/types'; @@ -32,11 +34,14 @@ export interface SearchPlaygroundPluginStart { PlaygroundProvider: React.FC>; PlaygroundToolbar: React.FC>; Playground: React.FC>; + PlaygroundHeaderDocs: React.FC>; } export interface AppPluginStartDependencies { + history: AppMountParameters['history']; navigation: NavigationPublicPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + share: SharePluginStart; } export interface AppServicesContext { diff --git a/x-pack/plugins/search_playground/server/config.ts b/x-pack/plugins/search_playground/server/config.ts new file mode 100644 index 0000000000000..083c7ff14f5ea --- /dev/null +++ b/x-pack/plugins/search_playground/server/config.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema, TypeOf } from '@kbn/config-schema'; +import { PluginConfigDescriptor } from '@kbn/core/server'; + +export * from './types'; + +const configSchema = schema.object({ + enabled: schema.boolean({ defaultValue: true }), + ui: schema.object({ + enabled: schema.boolean({ defaultValue: false }), + }), +}); + +export type SearchPlaygroundConfig = TypeOf; + +export const config: PluginConfigDescriptor = { + exposeToBrowser: { + ui: true, + }, + schema: configSchema, +}; diff --git a/x-pack/plugins/search_playground/server/index.ts b/x-pack/plugins/search_playground/server/index.ts index b47f80abe4854..0ee64ebd541ae 100644 --- a/x-pack/plugins/search_playground/server/index.ts +++ b/x-pack/plugins/search_playground/server/index.ts @@ -7,6 +7,8 @@ import { PluginInitializerContext } from '@kbn/core/server'; +export { config } from './config'; + export async function plugin(initializerContext: PluginInitializerContext) { const { SearchPlaygroundPlugin } = await import('./plugin'); return new SearchPlaygroundPlugin(initializerContext); diff --git a/x-pack/plugins/search_playground/server/utils/conversational_chain.test.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts similarity index 98% rename from x-pack/plugins/search_playground/server/utils/conversational_chain.test.ts rename to x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts index e5175cac252f0..bb65f55928bcd 100644 --- a/x-pack/plugins/search_playground/server/utils/conversational_chain.test.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts @@ -6,7 +6,7 @@ */ import type { Client } from '@elastic/elasticsearch'; -import { createAssist as Assist } from './assist'; +import { createAssist as Assist } from '../utils/assist'; import { ConversationalChain } from './conversational_chain'; import { FakeListLLM } from 'langchain/llms/fake'; import { BaseChatModel } from '@langchain/core/language_models/chat_models'; diff --git a/x-pack/plugins/search_playground/server/utils/conversational_chain.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts similarity index 97% rename from x-pack/plugins/search_playground/server/utils/conversational_chain.ts rename to x-pack/plugins/search_playground/server/lib/conversational_chain.ts index 72e5961b7e8c8..0844fe3b64c42 100644 --- a/x-pack/plugins/search_playground/server/utils/conversational_chain.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts @@ -17,10 +17,10 @@ import { } from 'ai'; import { BaseLanguageModel } from '@langchain/core/language_models/base'; import { ElasticsearchRetriever } from './elasticsearch_retriever'; -import { renderTemplate } from './render_template'; +import { renderTemplate } from '../utils/render_template'; -import { AssistClient } from './assist'; -import { getCitations } from './get_citations'; +import { AssistClient } from '../utils/assist'; +import { getCitations } from '../utils/get_citations'; interface RAGOptions { index: string; diff --git a/x-pack/plugins/search_playground/server/utils/elasticsearch_retriever.ts b/x-pack/plugins/search_playground/server/lib/elasticsearch_retriever.ts similarity index 100% rename from x-pack/plugins/search_playground/server/utils/elasticsearch_retriever.ts rename to x-pack/plugins/search_playground/server/lib/elasticsearch_retriever.ts diff --git a/x-pack/plugins/search_playground/server/lib/fetch_indices.test.ts b/x-pack/plugins/search_playground/server/lib/fetch_indices.test.ts new file mode 100644 index 0000000000000..8613609b38fc4 --- /dev/null +++ b/x-pack/plugins/search_playground/server/lib/fetch_indices.test.ts @@ -0,0 +1,54 @@ +/* + * Copyright 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 } from '@kbn/core/server'; + +import { fetchIndices } from './fetch_indices'; + +describe('fetch indices', () => { + const mockIndexResponse = { + 'index-1': { + aliases: { + 'search-alias-1': {}, + 'search-alias-2': {}, + }, + }, + 'index-2': { + aliases: { + 'search-alias-1': {}, + 'search-alias-2': {}, + }, + }, + 'index-3': { + aliases: { + 'search-alias-1': {}, + 'search-alias-2': {}, + }, + }, + }; + beforeEach(() => { + jest.clearAllMocks(); + }); + const mockClient = { + asCurrentUser: { indices: { get: jest.fn() } }, + }; + + it('returns index data with for non-hidden indices', async () => { + mockClient.asCurrentUser.indices.get.mockImplementationOnce(() => { + return mockIndexResponse; + }); + + const indexData = await fetchIndices( + mockClient.asCurrentUser as unknown as ElasticsearchClient, + undefined + ); + + expect(indexData).toEqual({ + indexNames: ['index-1', 'index-2', 'index-3'], + }); + }); +}); diff --git a/x-pack/plugins/search_playground/server/lib/fetch_indices.ts b/x-pack/plugins/search_playground/server/lib/fetch_indices.ts new file mode 100644 index 0000000000000..953e7a980a6a9 --- /dev/null +++ b/x-pack/plugins/search_playground/server/lib/fetch_indices.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 { IndicesIndexState } from '@elastic/elasticsearch/lib/api/types'; + +import { ElasticsearchClient } from '@kbn/core/server'; + +function isHidden(index: IndicesIndexState): boolean { + return index.settings?.index?.hidden === true || index.settings?.index?.hidden === 'true'; +} +function isClosed(index: IndicesIndexState): boolean { + return ( + index.settings?.index?.verified_before_close === true || + index.settings?.index?.verified_before_close === 'true' + ); +} + +export const fetchIndices = async ( + client: ElasticsearchClient, + searchQuery: string | undefined +): Promise<{ + indexNames: string[]; +}> => { + const indexPattern = searchQuery ? `*${searchQuery}*` : '*'; + const allIndexMatches = await client.indices.get({ + expand_wildcards: ['open'], + // 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 = searchQuery + ? allIndexNames.filter((indexName) => indexName.includes(searchQuery.toLowerCase())) + : allIndexNames; + + return { + indexNames, + }; +}; diff --git a/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.test.ts b/x-pack/plugins/search_playground/server/lib/fetch_query_source_fields.test.ts similarity index 100% rename from x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.test.ts rename to x-pack/plugins/search_playground/server/lib/fetch_query_source_fields.test.ts diff --git a/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.ts b/x-pack/plugins/search_playground/server/lib/fetch_query_source_fields.ts similarity index 100% rename from x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.ts rename to x-pack/plugins/search_playground/server/lib/fetch_query_source_fields.ts diff --git a/x-pack/plugins/search_playground/server/utils/get_chat_params.test.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts similarity index 100% rename from x-pack/plugins/search_playground/server/utils/get_chat_params.test.ts rename to x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts diff --git a/x-pack/plugins/search_playground/server/utils/get_chat_params.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.ts similarity index 100% rename from x-pack/plugins/search_playground/server/utils/get_chat_params.ts rename to x-pack/plugins/search_playground/server/lib/get_chat_params.ts diff --git a/x-pack/plugins/search_playground/server/routes.ts b/x-pack/plugins/search_playground/server/routes.ts index e14e48287d354..12ba2e89c66cd 100644 --- a/x-pack/plugins/search_playground/server/routes.ts +++ b/x-pack/plugins/search_playground/server/routes.ts @@ -9,16 +9,18 @@ import { schema } from '@kbn/config-schema'; import { streamFactory } from '@kbn/ml-response-stream/server'; import type { Logger } from '@kbn/logging'; import { IRouter, StartServicesAccessor } from '@kbn/core/server'; -import { fetchFields } from './utils/fetch_query_source_fields'; +import { fetchFields } from './lib/fetch_query_source_fields'; import { AssistClientOptionsWithClient, createAssist as Assist } from './utils/assist'; -import { ConversationalChain } from './utils/conversational_chain'; +import { ConversationalChain } from './lib/conversational_chain'; import { errorHandler } from './utils/error_handler'; import { APIRoutes, SearchPlaygroundPluginStart, SearchPlaygroundPluginStartDependencies, } from './types'; -import { getChatParams } from './utils/get_chat_params'; +import { getChatParams } from './lib/get_chat_params'; +import { fetchIndices } from './lib/fetch_indices'; +import { isNotNullish } from '../common/is_not_nullish'; export function createRetriever(esQuery: string) { return (question: string) => { @@ -199,4 +201,35 @@ export function defineRoutes({ }); }) ); + + // SECURITY: We don't apply any authorization tags to this route because all actions performed + // on behalf of the user making the request and governed by the user's own cluster privileges. + router.get( + { + path: APIRoutes.GET_INDICES, + validate: { + query: schema.object({ + search_query: schema.maybe(schema.string()), + size: schema.number({ defaultValue: 10, min: 0 }), + }), + }, + }, + errorHandler(async (context, request, response) => { + const { search_query: searchQuery, size } = request.query; + const { + client: { asCurrentUser }, + } = (await context.core).elasticsearch; + + const { indexNames } = await fetchIndices(asCurrentUser, searchQuery); + + const indexNameSlice = indexNames.slice(0, size).filter(isNotNullish); + + return response.ok({ + body: { + indices: indexNameSlice, + }, + headers: { 'content-type': 'application/json' }, + }); + }) + ); } diff --git a/x-pack/plugins/search_playground/tsconfig.json b/x-pack/plugins/search_playground/tsconfig.json index c4cfb17e28870..7a7ee54279017 100644 --- a/x-pack/plugins/search_playground/tsconfig.json +++ b/x-pack/plugins/search_playground/tsconfig.json @@ -34,7 +34,8 @@ "@kbn/triggers-actions-ui-plugin", "@kbn/elastic-assistant-common", "@kbn/logging", - "@kbn/react-kibana-context-render" + "@kbn/react-kibana-context-render", + "@kbn/doc-links" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_key_flyout.tsx b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_key_flyout.tsx index 65a2f588a7591..a7918c9dc8d58 100644 --- a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_key_flyout.tsx +++ b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_key_flyout.tsx @@ -137,6 +137,29 @@ const defaultInitialValues: ApiKeyFormValues = { role_descriptors: '{}', }; +const READ_ONLY_BOILERPLATE = `{ + "read-only-role": { + "cluster": [], + "indices": [ + { + "names": ["*"], + "privileges": ["read"] + } + ] + } +}`; +const WRITE_ONLY_BOILERPLATE = `{ + "write-only-role": { + "cluster": [], + "indices": [ + { + "names": ["*"], + "privileges": ["write"] + } + ] + } +}`; + export const ApiKeyFlyout: FunctionComponent = ({ onSuccess, onCancel, @@ -704,6 +727,57 @@ export const ApiKeyFlyout: FunctionComponent = ({ {formik.values.customPrivileges && ( <> + + + + +

    + {i18n.translate( + 'xpack.security.apiKey.privileges.boilerplate.label', + { + defaultMessage: 'Replace with boilerplate:', + } + )} +

    +
    +
    + + + + formik.setFieldValue('role_descriptors', READ_ONLY_BOILERPLATE) + } + > + {i18n.translate( + 'xpack.security.apiKeys.apiKeyFlyout.roleDescriptors.readOnlyLabel', + { + defaultMessage: 'Read-only', + } + )} + + + + + formik.setFieldValue('role_descriptors', WRITE_ONLY_BOILERPLATE) + } + > + {i18n.translate( + 'xpack.security.management.apiKeys.apiKeyFlyout.roleDescriptors.writeOnlyLabel', + { + defaultMessage: 'Write-only', + } + )} + + +
    +
    { if (!this.userProfileStart) { throw new Error(`userProfileStart is not registered!`); @@ -202,15 +196,8 @@ export class SecurityPlugin this.userProfileService = new UserProfileService( this.initializerContext.logger.get('user-profile') ); - this.userSettingService = new UserSettingService( - this.initializerContext.logger.get('user-settings') - ); this.analyticsService = new AnalyticsService(this.initializerContext.logger.get('analytics')); - - this.userProfileSettingsClient = new UserProfileSettingsClient( - this.initializerContext.logger.get('user-settings-client') - ); } public setup( @@ -238,8 +225,6 @@ export class SecurityPlugin features: depsServices.features, })); - core.userSettings.setUserProfileSettings(this.userProfileSettingsClient); - const { license } = this.securityLicenseService.setup({ license$: licensing.license$, }); @@ -386,8 +371,6 @@ export class SecurityPlugin this.session = session; this.userProfileStart = this.userProfileService.start({ clusterClient, session }); - this.userSettingServiceStart = this.userSettingService.start(this.userProfileStart); - this.userProfileSettingsClient.setUserSettingsServiceStart(this.userSettingServiceStart); // In serverless, we want to redirect users to the list of projects instead of standard "Logged Out" page. const customLogoutURL = diff --git a/x-pack/plugins/security/server/user_profile/user_profile_settings_client.test.ts b/x-pack/plugins/security/server/user_profile/user_profile_settings_client.test.ts deleted file mode 100644 index 46202d5a94ea2..0000000000000 --- a/x-pack/plugins/security/server/user_profile/user_profile_settings_client.test.ts +++ /dev/null @@ -1,46 +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 { loggingSystemMock } from '@kbn/core/server/mocks'; -import type { httpServerMock } from '@kbn/core-http-server-mocks'; -import type { Logger } from '@kbn/logging'; - -import { UserProfileSettingsClient } from './user_profile_settings_client'; -import type { UserSettingServiceStart } from './user_setting_service'; - -describe('UserProfileSettingsClient', () => { - let mockRequest: ReturnType; - let client: UserProfileSettingsClient; - let logger: Logger; - let userSettingServiceStart: jest.Mocked; - - beforeEach(() => { - userSettingServiceStart = { - getCurrentUserProfileSettings: jest.fn(), - }; - - userSettingServiceStart.getCurrentUserProfileSettings.mockResolvedValue({ darkMode: 'dark' }); - - logger = loggingSystemMock.createLogger(); - client = new UserProfileSettingsClient(logger); - }); - - describe('#get', () => { - it('should return empty before UserSettingServiceStart is set', async () => { - const userSettings = await client.get(mockRequest); - expect(userSettings).toEqual({}); - expect(logger.debug).toHaveBeenCalledWith('UserSettingsServiceStart has not been set yet'); - }); - - it('should return user settings after UserSettingServiceStart is set', async () => { - client.setUserSettingsServiceStart(userSettingServiceStart); - const userSettings = await client.get(mockRequest); - - expect(userSettings).toEqual({ darkMode: 'dark' }); - }); - }); -}); diff --git a/x-pack/plugins/security/server/user_profile/user_profile_settings_client.ts b/x-pack/plugins/security/server/user_profile/user_profile_settings_client.ts deleted file mode 100644 index 03bf4855cbc79..0000000000000 --- a/x-pack/plugins/security/server/user_profile/user_profile_settings_client.ts +++ /dev/null @@ -1,45 +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 type { Logger } from '@kbn/core/server'; -import type { KibanaRequest } from '@kbn/core-http-server'; -import type { UserProfileSettingsClientContract } from '@kbn/core-user-settings-server'; - -import type { UserSettingServiceStart } from './user_setting_service'; -/** - * A wrapper client around {@link UserSettingServiceStart} that exposes a method to get the current user's profile - */ -export class UserProfileSettingsClient implements UserProfileSettingsClientContract { - private userSettingServiceStart: UserSettingServiceStart | undefined; - private logger: Logger; - - constructor(logger: Logger) { - this.logger = logger; - } - - /** - * Returns the current user's user profile settings - * - * @param request the KibanaRequest that is required to get the current user and their settings - * @return the User Settings values retrieved from the UserSettingsServiceStart, if it has been set, otherwise, - * default to an empty Record - */ - async get(request: KibanaRequest): Promise> { - let result: Record = {} as Record; - - if (this.userSettingServiceStart) { - result = await this.userSettingServiceStart.getCurrentUserProfileSettings(request); - } else { - this.logger.debug('UserSettingsServiceStart has not been set yet'); - } - - return result; - } - - setUserSettingsServiceStart(userSettingServiceStart: UserSettingServiceStart) { - this.userSettingServiceStart = userSettingServiceStart; - } -} diff --git a/x-pack/plugins/security/server/user_profile/user_setting_service.ts b/x-pack/plugins/security/server/user_profile/user_setting_service.ts deleted file mode 100644 index f423d75e1a041..0000000000000 --- a/x-pack/plugins/security/server/user_profile/user_setting_service.ts +++ /dev/null @@ -1,55 +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 type { KibanaRequest } from '@kbn/core-http-server'; -import type { Logger } from '@kbn/logging'; -import type { - UserProfileGetCurrentParams, - UserProfileServiceStart, -} from '@kbn/security-plugin-types-server'; - -export interface UserSettingServiceStart { - /** - * Returns the currently signed-in user's settings from their User Profile - * - * @param request the KibanaRequest that is required to get the current user and their settings - */ - getCurrentUserProfileSettings(request: KibanaRequest): Promise>; -} - -/** - * A service that wraps the {@link UserProfileServiceStart} so that only the 'getCurrent' method is made available - */ -export class UserSettingService { - private readonly logger: Logger; - - constructor(logger: Logger) { - this.logger = logger; - } - - start(userProfileServiceStart: UserProfileServiceStart): UserSettingServiceStart { - return { - getCurrentUserProfileSettings: async (request) => { - const params: UserProfileGetCurrentParams = { - request, - dataPath: 'userSettings', - }; - - const currentUserProfile = await userProfileServiceStart.getCurrent(params); - - let result = {} as Record; - - if (currentUserProfile?.data?.userSettings) { - result = currentUserProfile?.data?.userSettings as Record; - } else { - this.logger.debug('User Settings not found.'); - } - return result; - }, - }; - } -} diff --git a/x-pack/plugins/security/server/user_profile/user_settings_service.test.ts b/x-pack/plugins/security/server/user_profile/user_settings_service.test.ts deleted file mode 100644 index d27887d5716f9..0000000000000 --- a/x-pack/plugins/security/server/user_profile/user_settings_service.test.ts +++ /dev/null @@ -1,143 +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 type { SecurityGetUserProfileResponse } from '@elastic/elasticsearch/lib/api/types'; - -import { - elasticsearchServiceMock, - httpServerMock, - loggingSystemMock, -} from '@kbn/core/server/mocks'; -import type { UserProfileServiceStart } from '@kbn/security-plugin-types-server'; - -import { UserProfileService } from './user_profile_service'; -import { UserSettingService } from './user_setting_service'; -import type { UserProfileWithSecurity } from '../../common'; -import { licenseMock } from '../../common/licensing/index.mock'; -import { userProfileMock } from '../../common/model/user_profile.mock'; -import { authorizationMock } from '../authorization/index.mock'; -import { sessionMock } from '../session_management/session.mock'; - -const logger = loggingSystemMock.createLogger(); -describe('UserSettingService', () => { - let mockStartParams: { - clusterClient: ReturnType; - session: ReturnType; - }; - - let mockAuthz: ReturnType; - let userProfileService: UserProfileService; - let userSettingsService: UserSettingService; - let userProfileServiceStart: UserProfileServiceStart; - - beforeEach(() => { - mockStartParams = { - clusterClient: elasticsearchServiceMock.createClusterClient(), - session: sessionMock.create(), - }; - - mockAuthz = authorizationMock.create(); - - userProfileService = new UserProfileService(logger); - userSettingsService = new UserSettingService(logger); - - userProfileService.setup({ - authz: mockAuthz, - license: licenseMock.create({ allowUserProfileCollaboration: true }), - }); - - userProfileServiceStart = userProfileService.start(mockStartParams); - }); - - afterEach(() => { - logger.error.mockClear(); - }); - - it('should expose correct start contract', () => { - const userSettingServiceStart = userSettingsService.start(userProfileServiceStart); - expect(userSettingServiceStart).toMatchInlineSnapshot(` - Object { - "getCurrentUserProfileSettings": [Function], - } - `); - }); - - describe('#getCurrentUserProfileSettings', () => { - let mockUserProfile: UserProfileWithSecurity; - let mockRequest: ReturnType; - beforeEach(() => { - mockRequest = httpServerMock.createKibanaRequest(); - }); - - it('returns user settings data', async () => { - mockUserProfile = userProfileMock.createWithSecurity({ - uid: 'UID', - user: { - username: 'user-1', - full_name: 'full-name-1', - realm_name: 'some-realm', - realm_domain: 'some-domain', - roles: ['role-1'], - }, - data: { - kibana: { - userSettings: { - darkMode: 'dark', - }, - }, - }, - }); - - mockStartParams.clusterClient.asInternalUser.security.getUserProfile.mockResolvedValue({ - profiles: [mockUserProfile], - } as unknown as SecurityGetUserProfileResponse); - - mockStartParams.session.get.mockResolvedValue({ - error: null, - value: sessionMock.createValue({ userProfileId: mockUserProfile.uid }), - }); - - userProfileServiceStart = userProfileService.start(mockStartParams); - const userSettingServiceStart = userSettingsService.start(userProfileServiceStart); - await expect( - userSettingServiceStart.getCurrentUserProfileSettings(mockRequest) - ).resolves.toEqual({ darkMode: 'dark' }); - }); - - it('logs a warning and returns ', async () => { - mockUserProfile = userProfileMock.createWithSecurity({ - uid: 'UID', - user: { - username: 'user-1', - full_name: 'full-name-1', - realm_name: 'some-realm', - realm_domain: 'some-domain', - roles: ['role-1'], - }, - data: {}, - }); - - mockStartParams.clusterClient.asInternalUser.security.getUserProfile.mockResolvedValue({ - profiles: [mockUserProfile], - } as unknown as SecurityGetUserProfileResponse); - - mockStartParams.session.get.mockResolvedValue({ - error: null, - value: sessionMock.createValue({ userProfileId: mockUserProfile.uid }), - }); - - userProfileServiceStart = userProfileService.start(mockStartParams); - const userSettingServiceStart = userSettingsService.start(userProfileServiceStart); - - await expect( - userSettingServiceStart.getCurrentUserProfileSettings(mockRequest) - ).resolves.toEqual({}); - - expect(logger.debug).toHaveBeenCalledWith('User Settings not found.'); - }); - }); -}); diff --git a/x-pack/plugins/security/tsconfig.json b/x-pack/plugins/security/tsconfig.json index 61eb1bb0147f3..f3ccbabffff97 100644 --- a/x-pack/plugins/security/tsconfig.json +++ b/x-pack/plugins/security/tsconfig.json @@ -64,7 +64,6 @@ "@kbn/shared-ux-router", "@kbn/core-http-server", "@kbn/core-http-server-mocks", - "@kbn/core-user-settings-server", "@kbn/remote-clusters-plugin", "@kbn/analytics-client", "@kbn/security-plugin-types-common", diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.gen.ts new file mode 100644 index 0000000000000..8124d05bff23e --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.gen.ts @@ -0,0 +1,169 @@ +/* + * Copyright 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: Risk Engine Common Schema + * version: 1.0.0 + */ + +export type AfterKeys = z.infer; +export const AfterKeys = z.object({ + host: z.object({}).catchall(z.string()).optional(), + user: z.object({}).catchall(z.string()).optional(), +}); + +/** + * The identifier of the Kibana data view to be used when generating risk scores. + */ +export type DataViewId = z.infer; +export const DataViewId = z.string(); + +/** + * An elasticsearch DSL filter object. Used to filter the risk inputs involved, which implicitly filters the risk scores themselves. + */ +export type Filter = z.infer; +export const Filter = z.unknown(); + +/** + * Specifies how many scores will be involved in a given calculation. Note that this value is per `identifier_type`, i.e. a value of 10 will calculate 10 host scores and 10 user scores, if available. To avoid missed data, keep this value consistent while paginating through scores. + */ +export type PageSize = z.infer; +export const PageSize = z.number().default(1000); + +export type KibanaDate = z.infer; +export const KibanaDate = z.union([z.string(), z.string().datetime(), z.string()]); + +/** + * Defines the time period on which risk inputs will be filtered. + */ +export type DateRange = z.infer; +export const DateRange = z.object({ + start: KibanaDate, + end: KibanaDate, +}); + +export type IdentifierType = z.infer; +export const IdentifierType = z.enum(['host', 'user']); +export type IdentifierTypeEnum = typeof IdentifierType.enum; +export const IdentifierTypeEnum = IdentifierType.enum; + +/** + * A generic representation of a document contributing to a Risk Score. + */ +export type RiskScoreInput = z.infer; +export const RiskScoreInput = z.object({ + /** + * The unique identifier (`_id`) of the original source document + */ + id: z.string().optional(), + /** + * The unique index (`_index`) of the original source document + */ + index: z.string().optional(), + /** + * The risk category of the risk input document. + */ + category: z.string().optional(), + /** + * A human-readable description of the risk input document. + */ + description: z.string().optional(), + /** + * The weighted risk score of the risk input document. + */ + risk_score: z.number().min(0).max(100).optional(), + /** + * The @timestamp of the risk input document. + */ + timestamp: z.string().optional(), +}); + +export type RiskScore = z.infer; +export const RiskScore = z.object({ + /** + * The time at which the risk score was calculated. + */ + '@timestamp': z.string().datetime(), + /** + * The identifier field defining this risk score. Coupled with `id_value`, uniquely identifies the entity being scored. + */ + id_field: z.string(), + /** + * The identifier value defining this risk score. Coupled with `id_field`, uniquely identifies the entity being scored. + */ + id_value: z.string(), + /** + * Lexical description of the entity's risk. + */ + calculated_level: z.string(), + /** + * The raw numeric value of the given entity's risk score. + */ + calculated_score: z.number(), + /** + * The normalized numeric value of the given entity's risk score. Useful for comparing with other entities. + */ + calculated_score_norm: z.number().min(0).max(100), + /** + * The contribution of Category 1 to the overall risk score (`calculated_score_norm`). Category 1 contains Detection Engine Alerts. + */ + category_1_score: z.number(), + /** + * The number of risk input documents that contributed to the Category 1 score (`category_1_score`). + */ + category_1_count: z.number(), + /** + * The contribution of Category 2 to the overall risk score (`calculated_score_norm`). Category 2 contains context from external sources. + */ + category_2_score: z.number().optional(), + /** + * The number of risk input documents that contributed to the Category 2 score (`category_2_score`). + */ + category_2_count: z.number().optional(), + /** + * The designated criticality level of the entity. Possible values are `low_impact`, `medium_impact`, `high_impact`, and `extreme_impact`. + */ + criticality_level: z.string().optional(), + /** + * The numeric modifier corresponding to the criticality level of the entity, which is used as an input to the risk score calculation. + */ + criticality_modifier: z.number().optional(), + /** + * A list of the highest-risk documents contributing to this risk score. Useful for investigative purposes. + */ + inputs: z.array(RiskScoreInput), +}); + +/** + * Configuration used to tune risk scoring. Weights can be used to change the score contribution of risk inputs for hosts and users at both a global level and also for Risk Input categories (e.g. 'category_1'). + */ +export type RiskScoreWeight = z.infer; +export const RiskScoreWeight = z.object({ + type: z.string(), + value: z.string().optional(), + host: z.number().min(0).max(1).optional(), + user: z.number().min(0).max(1).optional(), +}); + +/** + * A list of weights to be applied to the scoring calculation. + */ +export type RiskScoreWeights = z.infer; +export const RiskScoreWeights = z.array(RiskScoreWeight); + +export type RiskEngineInitStep = z.infer; +export const RiskEngineInitStep = z.object({ + type: z.string(), + success: z.boolean(), + error: z.string().optional(), +}); diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.yml b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.schema.yaml similarity index 95% rename from x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.yml rename to x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.schema.yaml index 47103564090fd..6df8760d89674 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.yml +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/common.schema.yaml @@ -33,13 +33,25 @@ components: Filter: description: An elasticsearch DSL filter object. Used to filter the risk inputs involved, which implicitly filters the risk scores themselves. - $ref: 'https://cloud.elastic.co/api/v1/api-docs/spec.json#/definitions/QueryContainer' + # TODO Fix the following line reference. Issue: https://github.com/elastic/kibana/issues/181948 + # $ref: 'https://cloud.elastic.co/api/v1/api-docs/spec.json#/definitions/QueryContainer' + PageSize: description: Specifies how many scores will be involved in a given calculation. Note that this value is per `identifier_type`, i.e. a value of 10 will calculate 10 host scores and 10 user scores, if available. To avoid missed data, keep this value consistent while paginating through scores. default: 1000 type: number + KibanaDate: + oneOf: + - type: string + format: date + - type: string + format: date-time + - type: string + format: datemath + example: '2017-07-21T17:32:28Z' + DateRange: description: Defines the time period on which risk inputs will be filtered. type: object @@ -52,20 +64,44 @@ components: end: $ref: '#/components/schemas/KibanaDate' - KibanaDate: - type: string - oneOf: - - format: date - - format: date-time - - format: datemath - example: '2017-07-21T17:32:28Z' - IdentifierType: type: string enum: - host - user + RiskScoreInput: + description: A generic representation of a document contributing to a Risk Score. + type: object + properties: + id: + type: string + example: 91a93376a507e86cfbf282166275b89f9dbdb1f0be6c8103c6ff2909ca8e1a1c + description: The unique identifier (`_id`) of the original source document + index: + type: string + example: .internal.alerts-security.alerts-default-000001 + description: The unique index (`_index`) of the original source document + category: + type: string + example: category_1 + description: The risk category of the risk input document. + description: + type: string + example: 'Generated from Detection Engine Rule: Malware Prevention Alert' + description: A human-readable description of the risk input document. + risk_score: + type: number + format: double + minimum: 0 + maximum: 100 + description: The weighted risk score of the risk input document. + timestamp: + type: string + example: '2017-07-21T17:32:28Z' + description: The @timestamp of the risk input document. + + RiskScore: type: object required: @@ -136,37 +172,6 @@ components: items: $ref: '#/components/schemas/RiskScoreInput' - RiskScoreInput: - description: A generic representation of a document contributing to a Risk Score. - type: object - properties: - id: - type: string - example: 91a93376a507e86cfbf282166275b89f9dbdb1f0be6c8103c6ff2909ca8e1a1c - description: The unique identifier (`_id`) of the original source document - index: - type: string - example: .internal.alerts-security.alerts-default-000001 - description: The unique index (`_index`) of the original source document - category: - type: string - example: category_1 - description: The risk category of the risk input document. - description: - type: string - example: 'Generated from Detection Engine Rule: Malware Prevention Alert' - description: A human-readable description of the risk input document. - risk_score: - type: number - format: double - minimum: 0 - maximum: 100 - description: The weighted risk score of the risk input document. - timestamp: - type: string - example: '2017-07-21T17:32:28Z' - description: The @timestamp of the risk input document. - RiskScoreWeight: description: "Configuration used to tune risk scoring. Weights can be used to change the score contribution of risk inputs for hosts and users at both a global level and also for Risk Input categories (e.g. 'category_1')." type: object diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts new file mode 100644 index 0000000000000..c583616198313 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts @@ -0,0 +1,39 @@ +/* + * Copyright 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: Risk Scoring API + * version: 1.0.0 + */ + +import { IdentifierType, RiskScore } from './common.gen'; + +export type RiskScoresEntityCalculationRequest = z.infer; +export const RiskScoresEntityCalculationRequest = z.object({ + /** + * Used to identify the entity. + */ + identifier: z.string(), + /** + * Used to define the type of entity. + */ + identifier_type: IdentifierType, +}); + +export type RiskScoresEntityCalculationResponse = z.infer< + typeof RiskScoresEntityCalculationResponse +>; +export const RiskScoresEntityCalculationResponse = z.object({ + success: z.boolean(), + score: RiskScore.optional(), +}); diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml new file mode 100644 index 0000000000000..de5f01f850187 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml @@ -0,0 +1,62 @@ +openapi: 3.0.0 + +info: + version: 1.0.0 + title: Risk Scoring API + description: These APIs allow the consumer to manage Entity Risk Scores within Entity Analytics. + +servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' + +paths: + /api/risk_scores/calculation/entity: + post: + summary: Trigger calculation of Risk Scores for an entity + description: Calculates and persists Risk Scores for an entity, returning the calculated risk score. + requestBody: + description: The entity type and identifier + content: + application/json: + schema: + $ref: '#/components/schemas/RiskScoresEntityCalculationRequest' + required: true + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/RiskScoresEntityCalculationResponse' + '400': + description: Invalid request + +components: + schemas: + RiskScoresEntityCalculationRequest: + type: object + required: + - identifier + - identifier_type + properties: + identifier: + description: Used to identify the entity. + type: string + example: 'my.host' + identifier_type: + description: Used to define the type of entity. + $ref: './common.schema.yaml#/components/schemas/IdentifierType' + + RiskScoresEntityCalculationResponse: + type: object + required: + - success + properties: + success: + type: boolean + score: + $ref: './common.schema.yaml#/components/schemas/RiskScore' diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index a897c108d6f62..0a470b0d234f3 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -98,7 +98,7 @@ export const RULES_CREATE_PATH = `${RULES_PATH}/create` as const; export const EXCEPTIONS_PATH = '/exceptions' as const; export const EXCEPTION_LIST_DETAIL_PATH = `${EXCEPTIONS_PATH}/details/:detailName` as const; export const HOSTS_PATH = '/hosts' as const; -export const AI_INSIGHTS_PATH = '/ai_insights' as const; +export const ATTACK_DISCOVERY_PATH = '/attack_discovery' as const; export const USERS_PATH = '/users' as const; export const KUBERNETES_PATH = '/kubernetes' as const; export const NETWORK_PATH = '/network' as const; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts index 54862b4a51549..43384ec5bc947 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts @@ -9,7 +9,7 @@ import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; import type { SearchResponse, SearchHit } from '@elastic/elasticsearch/lib/api/types'; import { EndpointActionGenerator } from './endpoint_action_generator'; -import { SENTINEL_ONE_ACTIVITY_INDEX } from '../..'; +import { SENTINEL_ONE_ACTIVITY_INDEX_PATTERN } from '../..'; import type { LogsEndpointAction, SentinelOneActivityEsDoc, @@ -61,7 +61,7 @@ export class SentinelOneDataGenerator extends EndpointActionGenerator { ): SearchHit { const hit = this.toEsSearchHit( this.generateActivityEsDoc(overrides), - SENTINEL_ONE_ACTIVITY_INDEX + SENTINEL_ONE_ACTIVITY_INDEX_PATTERN ); hit.inner_hits = { diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts index e8de7fc1c9122..57df36e32a893 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts @@ -12,7 +12,7 @@ export type ResponseActionStatus = typeof RESPONSE_ACTION_STATUS[number]; export const RESPONSE_ACTION_TYPE = ['automated', 'manual'] as const; export type ResponseActionType = typeof RESPONSE_ACTION_TYPE[number]; -export const RESPONSE_ACTION_AGENT_TYPE = ['endpoint', 'sentinel_one'] as const; +export const RESPONSE_ACTION_AGENT_TYPE = ['endpoint', 'sentinel_one', 'crowdstrike'] as const; export type ResponseActionAgentType = typeof RESPONSE_ACTION_AGENT_TYPE[number]; /** diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts index d197995de90d8..a2d55799c9943 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts @@ -22,80 +22,96 @@ const RESPONSE_ACTIONS_SUPPORT_MAP: SupportMap = { automated: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: true, + crowdstrike: true, }, }, unisolate: { automated: { endpoint: false, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: true, + crowdstrike: true, }, }, upload: { automated: { endpoint: false, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, }, 'get-file': { automated: { endpoint: false, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: true, + crowdstrike: false, }, }, 'kill-process': { automated: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, }, execute: { automated: { endpoint: false, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, }, 'suspend-process': { automated: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, }, 'running-processes': { automated: { endpoint: false, sentinel_one: false, + crowdstrike: false, }, manual: { endpoint: true, sentinel_one: false, + crowdstrike: false, }, }, }; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts index 55892e16392ca..5fe865488347c 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts @@ -6,9 +6,9 @@ */ /** - * Index name where the SentinelOne activity log is written to by the SentinelOne integration + * Index pattern where the SentinelOne activity log is written to by the SentinelOne integration */ -export const SENTINEL_ONE_ACTIVITY_INDEX = 'logs-sentinel_one.activity-default'; +export const SENTINEL_ONE_ACTIVITY_INDEX_PATTERN = 'logs-sentinel_one.activity-*'; /** * The passcode to be used when initiating actions in SentinelOne that require a passcode to be diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/common.ts b/x-pack/plugins/security_solution/common/endpoint/types/crowdstrike.ts similarity index 71% rename from x-pack/plugins/observability_solution/observability_onboarding/public/common.ts rename to x-pack/plugins/security_solution/common/endpoint/types/crowdstrike.ts index 110aeeebcd1c6..e1bb505878b3e 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/common.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/crowdstrike.ts @@ -5,4 +5,7 @@ * 2.0. */ -export const EXPERIMENTAL_ONBOARDING_APP_ROUTE = '/app/experimental-onboarding'; +export interface CrowdstrikeActionRequestCommonMeta { + /** The host name */ + hostName: string; +} diff --git a/x-pack/plugins/security_solution/common/entity_analytics/risk_score/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_score/constants.ts index 0c5648fc537bd..f4aa3f4f32976 100644 --- a/x-pack/plugins/security_solution/common/entity_analytics/risk_score/constants.ts +++ b/x-pack/plugins/security_solution/common/entity_analytics/risk_score/constants.ts @@ -9,6 +9,8 @@ */ export const RISK_ENGINE_PUBLIC_PREFIX = '/api/risk_scores' as const; export const RISK_SCORE_CALCULATION_URL = `${RISK_ENGINE_PUBLIC_PREFIX}/calculation` as const; +export const RISK_SCORE_ENTITY_CALCULATION_URL = + `${RISK_ENGINE_PUBLIC_PREFIX}/calculation/entity` as const; /** * Internal Risk Score routes diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index edf11805a4de5..18b13eb3dd193 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -96,6 +96,12 @@ export const allowedExperimentalValues = Object.freeze({ */ agentStatusClientEnabled: false, + /** + * Enables the ability to send Response actions to Crowdstrike and persist the results + * in ES. + */ + responseActionsCrowdstrikeManualHostIsolationEnabled: false, + /** * Enables top charts on Alerts Page */ @@ -128,9 +134,9 @@ export const allowedExperimentalValues = Object.freeze({ alertsPageFiltersEnabled: true, /** - * Enables the Assistant Alerts Insights feature and API endpoint + * Enables the Attack discovery feature and API endpoint */ - assistantAlertsInsights: false, + attackDiscoveryEnabled: false, /** * Enables the Assistant Model Evaluation advanced setting and API endpoint, introduced in `8.11.0`. @@ -185,16 +191,6 @@ export const allowedExperimentalValues = Object.freeze({ */ riskEnginePrivilegesRouteEnabled: true, - /** - * Enables alerts suppression for new terms rules - */ - alertSuppressionForNewTermsRuleEnabled: false, - - /** - * Enables alerts suppression for Eql rules with non-sequence queries - */ - alertSuppressionForNonSequenceEqlRuleEnabled: false, - /** * Enables experimental Experimental S1 integration data to be available in Analyzer */ diff --git a/x-pack/plugins/security_solution/common/index.ts b/x-pack/plugins/security_solution/common/index.ts index 46dfd562ee8a6..fb5caa2268f3b 100644 --- a/x-pack/plugins/security_solution/common/index.ts +++ b/x-pack/plugins/security_solution/common/index.ts @@ -22,7 +22,7 @@ export { export { ELASTIC_SECURITY_RULE_ID } from './detection_engine/constants'; export { ENABLED_FIELD } from './detection_engine/rule_management/rule_fields'; export { allowedExperimentalValues, type ExperimentalFeatures } from './experimental_features'; -export { SENTINEL_ONE_ACTIVITY_INDEX } from './endpoint/service/response_actions/sentinel_one'; +export { SENTINEL_ONE_ACTIVITY_INDEX_PATTERN } from './endpoint/service/response_actions/sentinel_one'; // Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase. // If you're using functions/types/etc... internally it's best to import directly from their paths than expose the functions/types/etc... here. diff --git a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.test.ts b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.test.ts index 5f5e62ea8efdb..76db5c587ff5a 100644 --- a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.test.ts +++ b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.test.ts @@ -16,6 +16,7 @@ describe('formatPageFilterSearchParam', () => { selectedOptions: ['test_user'], existsSelected: true, exclude: true, + hideActionBar: true, }; expect(formatPageFilterSearchParam([filter])).toEqual([filter]); @@ -33,6 +34,7 @@ describe('formatPageFilterSearchParam', () => { fieldName: 'user.name', existsSelected: false, exclude: false, + hideActionBar: false, }, ]); }); diff --git a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts index 9912ca06d3fb7..b8731ac220a19 100644 --- a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts +++ b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts @@ -9,12 +9,20 @@ import type { FilterControlConfig } from '@kbn/alerts-ui-shared'; export const formatPageFilterSearchParam = (filters: FilterControlConfig[]) => { return filters.map( - ({ title, fieldName, selectedOptions = [], existsSelected = false, exclude = false }) => ({ + ({ + title, + fieldName, + selectedOptions = [], + existsSelected = false, + exclude = false, + hideActionBar = false, + }) => ({ title: title ?? fieldName, selectedOptions, fieldName, existsSelected, exclude, + hideActionBar, }) ); }; diff --git a/x-pack/plugins/security_solution/package.json b/x-pack/plugins/security_solution/package.json index 3d9effa5983bf..d2afe4e4ae748 100644 --- a/x-pack/plugins/security_solution/package.json +++ b/x-pack/plugins/security_solution/package.json @@ -16,6 +16,8 @@ "cypress:dw:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ./scripts/start_cypress_parallel --config-file ./public/management/cypress/cypress_serverless.config.ts --ftr-config-file ../../test/defend_workflows_cypress/serverless_config", "cypress:dw:serverless:open": "yarn cypress:dw:serverless open", "cypress:dw:serverless:run": "yarn cypress:dw:serverless run", + "cypress:dw:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ./scripts/start_cypress_parallel_serverless --config-file ./public/management/cypress/cypress_serverless_qa.config.ts", + "cypress:dw:qa:serverless:run": "yarn cypress:dw:qa:serverless run", "cypress:dw:serverless:changed-specs-only": "yarn cypress:dw:serverless run --changed-specs-only --env burn=2", "cypress:dw:endpoint": "echo '\n** WARNING **: Run script `cypress:dw:endpoint` no longer valid! Use `cypress:dw` instead\n'", "cypress:dw:endpoint:run": "echo '\n** WARNING **: Run script `cypress:dw:endpoint:run` no longer valid! Use `cypress:dw:run` instead\n'", diff --git a/x-pack/plugins/security_solution/public/actions/register.ts b/x-pack/plugins/security_solution/public/actions/register.ts index 69abf6a07b8af..620df75c73d27 100644 --- a/x-pack/plugins/security_solution/public/actions/register.ts +++ b/x-pack/plugins/security_solution/public/actions/register.ts @@ -8,6 +8,7 @@ import { CELL_VALUE_TRIGGER } from '@kbn/embeddable-plugin/public'; import type { History } from 'history'; import { SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER_ID } from '@kbn/discover-plugin/public'; +import type { CoreSetup } from '@kbn/core/public'; import type { SecurityAppStore } from '../common/store/types'; import type { StartServices } from '../types'; import { @@ -45,13 +46,14 @@ import { createFilterOutLensAction } from './filter/lens/filter_out'; export const registerUIActions = ( store: SecurityAppStore, history: History, + coreSetup: CoreSetup, services: StartServices ) => { registerLensEmbeddableActions(store, services); registerDiscoverCellActions(store, services); registerCellActions(store, history, services); // TODO: Remove discover histogram actions when timeline esql tab is extracted from discover - registerDiscoverHistogramActions(store, history, services); + registerDiscoverHistogramActions(store, history, coreSetup, services); }; const registerLensEmbeddableActions = (store: SecurityAppStore, services: StartServices) => { @@ -105,7 +107,7 @@ const registerDiscoverCellActions = (store: SecurityAppStore, services: StartSer const registerCellActions = ( store: SecurityAppStore, - history: History, + _history: History, services: StartServices ) => { const { uiActions } = services; diff --git a/x-pack/plugins/security_solution/public/actions/register_discover_histogram_actions.ts b/x-pack/plugins/security_solution/public/actions/register_discover_histogram_actions.ts index 5235cef932e4f..4a737ba901107 100644 --- a/x-pack/plugins/security_solution/public/actions/register_discover_histogram_actions.ts +++ b/x-pack/plugins/security_solution/public/actions/register_discover_histogram_actions.ts @@ -7,19 +7,21 @@ import { createFilterAction } from '@kbn/unified-search-plugin/public'; import type { History } from 'history'; +import type { CoreSetup } from '@kbn/core/public'; import type { SecurityAppStore } from '../common/store'; import type { StartServices } from '../types'; import { EsqlInTimelineTrigger, EsqlInTimelineAction } from './constants'; const createDiscoverHistogramCustomFilterAction = ( - store: SecurityAppStore, - history: History, + _store: SecurityAppStore, + _history: History, + coreSetup: CoreSetup, services: StartServices ) => { const histogramApplyFilter = createFilterAction( services.customDataService.query.filterManager, services.customDataService.query.timefilter.timefilter, - services.theme, + coreSetup, EsqlInTimelineAction.VIS_FILTER_ACTION, EsqlInTimelineAction.VIS_FILTER_ACTION ); @@ -29,8 +31,8 @@ const createDiscoverHistogramCustomFilterAction = ( }; const createDiscoverHistogramCustomTrigger = ( - store: SecurityAppStore, - history: History, + _store: SecurityAppStore, + _history: History, services: StartServices ) => { services.uiActions.registerTrigger({ @@ -41,11 +43,17 @@ const createDiscoverHistogramCustomTrigger = ( export const registerDiscoverHistogramActions = ( store: SecurityAppStore, history: History, + coreSetup: CoreSetup, services: StartServices ) => { createDiscoverHistogramCustomTrigger(store, history, services); - const histogramApplyFilter = createDiscoverHistogramCustomFilterAction(store, history, services); + const histogramApplyFilter = createDiscoverHistogramCustomFilterAction( + store, + history, + coreSetup, + services + ); services.uiActions.attachAction(EsqlInTimelineTrigger.HISTOGRAM_TRIGGER, histogramApplyFilter.id); }; diff --git a/x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.tsx b/x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.tsx deleted file mode 100644 index 864daf9164e89..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.tsx +++ /dev/null @@ -1,24 +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 type { ReportInsightsGeneratedParams } from '../../../common/lib/telemetry/events/insights/types'; -import { useKibana } from '../../../common/lib/kibana'; - -interface InsightsTelemetry { - reportInsightsGenerated: (params: ReportInsightsGeneratedParams) => void; -} - -// TODO @andrew implement this hook and call the reportInsightsGenerated function wherever insights are generated -export const useInsightsTelemetry = (): InsightsTelemetry => { - const { - services: { telemetry }, - } = useKibana(); - - return { - reportInsightsGenerated: telemetry.reportInsightsGenerated, - }; -}; diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/translations.ts deleted file mode 100644 index faed5f8d69fbb..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/translations.ts +++ /dev/null @@ -1,37 +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 ADD_TO_CASE_SUCCESS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.addToCaseSuccessLabel', - { - defaultMessage: 'Successfully added insight to the case', - } -); - -export const ADD_TO_NEW_CASE = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.addToNewCaseButtonLabel', - { - defaultMessage: 'Add to new case', - } -); - -export const CREATE_A_CASE_FOR_INSIGHT = (title: string) => - i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.createACaseForInsightHeaderText', - { - values: { title }, - defaultMessage: 'Create a case for insight {title}', - } - ); - -export const CASE_DESCRIPTION = (insightTitle: string) => - i18n.translate('xpack.securitySolution.aiInsights.insight.actions.useAddToCase.caseDescription', { - values: { insightTitle }, - defaultMessage: 'This case was opened for insight: _{insightTitle}_', - }); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_existing_case/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_existing_case/translations.ts deleted file mode 100644 index 0d46653de0435..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_existing_case/translations.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 { i18n } from '@kbn/i18n'; - -export const ADD_TO_CASE_SUCCESS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.addToCaseSuccessLabel', - { - defaultMessage: 'Successfully added insight to the case', - } -); - -export const ADD_TO_NEW_CASE = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.addToNewCaseButtonLabel', - { - defaultMessage: 'Add to new case', - } -); - -export const CREATE_A_CASE_FOR_INSIGHT = (title: string) => - i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.useAddToCase.createACaseForInsightHeaderText', - { - values: { title }, - defaultMessage: 'Create a case for insight {title}', - } - ); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/translations.ts deleted file mode 100644 index e4026d917db72..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/translations.ts +++ /dev/null @@ -1,49 +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 ALERTS_WILL_BE_ANALYZED = (alertsCount: number) => - i18n.translate('xpack.securitySolution.aiInsights.pages.emptyPrompt.alertsWillBeAnalyzedTitle', { - defaultMessage: '{alertsCount, plural, one {alert} other {alerts}} will be analyzed', - values: { alertsCount }, - }); - -export const BASED_ON_SELECTED_FILTERS = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.emptyPrompt.basedOnSelectedFiltersLabel', - { - defaultMessage: 'Based on the selected filters above.', - } -); - -export const GENERATE = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.emptyPrompt.generateLabel', - { - defaultMessage: 'Generate', - } -); - -export const LEARN_MORE = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.emptyPrompt.learnMoreLabel', - { - defaultMessage: 'Learn more', - } -); - -export const SELECT_A_CONNECTOR = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.emptyPrompt.selectAConnectorLabel', - { - defaultMessage: 'Select a connector', - } -); - -export const START_GENERATING_INSIGHTS = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.emptyPrompt.startGeneratingInsightsLabel', - { - defaultMessage: 'Start generating insights via Elastic AI Assistant.', - } -); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/translations.ts deleted file mode 100644 index 35f8cdd027dff..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/translations.ts +++ /dev/null @@ -1,38 +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 AI_IS_CURRENTLY_ANALYZING = (alertsCount: number) => - i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.aiIsCurrentlyAnalyzing', - { - defaultMessage: `AI is currently analyzing up to {alertsCount} {alertsCount, plural, =1 {alert} other {alerts}} in the last 24 hours to generate insights`, - values: { alertsCount }, - } - ); - -export const ABOVE_THE_AVERAGE_TIME = i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.aboveTheAverageTimeLabel', - { - defaultMessage: 'Above the average time:', - } -); - -export const APPROXIMATE_TIME_REMAINING = i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.approximateTimeRemainingLabel', - { - defaultMessage: 'Approximate time remaining:', - } -); - -export const AVERAGE_TIME = i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.averageTimeLabel', - { - defaultMessage: 'Average time', - } -); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/translations.ts deleted file mode 100644 index b7c8015f90ad3..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/translations.ts +++ /dev/null @@ -1,21 +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 AI_IS_CURRENTLY_ANALYZING = (alertsCount: number) => - i18n.translate('xpack.securitySolution.aiInsights.pages.loadingCallout.aiIsCurrentlyAnalyzing', { - defaultMessage: `AI is currently analyzing up to {alertsCount} {alertsCount, plural, =1 {alert} other {alerts}} in the last 24 hours to generate insights`, - values: { alertsCount }, - }); - -export const INSIGHTS_GENERATION_IN_PROGRESS = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.loadingCallout.hangTightLabel', - { - defaultMessage: 'Insights generation in progress', - } -); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/page_title/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/pages/page_title/translations.ts deleted file mode 100644 index 5b34047faa360..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/page_title/translations.ts +++ /dev/null @@ -1,19 +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 AI_INSIGHTS_PAGE_TITLE = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.pageTitle.pageTitle', - { - defaultMessage: 'AI insights', - } -); - -export const BETA = i18n.translate('xpack.securitySolution.aiInsights.pages.pageTitle.betaBadge', { - defaultMessage: 'Beta', -}); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/translations.ts b/x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/translations.ts deleted file mode 100644 index 0c03b9d6f7a6a..0000000000000 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/translations.ts +++ /dev/null @@ -1,33 +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 AI_INSIGHTS = i18n.translate( - 'xpack.securitySolution.aiInsights.upgrade.aiInsightsTitle', - { - defaultMessage: 'AI Insights', - } -); - -export const AI_INSIGHTS_ARE_AVAILABLE = i18n.translate( - 'xpack.securitySolution.aiInsights.upgrade.aiInsightsAreAvailable', - { - defaultMessage: 'AI Insights are available to Enterprise users only.', - } -); - -export const PLEASE_UPGRADE = i18n.translate( - 'xpack.securitySolution.aiInsights.upgrade.pleaseUpgradeMessage', - { - defaultMessage: 'Please upgrade your license to use this feature.', - } -); - -export const UPGRADE = i18n.translate('xpack.securitySolution.aiInsights.upgrade.upgradeButton', { - defaultMessage: 'Upgrade', -}); diff --git a/x-pack/plugins/security_solution/public/app/app.tsx b/x-pack/plugins/security_solution/public/app/app.tsx index 51b48abddc92f..7c83b49431683 100644 --- a/x-pack/plugins/security_solution/public/app/app.tsx +++ b/x-pack/plugins/security_solution/public/app/app.tsx @@ -11,12 +11,11 @@ import React, { memo } from 'react'; import type { Store, Action } from 'redux'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import type { AppMountParameters } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { CellActionsProvider } from '@kbn/cell-actions'; -import { KibanaErrorBoundary, KibanaErrorBoundaryProvider } from '@kbn/shared-ux-error-boundary'; import { NavigationProvider } from '@kbn/security-solution-navigation'; import { UpsellingProvider } from '../common/components/upselling_provider'; import { ManageUserInfo } from '../detections/components/user_info'; @@ -43,8 +42,6 @@ interface StartAppComponent { const StartAppComponent: FC = ({ children, history, store, theme$ }) => { const services = useKibana().services; const { - i18n, - analytics, application: { capabilities }, uiActions, upselling, @@ -53,43 +50,37 @@ const StartAppComponent: FC = ({ children, history, store, th const darkMode = useDarkMode(); return ( - - - - - - - - - - - - - - - - - {children} - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + {children} + + + + + + + + + + + + + + + ); }; diff --git a/x-pack/plugins/security_solution/public/app/translations.ts b/x-pack/plugins/security_solution/public/app/translations.ts index b9072ba43701e..0449881d6a636 100644 --- a/x-pack/plugins/security_solution/public/app/translations.ts +++ b/x-pack/plugins/security_solution/public/app/translations.ts @@ -97,9 +97,12 @@ export const ALERTS = i18n.translate('xpack.securitySolution.navigation.alerts', defaultMessage: 'Alerts', }); -export const AI_INSIGHTS = i18n.translate('xpack.securitySolution.navigation.aiInsights', { - defaultMessage: 'AI Insights', -}); +export const ATTACK_DISCOVERY = i18n.translate( + 'xpack.securitySolution.navigation.attackDiscovery', + { + defaultMessage: 'Attack discovery', + } +); export const TIMELINES = i18n.translate('xpack.securitySolution.navigation.timelines', { defaultMessage: 'Timelines', diff --git a/x-pack/plugins/security_solution/public/app_links.ts b/x-pack/plugins/security_solution/public/app_links.ts index aef2997d8905d..4140f6bfcd322 100644 --- a/x-pack/plugins/security_solution/public/app_links.ts +++ b/x-pack/plugins/security_solution/public/app_links.ts @@ -6,7 +6,7 @@ */ import type { CoreStart } from '@kbn/core/public'; -import { links as aiInsightsLinks } from './ai_insights/links'; +import { links as attackDiscoveryLinks } from './attack_discovery/links'; import type { AppLinkItems } from './common/links/types'; import { indicatorsLinks } from './threat_intelligence/links'; import { links as alertsLinks } from './detections/links'; @@ -26,7 +26,7 @@ export { solutionAppLinksSwitcher } from './app/solution_navigation/links/app_li export const appLinks: AppLinkItems = Object.freeze([ dashboardsLinks, alertsLinks, - aiInsightsLinks, + attackDiscoveryLinks, findingsLinks, casesLinks, timelinesLinks, @@ -46,7 +46,7 @@ export const getFilteredLinks = async ( return Object.freeze([ dashboardsLinks, alertsLinks, - aiInsightsLinks, + attackDiscoveryLinks, findingsLinks, casesLinks, timelinesLinks, diff --git a/x-pack/plugins/security_solution/public/ai_insights/attack/attack_chain/axis_tick/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/attack/attack_chain/axis_tick/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/attack/attack_chain/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/ai_insights/attack/attack_chain/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx index ab1a042242451..18df24e442072 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/attack/attack_chain/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx @@ -11,14 +11,14 @@ import React, { useMemo } from 'react'; import { Tactic } from './tactic'; import { getTacticMetadata } from '../../helpers'; -import type { AlertsInsight } from '../../types'; +import type { AttackDiscovery } from '../../types'; interface Props { - insight: AlertsInsight; + attackDiscovery: AttackDiscovery; } -const AttackChainComponent: React.FC = ({ insight }) => { - const tacticMetadata = useMemo(() => getTacticMetadata(insight), [insight]); +const AttackChainComponent: React.FC = ({ attackDiscovery }) => { + const tacticMetadata = useMemo(() => getTacticMetadata(attackDiscovery), [attackDiscovery]); return ( = ({ insight }) => { +const MiniAttackChainComponent: React.FC = ({ attackDiscovery }) => { const { euiTheme } = useEuiTheme(); - const tactics = useMemo(() => getTacticMetadata(insight), [insight]); + const tactics = useMemo(() => getTacticMetadata(attackDiscovery), [attackDiscovery]); const detectedTactics = useMemo(() => tactics.filter((tactic) => tactic.detected), [tactics]); const detectedTacticsList = useMemo( diff --git a/x-pack/plugins/security_solution/public/ai_insights/attack/mini_attack_chain/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts similarity index 85% rename from x-pack/plugins/security_solution/public/ai_insights/attack/mini_attack_chain/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts index a0bc3e0b94cfe..2332ab5a0c5ef 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/attack/mini_attack_chain/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const ATTACK_CHAIN_TOOLTIP = (tacticsCount: number) => - i18n.translate('xpack.securitySolution.aiInsights.miniAttackChain.attackChainTooltip', { + i18n.translate('xpack.securitySolution.attackDiscovery.miniAttackChain.attackChainTooltip', { defaultMessage: '{tacticsCount} {tacticsCount, plural, one {tactic was} other {tactics were}} identified in the analysis, providing insight into the nature of the detected violations:', values: { tacticsCount }, diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/insight_markdown_parser/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/insight_markdown_parser/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/insight_markdown_parser/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/insight_markdown_parser/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx index 11b9d38370935..6812ebb749602 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/insight_markdown_parser/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx @@ -11,7 +11,7 @@ import type { RemarkTokenizer } from '@elastic/eui'; import { getIconFromFieldName } from './helpers'; import type { ParsedField } from '../types'; -export const InsightMarkdownParser: Plugin = function () { +export const AttackDiscoveryMarkdownParser: Plugin = function () { // NOTE: the use of `this.Parse` and the other idioms below required by the Remark `Plugin` should NOT be replicated outside this file const Parser = this.Parser; const tokenizers = Parser.prototype.inlineTokenizers; diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/field_markdown_renderer/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.tsx similarity index 57% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.tsx index 6e45064e23a6a..bc6a19aecf741 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.tsx @@ -12,7 +12,7 @@ import { } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { InsightMarkdownParser } from './insight_markdown_parser'; +import { AttackDiscoveryMarkdownParser } from './attack_discovery_markdown_parser'; import { getFieldMarkdownRenderer } from './field_markdown_renderer'; interface Props { @@ -20,16 +20,16 @@ interface Props { markdown: string; } -const InsightMarkdownFormatterComponent: React.FC = ({ +const AttackDiscoveryMarkdownFormatterComponent: React.FC = ({ disableActions = false, markdown, }) => { - const insightParsingPluginList = useMemo( - () => [...getDefaultEuiMarkdownParsingPlugins(), InsightMarkdownParser], + const attackDiscoveryParsingPluginList = useMemo( + () => [...getDefaultEuiMarkdownParsingPlugins(), AttackDiscoveryMarkdownParser], [] ); - const insightProcessingPluginList = useMemo(() => { + const attackDiscoveryProcessingPluginList = useMemo(() => { const processingPluginList = getDefaultEuiMarkdownProcessingPlugins(); processingPluginList[1][1].components.fieldPlugin = getFieldMarkdownRenderer(disableActions); @@ -39,15 +39,17 @@ const InsightMarkdownFormatterComponent: React.FC = ({ return ( {markdown} ); }; -InsightMarkdownFormatterComponent.displayName = 'InsightMarkdownFormatter'; +AttackDiscoveryMarkdownFormatterComponent.displayName = 'AttackDiscoveryMarkdownFormatter'; -export const InsightMarkdownFormatter = React.memo(InsightMarkdownFormatterComponent); +export const AttackDiscoveryMarkdownFormatter = React.memo( + AttackDiscoveryMarkdownFormatterComponent +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/types.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight_markdown_formatter/types.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/types.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actionable_summary/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.tsx similarity index 69% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actionable_summary/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.tsx index 85520e362c5a2..7f1dbe7be3b2e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actionable_summary/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.tsx @@ -9,20 +9,18 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import type { Replacements } from '@kbn/elastic-assistant-common'; import React, { useMemo } from 'react'; -import { InsightMarkdownFormatter } from '../../insight_markdown_formatter'; -import type { AlertsInsight } from '../../types'; +import { AttackDiscoveryMarkdownFormatter } from '../../attack_discovery_markdown_formatter'; +import type { AttackDiscovery } from '../../types'; import { ViewInAiAssistant } from '../view_in_ai_assistant'; interface Props { - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; showAnonymized?: boolean; } const ActionableSummaryComponent: React.FC = ({ - insight, - promptContextId, + attackDiscovery, replacements, showAnonymized = false, }) => { @@ -30,25 +28,31 @@ const ActionableSummaryComponent: React.FC = ({ () => Object.entries(replacements ?? {}).reduce( (acc, [key, value]) => acc.replace(key, value), - insight.entitySummaryMarkdown + attackDiscovery.entitySummaryMarkdown ), - [insight.entitySummaryMarkdown, replacements] + [attackDiscovery.entitySummaryMarkdown, replacements] ); return ( - - + diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/actions_placeholder/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/actions_placeholder/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/alerts_badge/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/alerts_badge/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx index 2d6289fccc3f1..3aeba84bee02f 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx @@ -14,15 +14,14 @@ import { AlertsBadge } from './alerts_badge'; import { MiniAttackChain } from '../../attack/mini_attack_chain'; import { TakeAction } from './take_action'; import * as i18n from './translations'; -import type { AlertsInsight } from '../../types'; +import type { AttackDiscovery } from '../../types'; interface Props { - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; } -const ActionsComponent: React.FC = ({ insight, promptContextId, replacements }) => { +const ActionsComponent: React.FC = ({ attackDiscovery, replacements }) => { const { euiTheme } = useEuiTheme(); return ( @@ -41,7 +40,7 @@ const ActionsComponent: React.FC = ({ insight, promptContextId, replaceme
    - + @@ -71,7 +70,7 @@ const ActionsComponent: React.FC = ({ insight, promptContextId, replaceme - + @@ -88,11 +87,7 @@ const ActionsComponent: React.FC = ({ insight, promptContextId, replaceme - +
    ); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx similarity index 70% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx index 5c4bfcfea0d0a..5e019f6af6653 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx @@ -5,7 +5,6 @@ * 2.0. */ -import { useAssistantContext } from '@kbn/elastic-assistant'; import type { Replacements } from '@kbn/elastic-assistant-common'; import { EuiButtonEmpty, @@ -16,28 +15,21 @@ import { } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; -import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; import { useKibana } from '../../../../common/lib/kibana'; import { APP_ID } from '../../../../../common'; -import { getAlertsInsightMarkdown } from '../../../get_alerts_insight_markdown/get_alerts_insight_markdown'; +import { getAttackDiscoveryMarkdown } from '../../../get_attack_discovery_markdown/get_attack_discovery_markdown'; import * as i18n from './translations'; -import type { AlertsInsight } from '../../../types'; +import type { AttackDiscovery } from '../../../types'; import { useAddToNewCase } from '../use_add_to_case'; import { useAddToExistingCase } from '../use_add_to_existing_case'; +import { useViewInAiAssistant } from '../../view_in_ai_assistant/use_view_in_ai_assistant'; interface Props { - conversationTitle?: string; - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; } -const TakeActionComponent: React.FC = ({ - conversationTitle, - insight, - promptContextId, - replacements, -}) => { +const TakeActionComponent: React.FC = ({ attackDiscovery, replacements }) => { // get dependencies for creating / adding to cases: const { cases } = useKibana().services; const userCasesPermissions = cases.helpers.canUseCases([APP_ID]); @@ -47,25 +39,12 @@ const TakeActionComponent: React.FC = ({ ); const { disabled: addToCaseDisabled, onAddToNewCase } = useAddToNewCase({ canUserCreateAndReadCases, - title: insight.title, + title: attackDiscovery.title, }); const { onAddToExistingCase } = useAddToExistingCase({ canUserCreateAndReadCases, }); - // get dependencies for viewing insights in the AI assistant: - const { hasAssistantPrivilege } = useAssistantAvailability(); - const { showAssistantOverlay } = useAssistantContext(); - - // proxy show / hide calls to the assistant context, using our internal prompt context id: - const showOverlay = useCallback(() => { - showAssistantOverlay({ - conversationTitle, - promptContextId, - showOverlay: true, - }); - }, [conversationTitle, promptContextId, showAssistantOverlay]); - // boilerplate for the take action popover: const takeActionContextMenuPopoverId = useGeneratedHtmlId({ prefix: 'takeActionContextMenuPopover', @@ -74,14 +53,14 @@ const TakeActionComponent: React.FC = ({ const onButtonClick = useCallback(() => setPopover(!isPopoverOpen), [isPopoverOpen]); const closePopover = useCallback(() => setPopover(false), []); - // markdown for the alert insight, which will be exported to the case, or to the assistant: + // markdown for the attack discovery, which will be exported to the case, or to the assistant: const markdown = useMemo( () => - getAlertsInsightMarkdown({ - insight, + getAttackDiscoveryMarkdown({ + attackDiscovery, replacements, }), - [insight, replacements] + [attackDiscovery, replacements] ); // click handlers for the popover actions: @@ -89,26 +68,31 @@ const TakeActionComponent: React.FC = ({ closePopover(); onAddToNewCase({ - alertIds: insight.alertIds, + alertIds: attackDiscovery.alertIds, markdownComments: [markdown], replacements, }); - }, [closePopover, insight.alertIds, markdown, onAddToNewCase, replacements]); + }, [closePopover, attackDiscovery.alertIds, markdown, onAddToNewCase, replacements]); const onClickAddToExistingCase = useCallback(() => { closePopover(); onAddToExistingCase({ - alertIds: insight.alertIds, + alertIds: attackDiscovery.alertIds, markdownComments: [markdown], replacements, }); - }, [closePopover, insight.alertIds, markdown, onAddToExistingCase, replacements]); + }, [closePopover, attackDiscovery.alertIds, markdown, onAddToExistingCase, replacements]); + + const { showAssistantOverlay, disabled: viewInAiAssistantDisabled } = useViewInAiAssistant({ + attackDiscovery, + replacements, + }); const onViewInAiAssistant = useCallback(() => { closePopover(); - showOverlay(); - }, [closePopover, showOverlay]); + showAssistantOverlay?.(); + }, [closePopover, showAssistantOverlay]); // button for the popover: const button = useMemo( @@ -126,11 +110,6 @@ const TakeActionComponent: React.FC = ({ [onButtonClick] ); - const viewInAiAssistantDisabled = useMemo( - () => !hasAssistantPrivilege || promptContextId == null, - [hasAssistantPrivilege, promptContextId] - ); - // items for the popover: const items = useMemo( () => [ diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/translations.ts similarity index 62% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/translations.ts index 14bd7dd334142..3ca19eac855ed 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/take_action/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/translations.ts @@ -8,28 +8,28 @@ import { i18n } from '@kbn/i18n'; export const ADD_TO_NEW_CASE = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.takeAction.addToNewCaseButtonLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.takeAction.addToNewCaseButtonLabel', { defaultMessage: 'Add to new case', } ); export const ADD_TO_EXISTING_CASE = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.takeAction.addToExistingCaseButtonLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.takeAction.addToExistingCaseButtonLabel', { defaultMessage: 'Add to existing case', } ); export const TAKE_ACTION = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.takeAction.title', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.takeAction.title', { defaultMessage: 'Take action', } ); export const VIEW_IN_AI_ASSISTANT = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.takeAction.viewInAiAssistantButtonLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.takeAction.viewInAiAssistantButtonLabel', { defaultMessage: 'View in AI Assistant', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/translations.ts similarity index 72% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/translations.ts index 605b78711b567..7f5bb5606ac06 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/translations.ts @@ -8,14 +8,14 @@ import { i18n } from '@kbn/i18n'; export const ATTACK_CHAIN = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.attackChainLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.attackChainLabel', { defaultMessage: 'Attack chain:', } ); export const ALERTS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.actions.alertsLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.alertsLabel', { defaultMessage: 'Alerts:', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx index 95053d4356f27..d2418c43ef66b 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_case/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx @@ -83,7 +83,10 @@ export const useAddToNewCase = ({ [alertsIndexPattern, createCaseFlyout] ); - const headerContent = useMemo(() =>
    {i18n.CREATE_A_CASE_FOR_INSIGHT(title)}
    , [title]); + const headerContent = useMemo( + () =>
    {i18n.CREATE_A_CASE_FOR_ATTACK_DISCOVERY(title)}
    , + [title] + ); const onAddToNewCase = useCallback( ({ diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/translations.ts new file mode 100644 index 0000000000000..9303bf0990205 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/translations.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 { i18n } from '@kbn/i18n'; + +export const ADD_TO_CASE_SUCCESS = i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.addToCaseSuccessLabel', + { + defaultMessage: 'Successfully added attack discovery to the case', + } +); + +export const ADD_TO_NEW_CASE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.addToNewCaseButtonLabel', + { + defaultMessage: 'Add to new case', + } +); + +export const CREATE_A_CASE_FOR_ATTACK_DISCOVERY = (title: string) => + i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.createACaseForAttackDiscoveryHeaderText', + { + values: { title }, + defaultMessage: 'Create a case for attack discovery {title}', + } + ); + +export const CASE_DESCRIPTION = (attackDiscoveryTitle: string) => + i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.caseDescription', + { + values: { attackDiscoveryTitle }, + defaultMessage: 'This case was opened for attack discovery: _{attackDiscoveryTitle}_', + } + ); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_existing_case/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/actions/use_add_to_existing_case/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts new file mode 100644 index 0000000000000..5c5fbcdd4f6e4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const ADD_TO_CASE_SUCCESS = i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.addToCaseSuccessLabel', + { + defaultMessage: 'Successfully added attack discovery to the case', + } +); + +export const ADD_TO_NEW_CASE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.addToNewCaseButtonLabel', + { + defaultMessage: 'Add to new case', + } +); + +export const CREATE_A_CASE_FOR_ATTACK_DISCOVERY = (title: string) => + i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.actions.useAddToCase.createACaseForAttackDiscoveryHeaderText', + { + values: { title }, + defaultMessage: 'Create a case for attack discovery {title}', + } + ); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.tsx similarity index 52% rename from x-pack/plugins/security_solution/public/ai_insights/insight/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.tsx index 60f9e245fabc9..daa5abd264598 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.tsx @@ -7,71 +7,34 @@ import { css } from '@emotion/react'; import { EuiAccordion, EuiPanel, EuiSpacer, useEuiTheme, useGeneratedHtmlId } from '@elastic/eui'; -import { useAssistantOverlay } from '@kbn/elastic-assistant'; import type { Replacements } from '@kbn/elastic-assistant-common'; import React, { useCallback, useMemo, useState } from 'react'; import { ActionableSummary } from './actionable_summary'; import { Actions } from './actions'; -import { useAssistantAvailability } from '../../assistant/use_assistant_availability'; -import { getAlertsInsightMarkdown } from '../get_alerts_insight_markdown/get_alerts_insight_markdown'; import { Tabs } from './tabs'; import { Title } from './title'; -import type { AlertsInsight } from '../types'; - -const useAssistantNoop = () => ({ promptContextId: undefined }); - -/** - * This category is provided in the prompt context for the assistant - */ -const category = 'insight'; +import type { AttackDiscovery } from '../types'; interface Props { + attackDiscovery: AttackDiscovery; initialIsOpen?: boolean; - insight: AlertsInsight; onToggle?: (newState: 'open' | 'closed') => void; replacements?: Replacements; showAnonymized?: boolean; } -const InsightComponent: React.FC = ({ +const AttackDiscoveryPanelComponent: React.FC = ({ + attackDiscovery, initialIsOpen, - insight, onToggle, replacements, showAnonymized = false, }) => { const { euiTheme } = useEuiTheme(); - // get assistant privileges: - const { hasAssistantPrivilege } = useAssistantAvailability(); - const useAssistantHook = useMemo( - () => (hasAssistantPrivilege ? useAssistantOverlay : useAssistantNoop), - [hasAssistantPrivilege] - ); - - // the prompt context for this insight: - const getPromptContext = useCallback( - async () => - getAlertsInsightMarkdown({ - insight, - // note: we do NOT want to replace the replacements here - }), - [insight] - ); - const { promptContextId } = useAssistantHook( - category, - insight.title, // conversation title - insight.title, // description used in context pill - getPromptContext, - null, // accept the UUID default for this prompt context - null, // suggestedUserPrompt - null, // tooltip - replacements ?? null - ); - const htmlId = useGeneratedHtmlId({ - prefix: 'insightAccordion', + prefix: 'attackDiscoveryAccordion', }); const [isOpen, setIsOpen] = useState<'open' | 'closed'>(initialIsOpen ? 'open' : 'closed'); const updateIsOpen = useCallback(() => { @@ -82,23 +45,21 @@ const InsightComponent: React.FC = ({ }, [isOpen, onToggle]); const actions = useMemo( - () => ( - - ), - [insight, promptContextId, replacements] + () => , + [attackDiscovery, replacements] ); const buttonContent = useMemo( - () => , - [insight.title] + () => <Title isLoading={false} title={attackDiscovery.title} />, + [attackDiscovery.title] ); return ( <> - <EuiPanel data-test-subj="insight" hasBorder={true}> + <EuiPanel data-test-subj="attackDiscovery" hasBorder={true}> <EuiAccordion buttonContent={buttonContent} - data-test-subj="insightAccordion" + data-test-subj="attackDiscoveryAccordion" extraAction={actions} forceState={isOpen} id={htmlId} @@ -110,8 +71,7 @@ const InsightComponent: React.FC<Props> = ({ <EuiSpacer size="m" /> <ActionableSummary - insight={insight} - promptContextId={promptContextId} + attackDiscovery={attackDiscovery} replacements={replacements} showAnonymized={showAnonymized} /> @@ -124,12 +84,11 @@ const InsightComponent: React.FC<Props> = ({ border-radius: 0 0 6px 6px; margin: 0 ${euiTheme.size.m} 0 ${euiTheme.size.m}; `} - data-test-subj="insightTabsPanel" + data-test-subj="attackDiscoveryTabsPanel" hasBorder={true} > <Tabs - insight={insight} - promptContextId={promptContextId} + attackDiscovery={attackDiscovery} replacements={replacements} showAnonymized={showAnonymized} /> @@ -139,6 +98,6 @@ const InsightComponent: React.FC<Props> = ({ ); }; -InsightComponent.displayName = 'Insight'; +AttackDiscoveryPanelComponent.displayName = 'AttackDiscoveryPanel'; -export const Insight = React.memo(InsightComponent); +export const AttackDiscoveryPanel = React.memo(AttackDiscoveryPanelComponent); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/interval/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/interval/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/interval/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/interval/helpers.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/alerts/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx similarity index 72% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/alerts/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx index 169192848d4cc..d7caf0a7528c9 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/alerts/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx @@ -11,22 +11,22 @@ import React, { useMemo } from 'react'; import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../common/constants'; import { useKibana } from '../../../../common/lib/kibana'; -import type { AlertsInsight } from '../../../types'; +import type { AttackDiscovery } from '../../../types'; interface Props { - insight: AlertsInsight; + attackDiscovery: AttackDiscovery; replacements?: Replacements; } -const AlertsComponent: React.FC<Props> = ({ insight, replacements }) => { +const AlertsTabComponent: React.FC<Props> = ({ attackDiscovery, replacements }) => { const { triggersActionsUi } = useKibana().services; const originalAlertIds = useMemo( () => - insight.alertIds.map((alertId) => + attackDiscovery.alertIds.map((alertId) => replacements != null ? replacements[alertId] ?? alertId : alertId ), - [insight.alertIds, replacements] + [attackDiscovery.alertIds, replacements] ); const alertIdsQuery = useMemo( @@ -44,12 +44,17 @@ const AlertsComponent: React.FC<Props> = ({ insight, replacements }) => { () => ({ alertsTableConfigurationRegistry: triggersActionsUi.alertsTableConfigurationRegistry, configurationId: configId, - id: `ai-insights-alerts-${insight.id}`, + id: `attack-discovery-alerts-${attackDiscovery.id}`, featureIds: [AlertConsumers.SIEM], query: alertIdsQuery, showAlertStatusWithFlapping: false, }), - [triggersActionsUi.alertsTableConfigurationRegistry, configId, insight.id, alertIdsQuery] + [ + alertIdsQuery, + attackDiscovery.id, + configId, + triggersActionsUi.alertsTableConfigurationRegistry, + ] ); return ( @@ -57,4 +62,6 @@ const AlertsComponent: React.FC<Props> = ({ insight, replacements }) => { ); }; -export const Alerts = React.memo(AlertsComponent); +AlertsTabComponent.displayName = 'AlertsTab'; + +export const AlertsTab = React.memo(AlertsTabComponent); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx similarity index 78% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx index 5045eaf08cd6b..e80be849de08e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx @@ -14,26 +14,24 @@ import { AttackChain } from '../../../attack/attack_chain'; import { InvestigateInTimelineButton } from '../../../../common/components/event_details/table/investigate_in_timeline_button'; import { buildAlertsKqlFilter } from '../../../../detections/components/alerts_table/actions'; import { getTacticMetadata } from '../../../helpers'; -import { InsightMarkdownFormatter } from '../../../insight_markdown_formatter'; +import { AttackDiscoveryMarkdownFormatter } from '../../../attack_discovery_markdown_formatter'; import * as i18n from './translations'; -import type { AlertsInsight } from '../../../types'; +import type { AttackDiscovery } from '../../../types'; import { ViewInAiAssistant } from '../../view_in_ai_assistant'; interface Props { - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; showAnonymized?: boolean; } -const AiInsightsComponent: React.FC<Props> = ({ - insight, - promptContextId, +const AttackDiscoveryTabComponent: React.FC<Props> = ({ + attackDiscovery, replacements, showAnonymized = false, }) => { const { euiTheme } = useEuiTheme(); - const { detailsMarkdown, summaryMarkdown } = useMemo(() => insight, [insight]); + const { detailsMarkdown, summaryMarkdown } = useMemo(() => attackDiscovery, [attackDiscovery]); const summaryMarkdownWithReplacements = useMemo( () => @@ -53,22 +51,22 @@ const AiInsightsComponent: React.FC<Props> = ({ [detailsMarkdown, replacements] ); - const tacticMetadata = useMemo(() => getTacticMetadata(insight), [insight]); + const tacticMetadata = useMemo(() => getTacticMetadata(attackDiscovery), [attackDiscovery]); const originalAlertIds = useMemo( - () => insight.alertIds.map((id) => replacements?.[id] ?? id), - [insight.alertIds, replacements] + () => attackDiscovery.alertIds.map((id) => replacements?.[id] ?? id), + [attackDiscovery.alertIds, replacements] ); const filters = useMemo(() => buildAlertsKqlFilter('_id', originalAlertIds), [originalAlertIds]); return ( - <div data-test-subj="aiInsightsTab"> + <div data-test-subj="attackDiscoveryTab"> <EuiTitle data-test-subj="summaryTitle" size="xs"> <h2>{i18n.SUMMARY}</h2> </EuiTitle> <EuiSpacer size="s" /> - <InsightMarkdownFormatter + <AttackDiscoveryMarkdownFormatter disableActions={showAnonymized} markdown={showAnonymized ? summaryMarkdown : summaryMarkdownWithReplacements} /> @@ -79,7 +77,7 @@ const AiInsightsComponent: React.FC<Props> = ({ <h2>{i18n.DETAILS}</h2> </EuiTitle> <EuiSpacer size="s" /> - <InsightMarkdownFormatter + <AttackDiscoveryMarkdownFormatter disableActions={showAnonymized} markdown={showAnonymized ? detailsMarkdown : detailsMarkdownWithReplacements} /> @@ -92,14 +90,14 @@ const AiInsightsComponent: React.FC<Props> = ({ <h2>{i18n.ATTACK_CHAIN}</h2> </EuiTitle> <EuiSpacer size="s" /> - <AttackChain insight={insight} /> + <AttackChain attackDiscovery={attackDiscovery} /> <EuiSpacer size="l" /> </> )} <EuiFlexGroup alignItems="center" gutterSize="none"> <EuiFlexItem grow={false}> - <ViewInAiAssistant promptContextId={promptContextId} /> + <ViewInAiAssistant attackDiscovery={attackDiscovery} replacements={replacements} /> </EuiFlexItem> <EuiFlexItem css={css` @@ -130,6 +128,6 @@ const AiInsightsComponent: React.FC<Props> = ({ ); }; -AiInsightsComponent.displayName = 'AiInsights'; +AttackDiscoveryTabComponent.displayName = 'AttackDiscoveryTab'; -export const AiInsights = React.memo(AiInsightsComponent); +export const AttackDiscoveryTab = React.memo(AttackDiscoveryTabComponent); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts similarity index 55% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts index f3ab02bf262ad..a83495b2fcc62 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/ai_insights/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts @@ -8,35 +8,28 @@ import { i18n } from '@kbn/i18n'; export const ATTACK_CHAIN = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsights.attackChainLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.attackDiscovery.attackChainLabel', { defaultMessage: 'Attack Chain', } ); -export const ALERTS_FROM_INSIGHT = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsights.alertsFromInsightQueryTitle', - { - defaultMessage: 'Alerts from insight', - } -); - export const DETAILS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsights.detailsTitle', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.attackDiscovery.detailsTitle', { defaultMessage: 'Details', } ); export const INVESTIGATE_IN_TIMELINE = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsights.investigateInTimelineButtonLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.attackDiscovery.investigateInTimelineButtonLabel', { defaultMessage: 'Investigate in Timeline', } ); export const SUMMARY = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsights.summaryTitle', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.attackDiscovery.summaryTitle', { defaultMessage: 'Summary', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/get_tabs.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.tsx similarity index 68% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/get_tabs.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.tsx index 2c6fc75e23afe..8f74a52bdb650 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/get_tabs.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.tsx @@ -9,10 +9,10 @@ import { EuiSpacer } from '@elastic/eui'; import type { Replacements } from '@kbn/elastic-assistant-common'; import React from 'react'; -import { AiInsights } from './ai_insights'; -import { Alerts } from './alerts'; +import { AttackDiscoveryTab } from './attack_discovery_tab'; +import { AlertsTab } from './alerts_tab'; import * as i18n from './translations'; -import type { AlertsInsight } from '../../types'; +import type { AttackDiscovery } from '../../types'; interface TabInfo { content: JSX.Element; @@ -21,25 +21,22 @@ interface TabInfo { } export const getTabs = ({ - insight, - promptContextId, + attackDiscovery, replacements, showAnonymized = false, }: { - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; showAnonymized?: boolean; }): TabInfo[] => [ { - id: 'aiInsights--id', - name: i18n.AI_INSIGHTS, + id: 'attackDiscovery--id', + name: i18n.ATTACK_DISCOVERY, content: ( <> <EuiSpacer /> - <AiInsights - insight={insight} - promptContextId={promptContextId} + <AttackDiscoveryTab + attackDiscovery={attackDiscovery} replacements={replacements} showAnonymized={showAnonymized} /> @@ -52,7 +49,7 @@ export const getTabs = ({ content: ( <> <EuiSpacer /> - <Alerts insight={insight} replacements={replacements} /> + <AlertsTab attackDiscovery={attackDiscovery} replacements={replacements} /> </> ), }, diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.tsx index fcd2222507553..a11d63acb83bb 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.tsx @@ -10,24 +10,22 @@ import { EuiTabs, EuiTab } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import { getTabs } from './get_tabs'; -import type { AlertsInsight } from '../../types'; +import type { AttackDiscovery } from '../../types'; interface Props { - insight: AlertsInsight; - promptContextId: string | undefined; + attackDiscovery: AttackDiscovery; replacements?: Replacements; showAnonymized?: boolean; } const TabsComponent: React.FC<Props> = ({ - insight, - promptContextId, + attackDiscovery, replacements, showAnonymized = false, }) => { const tabs = useMemo( - () => getTabs({ insight, promptContextId, replacements, showAnonymized }), - [insight, promptContextId, replacements, showAnonymized] + () => getTabs({ attackDiscovery, replacements, showAnonymized }), + [attackDiscovery, replacements, showAnonymized] ); const [selectedTabId, setSelectedTabId] = useState(tabs[0].id); diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/translations.ts similarity index 58% rename from x-pack/plugins/security_solution/public/ai_insights/insight/tabs/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/translations.ts index 28846d3f0db9e..ef873da2fd17e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/tabs/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/translations.ts @@ -7,15 +7,15 @@ import { i18n } from '@kbn/i18n'; -export const AI_INSIGHTS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.aiInsightsTabLabel', +export const ATTACK_DISCOVERY = i18n.translate( + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.attackDiscoveryTabLabel', { - defaultMessage: 'AI Insights', + defaultMessage: 'Attack discovery', } ); export const ALERTS = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.tabs.alertsTabLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.tabs.alertsTabLabel', { defaultMessage: 'Alerts', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/title/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/insight/title/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.tsx similarity index 58% rename from x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.tsx index 6cf5f8f618fd2..b3ad4590f0363 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.tsx @@ -5,46 +5,37 @@ * 2.0. */ -import { AssistantAvatar, useAssistantContext } from '@kbn/elastic-assistant'; +import { AssistantAvatar } from '@kbn/elastic-assistant'; import type { Replacements } from '@kbn/elastic-assistant-common'; import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import React, { useCallback } from 'react'; +import React from 'react'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; -import { ALERT_SUMMARY_CONVERSATION_ID } from '../../../common/components/event_details/translations'; import * as i18n from './translations'; +import type { AttackDiscovery } from '../../types'; +import { useViewInAiAssistant } from './use_view_in_ai_assistant'; interface Props { + attackDiscovery: AttackDiscovery; compact?: boolean; - promptContextId: string | undefined; replacements?: Replacements; } const ViewInAiAssistantComponent: React.FC<Props> = ({ + attackDiscovery, compact = false, - promptContextId, replacements, }) => { - const { hasAssistantPrivilege } = useAssistantAvailability(); - const { showAssistantOverlay } = useAssistantContext(); - - // proxy show / hide calls to assistant context, using our internal prompt context id: - const showOverlay = useCallback(() => { - showAssistantOverlay({ - conversationTitle: ALERT_SUMMARY_CONVERSATION_ID, // a known conversation ID is required to auto-select the insight as context - promptContextId, - showOverlay: true, - }); - }, [promptContextId, showAssistantOverlay]); - - const disabled = !hasAssistantPrivilege || promptContextId == null; + const { showAssistantOverlay, disabled } = useViewInAiAssistant({ + attackDiscovery, + replacements, + }); return compact ? ( <EuiButtonEmpty data-test-subj="viewInAiAssistantCompact" disabled={disabled} iconType="expand" - onClick={showOverlay} + onClick={showAssistantOverlay} size="xs" > {i18n.VIEW_IN_AI_ASSISTANT} @@ -53,7 +44,7 @@ const ViewInAiAssistantComponent: React.FC<Props> = ({ <EuiButton data-test-subj="viewInAiAssistant" disabled={disabled} - onClick={showOverlay} + onClick={showAssistantOverlay} size="s" > <EuiFlexGroup alignItems="center" gutterSize="xs"> diff --git a/x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/translations.ts similarity index 77% rename from x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/translations.ts index 92d95f659ba9b..8adbaf682dec6 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/insight/view_in_ai_assistant/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const VIEW_IN_AI_ASSISTANT = i18n.translate( - 'xpack.securitySolution.aiInsights.insight.viewInAiAssistant.viewInAiAssistantButtonLabel', + 'xpack.securitySolution.attackDiscovery.attackDiscoveryPanel.viewInAiAssistant.viewInAiAssistantButtonLabel', { defaultMessage: 'View in AI Assistant', } diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts new file mode 100644 index 0000000000000..228f882863777 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo, useCallback } from 'react'; +import { useAssistantOverlay } from '@kbn/elastic-assistant'; +import type { Replacements } from '@kbn/elastic-assistant-common'; +import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; +import { getAttackDiscoveryMarkdown } from '../../get_attack_discovery_markdown/get_attack_discovery_markdown'; +import type { AttackDiscovery } from '../../types'; + +const useAssistantNoop = () => ({ promptContextId: undefined, showAssistantOverlay: () => {} }); + +/** + * This category is provided in the prompt context for the assistant + */ +const category = 'insight'; +export const useViewInAiAssistant = ({ + attackDiscovery, + replacements, +}: { + attackDiscovery: AttackDiscovery; + replacements?: Replacements; +}) => { + const { hasAssistantPrivilege } = useAssistantAvailability(); + + const useAssistantHook = useMemo( + () => (hasAssistantPrivilege ? useAssistantOverlay : useAssistantNoop), + [hasAssistantPrivilege] + ); + + // the prompt context for this insight: + const getPromptContext = useCallback( + async () => + getAttackDiscoveryMarkdown({ + attackDiscovery, + // note: we do NOT want to replace the replacements here + }), + [attackDiscovery] + ); + const { promptContextId, showAssistantOverlay: showOverlay } = useAssistantHook( + category, + attackDiscovery.title, // conversation title + attackDiscovery.title, // description used in context pill + getPromptContext, + attackDiscovery.id, // accept the UUID default for this prompt context + null, // suggestedUserPrompt + null, // tooltip + replacements ?? null + ); + + // proxy show / hide calls to assistant context, using our internal prompt context id: + const showAssistantOverlay = useCallback(() => { + showOverlay(true, true); + }, [showOverlay]); + + const disabled = !hasAssistantPrivilege || promptContextId == null; + + return useMemo( + () => ({ promptContextId, disabled, showAssistantOverlay }), + [promptContextId, disabled, showAssistantOverlay] + ); +}; diff --git a/x-pack/plugins/security_solution/public/ai_insights/get_alerts_insight_markdown/get_alerts_insight_markdown.ts b/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts similarity index 68% rename from x-pack/plugins/security_solution/public/ai_insights/get_alerts_insight_markdown/get_alerts_insight_markdown.ts rename to x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts index 1ab375208281e..e79470f670d8d 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/get_alerts_insight_markdown/get_alerts_insight_markdown.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts @@ -8,7 +8,7 @@ import type { Replacements } from '@kbn/elastic-assistant-common'; import { getTacticLabel, getTacticMetadata } from '../helpers'; -import type { AlertsInsight } from '../types'; +import type { AttackDiscovery } from '../types'; export const getMarkdownFields = (markdown: string): string => { const regex = new RegExp('{{\\s*(\\S+)\\s+(\\S+)\\s*}}', 'gm'); @@ -16,8 +16,8 @@ export const getMarkdownFields = (markdown: string): string => { return markdown.replace(regex, (_, field, value) => `\`${value}\``); }; -export const getAttackChainMarkdown = (insight: AlertsInsight): string => { - const tacticMetadata = getTacticMetadata(insight).filter((tactic) => tactic.detected); +export const getAttackChainMarkdown = (attackDiscovery: AttackDiscovery): string => { + const tacticMetadata = getTacticMetadata(attackDiscovery).filter((tactic) => tactic.detected); if (tacticMetadata.length === 0) { return ''; @@ -49,17 +49,17 @@ export const getMarkdownWithOriginalValues = ({ ); }; -export const getAlertsInsightMarkdown = ({ - insight, +export const getAttackDiscoveryMarkdown = ({ + attackDiscovery, replacements, }: { - insight: AlertsInsight; + attackDiscovery: AttackDiscovery; replacements?: Replacements; }): string => { - const title = getMarkdownFields(insight.title); - const entitySummaryMarkdown = getMarkdownFields(insight.entitySummaryMarkdown); - const summaryMarkdown = getMarkdownFields(insight.summaryMarkdown); - const detailsMarkdown = getMarkdownFields(insight.detailsMarkdown); + const title = getMarkdownFields(attackDiscovery.title); + const entitySummaryMarkdown = getMarkdownFields(attackDiscovery.entitySummaryMarkdown); + const summaryMarkdown = getMarkdownFields(attackDiscovery.summaryMarkdown); + const detailsMarkdown = getMarkdownFields(attackDiscovery.detailsMarkdown); const markdown = `## ${title} @@ -71,7 +71,7 @@ ${summaryMarkdown} ### Details ${detailsMarkdown} -${getAttackChainMarkdown(insight)} +${getAttackChainMarkdown(attackDiscovery)} `; if (replacements != null) { return getMarkdownWithOriginalValues({ markdown, replacements }); diff --git a/x-pack/plugins/security_solution/public/ai_insights/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/helpers.ts similarity index 89% rename from x-pack/plugins/security_solution/public/ai_insights/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/helpers.ts index 579f36f581c09..2cdd1354c9b6d 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/helpers.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/helpers.ts @@ -6,7 +6,7 @@ */ import * as i18n from './translations'; -import type { AlertsInsight } from './types'; +import type { AttackDiscovery } from './types'; export const RECONNAISSANCE = 'Reconnaissance'; export const INITIAL_ACCESS = 'Initial Access'; @@ -62,12 +62,12 @@ interface TacticMetadata { name: string; } -export const getTacticMetadata = (insight: AlertsInsight): TacticMetadata[] => +export const getTacticMetadata = (attackDiscovery: AttackDiscovery): TacticMetadata[] => MITRE_ATTACK_TACTICS_SUBSET.map((tactic, i) => ({ detected: - insight.mitreAttackTactics === undefined + attackDiscovery.mitreAttackTactics === undefined ? false - : insight.mitreAttackTactics.includes(tactic), + : attackDiscovery.mitreAttackTactics.includes(tactic), name: getTacticLabel(tactic), index: i, })); diff --git a/x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.test.tsx similarity index 56% rename from x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.test.tsx index dd1592ec0f8c3..423c30bddf207 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/hooks/use_insights_telemetry/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.test.tsx @@ -6,13 +6,13 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { useInsightsTelemetry } from '.'; +import { useAttackDiscoveryTelemetry } from '.'; import { createTelemetryServiceMock } from '../../../common/lib/telemetry/telemetry_service.mock'; -const reportInsightsGenerated = jest.fn(); +const reportAttackDiscoveriesGenerated = jest.fn(); const mockedTelemetry = { ...createTelemetryServiceMock(), - reportInsightsGenerated, + reportAttackDiscoveriesGenerated, }; jest.mock('../../../common/lib/kibana', () => { @@ -28,19 +28,22 @@ jest.mock('../../../common/lib/kibana', () => { }; }); -describe('useInsightsTelemetry', () => { +describe('useAttackDiscoveryTelemetry', () => { beforeEach(() => { jest.clearAllMocks(); }); it('should return the expected telemetry object with tracking functions', () => { - const { result } = renderHook(() => useInsightsTelemetry()); - expect(result.current).toHaveProperty('reportInsightsGenerated'); + const { result } = renderHook(() => useAttackDiscoveryTelemetry()); + expect(result.current).toHaveProperty('reportAttackDiscoveriesGenerated'); }); - it('Should call reportInsightsGenerated with appropriate actionTypeId when tracking is called', async () => { - const { result } = renderHook(() => useInsightsTelemetry()); - await result.current.reportInsightsGenerated({ actionTypeId: '.gen-ai', model: 'gpt-4' }); - expect(reportInsightsGenerated).toHaveBeenCalledWith({ + it('Should call reportAttackDiscoveriesGenerated with appropriate actionTypeId when tracking is called', async () => { + const { result } = renderHook(() => useAttackDiscoveryTelemetry()); + await result.current.reportAttackDiscoveriesGenerated({ + actionTypeId: '.gen-ai', + model: 'gpt-4', + }); + expect(reportAttackDiscoveriesGenerated).toHaveBeenCalledWith({ actionTypeId: '.gen-ai', model: 'gpt-4', }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.tsx new file mode 100644 index 0000000000000..a0cc331e88017 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_attack_discovery_telemetry/index.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 { ReportAttackDiscoveriesGeneratedParams } from '../../../common/lib/telemetry/events/attack_discovery/types'; +import { useKibana } from '../../../common/lib/kibana'; + +interface AttackDiscoveryTelemetry { + reportAttackDiscoveriesGenerated: (params: ReportAttackDiscoveriesGeneratedParams) => void; +} + +export const useAttackDiscoveryTelemetry = (): AttackDiscoveryTelemetry => { + const { + services: { telemetry }, + } = useKibana(); + + return { + reportAttackDiscoveriesGenerated: telemetry.reportAttackDiscoveriesGenerated, + }; +}; diff --git a/x-pack/plugins/security_solution/public/ai_insights/index.ts b/x-pack/plugins/security_solution/public/attack_discovery/index.ts similarity index 94% rename from x-pack/plugins/security_solution/public/ai_insights/index.ts rename to x-pack/plugins/security_solution/public/attack_discovery/index.ts index e9e14376b12bb..fa7667f60dcfe 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/index.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/index.ts @@ -8,7 +8,7 @@ import type { SecuritySubPlugin } from '../app/types'; import { routes } from './routes'; -export class AiInsights { +export class AttackDiscovery { public setup() {} public start(isEnabled = false): SecuritySubPlugin { diff --git a/x-pack/plugins/security_solution/public/ai_insights/jest.config.js b/x-pack/plugins/security_solution/public/attack_discovery/jest.config.js similarity index 72% rename from x-pack/plugins/security_solution/public/ai_insights/jest.config.js rename to x-pack/plugins/security_solution/public/attack_discovery/jest.config.js index c633ac8ac91e9..bfec7737e4211 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/jest.config.js +++ b/x-pack/plugins/security_solution/public/attack_discovery/jest.config.js @@ -8,12 +8,12 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../..', - roots: ['<rootDir>/x-pack/plugins/security_solution/public/ai_insights'], + roots: ['<rootDir>/x-pack/plugins/security_solution/public/attack_discovery'], coverageDirectory: - '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/ai_insights', + '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/attack_discovery', coverageReporters: ['text', 'html'], collectCoverageFrom: [ - '<rootDir>/x-pack/plugins/security_solution/public/ai_insights/**/*.{ts,tsx}', + '<rootDir>/x-pack/plugins/security_solution/public/attack_discovery/**/*.{ts,tsx}', ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/plugins/security_solution/public/ai_insights/links.ts b/x-pack/plugins/security_solution/public/attack_discovery/links.ts similarity index 54% rename from x-pack/plugins/security_solution/public/ai_insights/links.ts rename to x-pack/plugins/security_solution/public/attack_discovery/links.ts index 0f7435656a00e..e53fdc8fef053 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/links.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/links.ts @@ -7,20 +7,20 @@ import { i18n } from '@kbn/i18n'; -import { AI_INSIGHTS } from '../app/translations'; -import { SecurityPageName, SERVER_APP_ID, AI_INSIGHTS_PATH } from '../../common/constants'; +import { ATTACK_DISCOVERY } from '../app/translations'; +import { ATTACK_DISCOVERY_PATH, SecurityPageName, SERVER_APP_ID } from '../../common/constants'; import type { LinkItem } from '../common/links/types'; export const links: LinkItem = { capabilities: [`${SERVER_APP_ID}.show`], - experimentalKey: 'assistantAlertsInsights', + experimentalKey: 'attackDiscoveryEnabled', globalNavPosition: 4, globalSearchKeywords: [ - i18n.translate('xpack.securitySolution.appLinks.aiInsights', { - defaultMessage: 'AI Insights', + i18n.translate('xpack.securitySolution.appLinks.attackDiscovery', { + defaultMessage: 'Attack discovery', }), ], - id: SecurityPageName.aiInsights, - path: AI_INSIGHTS_PATH, - title: AI_INSIGHTS, + id: SecurityPageName.attackDiscovery, + path: ATTACK_DISCOVERY_PATH, + title: ATTACK_DISCOVERY, }; diff --git a/x-pack/plugins/security_solution/public/ai_insights/mock/mock_find_anonymization_fields_response.ts b/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_find_anonymization_fields_response.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/mock/mock_find_anonymization_fields_response.ts rename to x-pack/plugins/security_solution/public/attack_discovery/mock/mock_find_anonymization_fields_response.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/mock/mock_use_insights.ts b/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_use_attack_discovery.ts similarity index 96% rename from x-pack/plugins/security_solution/public/ai_insights/mock/mock_use_insights.ts rename to x-pack/plugins/security_solution/public/attack_discovery/mock/mock_use_attack_discovery.ts index be49853c3b3bc..639f66497583e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/mock/mock_use_insights.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_use_attack_discovery.ts @@ -5,30 +5,16 @@ * 2.0. */ -import type { Replacements } from '@kbn/elastic-assistant-common'; +import type { UseAttackDiscovery } from '../use_attack_discovery'; -import type { CachedInsights } from '../pages/session_storage'; -import type { AlertsInsight, GenerationInterval } from '../types'; - -interface MockUseInsightsResults { - approximateFutureTime: Date | null; - cachedInsights: Record<string, CachedInsights>; - fetchInsights: () => Promise<void>; - generationIntervals: Record<string, GenerationInterval[]> | undefined; - insights: AlertsInsight[]; - isLoading: boolean; - lastUpdated: Date | null; - replacements: Replacements; -} - -export const getMockUseInsightsWithCachedInsights = ( - fetchInsights: () => Promise<void> -): MockUseInsightsResults => ({ +export const getMockUseAttackDiscoveriesWithCachedAttackDiscoveries = ( + fetchAttackDiscoveries: () => Promise<void> +): UseAttackDiscovery => ({ approximateFutureTime: null, - cachedInsights: { + cachedAttackDiscoveries: { claudeV3SonnetUsEast1: { connectorId: 'claudeV3SonnetUsEast1', - insights: [ + attackDiscoveries: [ { alertIds: [ 'e770a817-0e87-4e4b-8e26-1bf504a209d2', @@ -170,7 +156,7 @@ export const getMockUseInsightsWithCachedInsights = ( }, claudeV3SonnetUsWest2: { connectorId: 'claudeV3SonnetUsWest2', - insights: [ + attackDiscoveries: [ { alertIds: [ 'e6b49cac-a5d0-4d22-a7e2-868881aa9d20', @@ -381,8 +367,8 @@ export const getMockUseInsightsWithCachedInsights = ( }, ], }, - fetchInsights, - insights: [ + fetchAttackDiscoveries, + attackDiscoveries: [ { alertIds: [ 'e770a817-0e87-4e4b-8e26-1bf504a209d2', @@ -518,28 +504,28 @@ export const getMockUseInsightsWithCachedInsights = ( isLoading: false, }); -export const getMockUseInsightsWithNoInsights = ( - fetchInsights: () => Promise<void> -): MockUseInsightsResults => ({ +export const getMockUseAttackDiscoveriesWithNoAttackDiscoveries = ( + fetchAttackDiscoveries: () => Promise<void> +): UseAttackDiscovery => ({ approximateFutureTime: null, - cachedInsights: {}, - fetchInsights, + cachedAttackDiscoveries: {}, + fetchAttackDiscoveries, generationIntervals: undefined, - insights: [], + attackDiscoveries: [], lastUpdated: null, replacements: {}, isLoading: false, }); -export const getMockUseInsightsWithNoInsightsLoading = ( - fetchInsights: () => Promise<void> -): MockUseInsightsResults => ({ +export const getMockUseAttackDiscoveriesWithNoAttackDiscoveriesLoading = ( + fetchAttackDiscoveries: () => Promise<void> +): UseAttackDiscovery => ({ approximateFutureTime: new Date('2024-04-15T17:13:29.470Z'), // <-- estimated generation completion time - cachedInsights: {}, - fetchInsights, + cachedAttackDiscoveries: {}, + fetchAttackDiscoveries, generationIntervals: undefined, - insights: [], + attackDiscoveries: [], lastUpdated: null, replacements: {}, - isLoading: true, // <-- insights are being generated + isLoading: true, // <-- attack discoveries are being generated }); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/animated_counter/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/animated_counter/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx index e488c4d0fd896..d5e8c8cb2bf2e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/empty_prompt/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx @@ -74,14 +74,8 @@ const EmptyPromptComponent: React.FC<Props> = ({ gutterSize="none" > <EuiFlexItem grow={false}> - <EuiText color="subdued" data-test-subj="basedOnSelectedFiltersLabel"> - {i18n.BASED_ON_SELECTED_FILTERS} - </EuiText> - </EuiFlexItem> - - <EuiFlexItem grow={false}> - <EuiText color="subdued" data-test-subj="startGeneratingInsightsLabel"> - {i18n.START_GENERATING_INSIGHTS} + <EuiText color="subdued" data-test-subj="startGeneratingDiscoveriesLabel"> + {i18n.START_GENERATING_DISCOVERIES} </EuiText> </EuiFlexItem> </EuiFlexGroup> @@ -121,7 +115,11 @@ const EmptyPromptComponent: React.FC<Props> = ({ </EuiFlexItem> <EuiFlexItem grow={false}> - <EuiLink data-test-subj="learnMore" href="#" target="_blank"> + <EuiLink + data-test-subj="learnMore" + href="https://www.elastic.co/guide/en/security/master/attack-discovery.html" + target="_blank" + > {i18n.LEARN_MORE} </EuiLink> </EuiFlexItem> diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts new file mode 100644 index 0000000000000..d71b47c3f099d --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.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 { i18n } from '@kbn/i18n'; + +export const ALERTS_WILL_BE_ANALYZED = (alertsCount: number) => + i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.alertsWillBeAnalyzedTitle', + { + defaultMessage: '{alertsCount, plural, one {alert} other {alerts}} will be analyzed', + values: { alertsCount }, + } + ); + +export const GENERATE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.generateLabel', + { + defaultMessage: 'Generate', + } +); + +export const LEARN_MORE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.learnMoreLabel', + { + defaultMessage: 'Learn more', + } +); + +export const SELECT_A_CONNECTOR = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.selectAConnectorLabel', + { + defaultMessage: 'Select a connector', + } +); + +export const START_GENERATING_DISCOVERIES = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.startGeneratingDiscoveriesLabel', + { + defaultMessage: 'Start generating discoveries via Elastic AI Assistant.', + } +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/header/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/header/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/header/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/translations.ts similarity index 72% rename from x-pack/plugins/security_solution/public/ai_insights/pages/header/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/header/translations.ts index 8744286cfd3ca..f155dda9e234f 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/header/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/translations.ts @@ -8,21 +8,21 @@ import { i18n } from '@kbn/i18n'; export const GENERATE = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.header.generateButton', + 'xpack.securitySolution.attackDiscovery.pages.header.generateButton', { defaultMessage: 'Generate', } ); export const LOADING = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.header.loadingButton', + 'xpack.securitySolution.attackDiscovery.pages.header.loadingButton', { defaultMessage: 'Loading...', } ); export const SELECT_A_CONNECTOR = i18n.translate( - 'xpack.securitySolution.aiInsights.pages.header.selectAConnector', + 'xpack.securitySolution.attackDiscovery.pages.header.selectAConnector', { defaultMessage: 'Select a connector', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/helpers.ts similarity index 85% rename from x-pack/plugins/security_solution/public/ai_insights/pages/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/helpers.ts index f62fb348c668c..930fb372ca8db 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/helpers.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/helpers.ts @@ -50,7 +50,7 @@ export function isErrorWithStructuredMessage(error: any): error is ErrorWithStru export const CONNECTOR_ID_LOCAL_STORAGE_KEY = 'connectorId'; -export const CACHED_INSIGHTS_SESSION_STORAGE_KEY = 'cachedInsights'; +export const CACHED_ATTACK_DISCOVERIES_SESSION_STORAGE_KEY = 'cachedAttackDiscoveries'; export const GENERATION_INTERVALS_LOCAL_STORAGE_KEY = 'generationIntervals'; @@ -74,31 +74,31 @@ export const getErrorToastText = ( }; export const showEmptyPrompt = ({ - insightsCount, + attackDiscoveriesCount, isLoading, }: { - insightsCount: number; + attackDiscoveriesCount: number; isLoading: boolean; -}): boolean => !isLoading && insightsCount === 0; +}): boolean => !isLoading && attackDiscoveriesCount === 0; export const showLoading = ({ connectorId, - insightsCount, + attackDiscoveriesCount, isLoading, loadingConnectorId, }: { connectorId: string | undefined; - insightsCount: number; + attackDiscoveriesCount: number; isLoading: boolean; loadingConnectorId: string | null; -}): boolean => isLoading && (loadingConnectorId === connectorId || insightsCount === 0); +}): boolean => isLoading && (loadingConnectorId === connectorId || attackDiscoveriesCount === 0); export const showSummary = ({ connectorId, - insightsCount, + attackDiscoveriesCount, loadingConnectorId, }: { connectorId: string | undefined; - insightsCount: number; + attackDiscoveriesCount: number; loadingConnectorId: string | null; -}): boolean => loadingConnectorId !== connectorId && insightsCount > 0; +}): boolean => loadingConnectorId !== connectorId && attackDiscoveriesCount > 0; diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx similarity index 79% rename from x-pack/plugins/security_solution/public/ai_insights/pages/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx index 9ed35daab79fa..b41b6f7f947aa 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx @@ -17,18 +17,18 @@ import React from 'react'; import { TestProviders } from '../../common/mock'; import { MockAssistantProvider } from '../../common/mock/mock_assistant_provider'; -import { AI_INSIGHTS_PATH } from '../../../common/constants'; +import { ATTACK_DISCOVERY_PATH } from '../../../common/constants'; import { mockHistory } from '../../common/utils/route/mocks'; -import { AiInsights } from '.'; +import { AttackDiscoveryPage } from '.'; import { mockTimelines } from '../../common/mock/mock_timelines_plugin'; import { UpsellingProvider } from '../../common/components/upselling_provider'; import { mockFindAnonymizationFieldsResponse } from '../mock/mock_find_anonymization_fields_response'; import { - getMockUseInsightsWithCachedInsights, - getMockUseInsightsWithNoInsightsLoading, -} from '../mock/mock_use_insights'; -import { AI_INSIGHTS_PAGE_TITLE } from './page_title/translations'; -import { useInsights } from '../use_insights'; + getMockUseAttackDiscoveriesWithCachedAttackDiscoveries, + getMockUseAttackDiscoveriesWithNoAttackDiscoveriesLoading, +} from '../mock/mock_use_attack_discovery'; +import { ATTACK_DISCOVERY_PAGE_TITLE } from './page_title/translations'; +import { useAttackDiscovery } from '../use_attack_discovery'; jest.mock('react-use', () => { const actual = jest.requireActual('react-use'); @@ -50,25 +50,25 @@ jest.mock( jest.mock('../../common/links', () => ({ useLinkInfo: jest.fn().mockReturnValue({ capabilities: ['siem.show'], - experimentalKey: 'assistantAlertsInsights', + experimentalKey: 'attackDiscoveryEnabled', globalNavPosition: 4, - globalSearchKeywords: ['AI Insights'], - id: 'ai_insights', - path: '/ai_insights', - title: 'AI Insights', + globalSearchKeywords: ['Attack discovery'], + id: 'attack_discovery', + path: '/attack_discovery', + title: 'Attack discovery', }), })); -jest.mock('../use_insights', () => ({ - useInsights: jest.fn().mockReturnValue({ +jest.mock('../use_attack_discovery', () => ({ + useAttackDiscovery: jest.fn().mockReturnValue({ approximateFutureTime: null, - cachedInsights: {}, - fetchInsights: jest.fn(), + attackDiscoveries: [], + cachedAttackDiscoveries: {}, + fetchAttackDiscoveries: jest.fn(), generationIntervals: undefined, - insights: [], + isLoading: false, lastUpdated: null, replacements: {}, - isLoading: false, }), })); @@ -175,13 +175,13 @@ const historyMock = { ...mockHistory, location: { hash: '', - pathname: AI_INSIGHTS_PATH, + pathname: ATTACK_DISCOVERY_PATH, search: '', state: '', }, }; -describe('AiInsights', () => { +describe('AttackDiscovery', () => { beforeEach(() => { jest.clearAllMocks(); }); @@ -192,7 +192,7 @@ describe('AiInsights', () => { <TestProviders> <Router history={historyMock}> <UpsellingProvider upsellingService={mockUpselling}> - <AiInsights /> + <AttackDiscoveryPage /> </UpsellingProvider> </Router> </TestProviders> @@ -200,7 +200,9 @@ describe('AiInsights', () => { }); it('renders the expected page title', () => { - expect(screen.getByTestId('aiInsightsPageTitle')).toHaveTextContent(AI_INSIGHTS_PAGE_TITLE); + expect(screen.getByTestId('attackDiscoveryPageTitle')).toHaveTextContent( + ATTACK_DISCOVERY_PAGE_TITLE + ); }); it('renders the header', () => { @@ -208,13 +210,13 @@ describe('AiInsights', () => { }); }); - describe('when there are no insights', () => { + describe('when there are no attack discoveries', () => { beforeEach(() => { render( <TestProviders> <Router history={historyMock}> <UpsellingProvider upsellingService={mockUpselling}> - <AiInsights /> + <AttackDiscoveryPage /> </UpsellingProvider> </Router> </TestProviders> @@ -233,8 +235,8 @@ describe('AiInsights', () => { expect(screen.getByTestId('emptyPrompt')).toBeInTheDocument(); }); - it('does NOT render insights', () => { - expect(screen.queryAllByTestId('insight')).toHaveLength(0); + it('does NOT render attack discoveries', () => { + expect(screen.queryAllByTestId('attackDiscovery')).toHaveLength(0); }); it('does NOT render the upgrade call to action', () => { @@ -242,18 +244,20 @@ describe('AiInsights', () => { }); }); - describe('when there are insights', () => { - const mockUseInsightsResults = getMockUseInsightsWithCachedInsights(jest.fn()); - const { insights } = mockUseInsightsResults; + describe('when there are attack discoveries', () => { + const mockUseAttackDiscoveriesResults = getMockUseAttackDiscoveriesWithCachedAttackDiscoveries( + jest.fn() + ); + const { attackDiscoveries } = mockUseAttackDiscoveriesResults; beforeEach(() => { - (useInsights as jest.Mock).mockReturnValue(mockUseInsightsResults); + (useAttackDiscovery as jest.Mock).mockReturnValue(mockUseAttackDiscoveriesResults); render( <TestProviders> <Router history={historyMock}> <UpsellingProvider upsellingService={mockUpselling}> - <AiInsights /> + <AttackDiscoveryPage /> </UpsellingProvider> </Router> </TestProviders> @@ -268,8 +272,8 @@ describe('AiInsights', () => { expect(screen.queryByTestId('loadingCallout')).toBeNull(); }); - it('renders the expected number of insights', () => { - expect(screen.queryAllByTestId('insight')).toHaveLength(insights.length); + it('renders the expected number of attack discoveries', () => { + expect(screen.queryAllByTestId('attackDiscovery')).toHaveLength(attackDiscoveries.length); }); it('does NOT render the empty prompt', () => { @@ -283,15 +287,15 @@ describe('AiInsights', () => { describe('when loading', () => { beforeEach(() => { - (useInsights as jest.Mock).mockReturnValue( - getMockUseInsightsWithNoInsightsLoading(jest.fn()) // <-- loading + (useAttackDiscovery as jest.Mock).mockReturnValue( + getMockUseAttackDiscoveriesWithNoAttackDiscoveriesLoading(jest.fn()) // <-- loading ); render( <TestProviders> <Router history={historyMock}> <UpsellingProvider upsellingService={mockUpselling}> - <AiInsights /> + <AttackDiscoveryPage /> </UpsellingProvider> </Router> </TestProviders> @@ -306,8 +310,8 @@ describe('AiInsights', () => { expect(screen.getByTestId('loadingCallout')).toBeInTheDocument(); }); - it('does NOT render insights', () => { - expect(screen.queryAllByTestId('insight')).toHaveLength(0); + it('does NOT render attack discoveries', () => { + expect(screen.queryAllByTestId('attackDiscovery')).toHaveLength(0); }); it('does NOT render the empty prompt', () => { @@ -334,7 +338,7 @@ describe('AiInsights', () => { <Router history={historyMock}> <UpsellingProvider upsellingService={mockUpselling}> <MockAssistantProvider assistantAvailability={assistantUnavailable}> - <AiInsights /> + <AttackDiscoveryPage /> </MockAssistantProvider> </UpsellingProvider> </Router> @@ -350,8 +354,8 @@ describe('AiInsights', () => { expect(screen.queryByTestId('summary')).toBeNull(); }); - it('does NOT render insights', () => { - expect(screen.queryAllByTestId('insight')).toHaveLength(0); + it('does NOT render attack discoveries', () => { + expect(screen.queryAllByTestId('attackDiscovery')).toHaveLength(0); }); it('does NOT render the loading callout', () => { diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx similarity index 65% rename from x-pack/plugins/security_solution/public/ai_insights/pages/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx index 71b7998099837..e0318f61995df 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { css } from '@emotion/react'; import { - AI_INSIGHTS_STORAGE_KEY, + ATTACK_DISCOVERY_STORAGE_KEY, DEFAULT_ASSISTANT_NAMESPACE, useAssistantContext, } from '@kbn/elastic-assistant'; @@ -20,6 +20,7 @@ import { useLocalStorage } from 'react-use'; import { SecurityRoutePageWrapper } from '../../common/components/security_route_page_wrapper'; import { SecurityPageName } from '../../../common/constants'; import { HeaderPage } from '../../common/components/header_page'; +import { useSpaceId } from '../../common/hooks/use_space_id'; import { SpyRoute } from '../../common/utils/route/spy_routes'; import { EmptyPrompt } from './empty_prompt'; import { Header } from './header'; @@ -30,15 +31,17 @@ import { showLoading, showSummary, } from './helpers'; -import { Insight } from '../insight'; +import { AttackDiscoveryPanel } from '../attack_discovery_panel'; import { LoadingCallout } from './loading_callout'; import { PageTitle } from './page_title'; import { Summary } from './summary'; import { Upgrade } from './upgrade'; -import { useInsights } from '../use_insights'; -import type { AlertsInsight } from '../types'; +import { useAttackDiscovery } from '../use_attack_discovery'; +import type { AttackDiscovery } from '../types'; + +const AttackDiscoveryPageComponent: React.FC = () => { + const spaceId = useSpaceId() ?? 'default'; -const AiInsightsComponent: React.FC = () => { const { assistantAvailability: { isAssistantEnabled }, knowledgeBase, @@ -49,13 +52,13 @@ const AiInsightsComponent: React.FC = () => { const onToggleShowAnonymized = useCallback(() => setShowAnonymized((current) => !current), []); // get the last selected connector ID from local storage: - const [localStorageAiInsightsConnectorId, setLocalStorageAiInsightsConnectorId] = + const [localStorageAttackDiscoveryConnectorId, setLocalStorageAttackDiscoveryConnectorId] = useLocalStorage<string>( - `${DEFAULT_ASSISTANT_NAMESPACE}.${AI_INSIGHTS_STORAGE_KEY}.${CONNECTOR_ID_LOCAL_STORAGE_KEY}` + `${DEFAULT_ASSISTANT_NAMESPACE}.${ATTACK_DISCOVERY_STORAGE_KEY}.${spaceId}.${CONNECTOR_ID_LOCAL_STORAGE_KEY}` ); const [connectorId, setConnectorId] = React.useState<string | undefined>( - localStorageAiInsightsConnectorId + localStorageAttackDiscoveryConnectorId ); // state for the connector loading in the background: @@ -63,38 +66,41 @@ const AiInsightsComponent: React.FC = () => { const { approximateFutureTime, - cachedInsights, - fetchInsights, + attackDiscoveries, + cachedAttackDiscoveries, + fetchAttackDiscoveries, generationIntervals, - insights, isLoading, lastUpdated, replacements, - } = useInsights({ + } = useAttackDiscovery({ connectorId, setConnectorId, setLoadingConnectorId, }); - // get last updated from the cached insights if it exists: + // get last updated from the cached attack discoveries if it exists: const [selectedConnectorLastUpdated, setSelectedConnectorLastUpdated] = useState<Date | null>( - cachedInsights[connectorId ?? '']?.updated ?? null + cachedAttackDiscoveries[connectorId ?? '']?.updated ?? null ); - // get cached insights if they exist: - const [selectedConnectorInsights, setSelectedConnectorInsights] = useState<AlertsInsight[]>( - cachedInsights[connectorId ?? '']?.insights ?? [] - ); + // get cached attack discoveries if they exist: + const [selectedConnectorAttackDiscoveries, setSelectedConnectorAttackDiscoveries] = useState< + AttackDiscovery[] + >(cachedAttackDiscoveries[connectorId ?? '']?.attackDiscoveries ?? []); - // get replacements from the cached insights if they exist: + // get replacements from the cached attack discoveries if they exist: const [selectedConnectorReplacements, setSelectedConnectorReplacements] = useState<Replacements>( - cachedInsights[connectorId ?? '']?.replacements ?? {} + cachedAttackDiscoveries[connectorId ?? '']?.replacements ?? {} ); - // the number of unique alerts in the insights: + // the number of unique alerts in the attack discoveries: const alertsCount = useMemo( - () => uniq(selectedConnectorInsights.flatMap((insight) => insight.alertIds)).length, - [selectedConnectorInsights] + () => + uniq( + selectedConnectorAttackDiscoveries.flatMap((attackDiscovery) => attackDiscovery.alertIds) + ).length, + [selectedConnectorAttackDiscoveries] ); /** The callback when users select a connector ID */ @@ -102,21 +108,21 @@ const AiInsightsComponent: React.FC = () => { (selectedConnectorId: string) => { // update the connector ID in local storage: setConnectorId(selectedConnectorId); - setLocalStorageAiInsightsConnectorId(selectedConnectorId); + setLocalStorageAttackDiscoveryConnectorId(selectedConnectorId); - // get the cached insights for the selected connector: - const cached = cachedInsights[selectedConnectorId]; + // get the cached attack discoveries for the selected connector: + const cached = cachedAttackDiscoveries[selectedConnectorId]; if (cached != null) { setSelectedConnectorReplacements(cached.replacements ?? {}); - setSelectedConnectorInsights(cached.insights ?? []); + setSelectedConnectorAttackDiscoveries(cached.attackDiscoveries ?? []); setSelectedConnectorLastUpdated(cached.updated ?? null); } else { setSelectedConnectorReplacements({}); - setSelectedConnectorInsights([]); + setSelectedConnectorAttackDiscoveries([]); setSelectedConnectorLastUpdated(null); } }, - [cachedInsights, setLocalStorageAiInsightsConnectorId] + [cachedAttackDiscoveries, setLocalStorageAttackDiscoveryConnectorId] ); // get connector intervals from generation intervals: @@ -127,15 +133,15 @@ const AiInsightsComponent: React.FC = () => { const pageTitle = useMemo(() => <PageTitle />, []); - const onGenerate = useCallback(async () => fetchInsights(), [fetchInsights]); + const onGenerate = useCallback(async () => fetchAttackDiscoveries(), [fetchAttackDiscoveries]); useEffect(() => { setSelectedConnectorReplacements(replacements); - setSelectedConnectorInsights(insights); + setSelectedConnectorAttackDiscoveries(attackDiscoveries); setSelectedConnectorLastUpdated(lastUpdated); - }, [insights, lastUpdated, replacements]); + }, [attackDiscoveries, lastUpdated, replacements]); - const insightsCount = selectedConnectorInsights.length; + const attackDiscoveriesCount = selectedConnectorAttackDiscoveries.length; if (!isAssistantEnabled) { return ( @@ -156,8 +162,8 @@ const AiInsightsComponent: React.FC = () => { data-test-subj="fullHeightContainer" > <SecurityRoutePageWrapper - data-test-subj="aiInsightsPage" - pageName={SecurityPageName.aiInsights} + data-test-subj="attackDiscoveryPage" + pageName={SecurityPageName.attackDiscovery} > <HeaderPage border title={pageTitle}> <Header @@ -170,13 +176,13 @@ const AiInsightsComponent: React.FC = () => { </HeaderPage> {showSummary({ + attackDiscoveriesCount, connectorId, - insightsCount, loadingConnectorId, }) && ( <Summary alertsCount={alertsCount} - insightsCount={insightsCount} + attackDiscoveriesCount={attackDiscoveriesCount} lastUpdated={selectedConnectorLastUpdated} onToggleShowAnonymized={onToggleShowAnonymized} showAnonymized={showAnonymized} @@ -185,8 +191,8 @@ const AiInsightsComponent: React.FC = () => { <> {showLoading({ + attackDiscoveriesCount, connectorId, - insightsCount, isLoading, loadingConnectorId, }) ? ( @@ -196,11 +202,11 @@ const AiInsightsComponent: React.FC = () => { connectorIntervals={connectorIntervals} /> ) : ( - selectedConnectorInsights.map((insight, i) => ( - <React.Fragment key={insight.id}> - <Insight + selectedConnectorAttackDiscoveries.map((attackDiscovery, i) => ( + <React.Fragment key={attackDiscovery.id}> + <AttackDiscoveryPanel + attackDiscovery={attackDiscovery} initialIsOpen={getInitialIsOpen(i)} - insight={insight} showAnonymized={showAnonymized} replacements={selectedConnectorReplacements} /> @@ -220,7 +226,7 @@ const AiInsightsComponent: React.FC = () => { <EuiSpacer size="xxl" /> <EuiFlexItem grow={false}> - {showEmptyPrompt({ insightsCount, isLoading }) && ( + {showEmptyPrompt({ attackDiscoveriesCount, isLoading }) && ( <EmptyPrompt alertsCount={knowledgeBase.latestAlerts} isDisabled={connectorId == null} @@ -232,10 +238,12 @@ const AiInsightsComponent: React.FC = () => { <EuiFlexItem grow={true} /> </EuiFlexGroup> - <SpyRoute pageName={SecurityPageName.aiInsights} /> + <SpyRoute pageName={SecurityPageName.attackDiscovery} /> </SecurityRoutePageWrapper> </div> ); }; -export const AiInsights = React.memo(AiInsightsComponent); +AttackDiscoveryPageComponent.displayName = 'AttackDiscoveryPage'; + +export const AttackDiscoveryPage = React.memo(AttackDiscoveryPageComponent); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/generation_timing/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/generation_timing/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/generation_timing/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/generation_timing/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/helpers.ts diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/translations.ts similarity index 75% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/translations.ts index 266c08cfd2d9e..502449d925676 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/countdown/last_times_popover/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/last_times_popover/translations.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; export const AVERAGE_TIME_IS_CALCULATED = (intervals: number) => i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.lastTimesPopover.aiIsCurrentlyAnalyzing', + 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.lastTimesPopover.aiIsCurrentlyAnalyzing', { defaultMessage: 'Average time is calculated over the last {intervals} {intervals, plural, =1 {generation} other {generations}} on the selected connector:', @@ -18,7 +18,7 @@ export const AVERAGE_TIME_IS_CALCULATED = (intervals: number) => ); export const SECONDS_ABBREVIATION = i18n.translate( - 'xpack.securitySolution.aiInsights.loadingCallout.countdown.lastTimesPopover.secondsAbbreviationLabel', + 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.lastTimesPopover.secondsAbbreviationLabel', { defaultMessage: 's', // short for seconds } diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/translations.ts new file mode 100644 index 0000000000000..02273d213d5e7 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/countdown/translations.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const ABOVE_THE_AVERAGE_TIME = i18n.translate( + 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.aboveTheAverageTimeLabel', + { + defaultMessage: 'Above the average time:', + } +); + +export const APPROXIMATE_TIME_REMAINING = i18n.translate( + 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.approximateTimeRemainingLabel', + { + defaultMessage: 'Approximate time remaining:', + } +); + +export const AVERAGE_TIME = i18n.translate( + 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.averageTimeLabel', + { + defaultMessage: 'Average time', + } +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/info_popover_body/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/info_popover_body/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/info_popover_body/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/info_popover_body/index.tsx diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/loading_messages/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/loading_messages/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/loading_messages/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/loading_messages/index.tsx index 42d7cb540a2bf..9acd7b4d2dbbf 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/loading_callout/loading_messages/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/loading_messages/index.tsx @@ -31,10 +31,10 @@ const LoadingMessagesComponent: React.FC<Props> = ({ alertsCount }) => { css={css` font-weight: 600; `} - data-test-subj="insightsGenerationInProgress" + data-test-subj="attackDiscoveryGenerationInProgress" size="s" > - {i18n.INSIGHTS_GENERATION_IN_PROGRESS} + {i18n.ATTACK_DISCOVERY_GENERATION_IN_PROGRESS} </EuiText> </EuiFlexItem> diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts new file mode 100644 index 0000000000000..a63a419b147b5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.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 { i18n } from '@kbn/i18n'; + +export const AI_IS_CURRENTLY_ANALYZING = (alertsCount: number) => + i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.loadingCallout.aiIsCurrentlyAnalyzing', + { + defaultMessage: `AI is currently analyzing up to {alertsCount} {alertsCount, plural, =1 {alert} other {alerts}} in the last 24 hours to generate discoveries.`, + values: { alertsCount }, + } + ); + +export const ATTACK_DISCOVERY_GENERATION_IN_PROGRESS = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.loadingCallout.attackDiscoveryGenerationInProgressLabel', + { + defaultMessage: 'Attack discovery in progress', + } +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/page_title/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/ai_insights/pages/page_title/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx index 25af7daf7f819..236ad73a6995b 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/page_title/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx @@ -26,8 +26,8 @@ const PageTitleComponent: React.FC = () => { return ( <EuiFlexGroup alignItems="center" data-test-subj="pageTitle" gutterSize="none"> <EuiFlexItem grow={false}> - <EuiTitle data-test-subj="aiInsightsPageTitle" size="l"> - <h1>{i18n.AI_INSIGHTS_PAGE_TITLE}</h1> + <EuiTitle data-test-subj="attackDiscoveryPageTitle" size="l"> + <h1>{i18n.ATTACK_DISCOVERY_PAGE_TITLE}</h1> </EuiTitle> </EuiFlexItem> diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/translations.ts new file mode 100644 index 0000000000000..5d2b8bf92dbac --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/translations.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const ATTACK_DISCOVERY_PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.pageTitle.pageTitle', + { + defaultMessage: 'Attack discovery', + } +); + +export const BETA = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.pageTitle.betaBadge', + { + defaultMessage: 'Beta', + } +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/session_storage/index.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/session_storage/index.ts similarity index 50% rename from x-pack/plugins/security_solution/public/ai_insights/pages/session_storage/index.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/session_storage/index.ts index a3c068c1bdece..2794660976bda 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/session_storage/index.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/session_storage/index.ts @@ -6,30 +6,30 @@ */ import type { Replacements } from '@kbn/elastic-assistant-common'; -import type { AlertsInsight } from '../../types'; +import type { AttackDiscovery } from '../../types'; -export interface CachedInsights { +export interface CachedAttackDiscoveries { connectorId: string; updated: Date; - insights: AlertsInsight[]; + attackDiscoveries: AttackDiscovery[]; replacements: Replacements; } -export const encodeCachedInsights = ( - cachedInsights: Record<string, CachedInsights> +export const encodeCachedAttackDiscoveries = ( + cachedAttackDiscoveries: Record<string, CachedAttackDiscoveries> ): string | null => { try { - return JSON.stringify(cachedInsights, null, 2); + return JSON.stringify(cachedAttackDiscoveries, null, 2); } catch { return null; } }; -export const decodeCachedInsights = ( - cachedInsights: string -): Record<string, CachedInsights> | null => { +export const decodeCachedAttackDiscoveries = ( + cachedAttackDiscoveries: string +): Record<string, CachedAttackDiscoveries> | null => { try { - return JSON.parse(cachedInsights); + return JSON.parse(cachedAttackDiscoveries); } catch { return null; } diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/summary/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/ai_insights/pages/summary/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx index 7cb9ff010bcf2..5794901a85892 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/summary/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx @@ -14,7 +14,7 @@ import { SHOW_REAL_VALUES, SHOW_ANONYMIZED_LABEL } from '../translations'; interface Props { alertsCount: number; - insightsCount: number; + attackDiscoveriesCount: number; lastUpdated: Date | null; onToggleShowAnonymized: () => void; showAnonymized: boolean; @@ -22,7 +22,7 @@ interface Props { const SummaryComponent: React.FC<Props> = ({ alertsCount, - insightsCount, + attackDiscoveriesCount, lastUpdated, onToggleShowAnonymized, showAnonymized, @@ -31,8 +31,8 @@ const SummaryComponent: React.FC<Props> = ({ <EuiFlexItem grow={false}> <SummaryCount alertsCount={alertsCount} + attackDiscoveriesCount={attackDiscoveriesCount} lastUpdated={lastUpdated} - insightsCount={insightsCount} /> <EuiSpacer size="l" /> </EuiFlexItem> diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.tsx index 5cc30e1f5936e..6ef7160eb267a 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.tsx @@ -10,17 +10,21 @@ import { css } from '@emotion/react'; import React, { useEffect, useMemo, useState } from 'react'; import moment from 'moment'; -import { ALERTS, INSIGHTS, LAST_GENERATED } from './translations'; +import { ALERTS, DISCOVERIES, LAST_GENERATED } from './translations'; export const EMPTY_LAST_UPDATED_DATE = '--'; interface Props { alertsCount: number; - insightsCount: number; + attackDiscoveriesCount: number; lastUpdated: Date | null; } -const SummaryCountComponent: React.FC<Props> = ({ alertsCount, insightsCount, lastUpdated }) => { +const SummaryCountComponent: React.FC<Props> = ({ + alertsCount, + attackDiscoveriesCount, + lastUpdated, +}) => { const { euiTheme } = useEuiTheme(); const [formattedDate, setFormattedDate] = useState<string>(EMPTY_LAST_UPDATED_DATE); @@ -71,8 +75,8 @@ const SummaryCountComponent: React.FC<Props> = ({ alertsCount, insightsCount, la size="xs" > <EuiFlexGroup alignItems="center" gutterSize="none"> - <EuiFlexItem data-test-subj="insightsCount" grow={false}> - {INSIGHTS(insightsCount)} + <EuiFlexItem data-test-subj="discoveriesCount" grow={false}> + {DISCOVERIES(attackDiscoveriesCount)} </EuiFlexItem> {Separator} diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/translations.ts similarity index 53% rename from x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/translations.ts index 1962420edefe4..3dbf5d9b8783e 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/summary_count/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/translations.ts @@ -8,19 +8,19 @@ import { i18n } from '@kbn/i18n'; export const ALERTS = (alertsCount: number) => - i18n.translate('xpack.securitySolution.aiInsights.summaryCount.alertsLabel', { + i18n.translate('xpack.securitySolution.attackDiscovery.summaryCount.alertsLabel', { defaultMessage: `{alertsCount} {alertsCount, plural, =1 {alert} other {alerts}}`, values: { alertsCount }, }); -export const INSIGHTS = (insightsCount: number) => - i18n.translate('xpack.securitySolution.aiInsights.summaryCount.insightsLabel', { - defaultMessage: `{insightsCount} {insightsCount, plural, =1 {insight} other {insights}}`, - values: { insightsCount }, +export const DISCOVERIES = (attackDiscoveriesCount: number) => + i18n.translate('xpack.securitySolution.attackDiscovery.summaryCount.discoveriesLabel', { + defaultMessage: `{attackDiscoveriesCount} {attackDiscoveriesCount, plural, =1 {discovery} other {discoveries}}`, + values: { attackDiscoveriesCount }, }); export const LAST_GENERATED = i18n.translate( - 'xpack.securitySolution.aiInsights.summaryCount.lastGeneratedLabel', + 'xpack.securitySolution.attackDiscovery.summaryCount.lastGeneratedLabel', { defaultMessage: 'Generated', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/translations.ts similarity index 59% rename from x-pack/plugins/security_solution/public/ai_insights/pages/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/translations.ts index e379e4019e143..3f8b87a9058c2 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/translations.ts @@ -7,22 +7,22 @@ import { i18n } from '@kbn/i18n'; -export const ERROR_GENERATING_INSIGHTS = i18n.translate( - 'xpack.securitySolution.aiInsights.errorGeneratingInsightsToastTitle', +export const ERROR_GENERATING_ATTACK_DISCOVERIES = i18n.translate( + 'xpack.securitySolution.attackDiscovery.errorGeneratingAttackDiscoveriesToastTitle', { - defaultMessage: 'Error generating insights', + defaultMessage: 'Error generating attack discoveries', } ); export const SHOW_REAL_VALUES = i18n.translate( - 'xpack.securitySolution.aiInsights.showRealValuesLabel', + 'xpack.securitySolution.attackDiscovery.showRealValuesLabel', { defaultMessage: 'Show real values', } ); export const SHOW_ANONYMIZED_LABEL = i18n.translate( - 'xpack.securitySolution.aiInsights.showAnonymizedLabel', + 'xpack.securitySolution.attackDiscovery.showAnonymizedLabel', { defaultMessage: 'Show anonymized', } diff --git a/x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx similarity index 79% rename from x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx index 6da099e42f2b1..bf2cd241408a1 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/pages/upgrade/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx @@ -25,7 +25,7 @@ const UpgradeComponent: React.FC = () => { <EuiFlexItem grow={false}> <EuiFlexGroup alignItems="center" direction="row" gutterSize="none"> <EuiFlexItem data-test-subj="upgradeTitle" grow={false}> - <span>{i18n.AI_INSIGHTS}</span> + <span>{i18n.FIND_POTENTIAL_ATTACKS_WITH_AI}</span> </EuiFlexItem> </EuiFlexGroup> </EuiFlexItem> @@ -38,8 +38,8 @@ const UpgradeComponent: React.FC = () => { () => ( <EuiFlexGroup alignItems="center" direction="column" gutterSize="none"> <EuiFlexItem grow={false}> - <EuiText color="subdued" data-test-subj="aiInsightsAreAvailable"> - {i18n.AI_INSIGHTS_ARE_AVAILABLE} + <EuiText color="subdued" data-test-subj="attackDiscoveryIsAvailable"> + {i18n.ATTACK_DISCOVERY_IS_AVAILABLE} </EuiText> </EuiFlexItem> @@ -53,7 +53,16 @@ const UpgradeComponent: React.FC = () => { [] ); - const actions = useMemo(() => <UpgradeButtons basePath={http.basePath.get()} />, [http.basePath]); + const actions = useMemo( + () => ( + <EuiFlexGroup justifyContent="center" gutterSize="none"> + <EuiFlexItem grow={false}> + <UpgradeButtons basePath={http.basePath.get()} /> + </EuiFlexItem> + </EuiFlexGroup> + ), + [http.basePath] + ); return <EuiEmptyPrompt actions={actions} body={body} data-test-subj="upgrade" title={title} />; }; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts new file mode 100644 index 0000000000000..eece0fb5a6870 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const FIND_POTENTIAL_ATTACKS_WITH_AI = i18n.translate( + 'xpack.securitySolution.attackDiscovery.upgrade.findPotentialAttacksWithAiTitle', + { + defaultMessage: 'Find potential attacks with AI', + } +); + +export const ATTACK_DISCOVERY_IS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.upgrade.attackDiscoveryIsAvailable', + { + defaultMessage: 'Your license does not support Attack discovery.', + } +); + +export const PLEASE_UPGRADE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.upgrade.pleaseUpgradeMessage', + { + defaultMessage: 'Please upgrade your license to use this feature.', + } +); + +export const UPGRADE = i18n.translate( + 'xpack.securitySolution.attackDiscovery.upgrade.upgradeButton', + { + defaultMessage: 'Upgrade', + } +); diff --git a/x-pack/plugins/security_solution/public/ai_insights/routes.tsx b/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx similarity index 67% rename from x-pack/plugins/security_solution/public/ai_insights/routes.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/routes.tsx index 14c3ac8f47532..10c9a70e4217f 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/routes.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx @@ -7,19 +7,19 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { AiInsights } from './pages'; +import { AttackDiscoveryPage } from './pages'; import type { SecuritySubPluginRoutes } from '../app/types'; import { SecurityPageName } from '../app/types'; -import { AI_INSIGHTS_PATH } from '../../common/constants'; +import { ATTACK_DISCOVERY_PATH } from '../../common/constants'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; import { SecurityRoutePageWrapper } from '../common/components/security_route_page_wrapper'; -export const AiInsightsRoutes = () => ( +export const AttackDiscoveryRoutes = () => ( <PluginTemplateWrapper> - <TrackApplicationView viewId={SecurityPageName.aiInsights}> - <SecurityRoutePageWrapper pageName={SecurityPageName.aiInsights}> - <AiInsights /> + <TrackApplicationView viewId={SecurityPageName.attackDiscovery}> + <SecurityRoutePageWrapper pageName={SecurityPageName.attackDiscovery}> + <AttackDiscoveryPage /> </SecurityRoutePageWrapper> </TrackApplicationView> </PluginTemplateWrapper> @@ -27,7 +27,7 @@ export const AiInsightsRoutes = () => ( export const routes: SecuritySubPluginRoutes = [ { - path: AI_INSIGHTS_PATH, - component: AiInsightsRoutes, + path: ATTACK_DISCOVERY_PATH, + component: AttackDiscoveryRoutes, }, ]; diff --git a/x-pack/plugins/security_solution/public/ai_insights/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/translations.ts similarity index 56% rename from x-pack/plugins/security_solution/public/ai_insights/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/translations.ts index 562ca0ac5e671..50bab7ae536eb 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/translations.ts @@ -8,71 +8,64 @@ import { i18n } from '@kbn/i18n'; export const COMMAND_AND_CONTROL = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.commandAndControlLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.commandAndControlLabel', { defaultMessage: 'Command & Control', } ); export const DISCOVERY = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.discoveryLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.discoveryLabel', { defaultMessage: 'Discovery', } ); export const EXECUTION = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.executionLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.executionLabel', { defaultMessage: 'Execution', } ); export const EXFILTRATION = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.exfiltrationLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.exfiltrationLabel', { defaultMessage: 'Exfiltration', } ); export const LATERAL_MOVEMENT = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.lateralMovementLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.lateralMovementLabel', { defaultMessage: 'Lateral Movement', } ); export const INITIAL_ACCESS = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.initialAccessLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.initialAccessLabel', { defaultMessage: 'Initial Access', } ); export const PERSISTENCE = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.persistenceLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.persistenceLabel', { defaultMessage: 'Persistence', } ); export const PRIVILEGE_ESCALATION = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.privilegeEscalationLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.privilegeEscalationLabel', { defaultMessage: 'Privilege Escalation', } ); export const RECONNAISSANCE = i18n.translate( - 'xpack.securitySolution.aiInsights.mitre.attack.tactics.reconnaissanceLabel', + 'xpack.securitySolution.attackDiscovery.mitre.attack.tactics.reconnaissanceLabel', { defaultMessage: 'Reconnaissance', } ); - -export const INSIGHTS_CONVERSATION_TITLE = i18n.translate( - 'xpack.securitySolution.aiInsights.insightsConversationTitle', - { - defaultMessage: 'Insights', - } -); diff --git a/x-pack/plugins/security_solution/public/ai_insights/types.ts b/x-pack/plugins/security_solution/public/attack_discovery/types.ts similarity index 81% rename from x-pack/plugins/security_solution/public/ai_insights/types.ts rename to x-pack/plugins/security_solution/public/attack_discovery/types.ts index 901ebf109a499..5a5c490042d06 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/types.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -export interface AlertsInsight { +export interface AttackDiscovery { alertIds: string[]; detailsMarkdown: string; entitySummaryMarkdown: string; @@ -15,7 +15,7 @@ export interface AlertsInsight { title: string; } -/** Generation intervals measure the time it takes to generate insights */ +/** Generation intervals measure the time it takes to generate attack discoveries */ export interface GenerationInterval { connectorId: string; date: Date; diff --git a/x-pack/plugins/security_solution/public/ai_insights/use_insights/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx similarity index 61% rename from x-pack/plugins/security_solution/public/ai_insights/use_insights/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx index 43fc74ddc9671..c37680709916c 100644 --- a/x-pack/plugins/security_solution/public/ai_insights/use_insights/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx @@ -6,14 +6,14 @@ */ import { - AI_INSIGHTS_STORAGE_KEY, + ATTACK_DISCOVERY_STORAGE_KEY, DEFAULT_ASSISTANT_NAMESPACE, useAssistantContext, useLoadConnectors, } from '@kbn/elastic-assistant'; -import type { AlertsInsightsPostRequestBody, Replacements } from '@kbn/elastic-assistant-common'; +import type { AttackDiscoveryPostRequestBody, Replacements } from '@kbn/elastic-assistant-common'; import { - AlertsInsightsPostResponse, + AttackDiscoveryPostResponse, ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, } from '@kbn/elastic-assistant-common'; import { isEmpty } from 'lodash/fp'; @@ -23,23 +23,39 @@ import { useLocalStorage, useSessionStorage } from 'react-use'; import * as uuid from 'uuid'; import { useFetchAnonymizationFields } from '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields'; +import { useSpaceId } from '../../common/hooks/use_space_id'; import { useKibana } from '../../common/lib/kibana'; import { replaceNewlineLiterals } from '../helpers'; +import { useAttackDiscoveryTelemetry } from '../hooks/use_attack_discovery_telemetry'; import { - CACHED_INSIGHTS_SESSION_STORAGE_KEY, + CACHED_ATTACK_DISCOVERIES_SESSION_STORAGE_KEY, GENERATION_INTERVALS_LOCAL_STORAGE_KEY, getErrorToastText, getFallbackActionTypeId, } from '../pages/helpers'; import { getAverageIntervalSeconds } from '../pages/loading_callout/countdown/last_times_popover/helpers'; -import type { CachedInsights } from '../pages/session_storage'; -import { encodeCachedInsights, decodeCachedInsights } from '../pages/session_storage'; -import { ERROR_GENERATING_INSIGHTS } from '../pages/translations'; -import type { AlertsInsight, GenerationInterval } from '../types'; +import type { CachedAttackDiscoveries } from '../pages/session_storage'; +import { + encodeCachedAttackDiscoveries, + decodeCachedAttackDiscoveries, +} from '../pages/session_storage'; +import { ERROR_GENERATING_ATTACK_DISCOVERIES } from '../pages/translations'; +import type { AttackDiscovery, GenerationInterval } from '../types'; const MAX_GENERATION_INTERVALS = 5; -export const useInsights = ({ +export interface UseAttackDiscovery { + approximateFutureTime: Date | null; + attackDiscoveries: AttackDiscovery[]; + cachedAttackDiscoveries: Record<string, CachedAttackDiscoveries>; + fetchAttackDiscoveries: () => Promise<void>; + generationIntervals: Record<string, GenerationInterval[]> | undefined; + isLoading: boolean; + lastUpdated: Date | null; + replacements: Replacements; +} + +export const useAttackDiscovery = ({ connectorId, setConnectorId, setLoadingConnectorId, @@ -47,7 +63,10 @@ export const useInsights = ({ connectorId: string | undefined; setConnectorId?: (connectorId: string | undefined) => void; setLoadingConnectorId?: (loadingConnectorId: string | null) => void; -}) => { +}): UseAttackDiscovery => { + const { reportAttackDiscoveriesGenerated } = useAttackDiscoveryTelemetry(); + const spaceId = useSpaceId() ?? 'default'; + // get Kibana services and connectors const { http, @@ -65,19 +84,20 @@ export const useInsights = ({ const { data: anonymizationFields } = useFetchAnonymizationFields(); - // get cached insights from session storage: - const [sessionStorageCachedInsights, setSessionStorageCachedInsights] = useSessionStorage<string>( - `${DEFAULT_ASSISTANT_NAMESPACE}.${AI_INSIGHTS_STORAGE_KEY}.${CACHED_INSIGHTS_SESSION_STORAGE_KEY}` - ); - const [cachedInsights, setCachedInsights] = useState<Record<string, CachedInsights>>( - decodeCachedInsights(sessionStorageCachedInsights) ?? {} - ); + // get cached attack discoveries from session storage: + const [sessionStorageCachedAttackDiscoveries, setSessionStorageCachedAttackDiscoveries] = + useSessionStorage<string>( + `${DEFAULT_ASSISTANT_NAMESPACE}.${ATTACK_DISCOVERY_STORAGE_KEY}.${spaceId}.${CACHED_ATTACK_DISCOVERIES_SESSION_STORAGE_KEY}` + ); + const [cachedAttackDiscoveries, setCachedAttackDiscoveries] = useState< + Record<string, CachedAttackDiscoveries> + >(decodeCachedAttackDiscoveries(sessionStorageCachedAttackDiscoveries) ?? {}); // get generation intervals from local storage: const [localStorageGenerationIntervals, setLocalStorageGenerationIntervals] = useLocalStorage< Record<string, GenerationInterval[]> >( - `${DEFAULT_ASSISTANT_NAMESPACE}.${AI_INSIGHTS_STORAGE_KEY}.${GENERATION_INTERVALS_LOCAL_STORAGE_KEY}` + `${DEFAULT_ASSISTANT_NAMESPACE}.${ATTACK_DISCOVERY_STORAGE_KEY}.${spaceId}.${GENERATION_INTERVALS_LOCAL_STORAGE_KEY}` ); const [generationIntervals, setGenerationIntervals] = React.useState< Record<string, GenerationInterval[]> | undefined @@ -92,27 +112,27 @@ export const useInsights = ({ // generation can take a long time, so we calculate an approximate future time: const [approximateFutureTime, setApproximateFutureTime] = useState<Date | null>(null); - // get cached insights if they exist: - const [insights, setInsights] = useState<AlertsInsight[]>( - cachedInsights[connectorId ?? '']?.insights ?? [] + // get cached attack discoveries if they exist: + const [attackDiscoveries, setAttackDiscoveries] = useState<AttackDiscovery[]>( + cachedAttackDiscoveries[connectorId ?? '']?.attackDiscoveries ?? [] ); - // get replacements from the cached insights if they exist: + // get replacements from the cached attack discoveries if they exist: const [replacements, setReplacements] = useState<Replacements>( - cachedInsights[connectorId ?? '']?.replacements ?? {} + cachedAttackDiscoveries[connectorId ?? '']?.replacements ?? {} ); - // get last updated from the cached insights if it exists: + // get last updated from the cached attack discoveries if it exists: const [lastUpdated, setLastUpdated] = useState<Date | null>( - cachedInsights[connectorId ?? '']?.updated ?? null + cachedAttackDiscoveries[connectorId ?? '']?.updated ?? null ); /** The callback when users click the Generate button */ - const fetchInsights = useCallback(async () => { + const fetchAttackDiscoveries = useCallback(async () => { const selectedConnector = aiConnectors?.find((connector) => connector.id === connectorId); const actionTypeId = getFallbackActionTypeId(selectedConnector?.actionTypeId); - const body: AlertsInsightsPostRequestBody = { + const body: AttackDiscoveryPostRequestBody = { actionTypeId, alertsIndexPattern: alertsIndexPattern ?? '', anonymizationFields: anonymizationFields?.data ?? [], @@ -138,14 +158,14 @@ export const useInsights = ({ const startTime = moment(); // start timing the generation - // call the internal API to generate insights: - const rawResponse = await http.fetch('/internal/elastic_assistant/insights/alerts', { + // call the internal API to generate attack discoveries: + const rawResponse = await http.fetch('/internal/elastic_assistant/attack_discovery', { body: JSON.stringify(body), method: 'POST', version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, }); - const parsedResponse = AlertsInsightsPostResponse.safeParse(rawResponse); + const parsedResponse = AttackDiscoveryPostResponse.safeParse(rawResponse); if (!parsedResponse.success) { throw new Error('Failed to parse the response'); } @@ -153,16 +173,16 @@ export const useInsights = ({ const endTime = moment(); const durationMs = endTime.diff(startTime); - // update the cached insights with the new insights: - const newInsights: AlertsInsight[] = - parsedResponse.data.insights?.map((insight) => ({ - alertIds: [...insight.alertIds], - detailsMarkdown: replaceNewlineLiterals(insight.detailsMarkdown), - entitySummaryMarkdown: replaceNewlineLiterals(insight.entitySummaryMarkdown), + // update the cached attack discoveries with the new discoveries: + const newAttackDiscoveries: AttackDiscovery[] = + parsedResponse.data.attackDiscoveries?.map((attackDiscovery) => ({ + alertIds: [...attackDiscovery.alertIds], + detailsMarkdown: replaceNewlineLiterals(attackDiscovery.detailsMarkdown), + entitySummaryMarkdown: replaceNewlineLiterals(attackDiscovery.entitySummaryMarkdown), id: uuid.v4(), - mitreAttackTactics: insight.mitreAttackTactics, - summaryMarkdown: replaceNewlineLiterals(insight.summaryMarkdown), - title: insight.title, + mitreAttackTactics: attackDiscovery.mitreAttackTactics, + summaryMarkdown: replaceNewlineLiterals(attackDiscovery.summaryMarkdown), + title: attackDiscovery.title, })) ?? []; const responseReplacements = parsedResponse.data.replacements ?? {}; @@ -170,18 +190,20 @@ export const useInsights = ({ const newLastUpdated = new Date(); - const newCachedInsights = { - ...cachedInsights, + const newCachedAttackDiscoveries = { + ...cachedAttackDiscoveries, [connectorId ?? '']: { connectorId: connectorId ?? '', - insights: newInsights, + attackDiscoveries: newAttackDiscoveries, replacements: newReplacements, updated: newLastUpdated, }, }; - setCachedInsights(newCachedInsights); - setSessionStorageCachedInsights(encodeCachedInsights(newCachedInsights) ?? ''); + setCachedAttackDiscoveries(newCachedAttackDiscoveries); + setSessionStorageCachedAttackDiscoveries( + encodeCachedAttackDiscoveries(newCachedAttackDiscoveries) ?? '' + ); // update the generation intervals with the latest timing: const previousConnectorIntervals: GenerationInterval[] = @@ -205,12 +227,13 @@ export const useInsights = ({ setLocalStorageGenerationIntervals(newGenerationIntervals); setReplacements(newReplacements); - setInsights(newInsights); + setAttackDiscoveries(newAttackDiscoveries); setLastUpdated(newLastUpdated); setConnectorId?.(connectorId); + reportAttackDiscoveriesGenerated({ actionTypeId }); } catch (error) { toasts?.addDanger(error, { - title: ERROR_GENERATING_INSIGHTS, + title: ERROR_GENERATING_ATTACK_DISCOVERIES, text: getErrorToastText(error), }); } finally { @@ -222,17 +245,18 @@ export const useInsights = ({ aiConnectors, alertsIndexPattern, anonymizationFields?.data, - cachedInsights, + cachedAttackDiscoveries, connectorId, connectorIntervals, generationIntervals, http, knowledgeBase.latestAlerts, replacements, + reportAttackDiscoveriesGenerated, setConnectorId, setLoadingConnectorId, setLocalStorageGenerationIntervals, - setSessionStorageCachedInsights, + setSessionStorageCachedAttackDiscoveries, toasts, traceOptions?.langSmithApiKey, traceOptions?.langSmithProject, @@ -240,10 +264,10 @@ export const useInsights = ({ return { approximateFutureTime, - cachedInsights, - fetchInsights, + attackDiscoveries, + cachedAttackDiscoveries, + fetchAttackDiscoveries, generationIntervals, - insights, isLoading, lastUpdated, replacements, diff --git a/x-pack/plugins/security_solution/public/cases/pages/index.tsx b/x-pack/plugins/security_solution/public/cases/pages/index.tsx index a4d43043b49e9..27cccce70c9a2 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/pages/index.tsx @@ -11,7 +11,7 @@ import type { CaseViewRefreshPropInterface } from '@kbn/cases-plugin/common'; import { CaseMetricsFeature } from '@kbn/cases-plugin/common'; import { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { DocumentDetailsRightPanelKey } from '../../flyout/document_details/right'; +import { DocumentDetailsRightPanelKey } from '../../flyout/document_details/shared/constants/panel_keys'; import { useTourContext } from '../../common/components/guided_onboarding_tour'; import { AlertsCasesTourSteps, @@ -39,6 +39,7 @@ import { useInsertTimeline } from '../components/use_insert_timeline'; import * as timelineMarkdownPlugin from '../../common/components/markdown_editor/plugins/timeline'; import { DetailsPanel } from '../../timelines/components/side_panel'; import { useFetchAlertData } from './use_fetch_alert_data'; +import { useUpsellingMessage } from '../../common/hooks/use_upselling'; const TimelineDetailsPanel = () => { const { browserFields, runtimeMappings } = useSourcererDataView(SourcererScopeName.detections); @@ -69,6 +70,8 @@ const CaseContainerComponent: React.FC = () => { [detectionsFormatUrl, detectionsUrlSearch] ); + const interactionsUpsellingMessage = useUpsellingMessage('investigation_guide_interactions'); + const showAlertDetails = useCallback( (alertId: string, index: string) => { if (isSecurityFlyoutEnabled) { @@ -187,7 +190,7 @@ const CaseContainerComponent: React.FC = () => { editor_plugins: { parsingPlugin: timelineMarkdownPlugin.parser, processingPluginRenderer: timelineMarkdownPlugin.renderer, - uiPlugin: timelineMarkdownPlugin.plugin, + uiPlugin: timelineMarkdownPlugin.plugin({ interactionsUpsellingMessage }), }, hooks: { useInsertTimeline, diff --git a/x-pack/plugins/security_solution/public/common/components/control_columns/row_action/index.tsx b/x-pack/plugins/security_solution/public/common/components/control_columns/row_action/index.tsx index 7454db7c1e484..a9810a03960fd 100644 --- a/x-pack/plugins/security_solution/public/common/components/control_columns/row_action/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/control_columns/row_action/index.tsx @@ -14,7 +14,7 @@ import { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; import { useKibana } from '../../../lib/kibana'; import { timelineActions } from '../../../../timelines/store'; import { ENABLE_EXPANDABLE_FLYOUT_SETTING } from '../../../../../common/constants'; -import { DocumentDetailsRightPanelKey } from '../../../../flyout/document_details/right'; +import { DocumentDetailsRightPanelKey } from '../../../../flyout/document_details/shared/constants/panel_keys'; import type { SetEventsDeleted, SetEventsLoading, diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx index fe5b628a07fd2..2e6886af03afa 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx @@ -26,11 +26,7 @@ import type { StepId, Step, } from '../types'; -import { - ALL_DONE_TEXT, - COLLAPSE_STEP_BUTTON_LABEL, - EXPAND_STEP_BUTTON_LABEL, -} from '../translations'; +import { ALL_DONE_TEXT, EXPAND_STEP_BUTTON_LABEL } from '../translations'; import { StepContent } from './step_content'; import { useCheckStepCompleted } from '../hooks/use_check_step_completed'; @@ -149,7 +145,8 @@ const CardStepComponent: React.FC<{ color="primary" onClick={toggleStep} iconType={isExpandedStep ? 'arrowUp' : 'arrowDown'} - aria-label={isExpandedStep ? COLLAPSE_STEP_BUTTON_LABEL : EXPAND_STEP_BUTTON_LABEL} + aria-label={EXPAND_STEP_BUTTON_LABEL(title ?? '')} + aria-expanded={isExpandedStep} size="xs" css={toggleButtonStyles} isDisabled={!hasStepContent} diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/card_step.styles.ts b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/card_step.styles.ts index 6180e6d914df9..b24fa458ecff5 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/card_step.styles.ts +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/card_step.styles.ts @@ -21,10 +21,15 @@ export const useCardStepStyles = () => { '.stepContentWrapper': { display: 'grid', gridTemplateRows: '1fr', - transition: `grid-template-rows ${HEIGHT_ANIMATION_DURATION}ms ease-in`, + visibility: 'visible', + transition: ` + grid-template-rows ${HEIGHT_ANIMATION_DURATION}ms ease-in, + visibility ${euiTheme.animation.normal} ${euiTheme.animation.resistance} + `, }, '&.step-panel-collapsed .stepContentWrapper': { + visibility: 'collapse', gridTemplateRows: '0fr', }, @@ -74,6 +79,8 @@ export const useCardStepStyles = () => { }), [ completeStepBackgroundColor, + euiTheme.animation.normal, + euiTheme.animation.resistance, euiTheme.base, euiTheme.colors.body, euiTheme.colors.successText, diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts index c263e52182175..bad766fc41a4d 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts @@ -269,16 +269,8 @@ export const ALL_DONE_TEXT = i18n.translate( } ); -export const COLLAPSE_STEP_BUTTON_LABEL = i18n.translate( - 'xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label', - { - defaultMessage: 'Collapse', - } -); - -export const EXPAND_STEP_BUTTON_LABEL = i18n.translate( - 'xpack.securitySolution.onboarding.togglePanel.expandStepButton.label', - { - defaultMessage: 'Expand', - } -); +export const EXPAND_STEP_BUTTON_LABEL = (title: string) => + i18n.translate('xpack.securitySolution.onboarding.togglePanel.expandStepButton.ariaLabel', { + defaultMessage: 'Expand "{title}"', + values: { title }, + }); diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx index 2f439c55a7d1c..5662c68ec1c32 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx @@ -74,9 +74,15 @@ const MarkdownEditorComponent = forwardRef<MarkdownEditorRef, MarkdownEditorProp }, [autoFocusDisabled]); const insightsUpsellingMessage = useUpsellingMessage('investigation_guide'); + const interactionsUpsellingMessage = useUpsellingMessage('investigation_guide_interactions'); const uiPluginsWithState = useMemo(() => { - return includePlugins ? uiPlugins({ insightsUpsellingMessage }) : undefined; - }, [insightsUpsellingMessage, includePlugins]); + return includePlugins + ? uiPlugins({ + insightsUpsellingMessage, + interactionsUpsellingMessage, + }) + : undefined; + }, [includePlugins, insightsUpsellingMessage, interactionsUpsellingMessage]); // @ts-expect-error update types useImperativeHandle(ref, () => { diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts index a34ac40ec8a28..607ed6d94959b 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts @@ -22,16 +22,24 @@ export const platinumOnlyPluginTokens = [insightMarkdownPlugin.insightPrefix]; export const uiPlugins = ({ insightsUpsellingMessage, + interactionsUpsellingMessage, }: { insightsUpsellingMessage: string | null; + interactionsUpsellingMessage: string | null; }) => { const currentPlugins = nonStatefulUiPlugins.map((plugin) => plugin.name); const insightPluginWithLicense = insightMarkdownPlugin.plugin({ insightsUpsellingMessage, }); + const timelinePluginWithLicense = timelineMarkdownPlugin.plugin({ + interactionsUpsellingMessage, + }); + const osqueryPluginWithLicense = osqueryMarkdownPlugin.plugin({ + interactionsUpsellingMessage, + }); if (currentPlugins.includes(insightPluginWithLicense.name) === false) { - nonStatefulUiPlugins.push(timelineMarkdownPlugin.plugin); - nonStatefulUiPlugins.push(osqueryMarkdownPlugin.plugin); + nonStatefulUiPlugins.push(timelinePluginWithLicense); + nonStatefulUiPlugins.push(osqueryPluginWithLicense); nonStatefulUiPlugins.push(insightPluginWithLicense); } else { // When called for the second time we need to update insightMarkdownPlugin diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.test.tsx index 2b4ae4d2d9fcf..8ea10b1c54f8c 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.test.tsx @@ -14,10 +14,10 @@ import { DEFAULT_TO, } from '../../../../../../common/constants'; import { KibanaServices } from '../../../../lib/kibana'; -import { licenseService } from '../../../../hooks/use_license'; import type { DefaultTimeRangeSetting } from '../../../../utils/default_date_settings'; import { plugin, renderer as Renderer } from '.'; import type { InvestigateInTimelineButtonProps } from '../../../event_details/table/investigate_in_timeline_button'; +import { useUpsellingMessage } from '../../../../hooks/use_upselling'; jest.mock('../../../../lib/kibana'); const mockGetServices = KibanaServices.get as jest.Mock; @@ -59,24 +59,12 @@ const mockTimeRange = ( })); }; -jest.mock('../../../../hooks/use_license', () => { - const licenseServiceInstance = { - isPlatinumPlus: jest.fn(), - isEnterprise: jest.fn(() => true), - }; - return { - licenseService: licenseServiceInstance, - useLicense: () => { - return licenseServiceInstance; - }, - }; -}); -const licenseServiceMock = licenseService as jest.Mocked<typeof licenseService>; +jest.mock('../../../../hooks/use_upselling'); describe('insight component renderer', () => { - describe('when license is at least platinum plus', () => { + describe('when there is no upselling message', () => { beforeAll(() => { - licenseServiceMock.isPlatinumPlus.mockReturnValue(true); + (useUpsellingMessage as jest.Mock).mockReturnValue(null); mockTimeRange(null); }); it('renders correctly with valid date strings with no timestamp from results', () => { @@ -106,9 +94,9 @@ describe('insight component renderer', () => { }); }); - describe('when license is not at least platinum plus', () => { + describe('when there is an upselling message', () => { beforeAll(() => { - licenseServiceMock.isPlatinumPlus.mockReturnValue(false); + (useUpsellingMessage as jest.Mock).mockReturnValue('Go for Platinum!'); mockTimeRange(null); }); it('renders a disabled eui button with label', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx index 2faca21677863..d5a9775bdcc6a 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx @@ -28,6 +28,7 @@ import { EuiSelect, EuiFlexGroup, EuiFlexItem, + EuiToolTip, } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { css } from '@emotion/react'; @@ -36,6 +37,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import type { Filter } from '@kbn/es-query'; import { FilterStateStore } from '@kbn/es-query'; import { useForm, FormProvider, useController } from 'react-hook-form'; +import { useUpsellingMessage } from '../../../../hooks/use_upselling'; import { useAppToasts } from '../../../../hooks/use_app_toasts'; import { useKibana } from '../../../../lib/kibana'; import { useInsightQuery } from './use_insight_query'; @@ -240,19 +242,21 @@ const InsightComponent = ({ relativeFrom, relativeTo, }: InsightComponentProps) => { - const isPlatinum = useLicense().isPlatinumPlus(); + const insightsUpsellingMessage = useUpsellingMessage('investigation_guide'); - if (isPlatinum === false) { + if (insightsUpsellingMessage) { return ( <> - <EuiButton - isDisabled={true} - iconSide={'left'} - iconType={'timeline'} - data-test-subj="insight-investigate-in-timeline-button" - > - {`${label}`} - </EuiButton> + <EuiToolTip content={insightsUpsellingMessage}> + <EuiButton + isDisabled={true} + iconSide={'left'} + iconType={'timeline'} + data-test-subj="insight-investigate-in-timeline-button" + > + {`${label}`} + </EuiButton> + </EuiToolTip> <div>{description}</div> </> ); diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx index 7e12c1c42d001..6cc54184db60c 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx @@ -156,19 +156,26 @@ const OsqueryEditorComponent = ({ const OsqueryEditor = React.memo(OsqueryEditorComponent); -export const plugin = { - name: 'osquery', - button: { - label: 'Osquery', - iconType: 'logoOsquery', - }, - helpText: ( - <div> - <EuiCodeBlock language="md" fontSize="l" paddingSize="s" isCopyable> - {'!{osquery{options}}'} - </EuiCodeBlock> - <EuiSpacer size="s" /> - </div> - ), - editor: OsqueryEditor, +export const plugin = ({ + interactionsUpsellingMessage, +}: { + interactionsUpsellingMessage: string | null; +}) => { + return { + name: 'osquery', + button: { + label: interactionsUpsellingMessage ?? 'Osquery', + iconType: 'logoOsquery', + isDisabled: !!interactionsUpsellingMessage, + }, + helpText: ( + <div> + <EuiCodeBlock language="md" fontSize="l" paddingSize="s" isCopyable> + {'!{osquery{options}}'} + </EuiCodeBlock> + <EuiSpacer size="s" /> + </div> + ), + editor: OsqueryEditor, + }; }; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx index 20bdb4d7a9e56..04963e70f9cfa 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx @@ -10,8 +10,9 @@ import React, { useCallback, useContext, useMemo, useState } from 'react'; import { reduce } from 'lodash'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; -import { EuiButton } from '@elastic/eui'; +import { EuiButton, EuiToolTip } from '@elastic/eui'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; +import { useUpsellingMessage } from '../../../../hooks/use_upselling'; import { BasicAlertDataContext } from '../../../event_details/investigation_guide_view'; import { expandDottedObject } from '../../../../../../common/utils/expand_dotted'; import OsqueryLogo from './osquery_icon/osquery.svg'; @@ -40,6 +41,8 @@ export const OsqueryRenderer = ({ const handleClose = useCallback(() => setShowFlyout(false), [setShowFlyout]); + const interactionsUpsellingMessage = useUpsellingMessage('investigation_guide_interactions'); + const ecsData = useMemo(() => { const fieldsMap: Record<string, string> = reduce( data, @@ -54,12 +57,18 @@ export const OsqueryRenderer = ({ return ( <> - <StyledEuiButton iconType={OsqueryLogo} onClick={handleOpen}> - {configuration.label ?? - i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', { - defaultMessage: 'Run Osquery', - })} - </StyledEuiButton> + <EuiToolTip content={interactionsUpsellingMessage}> + <StyledEuiButton + iconType={OsqueryLogo} + onClick={handleOpen} + disabled={!!interactionsUpsellingMessage} + > + {configuration.label ?? + i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', { + defaultMessage: 'Run Osquery', + })} + </StyledEuiButton> + </EuiToolTip> {showFlyout && ( <OsqueryFlyout defaultValues={{ diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx index 4e9654a82f8e7..c11bc6ff26186 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx @@ -75,18 +75,25 @@ const TimelineEditorComponent: React.FC<TimelineEditorProps> = ({ onClosePopover const TimelineEditor = memo(TimelineEditorComponent); -export const plugin: EuiMarkdownEditorUiPlugin = { - name: ID, - button: { - label: i18n.INSERT_TIMELINE, - iconType: 'timeline', - }, - helpText: ( - <EuiCodeBlock language="md" paddingSize="s" fontSize="l"> - {'[title](url)'} - </EuiCodeBlock> - ), - editor: function editor({ node, onSave, onCancel }) { - return <TimelineEditor onClosePopover={onCancel} onInsert={onSave} />; - }, +export const plugin = ({ + interactionsUpsellingMessage, +}: { + interactionsUpsellingMessage: string | null; +}): EuiMarkdownEditorUiPlugin => { + return { + name: ID, + button: { + label: interactionsUpsellingMessage ?? i18n.INSERT_TIMELINE, + iconType: 'timeline', + isDisabled: !!interactionsUpsellingMessage, + }, + helpText: ( + <EuiCodeBlock language="md" paddingSize="s" fontSize="l"> + {'[title](url)'} + </EuiCodeBlock> + ), + editor: function editor({ node, onSave, onCancel }) { + return <TimelineEditor onClosePopover={onCancel} onInsert={onSave} />; + }, + }; }; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx index 307378b2076bf..c2460cf7f5d19 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx @@ -8,6 +8,7 @@ import React, { useCallback, memo } from 'react'; import { EuiToolTip, EuiLink } from '@elastic/eui'; +import { useUpsellingMessage } from '../../../../hooks/use_upselling'; import { useTimelineClick } from '../../../../utils/timeline/use_timeline_click'; import type { TimelineProps } from './types'; import * as i18n from './translations'; @@ -20,6 +21,8 @@ export const TimelineMarkDownRendererComponent: React.FC<TimelineProps> = ({ }) => { const { addError } = useAppToasts(); + const interactionsUpsellingMessage = useUpsellingMessage('investigation_guide_interactions'); + const handleTimelineClick = useTimelineClick(); const onError = useCallback( @@ -37,8 +40,12 @@ export const TimelineMarkDownRendererComponent: React.FC<TimelineProps> = ({ [id, graphEventId, handleTimelineClick, onError] ); return ( - <EuiToolTip content={i18n.TIMELINE_ID(id ?? '')}> - <EuiLink onClick={onClickTimeline} data-test-subj={`markdown-timeline-link-${id}`}> + <EuiToolTip content={interactionsUpsellingMessage ?? i18n.TIMELINE_ID(id ?? '')}> + <EuiLink + onClick={onClickTimeline} + disabled={!!interactionsUpsellingMessage} + data-test-subj={`markdown-timeline-link-${id}`} + > {title} </EuiLink> </EuiToolTip> diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.test.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.test.tsx index b6d6f1bf0e69e..cc8f857e55b49 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.test.tsx @@ -11,6 +11,8 @@ import { render } from '@testing-library/react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; import { TestProviders } from '../../mock'; import { MarkdownRenderer } from './renderer'; +import { UpsellingService } from '@kbn/security-solution-upselling/service'; +import { UpsellingProvider } from '../upselling_provider'; jest.mock('../../utils/default_date_settings', () => { const original = jest.requireActual('../../utils/default_date_settings'); @@ -59,6 +61,8 @@ jest.mock('../../hooks/use_app_toasts', () => ({ }), })); +const mockUpselling = new UpsellingService(); + describe('Markdown', () => { describe('markdown links', () => { const markdownWithLink = 'A link to an external site [External Site](https://google.com)'; @@ -114,7 +118,9 @@ describe('Markdown', () => { test('displays an upgrade message with a premium markdown plugin', () => { const { queryByText, getByText } = render( <TestProviders> - <MarkdownRenderer>{`!{investigate{"label": "", "providers": [[{"field": "event.id", "value": "{{kibana.alert.original_event.id}}", "queryType": "phrase", "excluded": "false"}]]}}`}</MarkdownRenderer> + <UpsellingProvider upsellingService={mockUpselling}> + <MarkdownRenderer>{`!{investigate{"label": "", "providers": [[{"field": "event.id", "value": "{{kibana.alert.original_event.id}}", "queryType": "phrase", "excluded": "false"}]]}}`}</MarkdownRenderer> + </UpsellingProvider> </TestProviders> ); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/categories.ts b/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/categories.ts index 373df1e4a3ba8..cc695d72a8ffc 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/categories.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/categories.ts @@ -18,7 +18,7 @@ export const CATEGORIES: SeparatorLinkCategory[] = [ linkIds: [ SecurityPageName.rulesLanding, SecurityPageName.alerts, - SecurityPageName.aiInsights, + SecurityPageName.attackDiscovery, SecurityPageName.cloudSecurityPostureFindings, SecurityPageName.case, ], diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx index 6d37aff3c804e..223afb3918422 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx @@ -31,8 +31,8 @@ jest.mock('react-redux', () => { }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx index f0770b74a9caf..3ed7c87590354 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx @@ -37,8 +37,8 @@ jest.mock('react-redux', () => { }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx index 6573dc4d8fb05..b90627d1e8d68 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx @@ -38,8 +38,8 @@ jest.mock('react-redux', () => { }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx index 749800194ac91..753b9324d38f0 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx @@ -34,8 +34,8 @@ jest.mock('react-redux', () => { }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx index 878e88c88a5fb..b89eae2be49eb 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx @@ -32,8 +32,8 @@ jest.mock('react-redux', () => { }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx index 100ad09cc6024..49c0468d51cbf 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx @@ -8,7 +8,7 @@ import React, { useCallback } from 'react'; import { EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { useKibana } from '../../lib/kibana'; import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import * as i18n from './translations'; @@ -19,7 +19,7 @@ import { ensurePatternFormat } from '../../../../common/utils/sourcerer'; export const useUpdateDataView = ( onOpenAndReset: () => void ): ((missingPatterns: string[]) => Promise<boolean>) => { - const { theme, uiSettings } = useKibana().services; + const { uiSettings, ...startServices } = useKibana().services; const { addSuccess, addError } = useAppToasts(); return useCallback( async (missingPatterns: string[]): Promise<boolean> => { @@ -40,8 +40,8 @@ export const useUpdateDataView = ( if (isUiSettingsSuccess) { addSuccess({ color: 'success', - title: toMountPoint(i18n.SUCCESS_TOAST_TITLE, { theme$: theme.theme$ }), - text: toMountPoint(<RefreshButton />, { theme$: theme.theme$ }), + title: toMountPoint(i18n.SUCCESS_TOAST_TITLE, startServices), + text: toMountPoint(<RefreshButton />, startServices), iconType: undefined, toastLifeTimeMs: 600000, }); @@ -67,6 +67,6 @@ export const useUpdateDataView = ( }); return false; }, - [addError, addSuccess, onOpenAndReset, theme.theme$, uiSettings] + [addError, addSuccess, onOpenAndReset, uiSettings, startServices] ); }; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_save_to_library.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_save_to_library.tsx index 158b30979881a..a47195f8e57bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_save_to_library.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_save_to_library.tsx @@ -21,7 +21,7 @@ export const useSaveToLibrary = ({ }: { attributes: LensAttributes | undefined | null; }) => { - const { lens, theme, i18n } = useKibana().services; + const { lens, ...startServices } = useKibana().services; const { SaveModalComponent, canUseEditor } = lens; const getSecuritySolutionUrl = useGetSecuritySolutionUrl(); const { redirectTo, getEditOrCreateDashboardPath } = useRedirectToDashboardFromLens({ @@ -45,11 +45,11 @@ export const useSaveToLibrary = ({ } redirectTo={redirectTo} />, - { theme, i18n } + startServices ); mount(targetDomElement); - }, [SaveModalComponent, attributes, getEditOrCreateDashboardPath, i18n, redirectTo, theme]); + }, [SaveModalComponent, attributes, getEditOrCreateDashboardPath, redirectTo, startServices]); const disableVisualizations = useMemo( () => !canUseEditor() || attributes == null, diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts b/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts index abfaa564ec536..652c71e2ad9d4 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts @@ -11,7 +11,6 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { ensurePatternFormat } from '../../../../common/utils/sourcerer'; import type { KibanaDataView } from '../../store/sourcerer/model'; import { DEFAULT_TIME_FIELD } from '../../../../common/constants'; -import { getSourcererDataView } from './get_sourcerer_data_view'; export interface GetSourcererDataView { signal?: AbortSignal; @@ -39,8 +38,10 @@ export const createSourcererDataView = async ({ const siemDataViewExist = allDataViews.find((dv) => dv.id === dataViewId); const { patternList } = body; - const patternListAsTitle = ensurePatternFormat(patternList).join(); + const patternListFormatted = ensurePatternFormat(patternList); + const patternListAsTitle = patternListFormatted.join(); let siemDataView: DataViewType; + let defaultDataView: KibanaDataView; if (siemDataViewExist === undefined) { try { siemDataView = await dataViewService.createAndSave( @@ -62,33 +63,45 @@ export const createSourcererDataView = async ({ throw error; } } + defaultDataView = { + id: siemDataView.id ?? dataViewId, + patternList: siemDataView.title.split(','), + title: siemDataView.title, + }; } else { - const siemDataViewTitle = siemDataViewExist - ? ensurePatternFormat(siemDataViewExist.title.split(',')).join() - : ''; - siemDataView = await dataViewService.get(dataViewId); - + let patterns = ensurePatternFormat(siemDataViewExist.title.split(',')); + const siemDataViewTitle = siemDataViewExist ? patterns.join() : ''; if (patternListAsTitle !== siemDataViewTitle) { + patterns = patternListFormatted; + siemDataView = await dataViewService.get(dataViewId); siemDataView.title = patternListAsTitle; await dataViewService.updateSavedObject(siemDataView); } + defaultDataView = { + id: dataViewId, + patternList: patterns, + title: patternListAsTitle, + }; } if (allDataViews.some((dv) => dv.id === dataViewId)) { allDataViews = allDataViews.map((v) => v.id === dataViewId ? { ...v, title: patternListAsTitle } : v ); - } else if (siemDataView !== null) { - allDataViews.push({ id: siemDataView.id ?? dataViewId, title: siemDataView?.title }); + } else if (defaultDataView !== null) { + allDataViews.push({ id: defaultDataView.id ?? dataViewId, title: defaultDataView?.title }); } - const siemSourcererDataView = await getSourcererDataView(dataViewId, dataViewService); - + const existingPatternList = await dataViewService.getExistingIndices(defaultDataView.patternList); + defaultDataView = { + ...defaultDataView, + patternList: existingPatternList, + }; return { - defaultDataView: siemSourcererDataView, + defaultDataView, kibanaDataViews: allDataViews.map((dv) => dv.id === dataViewId - ? siemSourcererDataView + ? defaultDataView : { id: dv.id, patternList: dv.title.split(','), diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_navigate_to_alerts_page_with_filters.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_navigate_to_alerts_page_with_filters.test.ts index fd8627dcd5d73..6a957318f278f 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_navigate_to_alerts_page_with_filters.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_navigate_to_alerts_page_with_filters.test.ts @@ -31,7 +31,7 @@ describe('useNavigateToAlertsPageWithFilters', () => { expect(mockNavigateTo).toHaveBeenCalledWith({ deepLinkId: SecurityPageName.alerts, - path: "?pageFilters=!((exclude:!f,existsSelected:!f,fieldName:'test field',selectedOptions:!('test value'),title:'test filter'))", + path: "?pageFilters=!((exclude:!f,existsSelected:!f,fieldName:'test field',hideActionBar:!f,selectedOptions:!('test value'),title:'test filter'))", }); }); @@ -50,6 +50,7 @@ describe('useNavigateToAlertsPageWithFilters', () => { fieldName: 'test field 2', exclude: true, existsSelected: true, + hideActionBar: true, }, ]; @@ -61,7 +62,7 @@ describe('useNavigateToAlertsPageWithFilters', () => { expect(mockNavigateTo).toHaveBeenCalledWith({ deepLinkId: SecurityPageName.alerts, - path: "?pageFilters=!((exclude:!f,existsSelected:!f,fieldName:'test field 1',selectedOptions:!('test value 1'),title:'test filter 1'),(exclude:!t,existsSelected:!t,fieldName:'test field 2',selectedOptions:!('test value 2'),title:'test filter 2'))", + path: "?pageFilters=!((exclude:!f,existsSelected:!f,fieldName:'test field 1',hideActionBar:!f,selectedOptions:!('test value 1'),title:'test filter 1'),(exclude:!t,existsSelected:!t,fieldName:'test field 2',hideActionBar:!t,selectedOptions:!('test value 2'),title:'test filter 2'))", }); }); diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/constants.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/constants.ts index 052a3296d8414..a6eff07ac00ff 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/constants.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/constants.ts @@ -55,7 +55,7 @@ export enum TelemetryEventTypes { AssetCriticalityCsvPreviewGenerated = 'Asset Criticality Csv Preview Generated', AssetCriticalityFileSelected = 'Asset Criticality File Selected', AssetCriticalityCsvImported = 'Asset Criticality CSV Imported', - InsightsGenerated = 'Insights Generated', + AttackDiscoveriesGenerated = 'Attack Discoveries Generated', EntityDetailsClicked = 'Entity Details Clicked', EntityAlertsClicked = 'Entity Alerts Clicked', EntityRiskFiltered = 'Entity Risk Filtered', diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/index.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/index.ts similarity index 93% rename from x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/index.ts rename to x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/index.ts index 80fd4e3023846..eaad6840348fb 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/index.ts @@ -9,7 +9,7 @@ import type { TelemetryEvent } from '../../types'; import { TelemetryEventTypes } from '../../constants'; export const insightsGeneratedEvent: TelemetryEvent = { - eventType: TelemetryEventTypes.InsightsGenerated, + eventType: TelemetryEventTypes.AttackDiscoveriesGenerated, schema: { actionTypeId: { type: 'keyword', diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/types.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/types.ts similarity index 57% rename from x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/types.ts rename to x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/types.ts index ca211bb1f95c5..a2ad7ba93455b 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/insights/types.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/attack_discovery/types.ts @@ -8,15 +8,15 @@ import type { RootSchema } from '@kbn/analytics-client'; import type { TelemetryEventTypes } from '../../constants'; -export interface ReportInsightsGeneratedParams { +export interface ReportAttackDiscoveriesGeneratedParams { actionTypeId: string; provider?: string; model?: string; } -export type ReportInsightsTelemetryEventParams = ReportInsightsGeneratedParams; +export type ReportAttackDiscoveryTelemetryEventParams = ReportAttackDiscoveriesGeneratedParams; -export interface InsightsTelemetryEvent { - eventType: TelemetryEventTypes.InsightsGenerated; - schema: RootSchema<ReportInsightsGeneratedParams>; +export interface AttackDiscoveryTelemetryEvent { + eventType: TelemetryEventTypes.AttackDiscoveriesGenerated; + schema: RootSchema<ReportAttackDiscoveriesGeneratedParams>; } diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/telemetry_events.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/telemetry_events.ts index c69f00279d20b..fa9875a027db6 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/events/telemetry_events.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/events/telemetry_events.ts @@ -28,7 +28,7 @@ import { assistantMessageSentEvent, assistantQuickPrompt, } from './ai_assistant'; -import { insightsGeneratedEvent } from './insights'; +import { insightsGeneratedEvent } from './attack_discovery'; import { dataQualityIndexCheckedEvent, dataQualityCheckAllClickedEvent } from './data_quality'; import { DocumentDetailsFlyoutOpenedEvent, diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.mock.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.mock.ts index 061138d25007a..e1c4c8d4746cf 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.mock.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.mock.ts @@ -35,5 +35,5 @@ export const createTelemetryClientMock = (): jest.Mocked<TelemetryClientStart> = reportAssetCriticalityCsvPreviewGenerated: jest.fn(), reportAssetCriticalityFileSelected: jest.fn(), reportAssetCriticalityCsvImported: jest.fn(), - reportInsightsGenerated: jest.fn(), + reportAttackDiscoveriesGenerated: jest.fn(), }); diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts index bbd291076c3ce..3ca55ab75e685 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts @@ -24,7 +24,7 @@ import type { ReportAssistantMessageSentParams, ReportAssistantQuickPromptParams, ReportAssistantSettingToggledParams, - ReportInsightsGeneratedParams, + ReportAttackDiscoveriesGeneratedParams, ReportRiskInputsExpandedFlyoutOpenedParams, ReportToggleRiskSummaryClickedParams, ReportDetailsFlyoutOpenedParams, @@ -74,8 +74,8 @@ export class TelemetryClient implements TelemetryClientStart { this.analytics.reportEvent(TelemetryEventTypes.AssistantSettingToggled, params); }; - public reportInsightsGenerated = (params: ReportInsightsGeneratedParams) => { - this.analytics.reportEvent(TelemetryEventTypes.InsightsGenerated, params); + public reportAttackDiscoveriesGenerated = (params: ReportAttackDiscoveriesGeneratedParams) => { + this.analytics.reportEvent(TelemetryEventTypes.AttackDiscoveriesGenerated, params); }; public reportEntityDetailsClicked = ({ entity }: ReportEntityDetailsClickedParams) => { diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/types.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/types.ts index a2cef18618ff5..85c567121ac2d 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/types.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/types.ts @@ -8,10 +8,10 @@ import type { RootSchema } from '@kbn/analytics-client'; import type { AnalyticsServiceSetup } from '@kbn/core/public'; import type { - InsightsTelemetryEvent, - ReportInsightsGeneratedParams, - ReportInsightsTelemetryEventParams, -} from './events/insights/types'; + AttackDiscoveryTelemetryEvent, + ReportAttackDiscoveriesGeneratedParams, + ReportAttackDiscoveryTelemetryEventParams, +} from './events/attack_discovery/types'; import type { SecurityMetadata } from '../../../actions/types'; import type { ML_JOB_TELEMETRY_STATUS, TelemetryEventTypes } from './constants'; import type { @@ -62,7 +62,7 @@ import type { export * from './events/ai_assistant/types'; export * from './events/alerts_grouping/types'; -export * from './events/insights/types'; +export * from './events/attack_discovery/types'; export * from './events/data_quality/types'; export * from './events/onboarding/types'; export type { @@ -109,7 +109,7 @@ export interface ReportBreadcrumbClickedParams { export type TelemetryEventParams = | ReportAlertsGroupingTelemetryEventParams | ReportAssistantTelemetryEventParams - | ReportInsightsTelemetryEventParams + | ReportAttackDiscoveryTelemetryEventParams | ReportEntityAnalyticsTelemetryEventParams | ReportMLJobUpdateParams | ReportCellActionClickedParams @@ -133,8 +133,8 @@ export interface TelemetryClientStart { reportAssistantQuickPrompt(params: ReportAssistantQuickPromptParams): void; reportAssistantSettingToggled(params: ReportAssistantSettingToggledParams): void; - // Insights - reportInsightsGenerated(params: ReportInsightsGeneratedParams): void; + // Attack discovery + reportAttackDiscoveriesGenerated(params: ReportAttackDiscoveriesGeneratedParams): void; // Entity Analytics reportEntityDetailsClicked(params: ReportEntityDetailsClickedParams): void; @@ -174,7 +174,7 @@ export type TelemetryEvent = | EntityAnalyticsTelemetryEvent | DataQualityTelemetryEvents | DocumentDetailsTelemetryEvents - | InsightsTelemetryEvent + | AttackDiscoveryTelemetryEvent | { eventType: TelemetryEventTypes.MLJobUpdate; schema: RootSchema<ReportMLJobUpdateParams>; diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx index e32297f729ec3..57a23c249201b 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx @@ -8,12 +8,12 @@ import type { ReactNode } from 'react'; import React, { memo } from 'react'; import { Provider } from 'react-redux'; -import { I18nProvider } from '@kbn/i18n-react'; import { Router } from '@kbn/shared-ux-router'; import type { History } from 'history'; import useObservable from 'react-use/lib/useObservable'; import type { Store } from 'redux'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import type { CoreStart } from '@kbn/core/public'; import { NavigationProvider } from '@kbn/security-solution-navigation'; @@ -36,14 +36,14 @@ export const AppRootProvider = memo<{ startServices: StartServices; queryClient: QueryClient; children: ReactNode | ReactNode[]; -}>(({ store, history, coreStart, depsStart: { data }, queryClient, startServices, children }) => { +}>(({ store, history, coreStart, queryClient, startServices, children }) => { const { theme: themeStart } = coreStart; const theme = useObservable(themeStart.theme$, themeStart.getTheme()); const isDarkMode = theme.darkMode; return ( - <Provider store={store}> - <I18nProvider> + <KibanaRenderContextProvider {...coreStart}> + <Provider store={store}> <KibanaContextProvider services={startServices}> <EuiThemeProvider darkMode={isDarkMode}> <QueryClientProvider client={queryClient}> @@ -61,8 +61,8 @@ export const AppRootProvider = memo<{ </QueryClientProvider> </EuiThemeProvider> </KibanaContextProvider> - </I18nProvider> - </Provider> + </Provider> + </KibanaRenderContextProvider> ); }); diff --git a/x-pack/plugins/security_solution/public/common/translations.ts b/x-pack/plugins/security_solution/public/common/translations.ts index f8b8906df9cc3..ee0172e01b281 100644 --- a/x-pack/plugins/security_solution/public/common/translations.ts +++ b/x-pack/plugins/security_solution/public/common/translations.ts @@ -100,6 +100,8 @@ export const getAgentTypeName = (agentType: ResponseActionAgentType) => { return 'Elastic Defend'; case 'sentinel_one': return 'SentinelOne'; + case 'crowdstrike': + return 'Crowdstrike'; default: return agentType; } diff --git a/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.test.ts b/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.test.ts new file mode 100644 index 0000000000000..3d585808b8885 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.test.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 type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; + +import { + isAlertFromCrowdstrikeAlert, + isAlertFromCrowdstrikeEvent, +} from './crowdstrike_alert_check'; + +describe('crowdstrike_alert_check', () => { + describe('isAlertFromCrowdstrikeEvent', () => { + it('returns false if data is not a timeline event alert', () => { + const data: TimelineEventsDetailsItem[] = []; + expect(isAlertFromCrowdstrikeEvent({ data })).toBe(false); + }); + + it('returns false if data is a timeline event alert but not from Crowdstrike', () => { + const data = [ + { + category: 'kibana', + field: 'kibana.alert.rule.uuid', + }, + ] as unknown as TimelineEventsDetailsItem[]; + expect(isAlertFromCrowdstrikeEvent({ data })).toBe(false); + }); + + it('returns true if data is a Crowdstrike timeline event alert', () => { + const data = [ + { + category: 'kibana', + field: 'kibana.alert.rule.uuid', + }, + { + field: 'event.module', + values: ['crowdstrike'], + }, + ] as unknown as TimelineEventsDetailsItem[]; + expect(isAlertFromCrowdstrikeEvent({ data })).toBe(true); + }); + }); + + describe('isAlertFromCrowdstrikeAlert', () => { + it('returns false if ecsData is null', () => { + expect(isAlertFromCrowdstrikeAlert({ ecsData: null })).toBe(false); + }); + + it('returns false if ecsData is not a Crowdstrike alert', () => { + const ecsData = { + 'kibana.alert.original_event.module': ['other'], + 'kibana.alert.original_event.dataset': ['other'], + } as unknown as Ecs; + expect(isAlertFromCrowdstrikeAlert({ ecsData })).toBe(false); + }); + + it('returns true if ecsData is a Crowdstrike alert', () => { + const ecsData = { + 'kibana.alert.original_event.module': ['crowdstrike'], + 'kibana.alert.original_event.dataset': ['alert'], + } as unknown as Ecs; + expect(isAlertFromCrowdstrikeAlert({ ecsData })).toBe(true); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.ts b/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.ts new file mode 100644 index 0000000000000..5bb1befbadd51 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/utils/crowdstrike_alert_check.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 { find, getOr, some } from 'lodash/fp'; +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; +import { getFieldValue } from '../../detections/components/host_isolation/helpers'; + +/** + * Check to see if a timeline event item is an Alert (vs an event) + * @param timelineEventItem + */ +export const isTimelineEventItemAnAlert = ( + timelineEventItem: TimelineEventsDetailsItem[] +): boolean => { + return some({ category: 'kibana', field: 'kibana.alert.rule.uuid' }, timelineEventItem); +}; + +export const CROWDSTRIKE_AGENT_ID_FIELD = 'crowdstrike.event.DeviceId'; + +export const getCrowdstrikeAgentId = ( + data: TimelineEventsDetailsItem[] | null +): string | undefined => { + return ( + getFieldValue({ category: 'crowdstrike', field: CROWDSTRIKE_AGENT_ID_FIELD }, data) || undefined + ); +}; + +/** + * Checks to see if the given set of Timeline event detail items includes data that indicates its + * an endpoint Alert. Note that it will NOT match on Events - only alerts + * @param data + */ +export const isAlertFromCrowdstrikeEvent = ({ + data, +}: { + data: TimelineEventsDetailsItem[]; +}): boolean => { + if (!isTimelineEventItemAnAlert(data)) { + return false; + } + + const findEndpointAlert = find({ field: 'event.module' }, data)?.values; + return findEndpointAlert ? findEndpointAlert[0] === 'crowdstrike' : false; +}; + +/** + * Checks to see if the given alert was generated out of the Crowdstrike Alerts dataset, coming from + * crowdstrike Fleet integration + * @param ecsData + */ +export const isAlertFromCrowdstrikeAlert = ({ + ecsData, +}: { + ecsData: Ecs | null | undefined; +}): boolean => { + if (ecsData == null) { + return false; + } + + const eventModules = getOr([], 'kibana.alert.original_event.module', ecsData); + const kinds = getOr([], 'kibana.alert.original_event.dataset', ecsData); + + return eventModules.includes('crowdstrike') && kinds.includes('alert'); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts index 6d16a511fda6f..c035fef5af6e4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts @@ -7,8 +7,6 @@ import { useCallback } from 'react'; import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { isEqlRule, isNewTermsRule } from '../../../../../common/detection_engine/utils'; /** * transforms DefineStepRule fields according to experimental feature flags @@ -16,34 +14,9 @@ import { isEqlRule, isNewTermsRule } from '../../../../../common/detection_engin export const useExperimentalFeatureFieldsTransform = <T extends Partial<DefineStepRule>>(): (( fields: T ) => T) => { - const isAlertSuppressionForNonSequenceEqlRuleEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForNonSequenceEqlRuleEnabled' - ); - const isAlertSuppressionForNewTermsRuleEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForNewTermsRuleEnabled' - ); - - const transformer = useCallback( - (fields: T) => { - const isSuppressionDisabled = - (isNewTermsRule(fields.ruleType) && !isAlertSuppressionForNewTermsRuleEnabled) || - (isEqlRule(fields.ruleType) && !isAlertSuppressionForNonSequenceEqlRuleEnabled); - - // reset any alert suppression values hidden behind feature flag - if (isSuppressionDisabled) { - return { - ...fields, - groupByFields: [], - groupByRadioSelection: undefined, - groupByDuration: undefined, - suppressionMissingFields: undefined, - }; - } - - return fields; - }, - [isAlertSuppressionForNewTermsRuleEnabled, isAlertSuppressionForNonSequenceEqlRuleEnabled] - ); + const transformer = useCallback((fields: T) => { + return fields; + }, []); return transformer; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx index 63b0490b91e60..b54b92f4b14cf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx @@ -387,7 +387,14 @@ describe('When the add exception modal is opened', () => { exceptionItems: [ { ...getExceptionListItemSchemaMock(), - entries: [{ field: 'file.hash.sha256', operator: 'included', type: 'match' }], + entries: [ + { + field: 'file.hash.sha256', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], }, ], }) @@ -781,7 +788,14 @@ describe('When the add exception modal is opened', () => { exceptionItems: [ { ...getExceptionListItemSchemaMock(), - entries: [{ field: 'file.hash.sha256', operator: 'included', type: 'match' }], + entries: [ + { + field: 'file.hash.sha256', + operator: 'included', + type: 'match', + value: 'some value', + }, + ], }, ], }) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx index ecc82eb2ff3c5..0d9c0ebb75ca4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx @@ -16,51 +16,15 @@ describe('useAlertSuppression', () => { .mockReturnValue(false); }); - it('should return isSuppressionEnabled false if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is disabled', () => { - const { result } = renderHook(() => useAlertSuppression('new_terms')); - - expect(result.current.isSuppressionEnabled).toBe(false); - }); - - it('should return isSuppressionEnabled true if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is enabled', () => { - jest - .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') - .mockReset() - .mockReturnValue(true); - const { result } = renderHook(() => useAlertSuppression('new_terms')); - - expect(result.current.isSuppressionEnabled).toBe(true); - }); - - it('should return the correct isSuppressionEnabled value fot threat_match rule type', () => { - const { result } = renderHook(() => useAlertSuppression('threat_match')); - - expect(result.current.isSuppressionEnabled).toBe(true); - }); - - describe('Eql Rule', () => { - it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is enabled', () => { - jest - .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') - .mockReset() - .mockReturnValue(true); - const { result } = renderHook(() => useAlertSuppression('eql')); - - expect(result.current.isSuppressionEnabled).toBe(true); - }); - - it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is disabled', () => { - const { result } = renderHook(() => useAlertSuppression('eql')); - - expect(result.current.isSuppressionEnabled).toBe(false); - }); - }); - - it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES', () => { - const { result } = renderHook(() => useAlertSuppression('query')); - - expect(result.current.isSuppressionEnabled).toBe(true); - }); + (['new_terms', 'threat_match', 'saved_query', 'query', 'threshold', 'eql'] as Type[]).forEach( + (ruleType) => { + it(`should return the isSuppressionEnabled true for ${ruleType} rule type that exists in SUPPRESSIBLE_ALERT_RULES`, () => { + const { result } = renderHook(() => useAlertSuppression(ruleType)); + + expect(result.current.isSuppressionEnabled).toBe(true); + }); + } + ); it('should return false if rule type is undefined', () => { const { result } = renderHook(() => useAlertSuppression(undefined)); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx index 5ba799e6f5c26..6e1b2a4d6163f 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx @@ -6,46 +6,20 @@ */ import { useCallback } from 'react'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; -import { - isEqlRule, - isNewTermsRule, - isSuppressibleAlertRule, -} from '../../../../common/detection_engine/utils'; -import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; +import { isSuppressibleAlertRule } from '../../../../common/detection_engine/utils'; export interface UseAlertSuppressionReturn { isSuppressionEnabled: boolean; } export const useAlertSuppression = (ruleType: Type | undefined): UseAlertSuppressionReturn => { - const isAlertSuppressionForNonSequenceEQLRuleEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForNonSequenceEqlRuleEnabled' - ); - const isAlertSuppressionForNewTermsRuleEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForNewTermsRuleEnabled' - ); - const isSuppressionEnabledForRuleType = useCallback(() => { if (!ruleType) { return false; } - // Remove this condition when the Feature Flag for enabling Suppression in the New terms rule is removed. - if (isNewTermsRule(ruleType)) { - return isSuppressibleAlertRule(ruleType) && isAlertSuppressionForNewTermsRuleEnabled; - } - - // Remove this condition when the Feature Flag for enabling Suppression in the EQL rule is removed. - if (isEqlRule(ruleType)) { - return isSuppressibleAlertRule(ruleType) && isAlertSuppressionForNonSequenceEQLRuleEnabled; - } - return isSuppressibleAlertRule(ruleType); - }, [ - ruleType, - isAlertSuppressionForNewTermsRuleEnabled, - isAlertSuppressionForNonSequenceEQLRuleEnabled, - ]); + }, [ruleType]); return { isSuppressionEnabled: isSuppressionEnabledForRuleType(), diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx index d66f1b45feb9a..0e57febd33979 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx @@ -9,9 +9,10 @@ import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiTextColor } from '@elastic/eui'; import type { Toast } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { euiThemeVars } from '@kbn/ui-theme'; import React, { useCallback } from 'react'; +import { useKibana } from '../../../../../common/lib/kibana'; import { convertRulesFilterToKQL } from '../../../../../../common/detection_engine/rule_management/rule_filtering'; import { DuplicateOptions } from '../../../../../../common/detection_engine/rule_management/constants'; import type { @@ -65,6 +66,7 @@ export const useBulkActions = ({ completeBulkEditForm, executeBulkActionsDryRun, }: UseBulkActionsArgs) => { + const { services: startServices } = useKibana(); const hasMlPermissions = useHasMlPermissions(); const rulesTableContext = useRulesTableContext(); const hasActionsPrivileges = useHasActionsPrivileges(); @@ -258,7 +260,8 @@ export const useBulkActions = ({ </EuiButton> </EuiFlexItem> </EuiFlexGroup> - </> + </>, + startServices ), iconType: undefined, }, @@ -481,6 +484,7 @@ export const useBulkActions = ({ executeBulkActionsDryRun, filterOptions, completeBulkEditForm, + startServices, ] ); diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.test.tsx new file mode 100644 index 0000000000000..354751f1ae491 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.test.tsx @@ -0,0 +1,94 @@ +/* + * Copyright 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 } from '@testing-library/react'; +import { HostIsolationPanel } from '.'; +import { useKibana as mockUseKibana } from '../../../common/lib/kibana/__mocks__'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; + +const queryClient = new QueryClient({ + logger: { + log: () => null, + warn: () => null, + error: () => null, + }, +}); + +const useKibanaMock = mockUseKibana as jest.Mock; +jest.mock('../../../common/lib/kibana'); + +describe('HostIsolationPanel', () => { + const renderWithContext = (Element: React.ReactElement) => + render(<QueryClientProvider client={queryClient}>{Element}</QueryClientProvider>); + beforeEach(() => { + useKibanaMock.mockReturnValue({ + ...mockUseKibana(), + services: { ...mockUseKibana().services, notifications: { toasts: jest.fn() } }, + }); + }); + const details = [ + { + category: 'observer', + field: 'observer.serial_number', + values: ['expectedSentinelOneAgentId'], + originalValue: ['expectedSentinelOneAgentId'], + isObjectArray: false, + }, + { + category: 'crowdstrike', + field: 'crowdstrike.event.DeviceId', + values: ['expectedCrowdstrikeAgentId'], + originalValue: ['expectedCrowdstrikeAgentId'], + isObjectArray: false, + }, + ]; + + const cancelCallback = jest.fn(); + + it('renders IsolateHost when isolateAction is "isolateHost"', () => { + const { getByText } = renderWithContext( + <HostIsolationPanel + details={details} + cancelCallback={cancelCallback} + isolateAction="isolateHost" + /> + ); + + const textPieces = [ + 'Isolate host ', + 'from network.', + 'Isolating a host will disconnect it from the network. The host will only be able to communicate with the Kibana platform.', + ]; + + textPieces.forEach((textPiece) => { + expect(getByText(textPiece, { exact: false })).toBeInTheDocument(); + }); + }); + + it('renders UnisolateHost when isolateAction is "unisolateHost"', () => { + const { getByText } = renderWithContext( + <HostIsolationPanel + details={details} + cancelCallback={cancelCallback} + isolateAction="unisolateHost" + /> + ); + + const textPieces = [ + 'is currently', + 'isolated', + '. Are you sure you want to', + 'release', + 'this host?', + ]; + + textPieces.forEach((textPiece) => { + expect(getByText(textPiece, { exact: false })).toBeInTheDocument(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx index 0bb767b65275b..cd9fcee2a353f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx @@ -8,6 +8,7 @@ import React, { useMemo } from 'react'; import type { ResponseActionAgentType } from '../../../../common/endpoint/service/response_actions/constants'; import { getSentinelOneAgentId } from '../../../common/utils/sentinelone_alert_check'; +import { getCrowdstrikeAgentId } from '../../../common/utils/crowdstrike_alert_check'; import { useCasesFromAlerts } from '../../containers/detection_engine/alerts/use_cases_from_alerts'; import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { getFieldValue } from './helpers'; @@ -32,6 +33,9 @@ export const HostIsolationPanel = React.memo( ); const sentinelOneAgentId = useMemo(() => getSentinelOneAgentId(details), [details]); + const crowdstrikeAgentId = useMemo(() => { + return getCrowdstrikeAgentId(details); + }, [details]); const hostName = useMemo( () => getFieldValue({ category: 'host', field: 'host.name' }, details), @@ -45,14 +49,19 @@ export const HostIsolationPanel = React.memo( const { casesInfo } = useCasesFromAlerts({ alertId }); - const agentType: ResponseActionAgentType = useMemo( - () => (sentinelOneAgentId ? 'sentinel_one' : 'endpoint'), - [sentinelOneAgentId] - ); + const agentType: ResponseActionAgentType = useMemo(() => { + if (sentinelOneAgentId) { + return 'sentinel_one'; + } else if (crowdstrikeAgentId) { + return 'crowdstrike'; + } else { + return 'endpoint'; + } + }, [sentinelOneAgentId, crowdstrikeAgentId]); const endpointId = useMemo( - () => sentinelOneAgentId ?? elasticAgentId, - [elasticAgentId, sentinelOneAgentId] + () => sentinelOneAgentId ?? crowdstrikeAgentId ?? elasticAgentId, + [elasticAgentId, sentinelOneAgentId, crowdstrikeAgentId] ); return isolateAction === 'isolateHost' ? ( diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.test.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.test.tsx index 2c6d1f4122f7e..387638d394e6c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.test.tsx @@ -19,11 +19,13 @@ import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_exper jest.mock('./use_sentinelone_host_isolation'); jest.mock('../../../common/hooks/use_experimental_features'); +type AgentType = 'endpoint' | 'sentinel_one' | 'crowdstrike'; const useIsExperimentalFeatureEnabledMock = useIsExperimentalFeatureEnabled as jest.Mock; const useGetSentinelOneAgentStatusMock = useGetSentinelOneAgentStatus as jest.Mock; const useGetAgentStatusMock = useGetAgentStatus as jest.Mock; const useAgentStatusHookMock = useAgentStatusHook as jest.Mock; +// TODO TC: change crowdstrike tests when the useAgentStatus is implemented for Crowdstrike - now it defaults to `sentinel_one` describe('useHostIsolationAction', () => { describe.each([ ['useGetSentinelOneAgentStatus', useGetSentinelOneAgentStatusMock], @@ -37,37 +39,55 @@ describe('useHostIsolationAction', () => { return wrapper; }; - const render = (isSentinelAlert: boolean = true) => + const render = (agentTypeAlert: AgentType) => renderHook( () => useHostIsolationAction({ closePopover: jest.fn(), - detailsData: isSentinelAlert - ? [ - { - category: 'event', - field: 'event.module', - values: ['sentinel_one'], - originalValue: ['sentinel_one'], - isObjectArray: false, - }, - { - category: 'observer', - field: 'observer.serial_number', - values: ['some-agent-id'], - originalValue: ['some-agent-id'], - isObjectArray: false, - }, - ] - : [ - { - category: 'agent', - field: 'agent.id', - values: ['some-agent-id'], - originalValue: ['some-agent-id'], - isObjectArray: false, - }, - ], + detailsData: + agentTypeAlert === 'sentinel_one' + ? [ + { + category: 'event', + field: 'event.module', + values: ['sentinel_one'], + originalValue: ['sentinel_one'], + isObjectArray: false, + }, + { + category: 'observer', + field: 'observer.serial_number', + values: ['some-agent-id'], + originalValue: ['some-agent-id'], + isObjectArray: false, + }, + ] + : agentTypeAlert === 'crowdstrike' + ? [ + { + category: 'event', + field: 'event.module', + values: ['crowdstrike'], + originalValue: ['crowdstrike'], + isObjectArray: false, + }, + { + category: 'crowdstrike', + field: 'crowdstrike.event.DeviceId', + values: ['expectedCrowdstrikeAgentId'], + originalValue: ['expectedCrowdstrikeAgentId'], + isObjectArray: false, + }, + ] + : [ + { + category: 'agent', + field: 'agent.id', + values: ['some-agent-id'], + originalValue: ['some-agent-id'], + isObjectArray: false, + }, + ], isHostIsolationPanelOpen: false, onAddIsolationStatusClick: jest.fn(), }), @@ -86,24 +106,40 @@ describe('useHostIsolationAction', () => { }); it(`${name} is invoked as 'enabled' when SentinelOne alert and FF enabled`, () => { - render(); + render('sentinel_one'); expect(hook).toHaveBeenCalledWith(['some-agent-id'], 'sentinel_one', { enabled: true, }); }); + it(`${name} is invoked as 'enabled' when Crowdstrike alert and FF enabled`, () => { + render('crowdstrike'); + + expect(hook).toHaveBeenCalledWith([''], 'sentinel_one', { + enabled: false, + }); + }); it(`${name} is invoked as 'disabled' when SentinelOne alert and FF disabled`, () => { useIsExperimentalFeatureEnabledMock.mockReturnValue(false); - render(); + render('sentinel_one'); expect(hook).toHaveBeenCalledWith(['some-agent-id'], 'sentinel_one', { enabled: false, }); }); - it(`${name} is invoked as 'disabled' when non-SentinelOne alert`, () => { - render(false); + it(`${name} is invoked as 'disabled' when Crowdstrike alert and FF disabled`, () => { + useIsExperimentalFeatureEnabledMock.mockReturnValue(false); + render('crowdstrike'); + + expect(hook).toHaveBeenCalledWith([''], 'sentinel_one', { + enabled: false, + }); + }); + + it(`${name} is invoked as 'disabled' when endpoint alert`, () => { + render('endpoint'); expect(hook).toHaveBeenCalledWith([''], 'sentinel_one', { enabled: false, diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx index 90dce4985cb84..9c3e187b45d42 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx @@ -12,6 +12,10 @@ import { getSentinelOneAgentId, isAlertFromSentinelOneEvent, } from '../../../common/utils/sentinelone_alert_check'; +import { + getCrowdstrikeAgentId, + isAlertFromCrowdstrikeEvent, +} from '../../../common/utils/crowdstrike_alert_check'; import { isIsolationSupported } from '../../../../common/endpoint/service/host_isolation/utils'; import type { AgentStatusInfo } from '../../../../common/endpoint/types'; import { HostStatus } from '../../../../common/endpoint/types'; @@ -40,11 +44,14 @@ export const useHostIsolationAction = ({ const hasActionsAllPrivileges = useKibana().services.application?.capabilities?.actions?.save; + const agentStatusClientEnabled = useIsExperimentalFeatureEnabled('agentStatusClientEnabled'); const sentinelOneManualHostActionsEnabled = useIsExperimentalFeatureEnabled( 'sentinelOneManualHostActionsEnabled' ); + const crowdstrikeManualHostActionsEnabled = useIsExperimentalFeatureEnabled( + 'responseActionsCrowdstrikeManualHostIsolationEnabled' + ); - const agentStatusClientEnabled = useIsExperimentalFeatureEnabled('agentStatusClientEnabled'); const { canIsolateHost, canUnIsolateHost } = useUserPrivileges().endpointPrivileges; const isEndpointAlert = useMemo( @@ -57,12 +64,18 @@ export const useHostIsolationAction = ({ [detailsData] ); + const isCrowdstrikeAlert = useMemo( + () => isAlertFromCrowdstrikeEvent({ data: detailsData || [] }), + [detailsData] + ); + const agentId = useMemo( () => getFieldValue({ category: 'agent', field: 'agent.id' }, detailsData), [detailsData] ); const sentinelOneAgentId = useMemo(() => getSentinelOneAgentId(detailsData), [detailsData]); + const crowdstrikeAgentId = useMemo(() => getCrowdstrikeAgentId(detailsData), [detailsData]); const hostOsFamily = useMemo( () => getFieldValue({ category: 'host', field: 'host.os.name' }, detailsData), @@ -92,18 +105,25 @@ export const useHostIsolationAction = ({ } ); const sentinelOneAgentStatus = sentinelOneAgentData?.[`${sentinelOneAgentId}`]; + // TODO TC: Add support for Crowdstrike agent status - ongoing work by Ash :+1: const isHostIsolated = useMemo(() => { if (sentinelOneManualHostActionsEnabled && isSentinelOneAlert) { return sentinelOneAgentStatus?.isolated; } + if (crowdstrikeManualHostActionsEnabled && isCrowdstrikeAlert) { + return false; + // return crowdstrikeAgentStatus?.isolated; + } return isIsolated; }, [ isIsolated, isSentinelOneAlert, + isCrowdstrikeAlert, sentinelOneAgentStatus?.isolated, sentinelOneManualHostActionsEnabled, + crowdstrikeManualHostActionsEnabled, ]); const doesHostSupportIsolation = useMemo(() => { @@ -156,6 +176,11 @@ export const useHostIsolationAction = ({ return isUninstalled || isPendingUninstall; } + if (crowdstrikeManualHostActionsEnabled && isCrowdstrikeAlert) { + // TODO TC: crowdstrikeAgentStatus functionality is going to be implemented in another PR + return false; + } + return agentStatus === HostStatus.UNENROLLED; }, [ agentStatus, @@ -163,6 +188,8 @@ export const useHostIsolationAction = ({ isSentinelOneAlert, sentinelOneAgentStatus, sentinelOneManualHostActionsEnabled, + crowdstrikeManualHostActionsEnabled, + isCrowdstrikeAlert, ]); const menuItems = useMemo( @@ -193,6 +220,16 @@ export const useHostIsolationAction = ({ return menuItems; } + if ( + isCrowdstrikeAlert && + crowdstrikeManualHostActionsEnabled && + crowdstrikeAgentId && + // status && + hasActionsAllPrivileges + ) { + return menuItems; + } + if ( isEndpointAlert && doesHostSupportIsolation && @@ -217,5 +254,8 @@ export const useHostIsolationAction = ({ sentinelOneAgentStatus, sentinelOneAgentId, sentinelOneManualHostActionsEnabled, + crowdstrikeAgentId, + isCrowdstrikeAlert, + crowdstrikeManualHostActionsEnabled, ]); }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx index 83654c42179fe..57b170913ef0b 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alerts/alert_details_redirect.test.tsx @@ -54,10 +54,19 @@ describe('AlertDetailsRedirect', () => { </TestProviders> ); + const expectedSearch = new URLSearchParams({ + query: "(language:kuery,query:'_id: test-alert-id')", + timerange: + "(global:(linkTo:!(timeline,socTrends),timerange:(from:'2023-04-20T12:00:00.000Z',kind:absolute,to:'2023-04-20T12:05:00.000Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))", + pageFilters: + '!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,hideActionBar:!f,selectedOptions:!(),title:Status))', + flyout: '(panelView:eventDetail,params:(eventId:test-alert-id,indexName:.someTestIndex))', + }); + expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=%28language%3Akuery%2Cquery%3A%27_id%3A+test-alert-id%27%29&timerange=%28global%3A%28linkTo%3A%21%28timeline%2CsocTrends%29%2Ctimerange%3A%28from%3A%272023-04-20T12%3A00%3A00.000Z%27%2Ckind%3Aabsolute%2Cto%3A%272023-04-20T12%3A05%3A00.000Z%27%29%29%2Ctimeline%3A%28linkTo%3A%21%28global%2CsocTrends%29%2Ctimerange%3A%28from%3A%272020-07-07T08%3A20%3A18.966Z%27%2CfromStr%3Anow%2Fd%2Ckind%3Arelative%2Cto%3A%272020-07-08T08%3A20%3A18.966Z%27%2CtoStr%3Anow%2Fd%29%29%29&pageFilters=%21%28%28exclude%3A%21f%2CexistsSelected%3A%21f%2CfieldName%3Akibana.alert.workflow_status%2CselectedOptions%3A%21%28%29%2Ctitle%3AStatus%29%29&flyout=%28panelView%3AeventDetail%2Cparams%3A%28eventId%3Atest-alert-id%2CindexName%3A.someTestIndex%29%29`, + search: `?${expectedSearch.toString()}`, state: undefined, }); }); @@ -83,10 +92,19 @@ describe('AlertDetailsRedirect', () => { </TestProviders> ); + const expectedSearchParam = new URLSearchParams({ + query: "(language:kuery,query:'_id: test-alert-id')", + timerange: + "(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))", + pageFilters: + '!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,hideActionBar:!f,selectedOptions:!(),title:Status))', + flyout: '(panelView:eventDetail,params:(eventId:test-alert-id,indexName:.someTestIndex))', + }); + expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=%28language%3Akuery%2Cquery%3A%27_id%3A+test-alert-id%27%29&timerange=%28global%3A%28linkTo%3A%21%28timeline%2CsocTrends%29%2Ctimerange%3A%28from%3A%272020-07-07T08%3A20%3A18.966Z%27%2Ckind%3Aabsolute%2Cto%3A%272020-07-08T08%3A25%3A18.966Z%27%29%29%2Ctimeline%3A%28linkTo%3A%21%28global%2CsocTrends%29%2Ctimerange%3A%28from%3A%272020-07-07T08%3A20%3A18.966Z%27%2CfromStr%3Anow%2Fd%2Ckind%3Arelative%2Cto%3A%272020-07-08T08%3A20%3A18.966Z%27%2CtoStr%3Anow%2Fd%29%29%29&pageFilters=%21%28%28exclude%3A%21f%2CexistsSelected%3A%21f%2CfieldName%3Akibana.alert.workflow_status%2CselectedOptions%3A%21%28%29%2Ctitle%3AStatus%29%29&flyout=%28panelView%3AeventDetail%2Cparams%3A%28eventId%3Atest-alert-id%2CindexName%3A.someTestIndex%29%29`, + search: `?${expectedSearchParam.toString()}`, state: undefined, }); }); @@ -111,10 +129,20 @@ describe('AlertDetailsRedirect', () => { </TestProviders> ); + const expectedSearchParam = new URLSearchParams({ + query: "(language:kuery,query:'_id: test-alert-id')", + timerange: + "(global:(linkTo:!(timeline,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',kind:absolute,to:'2020-07-08T08:25:18.966Z')),timeline:(linkTo:!(global,socTrends),timerange:(from:'2020-07-07T08:20:18.966Z',fromStr:now/d,kind:relative,to:'2020-07-08T08:20:18.966Z',toStr:now/d)))", + pageFilters: + '!((exclude:!f,existsSelected:!f,fieldName:kibana.alert.workflow_status,hideActionBar:!f,selectedOptions:!(),title:Status))', + flyout: + '(panelView:eventDetail,params:(eventId:test-alert-id,indexName:.internal.alerts-security.alerts-default))', + }); + expect(historyMock.replace).toHaveBeenCalledWith({ hash: '', pathname: ALERTS_PATH, - search: `?query=%28language%3Akuery%2Cquery%3A%27_id%3A+test-alert-id%27%29&timerange=%28global%3A%28linkTo%3A%21%28timeline%2CsocTrends%29%2Ctimerange%3A%28from%3A%272020-07-07T08%3A20%3A18.966Z%27%2Ckind%3Aabsolute%2Cto%3A%272020-07-08T08%3A25%3A18.966Z%27%29%29%2Ctimeline%3A%28linkTo%3A%21%28global%2CsocTrends%29%2Ctimerange%3A%28from%3A%272020-07-07T08%3A20%3A18.966Z%27%2CfromStr%3Anow%2Fd%2Ckind%3Arelative%2Cto%3A%272020-07-08T08%3A20%3A18.966Z%27%2CtoStr%3Anow%2Fd%29%29%29&pageFilters=%21%28%28exclude%3A%21f%2CexistsSelected%3A%21f%2CfieldName%3Akibana.alert.workflow_status%2CselectedOptions%3A%21%28%29%2Ctitle%3AStatus%29%29&flyout=%28panelView%3AeventDetail%2Cparams%3A%28eventId%3Atest-alert-id%2CindexName%3A.internal.alerts-security.alerts-default%29%29`, + search: `?${expectedSearchParam.toString()}`, state: undefined, }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_enable_button.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_enable_button.tsx index e6242e75677c1..f75204ad5ffd2 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_enable_button.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_enable_button.tsx @@ -35,7 +35,7 @@ const RiskScoreEnableButtonComponent = ({ }; }) => { const spaceId = useSpaceId(); - const { http, notifications, theme, dashboard } = useKibana().services; + const { http, dashboard, ...startServices } = useKibana().services; const { renderDocLink, renderDashboardLink } = useRiskScoreToastContent(riskScoreEntity); const { fetch, isLoading } = useFetch(REQUEST_NAMES.ENABLE_RISK_SCORE, installRiskScoreModule); const isRiskEngineEnabled = useIsExperimentalFeatureEnabled('riskScoringRoutesEnabled'); @@ -44,27 +44,25 @@ const RiskScoreEnableButtonComponent = ({ fetch({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, riskScoreEntity, spaceId, - theme, timerange, + startServices, }); }, [ dashboard, fetch, http, - notifications, refetch, renderDashboardLink, renderDocLink, riskScoreEntity, spaceId, - theme, timerange, + startServices, ]); return ( diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_restart_button.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_restart_button.tsx index 7f4316b77ee97..70f28df4420f9 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_restart_button.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/risk_score_restart_button.tsx @@ -31,18 +31,18 @@ const RiskScoreRestartButtonComponent = ({ const spaceId = useSpaceId(); const { renderDocLink } = useRiskScoreToastContent(riskScoreEntity); - const { http, notifications } = useKibana().services; + const { http, ...startServices } = useKibana().services; const onClick = useCallback(async () => { fetch({ http, - notifications, refetch, renderDocLink, riskScoreEntity, spaceId, + startServices, }); - }, [fetch, http, notifications, refetch, renderDocLink, riskScoreEntity, spaceId]); + }, [fetch, http, refetch, renderDocLink, riskScoreEntity, spaceId, startServices]); return ( <EuiButton diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.test.ts index 816ba871249d2..f23a645643b2a 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.test.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + +import { coreMock } from '@kbn/core/public/mocks'; import type { HttpSetup } from '@kbn/core/public'; import { RiskScoreEntity } from '../../../../common/search_strategy'; import { @@ -26,6 +28,7 @@ import { jest.mock('../../deprecated_risk_engine/api'); +const startServices = coreMock.createStart(); const mockHttp = { post: jest.fn(), } as unknown as HttpSetup; @@ -45,6 +48,7 @@ describe.each([RiskScoreEntity.host, RiskScoreEntity.user])( spaceId: mockSpaceId, timerange: mockTimerange, riskScoreEntity, + startServices, }); }); @@ -78,6 +82,7 @@ describe.each([[RiskScoreEntity.host], [RiskScoreEntity.user]])( http: mockHttp, spaceId: mockSpaceId, riskScoreEntity, + startServices, }); }); @@ -146,6 +151,7 @@ describe.each([[RiskScoreEntity.host], [RiskScoreEntity.user]])( refetch: mockRefetch, riskScoreEntity, spaceId: mockSpaceId, + startServices, }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.ts index f1e582e1ed847..d3edda716e763 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_onboarding/utils.ts @@ -4,8 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { HttpSetup, NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; + +import type { HttpSetup } from '@kbn/core/public'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; +import type { StartRenderServices } from '../../../types'; import { RiskScoreEntity } from '../../../../common/search_strategy'; import * as utils from '../../../../common/utils/risk_score_modules'; import type { inputsModel } from '../../../common/store'; @@ -29,17 +31,16 @@ import { interface InstallRiskScoreModule { dashboard?: DashboardStart; http: HttpSetup; - notifications?: NotificationsStart; refetch?: inputsModel.Refetch; renderDashboardLink?: (message: string, dashboardUrl: string) => React.ReactNode; renderDocLink?: (message: string) => React.ReactNode; riskScoreEntity: RiskScoreEntity; spaceId?: string; - theme?: ThemeServiceStart; timerange: { from: string; to: string; }; + startServices: StartRenderServices; } type UpgradeRiskScoreModule = InstallRiskScoreModule; @@ -47,34 +48,32 @@ type UpgradeRiskScoreModule = InstallRiskScoreModule; const installHostRiskScoreModule = async ({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, - theme, timerange, + startServices, }: InstallRiskScoreModule) => { await installRiskScore({ http, renderDocLink, - notifications, options: { riskScoreEntity: RiskScoreEntity.host, }, + startServices, }); // Install dashboards and relevant saved objects await bulkCreatePrebuiltSavedObjects({ http, - theme, dashboard, renderDashboardLink, renderDocLink, ...timerange, - notifications, options: { templateName: `${RiskScoreEntity.host}RiskScoreDashboards`, }, + startServices, }); if (refetch) { @@ -85,35 +84,33 @@ const installHostRiskScoreModule = async ({ const installUserRiskScoreModule = async ({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, spaceId = 'default', - theme, timerange, + startServices, }: InstallRiskScoreModule) => { await installRiskScore({ http, renderDocLink, - notifications, options: { riskScoreEntity: RiskScoreEntity.user, }, + startServices, }); // Install dashboards and relevant saved objects await bulkCreatePrebuiltSavedObjects({ dashboard, http, - notifications, options: { templateName: `${RiskScoreEntity.user}RiskScoreDashboards`, }, renderDashboardLink, renderDocLink, + startServices, ...timerange, - theme, }); if (refetch) { @@ -131,21 +128,19 @@ export const installRiskScoreModule = async (settings: InstallRiskScoreModule) = export const uninstallRiskScoreModule = async ({ http, - notifications, refetch, renderDocLink, riskScoreEntity, spaceId = 'default', - theme, + startServices, }: { http: HttpSetup; - notifications?: NotificationsStart; refetch?: inputsModel.Refetch; renderDocLink?: (message: string) => React.ReactNode; riskScoreEntity: RiskScoreEntity; spaceId?: string; - theme?: ThemeServiceStart; deleteAll?: boolean; + startServices: StartRenderServices; }) => { const legacyTransformIds = [ // transform Ids never changed since 8.3 @@ -196,12 +191,11 @@ export const uninstallRiskScoreModule = async ({ options: { templateName: `${riskScoreEntity}RiskScoreDashboards`, }, + startServices, }), deleteTransforms({ http, - theme, renderDocLink, - notifications, errorMessage: `${UNINSTALLATION_ERROR} - ${TRANSFORM_DELETION_ERROR_MESSAGE( legacyTransformIds.length )}`, @@ -211,6 +205,7 @@ export const uninstallRiskScoreModule = async ({ deleteDestDataView: true, forceDelete: false, }, + startServices, }), /** * Intended not to pass notification to deleteIngestPipelines. @@ -226,6 +221,7 @@ export const uninstallRiskScoreModule = async ({ legacyIngestPipelineNames.length )}`, names: legacyIngestPipelineNames.join(','), + startServices, }), /** * Intended not to pass notification to deleteStoredScripts. @@ -241,6 +237,7 @@ export const uninstallRiskScoreModule = async ({ riskScoreEntity === RiskScoreEntity.user ? legacyRiskScoreUsersScriptIds : legacyRiskScoreHostsScriptIds, + startServices, }), ]); @@ -252,83 +249,77 @@ export const uninstallRiskScoreModule = async ({ export const upgradeHostRiskScoreModule = async ({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, spaceId = 'default', - theme, timerange, + startServices, }: UpgradeRiskScoreModule) => { await uninstallRiskScoreModule({ http, - notifications, renderDocLink, riskScoreEntity: RiskScoreEntity.host, spaceId, - theme, + startServices, }); await installRiskScoreModule({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, riskScoreEntity: RiskScoreEntity.host, spaceId, - theme, timerange, + startServices, }); }; export const upgradeUserRiskScoreModule = async ({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, spaceId = 'default', - theme, timerange, + startServices, }: UpgradeRiskScoreModule) => { await uninstallRiskScoreModule({ http, - notifications, renderDocLink, riskScoreEntity: RiskScoreEntity.user, spaceId, - theme, + startServices, }); await installRiskScoreModule({ dashboard, http, - notifications, refetch, renderDashboardLink, renderDocLink, riskScoreEntity: RiskScoreEntity.user, spaceId, - theme, timerange, + startServices, }); }; export const restartRiskScoreTransforms = async ({ http, - notifications, refetch, renderDocLink, riskScoreEntity, spaceId, + startServices, }: { http: HttpSetup; - notifications?: NotificationsStart; refetch?: inputsModel.Refetch; renderDocLink?: (message: string) => React.ReactNode; riskScoreEntity: RiskScoreEntity; spaceId?: string; + startServices: StartRenderServices; }) => { const transformIds = [ utils.getRiskScorePivotTransformId(riskScoreEntity, spaceId), @@ -337,16 +328,16 @@ export const restartRiskScoreTransforms = async ({ await stopTransforms({ http, - notifications, renderDocLink, transformIds, + startServices, }); const res = await startTransforms({ http, - notifications, renderDocLink, transformIds, + startServices, }); if (refetch) { diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.test.ts index 5b4c99e95fd9c..604d8a2947a16 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import type { HttpSetup } from '@kbn/core/public'; import { createIngestPipeline, deleteIngestPipelines } from './ingest_pipelines'; const mockRequest = jest.fn(); @@ -15,14 +16,8 @@ const mockHttp = { delete: mockRequest, } as unknown as HttpSetup; -const mockAddDanger = jest.fn(); -const mockAddError = jest.fn(); -const mockNotification = { - toasts: { - addDanger: mockAddDanger, - addError: mockAddError, - }, -} as unknown as NotificationsStart; +const startServices = coreMock.createStart(); +const mockAddDanger = jest.spyOn(startServices.notifications.toasts, 'addDanger'); const mockRenderDocLink = jest.fn(); @@ -33,9 +28,9 @@ describe('createIngestPipeline', () => { mockRequest.mockRejectedValue({ body: { message: 'test error' } }); await createIngestPipeline({ http: mockHttp, - notifications: mockNotification, options: mockOptions, renderDocLink: mockRenderDocLink, + startServices, }); }); @@ -47,7 +42,12 @@ describe('createIngestPipeline', () => { }); it('handles error', () => { - expect(mockAddDanger.mock.calls[0][0].title).toEqual('Failed to create Ingest pipeline'); + expect(mockAddDanger.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "text": [Function], + "title": "Failed to create Ingest pipeline", + } + `); expect(mockRenderDocLink.mock.calls[0][0]).toEqual('test error'); }); }); @@ -57,9 +57,9 @@ describe('deleteIngestPipelines', () => { mockRequest.mockRejectedValue({ body: { message: 'test error' } }); await deleteIngestPipelines({ http: mockHttp, - notifications: mockNotification, names: 'test,abc', renderDocLink: mockRenderDocLink, + startServices, }); }); @@ -71,7 +71,12 @@ describe('deleteIngestPipelines', () => { }); it('handles error', () => { - expect(mockAddDanger.mock.calls[0][0].title).toEqual('Failed to delete Ingest pipelines'); + expect(mockAddDanger.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "text": [Function], + "title": "Failed to delete Ingest pipelines", + } + `); expect(mockRenderDocLink.mock.calls[0][0]).toEqual('test error'); }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts index 8195a50440df9..9edc8ca886447 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/ingest_pipelines.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { INGEST_PIPELINE_CREATION_ERROR_MESSAGE, INGEST_PIPELINE_DELETION_ERROR_MESSAGE, @@ -17,11 +17,10 @@ const INGEST_PIPELINES_API_BASE_PATH = `/api/ingest_pipelines`; export async function createIngestPipeline({ errorMessage, http, - notifications, options, renderDocLink, signal, - theme, + startServices: { notifications, ...startServices }, }: CreateIngestPipeline) { const res = await http .post(INGEST_PIPELINES_API_BASE_PATH, { @@ -29,11 +28,12 @@ export async function createIngestPipeline({ signal, }) .catch((e) => { - notifications?.toasts?.addDanger({ + notifications.toasts.addDanger({ title: errorMessage ?? INGEST_PIPELINE_CREATION_ERROR_MESSAGE, - text: toMountPoint(renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, { - theme$: theme?.theme$, - }), + text: toMountPoint( + renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, + startServices + ), }); }); @@ -44,10 +44,9 @@ export async function deleteIngestPipelines({ errorMessage, http, names, // separate with ',' - notifications, renderDocLink, signal, - theme, + startServices: { notifications, ...startServices }, }: DeleteIngestPipeline) { const count = names.split(',').length; const res = await http @@ -55,11 +54,12 @@ export async function deleteIngestPipelines({ signal, }) .catch((e) => { - notifications?.toasts?.addDanger({ + notifications.toasts.addDanger({ title: errorMessage ?? INGEST_PIPELINE_DELETION_ERROR_MESSAGE(count), - text: toMountPoint(renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, { - theme$: theme?.theme$, - }), + text: toMountPoint( + renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, + startServices + ), }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/onboarding.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/onboarding.ts index ff6344679455f..66ebddf348bdb 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/onboarding.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/onboarding.ts @@ -5,8 +5,9 @@ * 2.0. */ -import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; +import type { StartRenderServices } from '../../../types'; import { INTERNAL_RISK_SCORE_URL } from '../../../../common/constants'; import { RiskScoreEntity } from '../../../../common/search_strategy'; @@ -27,18 +28,19 @@ const toastLifeTimeMs = 600000; export const installRiskScore = ({ errorMessage, http, - notifications, options, renderDocLink, signal, + startServices, }: { errorMessage?: string; http: HttpSetup; - notifications?: NotificationsStart; options: Options; renderDocLink?: (message: string) => React.ReactNode; signal?: AbortSignal; + startServices: Pick<StartRenderServices, 'notifications'>; }) => { + const { notifications } = startServices; return http .post<Response[]>(INTERNAL_RISK_SCORE_URL, { version: '1', @@ -61,7 +63,7 @@ export const installRiskScore = ({ ); if (resp.error.length > 0) { - notifications?.toasts?.addError(new Error(errorMessage ?? INSTALLATION_ERROR), { + notifications.toasts.addError(new Error(errorMessage ?? INSTALLATION_ERROR), { title: errorMessage ?? INSTALLATION_ERROR, toastMessage: renderDocLink ? (renderDocLink(resp.error.join(', ')) as unknown as string) @@ -69,7 +71,7 @@ export const installRiskScore = ({ toastLifeTimeMs, }); } else { - notifications?.toasts?.addSuccess({ + notifications.toasts.addSuccess({ 'data-test-subj': `${options.riskScoreEntity}EnableSuccessToast`, title: options.riskScoreEntity === RiskScoreEntity.user @@ -80,7 +82,7 @@ export const installRiskScore = ({ } }) .catch((e) => { - notifications?.toasts?.addError(new Error(errorMessage ?? INSTALLATION_ERROR), { + notifications.toasts.addError(new Error(errorMessage ?? INSTALLATION_ERROR), { title: errorMessage ?? INSTALLATION_ERROR, toastMessage: renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, toastLifeTimeMs, diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts index 4c3f863ddbeae..eb9adc159d019 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/saved_objects.ts @@ -5,9 +5,10 @@ * 2.0. */ -import type { HttpSetup, NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import type { HttpSetup } from '@kbn/core/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; +import type { StartRenderServices } from '../../../types'; import { RISKY_HOSTS_DASHBOARD_TITLE, RISKY_USERS_DASHBOARD_TITLE, @@ -38,23 +39,21 @@ export const bulkCreatePrebuiltSavedObjects = async ({ to, errorMessage, http, - notifications, options, renderDashboardLink, renderDocLink, from, - theme, + startServices: { notifications, ...startServices }, }: { dashboard?: DashboardStart; to: string; errorMessage?: string; http: HttpSetup; - notifications?: NotificationsStart; options: Options; renderDashboardLink?: (message: string, dashboardUrl: string) => React.ReactNode; renderDocLink?: (message: string) => React.ReactNode; from: string; - theme?: ThemeServiceStart; + startServices: StartRenderServices; }) => { const res = await http .post< @@ -72,7 +71,7 @@ export const bulkCreatePrebuiltSavedObjects = async ({ const error = response?.error?.message; if (error) { - notifications?.toasts?.addError(new Error(errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE), { + notifications.toasts.addError(new Error(errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE), { title: errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE, toastMessage: renderDocLink ? (renderDocLink(error) as unknown as string) : error, toastLifeTimeMs, @@ -104,23 +103,21 @@ export const bulkCreatePrebuiltSavedObjects = async ({ return; } - notifications?.toasts?.addSuccess({ + notifications.toasts.addSuccess({ 'data-test-subj': `${options.templateName}SuccessToast`, title: IMPORT_SAVED_OBJECTS_SUCCESS(response?.body?.length), text: toMountPoint( renderDashboardLink && targetUrl ? renderDashboardLink(successMessage, targetUrl) : successMessage, - { - theme$: theme?.theme$, - } + startServices ), toastLifeTimeMs, }); } }) .catch((e) => { - notifications?.toasts?.addError(new Error(errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE), { + notifications.toasts.addError(new Error(errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE), { title: errorMessage ?? IMPORT_SAVED_OBJECTS_FAILURE, toastMessage: renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, toastLifeTimeMs, @@ -132,19 +129,19 @@ export const bulkCreatePrebuiltSavedObjects = async ({ export const bulkDeletePrebuiltSavedObjects = async ({ http, - notifications, errorMessage, options, + startServices: { notifications }, }: { http: HttpSetup; - notifications?: NotificationsStart; errorMessage?: string; options: Options; + startServices: StartRenderServices; }) => { const res = await http .post(prebuiltSavedObjectsBulkDeleteUrl(options.templateName), { version: '1' }) .catch((e) => { - notifications?.toasts?.addDanger({ + notifications.toasts.addDanger({ title: errorMessage ?? DELETE_SAVED_OBJECTS_FAILURE, text: e?.body?.message, }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.test.ts index 90bcde6900a1c..fe23e8dbdb6c9 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import type { HttpSetup } from '@kbn/core/public'; import { createStoredScript, deleteStoredScript } from './stored_scripts'; const mockRequest = jest.fn(); @@ -15,14 +16,8 @@ const mockHttp = { delete: mockRequest, } as unknown as HttpSetup; -const mockAddDanger = jest.fn(); -const mockAddError = jest.fn(); -const mockNotification = { - toasts: { - addDanger: mockAddDanger, - addError: mockAddError, - }, -} as unknown as NotificationsStart; +const startServices = coreMock.createStart(); +const mockAddDanger = jest.spyOn(startServices.notifications.toasts, 'addDanger'); const mockRenderDocLink = jest.fn(); @@ -33,9 +28,9 @@ describe('createStoredScript', () => { mockRequest.mockRejectedValue({ body: { message: 'test error' } }); await createStoredScript({ http: mockHttp, - notifications: mockNotification, options: mockOptions, renderDocLink: mockRenderDocLink, + startServices, }); }); @@ -47,7 +42,12 @@ describe('createStoredScript', () => { }); it('handles error', () => { - expect(mockAddDanger.mock.calls[0][0].title).toEqual('Failed to create stored script'); + expect(mockAddDanger.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "text": [Function], + "title": "Failed to create stored script", + } + `); expect(mockRenderDocLink.mock.calls[0][0]).toEqual('test error'); }); }); @@ -59,9 +59,9 @@ describe('deleteStoredScript', () => { mockRequest.mockRejectedValue({ body: { message: 'test error' } }); await deleteStoredScript({ http: mockHttp, - notifications: mockNotification, options: mockOptions, renderDocLink: mockRenderDocLink, + startServices, }); }); @@ -73,7 +73,12 @@ describe('deleteStoredScript', () => { }); it('handles error', () => { - expect(mockAddDanger.mock.calls[0][0].title).toEqual('Failed to delete stored script'); + expect(mockAddDanger.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "text": [Function], + "title": "Failed to delete stored script", + } + `); expect(mockRenderDocLink.mock.calls[0][0]).toEqual('test error'); }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts index 243106325982a..90aeef15c22a8 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/stored_scripts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { RISK_SCORE_CREATE_STORED_SCRIPT, RISK_SCORE_DELETE_STORED_SCRIPT, @@ -19,11 +19,10 @@ import type { CreateStoredScript, DeleteStoredScript, DeleteStoredScripts } from export async function createStoredScript({ errorMessage, http, - notifications, options, renderDocLink, signal, - theme, + startServices: { notifications, ...startServices }, }: CreateStoredScript) { const res = await http .put(RISK_SCORE_CREATE_STORED_SCRIPT, { @@ -32,11 +31,12 @@ export async function createStoredScript({ signal, }) .catch((e) => { - notifications?.toasts?.addDanger({ + notifications.toasts.addDanger({ title: errorMessage ?? STORED_SCRIPT_CREATION_ERROR_MESSAGE, - text: toMountPoint(renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, { - theme$: theme?.theme$, - }), + text: toMountPoint( + renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, + startServices + ), }); }); @@ -46,11 +46,10 @@ export async function createStoredScript({ export async function deleteStoredScript({ errorMessage, http, - notifications, options, renderDocLink, signal, - theme, + startServices: { notifications, ...startServices }, }: DeleteStoredScript) { const res = await http .delete(RISK_SCORE_DELETE_STORED_SCRIPT, { @@ -59,11 +58,12 @@ export async function deleteStoredScript({ signal, }) .catch((e) => { - notifications?.toasts?.addDanger({ + notifications.toasts.addDanger({ title: errorMessage ?? STORED_SCRIPT_DELETION_ERROR_MESSAGE, - text: toMountPoint(renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, { - theme$: theme?.theme$, - }), + text: toMountPoint( + renderDocLink ? renderDocLink(e?.body?.message) : e?.body?.message, + startServices + ), }); }); @@ -72,19 +72,19 @@ export async function deleteStoredScript({ export async function deleteStoredScripts({ http, - notifications, signal, errorMessage, ids, + startServices, }: DeleteStoredScripts) { const result = await Promise.all( ids.map((id) => { return deleteStoredScript({ http, - notifications, signal, errorMessage, options: { id }, + startServices, }); }) ); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.test.ts index c59df3029691b..d45d19d8d6227 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.test.ts @@ -4,7 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; + +import { coreMock } from '@kbn/core/public/mocks'; +import type { HttpSetup } from '@kbn/core/public'; import { createTransform, deleteTransforms, getTransformState, stopTransforms } from './transforms'; const mockRequest = jest.fn(); @@ -15,14 +17,8 @@ const mockHttp = { delete: mockRequest, } as unknown as HttpSetup; -const mockAddDanger = jest.fn(); -const mockAddError = jest.fn(); -const mockNotification = { - toasts: { - addDanger: mockAddDanger, - addError: mockAddError, - }, -} as unknown as NotificationsStart; +const startServices = coreMock.createStart(); +const mockAddError = jest.spyOn(startServices.notifications.toasts, 'addError'); const mockRenderDocLink = jest.fn(); @@ -37,10 +33,10 @@ describe('createTransform', () => { }); await createTransform({ http: mockHttp, - notifications: mockNotification, options: mockOptions, renderDocLink: mockRenderDocLink, transformId: 'test', + startServices, }); }); @@ -64,9 +60,9 @@ describe('getTransformState', () => { }); await getTransformState({ http: mockHttp, - notifications: mockNotification, renderDocLink: mockRenderDocLink, transformId: 'test', + startServices, }); }); @@ -90,9 +86,9 @@ describe('startTransforms', () => { }); await getTransformState({ http: mockHttp, - notifications: mockNotification, renderDocLink: mockRenderDocLink, transformId: 'test', + startServices, }); }); @@ -130,9 +126,9 @@ describe('stopTransforms', () => { await stopTransforms({ http: mockHttp, - notifications: mockNotification, transformIds: ['test'], renderDocLink: mockRenderDocLink, + startServices, }); }); @@ -189,10 +185,10 @@ describe('deleteTransforms', () => { }); await deleteTransforms({ http: mockHttp, - notifications: mockNotification, options: mockOptions, transformIds: ['test'], renderDocLink: mockRenderDocLink, + startServices, }); }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.ts index 1a824ba4b05ad..9619b062b5f3d 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/transforms.ts @@ -40,11 +40,11 @@ const getErrorToastMessage = ({ export async function createTransform({ errorMessage, http, - notifications, options, renderDocLink, signal, transformId, + startServices: { notifications }, }: CreateTransform) { const res = await http .put<CreateTransformResult>(`${TRANSFORM_API_BASE_PATH}/transforms/${transformId}`, { @@ -64,7 +64,7 @@ export async function createTransform({ return id; }, []); - notifications?.toasts?.addError(new Error(errorMessageTitle), { + notifications.toasts.addError(new Error(errorMessageTitle), { title: errorMessageTitle, toastMessage: getErrorToastMessage({ messageBody: failedIds.join(', '), @@ -76,7 +76,7 @@ export async function createTransform({ return result; }) .catch((e) => { - notifications?.toasts?.addError(e, { + notifications.toasts.addError(e, { title: errorMessage ?? TRANSFORM_CREATION_ERROR_MESSAGE, toastMessage: getErrorToastMessage({ messageBody: e?.body?.message, renderDocLink }), toastLifeTimeMs, @@ -88,11 +88,11 @@ export async function createTransform({ export async function startTransforms({ http, - notifications, renderDocLink, signal, errorMessage, transformIds, + startServices: { notifications }, }: StartTransforms) { const res = await http .post<StartTransformsResult>(`${TRANSFORM_API_BASE_PATH}/start_transforms`, { @@ -113,7 +113,7 @@ export async function startTransforms({ const errorMessageTitle = errorMessage ?? START_TRANSFORMS_ERROR_MESSAGE(failedIds.length); if (failedIds.length > 0) { - notifications?.toasts?.addError(new Error(errorMessageTitle), { + notifications.toasts.addError(new Error(errorMessageTitle), { title: errorMessageTitle, toastMessage: getErrorToastMessage({ messageBody: failedIds.join(', '), @@ -126,7 +126,7 @@ export async function startTransforms({ return result; }) .catch((e) => { - notifications?.toasts?.addError(e, { + notifications.toasts.addError(e, { title: errorMessage ?? START_TRANSFORMS_ERROR_MESSAGE(transformIds.length), toastMessage: getErrorToastMessage({ messageBody: e?.body?.message, renderDocLink }), toastLifeTimeMs, @@ -138,11 +138,11 @@ export async function startTransforms({ export async function getTransformState({ http, - notifications, renderDocLink, signal, errorMessage = GET_TRANSFORM_STATE_ERROR_MESSAGE, transformId, + startServices: { notifications }, }: GetTransformState) { const res = await http .get<{ transforms: Array<{ id: string; state: string }>; count: number }>( @@ -154,7 +154,7 @@ export async function getTransformState({ ) .then((result) => { if (result.count === 0) { - notifications?.toasts?.addError(new Error(errorMessage), { + notifications.toasts.addError(new Error(errorMessage), { title: errorMessage, toastMessage: getErrorToastMessage({ messageBody: `${GET_TRANSFORM_STATE_NOT_FOUND_MESSAGE}: ${transformId}`, @@ -166,7 +166,7 @@ export async function getTransformState({ return result; }) .catch((e) => { - notifications?.toasts?.addError(e, { + notifications.toasts.addError(e, { title: errorMessage, toastMessage: getErrorToastMessage({ messageBody: e?.body?.message, renderDocLink }), toastLifeTimeMs, @@ -178,19 +178,19 @@ export async function getTransformState({ export async function getTransformsState({ http, - notifications, signal, errorMessage, transformIds, + startServices, }: GetTransformsState) { const states = await Promise.all( transformIds.map((transformId) => { const transformState = getTransformState({ http, - notifications, signal, errorMessage, transformId, + startServices, }); return transformState; }) @@ -200,13 +200,14 @@ export async function getTransformsState({ export async function stopTransforms({ http, - notifications, signal, errorMessage, transformIds, renderDocLink, + startServices, }: StopTransforms) { - const states = await getTransformsState({ http, signal, transformIds }); + const { notifications } = startServices; + const states = await getTransformsState({ http, signal, transformIds, startServices }); const res = await http .post<StopTransformsResult>(`${TRANSFORM_API_BASE_PATH}/stop_transforms`, { version: '1', @@ -236,7 +237,7 @@ export async function stopTransforms({ const errorMessageTitle = errorMessage ?? STOP_TRANSFORMS_ERROR_MESSAGE(failedIds.length); if (failedIds.length > 0) { - notifications?.toasts?.addError(new Error(errorMessageTitle), { + notifications.toasts.addError(new Error(errorMessageTitle), { title: errorMessageTitle, toastMessage: getErrorToastMessage({ messageBody: failedIds.join(', '), @@ -249,7 +250,7 @@ export async function stopTransforms({ return result; }) .catch((e) => { - notifications?.toasts?.addError(e, { + notifications.toasts.addError(e, { title: errorMessage ?? STOP_TRANSFORMS_ERROR_MESSAGE(transformIds.length), toastMessage: getErrorToastMessage({ messageBody: e?.body?.message, @@ -264,14 +265,15 @@ export async function stopTransforms({ export async function deleteTransforms({ http, - notifications, signal, errorMessage, transformIds, options, renderDocLink, + startServices, }: DeleteTransforms) { - await stopTransforms({ http, signal, transformIds }); + const { notifications } = startServices; + await stopTransforms({ http, signal, transformIds, startServices }); const res = await http .post<DeleteTransformsResult>(`${TRANSFORM_API_BASE_PATH}/delete_transforms`, { version: '1', @@ -298,7 +300,7 @@ export async function deleteTransforms({ const errorMessageTitle = errorMessage ?? TRANSFORM_DELETION_ERROR_MESSAGE(failedIds.length); if (failedIds.length > 0) { - notifications?.toasts?.addError(new Error(errorMessageTitle), { + notifications.toasts.addError(new Error(errorMessageTitle), { title: errorMessageTitle, toastMessage: getErrorToastMessage({ messageBody: failedIds.join(', '), @@ -311,7 +313,7 @@ export async function deleteTransforms({ return result; }) .catch((e) => { - notifications?.toasts?.addError(e, { + notifications.toasts.addError(e, { title: errorMessage ?? TRANSFORM_DELETION_ERROR_MESSAGE(transformIds.length), toastMessage: getErrorToastMessage({ messageBody: e?.body?.message, diff --git a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/types.ts b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/types.ts index e2888772e7b57..a6c91f47d60a5 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/types.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/deprecated_risk_engine/api/types.ts @@ -4,15 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { HttpSetup, NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; +import type { StartRenderServices } from '../../../types'; interface RiskyScoreApiBase { errorMessage?: string; http: HttpSetup; - notifications?: NotificationsStart; renderDocLink?: (message: string) => React.ReactNode; signal?: AbortSignal; - theme?: ThemeServiceStart; + startServices: StartRenderServices; } export interface CreateIngestPipeline extends RiskyScoreApiBase { options: { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/content.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/content.tsx index efd1870d31c87..ae7707e971131 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/content.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/content.tsx @@ -8,7 +8,7 @@ import type { FC } from 'react'; import React, { useCallback } from 'react'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { DocumentDetailsRightPanelKey } from '../right'; +import { DocumentDetailsRightPanelKey } from '../shared/constants/panel_keys'; import { useBasicDataFromDetailsData } from '../../../timelines/components/side_panel/event_details/helpers'; import { EndpointIsolateSuccess } from '../../../common/components/endpoint/host_isolation'; import { useHostIsolationTools } from '../../../timelines/components/side_panel/event_details/use_host_isolation_tools'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/index.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/index.tsx index b56282a542646..7d9d682b1fe0a 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/isolate_host/index.tsx @@ -11,9 +11,6 @@ import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; import { PanelContent } from './content'; import { PanelHeader } from './header'; -export const DocumentDetailsIsolateHostPanelKey: IsolateHostPanelProps['key'] = - 'document-details-isolate-host'; - export interface IsolateHostPanelProps extends FlyoutPanelProps { key: 'document-details-isolate-host'; params?: { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/index.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/index.tsx index 25b076eaa3d4a..fc644c99e297c 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/index.tsx @@ -9,6 +9,7 @@ import type { FC } from 'react'; import React, { memo, useMemo } from 'react'; import type { FlyoutPanelProps, PanelPath } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { DocumentDetailsLeftPanelKey } from '../shared/constants/panel_keys'; import { useKibana } from '../../../common/lib/kibana'; import { PanelHeader } from './header'; import { PanelContent } from './content'; @@ -20,7 +21,6 @@ import { useLeftPanelContext } from './context'; import { LeftPanelTour } from './components/tour'; export type LeftPanelPaths = 'visualize' | 'insights' | 'investigation' | 'response'; -export const DocumentDetailsLeftPanelKey: LeftPanelProps['key'] = 'document-details-left'; export const LeftPanelVisualizeTab: LeftPanelPaths = 'visualize'; export const LeftPanelInsightsTab: LeftPanelPaths = 'insights'; export const LeftPanelInvestigationTab: LeftPanelPaths = 'investigation'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/insights_tab.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/insights_tab.tsx index d47631f4de98d..a60c98f46bdd2 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/insights_tab.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/insights_tab.tsx @@ -22,7 +22,8 @@ import { INSIGHTS_TAB_CORRELATIONS_BUTTON_TEST_ID, } from './test_ids'; import { useLeftPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '..'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '..'; import { ENTITIES_TAB_ID, EntitiesDetails } from '../components/entities_details'; import { THREAT_INTELLIGENCE_TAB_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx index bc365e3f149dd..22a5e52c1d4a0 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx @@ -13,7 +13,8 @@ import { useExpandableFlyoutApi, useExpandableFlyoutState } from '@kbn/expandabl import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useLeftPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelVisualizeTab } from '..'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelVisualizeTab } from '..'; import { VISUALIZE_TAB_BUTTON_GROUP_TEST_ID, VISUALIZE_TAB_GRAPH_ANALYZER_BUTTON_TEST_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/preview/index.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/preview/index.tsx index 5bc4ebf31ab40..1d0080f795d80 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/preview/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/preview/index.tsx @@ -13,7 +13,6 @@ import { panels } from './panels'; export type PreviewPanelPaths = 'rule-preview' | 'alert-reason-preview'; export const RulePreviewPanel: PreviewPanelPaths = 'rule-preview'; export const AlertReasonPreviewPanel: PreviewPanelPaths = 'alert-reason-preview'; -export const DocumentDetailsPreviewPanelKey: PreviewPanelProps['key'] = 'document-details-preview'; export interface PreviewPanelProps extends FlyoutPanelProps { key: 'document-details-preview'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.test.tsx index 4b17ac6667c66..856c3ec51f364 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.test.tsx @@ -17,7 +17,7 @@ import { AlertDescription } from './alert_description'; import { RightPanelContext } from '../context'; import { mockGetFieldsData } from '../../shared/mocks/mock_get_fields_data'; import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; -import { DocumentDetailsPreviewPanelKey } from '../../preview'; +import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; import { TestProviders } from '../../../../common/mock'; import { i18n } from '@kbn/i18n'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.tsx index b3c4ac7a2ce6b..1b649700f3bb2 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/alert_description.tsx @@ -21,11 +21,8 @@ import { ALERT_DESCRIPTION_TITLE_TEST_ID, RULE_SUMMARY_BUTTON_TEST_ID, } from './test_ids'; -import { - DocumentDetailsPreviewPanelKey, - type PreviewPanelProps, - RulePreviewPanel, -} from '../../preview'; +import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; +import { type PreviewPanelProps, RulePreviewPanel } from '../../preview'; /** * Displays the rule description of a signal document. diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.test.tsx index ad2cdb8b06f6b..bb4fcdc79bb83 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.test.tsx @@ -13,7 +13,8 @@ import { RightPanelContext } from '../context'; import { TestProviders } from '../../../../common/mock'; import { CorrelationsOverview } from './correlations_overview'; import { CORRELATIONS_TAB_ID } from '../../left/components/correlations_details'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { CORRELATIONS_RELATED_ALERTS_BY_ANCESTRY_TEST_ID, CORRELATIONS_RELATED_ALERTS_BY_SAME_SOURCE_EVENT_TEST_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.tsx index 9595b9160ccbb..e6bf84f039c52 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/correlations_overview.tsx @@ -25,7 +25,8 @@ import { RelatedCases } from './related_cases'; import { useShowRelatedCases } from '../../shared/hooks/use_show_related_cases'; import { CORRELATIONS_TEST_ID } from './test_ids'; import { useRightPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { CORRELATIONS_TAB_ID } from '../../left/components/correlations_details'; import { useTimelineDataFilters } from '../../../../timelines/containers/use_timeline_data_filters'; import { isActiveTimeline } from '../../../../helpers'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.tsx index df6f5fbfc93ce..7d150c0850c81 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.tsx @@ -15,7 +15,8 @@ import { useRightPanelContext } from '../context'; import { getField } from '../../shared/utils'; import { HostEntityOverview } from './host_entity_overview'; import { UserEntityOverview } from './user_entity_overview'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; /** diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx index baa98fd757054..5c2446a6b407b 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx @@ -14,7 +14,8 @@ import { } from './test_ids'; import { HighlightedFieldsCell } from './highlighted_fields_cell'; import { RightPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { TestProviders } from '../../../../common/mock'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { useGetEndpointDetails } from '../../../../management/hooks'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx index eabc825789e3f..2ae8991094164 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx @@ -18,7 +18,8 @@ import { HOST_NAME_FIELD_NAME, USER_NAME_FIELD_NAME, } from '../../../../timelines/components/timeline/body/renderers/constants'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { HIGHLIGHTED_FIELDS_AGENT_STATUS_CELL_TEST_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx index c7e757919574b..40008e52b820d 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx @@ -21,7 +21,8 @@ import { RightPanelContext } from '../context'; import { mockContextValue } from '../mocks/mock_context'; import { mockDataFormattedForFieldBrowser } from '../../shared/mocks/mock_data_formatted_for_field_browser'; import { useExpandableFlyoutApi, type ExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx index d9568de7bf4dc..117206d0f63fe 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx @@ -50,7 +50,8 @@ import { ENTITIES_HOST_OVERVIEW_LINK_TEST_ID, ENTITIES_HOST_OVERVIEW_LOADING_TEST_ID, } from './test_ids'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { RiskScoreDocTooltip } from '../../../../overview/components/common'; const HOST_ICON = 'storage'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.test.tsx index d57492990b882..a1292e66a6c2f 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.test.tsx @@ -19,7 +19,8 @@ import { mockContextValue } from '../mocks/mock_context'; import type { ExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { useInvestigationGuide } from '../../shared/hooks/use_investigation_guide'; -import { LeftPanelInvestigationTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInvestigationTab } from '../../left'; jest.mock('../../shared/hooks/use_investigation_guide'); jest.mock('@kbn/expandable-flyout', () => ({ useExpandableFlyoutApi: jest.fn() })); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.tsx index 8adecb6ac0560..4b19af37fcfea 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/investigation_guide.tsx @@ -11,7 +11,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useInvestigationGuide } from '../../shared/hooks/use_investigation_guide'; import { useRightPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelInvestigationTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInvestigationTab } from '../../left'; import { INVESTIGATION_GUIDE_BUTTON_TEST_ID, INVESTIGATION_GUIDE_LOADING_TEST_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.test.tsx index ee081caa006be..f516ddb0860d7 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.test.tsx @@ -9,7 +9,8 @@ import { render } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { RightPanelContext } from '../context'; import { PREVALENCE_TEST_ID } from './test_ids'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import React from 'react'; import { PrevalenceOverview } from './prevalence_overview'; import { PREVALENCE_TAB_ID } from '../../left/components/prevalence_details'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.tsx index a2c05e8cf28d1..527e2f16e0f60 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.tsx @@ -14,7 +14,8 @@ import { ExpandablePanel } from '../../../shared/components/expandable_panel'; import { usePrevalence } from '../../shared/hooks/use_prevalence'; import { PREVALENCE_TEST_ID } from './test_ids'; import { useRightPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { PREVALENCE_TAB_ID } from '../../left/components/prevalence_details'; import { InsightsSummaryRow } from './insights_summary_row'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.test.tsx index bac24388a1c6b..46e9230830f33 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.test.tsx @@ -13,7 +13,7 @@ import { Reason } from './reason'; import { RightPanelContext } from '../context'; import { mockGetFieldsData } from '../../shared/mocks/mock_get_fields_data'; import { mockDataFormattedForFieldBrowser } from '../../shared/mocks/mock_data_formatted_for_field_browser'; -import { DocumentDetailsPreviewPanelKey } from '../../preview'; +import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; import { TestProviders } from '../../../../common/mock'; import { i18n } from '@kbn/i18n'; import { type ExpandableFlyoutApi, useExpandableFlyoutApi } from '@kbn/expandable-flyout'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.tsx index 0ac7e5f0eb2ff..5400052295c22 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/reason.tsx @@ -14,7 +14,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useKibana } from '../../../../common/lib/kibana'; import { getField } from '../../shared/utils'; -import { AlertReasonPreviewPanel, DocumentDetailsPreviewPanelKey } from '../../preview'; +import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; +import { AlertReasonPreviewPanel } from '../../preview'; import { REASON_DETAILS_PREVIEW_BUTTON_TEST_ID, REASON_DETAILS_TEST_ID, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/response_button.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/response_button.tsx index 32fa9cd8dec6a..36b941886383f 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/response_button.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/response_button.tsx @@ -9,7 +9,8 @@ import { EuiButton } from '@elastic/eui'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { FormattedMessage } from '@kbn/i18n-react'; import { useRightPanelContext } from '../context'; -import { DocumentDetailsLeftPanelKey, LeftPanelResponseTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelResponseTab } from '../../left'; import { RESPONSE_BUTTON_TEST_ID } from './test_ids'; /** diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.test.tsx index 7faf7609a269c..9cb6da0b929f8 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.test.tsx @@ -11,7 +11,8 @@ import { useExpandableFlyoutApi, type ExpandableFlyoutApi } from '@kbn/expandabl import { RightPanelContext } from '../context'; import { TestProviders } from '../../../../common/mock'; import { ThreatIntelligenceOverview } from './threat_intelligence_overview'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { useFetchThreatIntelligence } from '../hooks/use_fetch_threat_intelligence'; import { THREAT_INTELLIGENCE_TAB_ID } from '../../left/components/threat_intelligence_details'; import { INSIGHTS_THREAT_INTELLIGENCE_TEST_ID } from './test_ids'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.tsx index a16da1bbf647c..351c09f71d3f7 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/threat_intelligence_overview.tsx @@ -15,7 +15,8 @@ import { useFetchThreatIntelligence } from '../hooks/use_fetch_threat_intelligen import { InsightsSummaryRow } from './insights_summary_row'; import { useRightPanelContext } from '../context'; import { INSIGHTS_THREAT_INTELLIGENCE_TEST_ID } from './test_ids'; -import { DocumentDetailsLeftPanelKey, LeftPanelInsightsTab } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { THREAT_INTELLIGENCE_TAB_ID } from '../../left/components/threat_intelligence_details'; /** diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/tour.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/tour.tsx index 423619d59f13a..35a5cc1e5d379 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/tour.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/tour.tsx @@ -15,8 +15,10 @@ import { getLeftSectionTourSteps, } from '../../shared/utils/tour_step_config'; import { getField } from '../../shared/utils'; -import { DocumentDetailsRightPanelKey } from '..'; -import { DocumentDetailsLeftPanelKey } from '../../left'; +import { + DocumentDetailsLeftPanelKey, + DocumentDetailsRightPanelKey, +} from '../../shared/constants/panel_keys'; import { EventKind } from '../../shared/constants/event_kinds'; import { useIsTimelineFlyoutOpen } from '../../shared/hooks/use_is_timeline_flyout_open'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx index c608f50878fe8..a57fad465feb9 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx @@ -20,7 +20,8 @@ import { useObservedUserDetails } from '../../../../explore/users/containers/use import { mockContextValue } from '../mocks/mock_context'; import { mockDataFormattedForFieldBrowser } from '../../shared/mocks/mock_data_formatted_for_field_browser'; import { RightPanelContext } from '../context'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score'; import { type ExpandableFlyoutApi, useExpandableFlyoutApi } from '@kbn/expandable-flyout'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx index 5293536f54011..ef9dbb588f2a6 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx @@ -19,7 +19,8 @@ import { css } from '@emotion/css'; import { getOr } from 'lodash/fp'; import { i18n } from '@kbn/i18n'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { LeftPanelInsightsTab, DocumentDetailsLeftPanelKey } from '../../left'; +import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; +import { LeftPanelInsightsTab } from '../../left'; import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { useRightPanelContext } from '../context'; import type { DescriptionList } from '../../../../../common/utility_types'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx index f1cbd4fbc9685..23166706c177e 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx @@ -9,6 +9,7 @@ import type { FC } from 'react'; import React, { memo, useEffect } from 'react'; import type { FlyoutPanelProps, PanelPath } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { DocumentDetailsRightPanelKey } from '../shared/constants/panel_keys'; import { useTabs } from './hooks/use_tabs'; import { FLYOUT_STORAGE_KEYS } from '../shared/constants/local_storage'; import { useKibana } from '../../../common/lib/kibana'; @@ -22,7 +23,6 @@ import { PanelFooter } from './footer'; import { useFlyoutIsExpandable } from './hooks/use_flyout_is_expandable'; export type RightPanelPaths = 'overview' | 'table' | 'json'; -export const DocumentDetailsRightPanelKey: RightPanelProps['key'] = 'document-details-right'; export interface RightPanelProps extends FlyoutPanelProps { key: 'document-details-right'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/navigation.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/navigation.tsx index d484e2e2a0204..110f6892309ef 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/navigation.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/navigation.tsx @@ -11,7 +11,7 @@ import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { useKibana } from '../../../common/lib/kibana'; import { HeaderActions } from './components/header_actions'; import { FlyoutNavigation } from '../../shared/components/flyout_navigation'; -import { DocumentDetailsLeftPanelKey } from '../left'; +import { DocumentDetailsLeftPanelKey } from '../shared/constants/panel_keys'; import { useRightPanelContext } from './context'; interface PanelNavigationProps { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/constants/panel_keys.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/constants/panel_keys.ts new file mode 100644 index 0000000000000..ec2d59791524e --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/constants/panel_keys.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { IsolateHostPanelProps } from '../../isolate_host'; +import type { LeftPanelProps } from '../../left'; +import type { PreviewPanelProps } from '../../preview'; +import type { RightPanelProps } from '../../right'; + +export const DocumentDetailsRightPanelKey: RightPanelProps['key'] = 'document-details-right'; +export const DocumentDetailsLeftPanelKey: LeftPanelProps['key'] = 'document-details-left'; +export const DocumentDetailsPreviewPanelKey: PreviewPanelProps['key'] = 'document-details-preview'; +export const DocumentDetailsIsolateHostPanelKey: IsolateHostPanelProps['key'] = + 'document-details-isolate-host'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/url/expandable_flyout_state_from_event_meta.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/url/expandable_flyout_state_from_event_meta.ts index d80d6f5983b89..0d9e97fe2d427 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/url/expandable_flyout_state_from_event_meta.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/url/expandable_flyout_state_from_event_meta.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DocumentDetailsRightPanelKey } from '../../../right'; +import { DocumentDetailsRightPanelKey } from '../../constants/panel_keys'; interface RedirectParams { index: string; diff --git a/x-pack/plugins/security_solution/public/flyout/index.tsx b/x-pack/plugins/security_solution/public/flyout/index.tsx index 49681180b7415..f312125df0ab7 100644 --- a/x-pack/plugins/security_solution/public/flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/index.tsx @@ -8,20 +8,23 @@ import React, { memo } from 'react'; import { ExpandableFlyout, type ExpandableFlyoutProps } from '@kbn/expandable-flyout'; import { useEuiTheme } from '@elastic/eui'; -import type { IsolateHostPanelProps } from './document_details/isolate_host'; import { - IsolateHostPanel, DocumentDetailsIsolateHostPanelKey, -} from './document_details/isolate_host'; + DocumentDetailsLeftPanelKey, + DocumentDetailsPreviewPanelKey, + DocumentDetailsRightPanelKey, +} from './document_details/shared/constants/panel_keys'; +import type { IsolateHostPanelProps } from './document_details/isolate_host'; +import { IsolateHostPanel } from './document_details/isolate_host'; import { IsolateHostPanelProvider } from './document_details/isolate_host/context'; import type { RightPanelProps } from './document_details/right'; -import { RightPanel, DocumentDetailsRightPanelKey } from './document_details/right'; +import { RightPanel } from './document_details/right'; import { RightPanelProvider } from './document_details/right/context'; import type { LeftPanelProps } from './document_details/left'; -import { LeftPanel, DocumentDetailsLeftPanelKey } from './document_details/left'; +import { LeftPanel } from './document_details/left'; import { LeftPanelProvider } from './document_details/left/context'; import type { PreviewPanelProps } from './document_details/preview'; -import { PreviewPanel, DocumentDetailsPreviewPanelKey } from './document_details/preview'; +import { PreviewPanel } from './document_details/preview'; import { PreviewPanelProvider } from './document_details/preview/context'; import type { UserPanelExpandableFlyoutProps } from './entity_details/user_right'; import { UserPanel, UserPanelKey } from './entity_details/user_right'; diff --git a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx index 5c7686563f4b5..166d14b01c1a1 100644 --- a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx +++ b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx @@ -10,7 +10,7 @@ * By loading these later we can reduce the initial bundle size and allow users to delay loading these dependencies until they are needed. */ -import { AiInsights } from './ai_insights'; +import { AttackDiscovery } from './attack_discovery'; import { Cases } from './cases'; import { Detections } from './detections'; import { Exceptions } from './exceptions'; @@ -33,7 +33,7 @@ import { MachineLearning } from './machine_learning'; * The classes used to instantiate the sub plugins. These are grouped into a single object for the sake of bundling them in a single dynamic import. */ const subPluginClasses = { - AiInsights, + AttackDiscovery, Detections, Cases, Exceptions, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx index b8e08f557aa2d..730bebae72d7f 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx @@ -153,6 +153,12 @@ export type ActionsLogPopupFilters = Extract< 'actions' | 'hosts' | 'statuses' | 'types' >; +interface GetTypesFilterInitialStateArguments { + isFlyout: boolean; + agentTypes?: string[]; + types?: string[]; +} + /** * * @param isSentinelOneV1Enabled @@ -163,32 +169,45 @@ export type ActionsLogPopupFilters = Extract< * @description * sets the initial state of the types filter options */ -const getTypesFilterInitialState = ( - isSentinelOneV1Enabled: boolean, - isFlyout: boolean, - agentTypes?: string[], - types?: string[] -): FilterItems => { - const getFilterOptions = ({ key, label, checked }: FilterItems[number]): FilterItems[number] => ({ - key, - label, - isGroupLabel: false, - checked, - 'data-test-subj': `types-filter-option`, - }); +const useTypesFilterInitialState = ({ + isFlyout, + agentTypes, + types, +}: GetTypesFilterInitialStateArguments): FilterItems => { + const isSentinelOneV1Enabled = useIsExperimentalFeatureEnabled( + 'responseActionsSentinelOneV1Enabled' + ); + const isCrowdstrikeEnabled = useIsExperimentalFeatureEnabled( + 'responseActionsCrowdstrikeManualHostIsolationEnabled' + ); + + const getFilterOptions = useCallback( + ({ key, label, checked }: FilterItems[number]): FilterItems[number] => ({ + key, + label, + isGroupLabel: false, + checked, + 'data-test-subj': `types-filter-option`, + }), + [] + ); // action types filter options - const defaultFilterOptions = RESPONSE_ACTION_TYPE.map((type) => - getFilterOptions({ - key: type, - label: getTypeDisplayName(type), - checked: !isFlyout && types?.includes(type) ? 'on' : undefined, - }) + const defaultFilterOptions = useMemo( + () => + RESPONSE_ACTION_TYPE.map((type) => + getFilterOptions({ + key: type, + label: getTypeDisplayName(type), + checked: !isFlyout && types?.includes(type) ? 'on' : undefined, + }) + ), + [getFilterOptions, isFlyout, types] ); // v8.13 onwards // for showing agent types and action types in the same filter - if (isSentinelOneV1Enabled) { + if (isSentinelOneV1Enabled || isCrowdstrikeEnabled) { if (!isFlyout) { return [ { @@ -246,10 +265,6 @@ export const useActionsLogFilter = ({ // TODO: remove this when `responseActionsSentinelOneV1Enabled` is enabled and removed setUrlTypeFilters: ReturnType<typeof useActionHistoryUrlParams>['setUrlTypeFilters']; } => { - const isSentinelOneV1Enabled = useIsExperimentalFeatureEnabled( - 'responseActionsSentinelOneV1Enabled' - ); - const { agentTypes = [], commands, @@ -281,10 +296,15 @@ export const useActionsLogFilter = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + const typesFilterInitialState = useTypesFilterInitialState({ + isFlyout, + agentTypes, + types, + }); // filter options const [items, setItems] = useState<FilterItems>( isTypesFilter - ? getTypesFilterInitialState(isSentinelOneV1Enabled, isFlyout, agentTypes, types) + ? typesFilterInitialState : isStatusesFilter ? RESPONSE_ACTION_STATUS.map((statusName) => ({ key: statusName, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx index 614bcc5924aaa..482edd42056e4 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx @@ -1424,8 +1424,30 @@ describe('Response actions history', () => { ]); }); - it('should show a list of agent and action types when opened in page view', () => { - mockedContext.setExperimentalFlag({ responseActionsSentinelOneV1Enabled: true }); + it('should show only action types when 3rd party vendor feature flags are set to false thus only endpoint available', () => { + mockedContext.setExperimentalFlag({ + responseActionsSentinelOneV1Enabled: false, + responseActionsCrowdstrikeManualHostIsolationEnabled: false, + }); + render({ isFlyout: false }); + const { getByTestId, getAllByTestId } = renderResult; + + userEvent.click(getByTestId(`${testPrefix}-${filterPrefix}-popoverButton`)); + const filterList = getByTestId(`${testPrefix}-${filterPrefix}-popoverList`); + expect(filterList).toBeTruthy(); + expect(getAllByTestId(`${filterPrefix}-option`).length).toEqual( + [...RESPONSE_ACTION_TYPE].length + ); + expect(getAllByTestId(`${filterPrefix}-option`).map((option) => option.textContent)).toEqual([ + 'Triggered by rule', + 'Triggered manually', + ]); + }); + it('should show a list of agents and action types when opened in page view', () => { + mockedContext.setExperimentalFlag({ + responseActionsSentinelOneV1Enabled: true, + responseActionsCrowdstrikeManualHostIsolationEnabled: true, + }); render({ isFlyout: false }); const { getByTestId, getAllByTestId } = renderResult; @@ -1438,6 +1460,7 @@ describe('Response actions history', () => { expect(getAllByTestId(`${filterPrefix}-option`).map((option) => option.textContent)).toEqual([ 'Elastic Defend', 'SentinelOne', + 'Crowdstrike', 'Triggered by rule', 'Triggered manually', ]); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx index ff8908e1368ca..66efadb3c212b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx @@ -65,6 +65,9 @@ export const ResponseActionsLog = memo< const isSentinelOneV1Enabled = useIsExperimentalFeatureEnabled( 'responseActionsSentinelOneV1Enabled' ); + const isCrowdstrikeEnabled = useIsExperimentalFeatureEnabled( + 'responseActionsCrowdstrikeManualHostIsolationEnabled' + ); // Used to decide if display global loader or not (only the fist time tha page loads) const [isFirstAttempt, setIsFirstAttempt] = useState(true); @@ -86,11 +89,12 @@ export const ResponseActionsLog = memo< if (!isFlyout) { setQueryParams((prevState) => ({ ...prevState, - agentTypes: isSentinelOneV1Enabled - ? agentTypesFromUrl?.length - ? agentTypesFromUrl - : prevState.agentTypes - : [], + agentTypes: + isSentinelOneV1Enabled || isCrowdstrikeEnabled + ? agentTypesFromUrl?.length + ? agentTypesFromUrl + : prevState.agentTypes + : [], commands: commandsFromUrl?.length ? commandsFromUrl.map( (commandFromUrl) => RESPONSE_CONSOLE_COMMAND_TO_API_COMMAND_MAP[commandFromUrl] @@ -113,6 +117,7 @@ export const ResponseActionsLog = memo< commandsFromUrl, agentIdsFromUrl, isFlyout, + isCrowdstrikeEnabled, isSentinelOneV1Enabled, statusesFromUrl, setQueryParams, diff --git a/x-pack/plugins/security_solution/public/management/cypress/README.md b/x-pack/plugins/security_solution/public/management/cypress/README.md index 79689e650faea..7e574caa469f0 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/README.md +++ b/x-pack/plugins/security_solution/public/management/cypress/README.md @@ -34,9 +34,11 @@ for more information. Similarly to Security Solution cypress tests, we use tags in order to select which tests we want to execute on which environment: - `@serverless` includes a test in the Serverless test suite. You need to explicitly add this tag to any test you want to run against a Serverless environment. +- `@serverlessQA` includes a test in the Serverless test suite for the Kibana release process of serverless. You need to explicitly add this tag to any test you want you run in CI for the second quality gate. These tests should be stable, otherwise they will be blocking the release pipeline. They should be also critical enough, so that when they fail, there's a high chance of an SDH or blocker issue to be reported. - `@ess` includes a test in the normal, non-Serverless test suite. You need to explicitly add this tag to any test you want to run against a non-Serverless environment. - `@brokenInServerless` excludes a test from the Serverless test suite (even if it's tagged as `@serverless`). Indicates that a test should run in Serverless, but currently is broken. - `@skipInServerless` excludes a test from the Serverless test suite (even if it's tagged as `@serverless`). Indicates that we don't want to run the given test in Serverless. +- `@skipInServerlessMKI` excludes a test from any MKI environment, but it will continue being executed as part of the PR process if the `@serverless` tag is present. Important: if you don't provide any tag, your test won't be executed. diff --git a/x-pack/plugins/security_solution/public/management/cypress/cypress.d.ts b/x-pack/plugins/security_solution/public/management/cypress/cypress.d.ts index 0ae9db14cbce3..4ac089c98e560 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/cypress.d.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/cypress.d.ts @@ -197,6 +197,12 @@ declare global { options?: Partial<Loggable & Timeoutable> ): Chainable<string>; + task( + name: 'getSessionCookie', + arg: string, + options?: Partial<Loggable & Timeoutable> + ): Chainable<{ cookie: string; username: string; password: string }>; + task( name: 'loadUserAndRole', arg: LoadUserAndRoleCyTaskOptions, diff --git a/x-pack/plugins/security_solution/public/management/cypress/cypress_base.config.ts b/x-pack/plugins/security_solution/public/management/cypress/cypress_base.config.ts index 1152caf76724a..2cbd89a80d2ef 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/cypress_base.config.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/cypress_base.config.ts @@ -8,6 +8,7 @@ // @ts-expect-error import registerDataSession from 'cypress-data-session/src/plugin'; import { merge } from 'lodash'; +import { samlAuthentication } from './support/saml_authentication'; import { getVideosForFailedSpecs } from './support/filter_videos'; import { setupToolingLogLevel } from './support/setup_tooling_log_level'; import { createToolingLogger } from '../../../common/endpoint/data_loaders/utils'; @@ -81,6 +82,7 @@ export const getCypressBaseConfig = ( registerDataSession(on, config); // IMPORTANT: setting the log level should happen before any tooling is called setupToolingLogLevel(config); + samlAuthentication(on, config); dataLoaders(on, config); diff --git a/x-pack/plugins/security_solution/public/management/cypress/cypress_serverless_qa.config.ts b/x-pack/plugins/security_solution/public/management/cypress/cypress_serverless_qa.config.ts new file mode 100644 index 0000000000000..ac01d48cd1438 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/cypress_serverless_qa.config.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 { defineCypressConfig } from '@kbn/cypress-config'; +import { getCypressBaseConfig } from './cypress_base.config'; + +// eslint-disable-next-line import/no-default-export +export default defineCypressConfig( + getCypressBaseConfig({ + e2e: { + experimentalCspAllowList: ['default-src', 'script-src', 'script-src-elem'], + }, + env: { + // Uncomment to enable logging + // TOOLING_LOG_LEVEL: 'verbose', + grepTags: '@serverless --@skipInServerless --@brokenInServerless --@skipInServerlessMKI', + }, + }) +); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifact_tabs_in_policy_details.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifact_tabs_in_policy_details.cy.ts index 3feb681f47f5c..dedbbf607b3f0 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifact_tabs_in_policy_details.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifact_tabs_in_policy_details.cy.ts @@ -63,149 +63,171 @@ const clickArtifactTab = (tabId: string) => { cy.get(`#${tabId}`).click(); }; -describe('Artifact tabs in Policy Details page', { tags: ['@ess', '@serverless'] }, () => { - let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts> | undefined; - - before(() => { - indexEndpointHosts().then((indexEndpoints) => { - endpointData = indexEndpoints; +describe( + 'Artifact tabs in Policy Details page', + { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, + () => { + let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts> | undefined; + + before(() => { + indexEndpointHosts().then((indexEndpoints) => { + endpointData = indexEndpoints; + }); }); - }); - after(() => { - removeAllArtifacts(); + after(() => { + removeAllArtifacts(); - endpointData?.cleanup(); - endpointData = undefined; - }); - - for (const testData of getArtifactsListTestsData()) { - describe(`${testData.title} tab`, () => { - beforeEach(() => { - login(); - removeExceptionsList(testData.createRequestBody.list_id); - }); - - it( - `[NONE] User cannot see the tab for ${testData.title}`, - // there is no such role in Serverless environment that can read policy but cannot read artifacts - { tags: ['@skipInServerless'] }, - () => { - loginWithPrivilegeNone(testData.privilegePrefix); - visitPolicyDetailsPage(); + endpointData?.cleanup(); + endpointData = undefined; + }); - cy.get(`#${testData.tabId}`).should('not.exist'); - } - ); + for (const testData of getArtifactsListTestsData()) { + describe(`${testData.title} tab`, () => { + beforeEach(() => { + login(); + removeExceptionsList(testData.createRequestBody.list_id); + }); - context(`Given there are no ${testData.title} entries`, () => { it( - `[READ] User CANNOT add ${testData.title} artifact`, - // there is no such role in Serverless environment that only reads artifacts + `[NONE] User cannot see the tab for ${testData.title}`, + // there is no such role in Serverless environment that can read policy but cannot read artifacts { tags: ['@skipInServerless'] }, () => { - loginWithPrivilegeRead(testData.privilegePrefix); - visitArtifactTab(testData.tabId); + loginWithPrivilegeNone(testData.privilegePrefix); + visitPolicyDetailsPage(); - cy.getByTestSubj('policy-artifacts-empty-unexisting').should('exist'); - - cy.getByTestSubj('unexisting-manage-artifacts-button').should('not.exist'); + cy.get(`#${testData.tabId}`).should('not.exist'); } ); - it(`[ALL] User can add ${testData.title} artifact`, () => { - loginWithPrivilegeAll(); - visitArtifactTab(testData.tabId); + context(`Given there are no ${testData.title} entries`, () => { + it( + `[READ] User CANNOT add ${testData.title} artifact`, + // there is no such role in Serverless environment that only reads artifacts + { tags: ['@skipInServerless'] }, + () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); - cy.getByTestSubj('policy-artifacts-empty-unexisting').should('exist'); + cy.getByTestSubj('policy-artifacts-empty-unexisting').should('exist'); - cy.getByTestSubj('unexisting-manage-artifacts-button').should('exist').click(); + cy.getByTestSubj('unexisting-manage-artifacts-button').should('not.exist'); + } + ); - const { formActions, checkResults } = testData.create; + it(`[ALL] User can add ${testData.title} artifact`, () => { + loginWithPrivilegeAll(); + visitArtifactTab(testData.tabId); - performUserActions(formActions); + cy.getByTestSubj('policy-artifacts-empty-unexisting').should('exist'); - // Add a per policy artifact - but not assign it to any policy - cy.get('[data-test-subj$="-perPolicy"]').click(); // test-subjects are generated in different formats, but all ends with -perPolicy - cy.getByTestSubj(`${testData.pagePrefix}-flyout-submitButton`).click(); + cy.getByTestSubj('unexisting-manage-artifacts-button').should('exist').click(); - // Check new artifact is in the list - for (const checkResult of checkResults) { - cy.getByTestSubj(checkResult.selector).should('have.text', checkResult.value); - } + const { formActions, checkResults } = testData.create; - cy.getByTestSubj('policyDetailsPage').should('not.exist'); - cy.getByTestSubj('backToOrigin').contains(/^Back to .+ policy$/); + performUserActions(formActions); - cy.getByTestSubj('backToOrigin').click(); - cy.getByTestSubj('policyDetailsPage').should('exist'); - clickArtifactTab(testData.nextTabId); // Make sure the next tab is accessible and backLink doesn't throw errors - cy.getByTestSubj('policyDetailsPage'); - }); - }); + // Add a per policy artifact - but not assign it to any policy + cy.get('[data-test-subj$="-perPolicy"]').click(); // test-subjects are generated in different formats, but all ends with -perPolicy + cy.getByTestSubj(`${testData.pagePrefix}-flyout-submitButton`).click(); - context(`Given there are no assigned ${testData.title} entries`, () => { - beforeEach(() => { - login(); - createArtifactList(testData.createRequestBody.list_id); - createPerPolicyArtifact(testData.artifactName, testData.createRequestBody); - }); + // Check new artifact is in the list + for (const checkResult of checkResults) { + cy.getByTestSubj(checkResult.selector).should('have.text', checkResult.value); + } - it( - `[READ] User CANNOT Manage or Assign ${testData.title} artifacts`, - // there is no such role in Serverless environment that only reads artifacts - { tags: ['@skipInServerless'] }, - () => { - loginWithPrivilegeRead(testData.privilegePrefix); - visitArtifactTab(testData.tabId); + cy.getByTestSubj('policyDetailsPage').should('not.exist'); + cy.getByTestSubj('backToOrigin').contains(/^Back to .+ policy$/); - cy.getByTestSubj('policy-artifacts-empty-unassigned').should('exist'); + cy.getByTestSubj('backToOrigin').click(); + cy.getByTestSubj('policyDetailsPage').should('exist'); + clickArtifactTab(testData.nextTabId); // Make sure the next tab is accessible and backLink doesn't throw errors + cy.getByTestSubj('policyDetailsPage'); + }); + }); - cy.getByTestSubj('unassigned-manage-artifacts-button').should('not.exist'); - cy.getByTestSubj('unassigned-assign-artifacts-button').should('not.exist'); - } - ); + context(`Given there are no assigned ${testData.title} entries`, () => { + beforeEach(() => { + login(); + createArtifactList(testData.createRequestBody.list_id); + createPerPolicyArtifact(testData.artifactName, testData.createRequestBody); + }); - it(`[ALL] User can Manage and Assign ${testData.title} artifacts`, () => { - loginWithPrivilegeAll(); - visitArtifactTab(testData.tabId); + it( + `[READ] User CANNOT Manage or Assign ${testData.title} artifacts`, + // there is no such role in Serverless environment that only reads artifacts + { tags: ['@skipInServerless'] }, + () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); - cy.getByTestSubj('policy-artifacts-empty-unassigned').should('exist'); + cy.getByTestSubj('policy-artifacts-empty-unassigned').should('exist'); - // Manage artifacts - cy.getByTestSubj('unassigned-manage-artifacts-button').should('exist').click(); - cy.location('pathname').should( - 'equal', - `/app/security/administration/${testData.urlPath}` + cy.getByTestSubj('unassigned-manage-artifacts-button').should('not.exist'); + cy.getByTestSubj('unassigned-assign-artifacts-button').should('not.exist'); + } ); - cy.getByTestSubj('backToOrigin').click(); - // Assign artifacts - cy.getByTestSubj('unassigned-assign-artifacts-button').should('exist').click(); + it(`[ALL] User can Manage and Assign ${testData.title} artifacts`, () => { + loginWithPrivilegeAll(); + visitArtifactTab(testData.tabId); - cy.getByTestSubj('artifacts-assign-flyout').should('exist'); - cy.getByTestSubj('artifacts-assign-confirm-button').should('be.disabled'); + cy.getByTestSubj('policy-artifacts-empty-unassigned').should('exist'); - cy.getByTestSubj(`${testData.artifactName}_checkbox`).click(); - cy.getByTestSubj('artifacts-assign-confirm-button').click(); - }); - }); + // Manage artifacts + cy.getByTestSubj('unassigned-manage-artifacts-button').should('exist').click(); + cy.location('pathname').should( + 'equal', + `/app/security/administration/${testData.urlPath}` + ); + cy.getByTestSubj('backToOrigin').click(); - context(`Given there are assigned ${testData.title} entries`, () => { - beforeEach(() => { - login(); - createArtifactList(testData.createRequestBody.list_id); - yieldFirstPolicyID().then((policyID) => { - createPerPolicyArtifact(testData.artifactName, testData.createRequestBody, policyID); + // Assign artifacts + cy.getByTestSubj('unassigned-assign-artifacts-button').should('exist').click(); + + cy.getByTestSubj('artifacts-assign-flyout').should('exist'); + cy.getByTestSubj('artifacts-assign-confirm-button').should('be.disabled'); + + cy.getByTestSubj(`${testData.artifactName}_checkbox`).click(); + cy.getByTestSubj('artifacts-assign-confirm-button').click(); }); }); - it( - `[READ] User can see ${testData.title} artifacts but CANNOT assign or remove from policy`, - // there is no such role in Serverless environment that only reads artifacts - { tags: ['@skipInServerless'] }, - () => { - loginWithPrivilegeRead(testData.privilegePrefix); + context(`Given there are assigned ${testData.title} entries`, () => { + beforeEach(() => { + login(); + createArtifactList(testData.createRequestBody.list_id); + yieldFirstPolicyID().then((policyID) => { + createPerPolicyArtifact(testData.artifactName, testData.createRequestBody, policyID); + }); + }); + + it( + `[READ] User can see ${testData.title} artifacts but CANNOT assign or remove from policy`, + // there is no such role in Serverless environment that only reads artifacts + { tags: ['@skipInServerless'] }, + () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); + + // List of artifacts + cy.getByTestSubj('artifacts-collapsed-list-card').should('have.length', 1); + cy.getByTestSubj('artifacts-collapsed-list-card-header-titleHolder').contains( + testData.artifactName + ); + + // Cannot assign artifacts + cy.getByTestSubj('artifacts-assign-button').should('not.exist'); + + // Cannot remove from policy + cy.getByTestSubj('artifacts-collapsed-list-card-header-actions-button').click(); + cy.getByTestSubj('remove-from-policy-action').should('not.exist'); + } + ); + + it(`[ALL] User can see ${testData.title} artifacts and can assign or remove artifacts from policy`, () => { + loginWithPrivilegeAll(); visitArtifactTab(testData.tabId); // List of artifacts @@ -214,38 +236,20 @@ describe('Artifact tabs in Policy Details page', { tags: ['@ess', '@serverless'] testData.artifactName ); - // Cannot assign artifacts - cy.getByTestSubj('artifacts-assign-button').should('not.exist'); + // Assign artifacts + cy.getByTestSubj('artifacts-assign-button').should('exist').click(); + cy.getByTestSubj('artifacts-assign-flyout').should('exist'); + cy.getByTestSubj('artifacts-assign-cancel-button').click(); - // Cannot remove from policy + // Remove from policy cy.getByTestSubj('artifacts-collapsed-list-card-header-actions-button').click(); - cy.getByTestSubj('remove-from-policy-action').should('not.exist'); - } - ); + cy.getByTestSubj('remove-from-policy-action').click(); + cy.getByTestSubj('confirmModalConfirmButton').click(); - it(`[ALL] User can see ${testData.title} artifacts and can assign or remove artifacts from policy`, () => { - loginWithPrivilegeAll(); - visitArtifactTab(testData.tabId); - - // List of artifacts - cy.getByTestSubj('artifacts-collapsed-list-card').should('have.length', 1); - cy.getByTestSubj('artifacts-collapsed-list-card-header-titleHolder').contains( - testData.artifactName - ); - - // Assign artifacts - cy.getByTestSubj('artifacts-assign-button').should('exist').click(); - cy.getByTestSubj('artifacts-assign-flyout').should('exist'); - cy.getByTestSubj('artifacts-assign-cancel-button').click(); - - // Remove from policy - cy.getByTestSubj('artifacts-collapsed-list-card-header-actions-button').click(); - cy.getByTestSubj('remove-from-policy-action').click(); - cy.getByTestSubj('confirmModalConfirmButton').click(); - - cy.contains('Successfully removed'); + cy.contains('Successfully removed'); + }); }); }); - }); + } } -}); +); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts index e7f32820c00d7..9227eb80153fb 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts @@ -31,7 +31,7 @@ const loginWithoutAccess = (url: string) => { loadPage(url); }; -describe('Artifacts pages', { tags: ['@ess', '@serverless'] }, () => { +describe('Artifacts pages', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, () => { let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts> | undefined; before(() => { diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/results.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/results.cy.ts index 344c4b0b3bd21..fa0c232498a4c 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/results.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/results.cy.ts @@ -14,7 +14,7 @@ import { indexEndpointRuleAlerts } from '../../tasks/index_endpoint_rule_alerts' import { login, ROLE } from '../../tasks/login'; -describe('Results', { tags: ['@ess', '@serverless'] }, () => { +describe('Results', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, () => { let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts> | undefined; let alertData: ReturnTypeFromChainable<typeof indexEndpointRuleAlerts> | undefined; const [endpointAgentId, endpointHostname] = generateRandomStringName(2); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/responder.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/responder.cy.ts index e737779ad8ff9..e72b5a42eaf1f 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/responder.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/responder.cy.ts @@ -21,97 +21,101 @@ import { indexNewCase } from '../../tasks/index_new_case'; import { indexEndpointHosts } from '../../tasks/index_endpoint_hosts'; import { indexEndpointRuleAlerts } from '../../tasks/index_endpoint_rule_alerts'; -describe('When accessing Endpoint Response Console', { tags: ['@ess', '@serverless'] }, () => { - const performResponderSanityChecks = () => { - openResponderActionLogFlyout(); - // Ensure the popover in the action log date quick select picker is accessible - // (this is especially important for when Responder is displayed from a Timeline) - setResponderActionLogDateRange(); - closeResponderActionLogFlyout(); +describe( + 'When accessing Endpoint Response Console', + { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, + () => { + const performResponderSanityChecks = () => { + openResponderActionLogFlyout(); + // Ensure the popover in the action log date quick select picker is accessible + // (this is especially important for when Responder is displayed from a Timeline) + setResponderActionLogDateRange(); + closeResponderActionLogFlyout(); - // Global kibana nav bar should remain accessible - // (the login user button seems to be common in both ESS and serverless) - cy.getByTestSubj('userMenuButton').should('be.visible'); + // Global kibana nav bar should remain accessible + // (the login user button seems to be common in both ESS and serverless) + cy.getByTestSubj('userMenuButton').should('be.visible'); - closeResponder(); - }; + closeResponder(); + }; - beforeEach(() => { - login(); - }); + beforeEach(() => { + login(); + }); - describe('from Cases', () => { - let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts>; - let caseData: ReturnTypeFromChainable<typeof indexNewCase>; - let alertData: ReturnTypeFromChainable<typeof indexEndpointRuleAlerts>; - let caseAlertActions: ReturnType<typeof addAlertsToCase>; - let alertId: string; - let caseUrlPath: string; + describe('from Cases', () => { + let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts>; + let caseData: ReturnTypeFromChainable<typeof indexNewCase>; + let alertData: ReturnTypeFromChainable<typeof indexEndpointRuleAlerts>; + let caseAlertActions: ReturnType<typeof addAlertsToCase>; + let alertId: string; + let caseUrlPath: string; - const openCaseAlertDetails = () => { - cy.getByTestSubj(`comment-action-show-alert-${caseAlertActions.comments[alertId]}`).click(); - return cy.getByTestSubj('take-action-dropdown-btn').click(); - }; + const openCaseAlertDetails = () => { + cy.getByTestSubj(`comment-action-show-alert-${caseAlertActions.comments[alertId]}`).click(); + return cy.getByTestSubj('take-action-dropdown-btn').click(); + }; - before(() => { - indexNewCase().then((indexCase) => { - caseData = indexCase; - caseUrlPath = `${APP_CASES_PATH}/${indexCase.data.id}`; - }); + before(() => { + indexNewCase().then((indexCase) => { + caseData = indexCase; + caseUrlPath = `${APP_CASES_PATH}/${indexCase.data.id}`; + }); - indexEndpointHosts() - .then((indexEndpoints) => { - endpointData = indexEndpoints; - }) - .then(() => { - return indexEndpointRuleAlerts({ - endpointAgentId: endpointData.data.hosts[0].agent.id, - }).then((indexedAlert) => { - alertData = indexedAlert; - alertId = alertData.alerts[0]._id; - }); - }) - .then(() => { - caseAlertActions = addAlertsToCase({ - caseId: caseData.data.id, - alertIds: [alertId], + indexEndpointHosts() + .then((indexEndpoints) => { + endpointData = indexEndpoints; + }) + .then(() => { + return indexEndpointRuleAlerts({ + endpointAgentId: endpointData.data.hosts[0].agent.id, + }).then((indexedAlert) => { + alertData = indexedAlert; + alertId = alertData.alerts[0]._id; + }); + }) + .then(() => { + caseAlertActions = addAlertsToCase({ + caseId: caseData.data.id, + alertIds: [alertId], + }); }); - }); - }); + }); - after(() => { - if (caseData) { - caseData.cleanup(); - // @ts-expect-error ignore setting to undefined - caseData = undefined; - } + after(() => { + if (caseData) { + caseData.cleanup(); + // @ts-expect-error ignore setting to undefined + caseData = undefined; + } - if (endpointData) { - endpointData.cleanup(); - // @ts-expect-error ignore setting to undefined - endpointData = undefined; - } + if (endpointData) { + endpointData.cleanup(); + // @ts-expect-error ignore setting to undefined + endpointData = undefined; + } - if (alertData) { - alertData.cleanup(); - // @ts-expect-error ignore setting to undefined - alertData = undefined; - } - }); + if (alertData) { + alertData.cleanup(); + // @ts-expect-error ignore setting to undefined + alertData = undefined; + } + }); - it('should display responder option in take action menu', () => { - loadPage(caseUrlPath); - closeAllToasts(); - openCaseAlertDetails(); - cy.getByTestSubj('endpointResponseActions-action-item').should('be.enabled'); - }); + it('should display responder option in take action menu', () => { + loadPage(caseUrlPath); + closeAllToasts(); + openCaseAlertDetails(); + cy.getByTestSubj('endpointResponseActions-action-item').should('be.enabled'); + }); - it('should display Responder response action interface', () => { - loadPage(caseUrlPath); - closeAllToasts(); - openCaseAlertDetails(); - cy.getByTestSubj('endpointResponseActions-action-item').click(); - performResponderSanityChecks(); + it('should display Responder response action interface', () => { + loadPage(caseUrlPath); + closeAllToasts(); + openCaseAlertDetails(); + cy.getByTestSubj('endpointResponseActions-action-item').click(); + performResponderSanityChecks(); + }); }); - }); -}); + } +); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_actions_history.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_actions_history.cy.ts index a36f7e3beaec4..dfd67d6854b63 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_actions_history.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_actions_history.cy.ts @@ -10,64 +10,68 @@ import { indexEndpointHosts } from '../../tasks/index_endpoint_hosts'; import { login } from '../../tasks/login'; import { loadPage } from '../../tasks/common'; -describe('Response actions history page', { tags: ['@ess', '@serverless'] }, () => { - let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts>; +describe( + 'Response actions history page', + { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, + () => { + let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts>; - before(() => { - indexEndpointHosts({ numResponseActions: 11 }).then((indexEndpoints) => { - endpointData = indexEndpoints; + before(() => { + indexEndpointHosts({ numResponseActions: 11 }).then((indexEndpoints) => { + endpointData = indexEndpoints; + }); }); - }); - beforeEach(() => { - login(); - }); + beforeEach(() => { + login(); + }); - after(() => { - if (endpointData) { - endpointData.cleanup(); - // @ts-expect-error ignore setting to undefined - endpointData = undefined; - } - }); + after(() => { + if (endpointData) { + endpointData.cleanup(); + // @ts-expect-error ignore setting to undefined + endpointData = undefined; + } + }); - it('retains expanded action details on page reload', () => { - loadPage(`/app/security/administration/response_actions_history`); - cy.getByTestSubj('response-actions-list-expand-button').eq(3).click(); // 4th row on 1st page - cy.getByTestSubj('response-actions-list-details-tray').should('exist'); - cy.url().should('include', 'withOutputs'); + it('retains expanded action details on page reload', () => { + loadPage(`/app/security/administration/response_actions_history`); + cy.getByTestSubj('response-actions-list-expand-button').eq(3).click(); // 4th row on 1st page + cy.getByTestSubj('response-actions-list-details-tray').should('exist'); + cy.url().should('include', 'withOutputs'); - // navigate to page 2 - cy.getByTestSubj('pagination-button-1').click(); - cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); + // navigate to page 2 + cy.getByTestSubj('pagination-button-1').click(); + cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); - // reload with URL params on page 2 with existing URL - cy.reload(); - cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); + // reload with URL params on page 2 with existing URL + cy.reload(); + cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); - // navigate to page 1 - cy.getByTestSubj('pagination-button-0').click(); - cy.getByTestSubj('response-actions-list-details-tray').should('exist'); - }); + // navigate to page 1 + cy.getByTestSubj('pagination-button-0').click(); + cy.getByTestSubj('response-actions-list-details-tray').should('exist'); + }); - it('collapses expanded tray with a single click', () => { - loadPage(`/app/security/administration/response_actions_history`); - // 2nd row on 1st page - cy.getByTestSubj('response-actions-list-expand-button').eq(1).as('2nd-row'); + it('collapses expanded tray with a single click', () => { + loadPage(`/app/security/administration/response_actions_history`); + // 2nd row on 1st page + cy.getByTestSubj('response-actions-list-expand-button').eq(1).as('2nd-row'); - // expand the row - cy.get('@2nd-row').click(); - cy.getByTestSubj('response-actions-list-details-tray').should('exist'); - cy.url().should('include', 'withOutputs'); + // expand the row + cy.get('@2nd-row').click(); + cy.getByTestSubj('response-actions-list-details-tray').should('exist'); + cy.url().should('include', 'withOutputs'); - // collapse the row - cy.intercept('GET', '/api/endpoint/action*').as('getResponses'); - cy.get('@2nd-row').click(); - // wait for the API response to come back - // and then see if the tray is actually closed - cy.wait('@getResponses', { timeout: 500 }).then(() => { - cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); - cy.url().should('not.include', 'withOutputs'); + // collapse the row + cy.intercept('GET', '/api/endpoint/action*').as('getResponses'); + cy.get('@2nd-row').click(); + // wait for the API response to come back + // and then see if the tray is actually closed + cy.wait('@getResponses', { timeout: 500 }).then(() => { + cy.getByTestSubj('response-actions-list-details-tray').should('not.exist'); + cy.url().should('not.include', 'withOutputs'); + }); }); - }); -}); + } +); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts index dad573bb09c2b..937716a01591a 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts @@ -4,6 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { login } from '../../../tasks/login'; import type { PolicyData } from '../../../../../../common/endpoint/types'; import type { CreateAndEnrollEndpointHostResponse } from '../../../../../../scripts/endpoint/common/endpoint_host_services'; import { @@ -16,7 +17,6 @@ import { import type { IndexedFleetEndpointPolicyResponse } from '../../../../../../common/endpoint/data_loaders/index_fleet_endpoint_policy'; import { createAgentPolicyTask, getEndpointIntegrationVersion } from '../../../tasks/fleet'; -import { login } from '../../../tasks/login'; import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/isolate.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/isolate.cy.ts index 331b79dd7553d..44fdf9d63fb68 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/isolate.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/isolate.cy.ts @@ -26,8 +26,7 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -// Failing: See https://github.com/elastic/kibana/issues/172204 -describe.skip('Response console', { tags: ['@ess', '@serverless'] }, () => { +describe('Response console', { tags: ['@ess', '@serverless'] }, () => { let indexedPolicy: IndexedFleetEndpointPolicyResponse; let policy: PolicyData; let createdHost: CreateAndEnrollEndpointHostResponse; diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/release.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/release.cy.ts index 47d30ad96699c..8de8ca22ae8bf 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/release.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/release.cy.ts @@ -62,8 +62,7 @@ describe('Response console', { tags: ['@ess', '@serverless'] }, () => { } }); - // FLAKY: https://github.com/elastic/kibana/issues/172418 - describe.skip('Host Isolation:', () => { + describe('Host Isolation:', () => { beforeEach(() => { login(); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/endpoint_list_with_security_essentials.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/endpoint_list_with_security_essentials.cy.ts index 9cd298535df26..d82bde7f0426c 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/endpoint_list_with_security_essentials.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/endpoint_list_with_security_essentials.cy.ts @@ -18,7 +18,7 @@ import { describe( 'When on the Endpoint List in Security Essentials PLI', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [{ product_line: 'security', product_tier: 'essentials' }], diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/api/agent_policy_settings_essentials.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/api/agent_policy_settings_essentials.cy.ts index 9b24f0e2279ca..d28e75fd8513d 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/api/agent_policy_settings_essentials.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/api/agent_policy_settings_essentials.cy.ts @@ -18,7 +18,7 @@ import { login } from '../../../../tasks/login'; describe( 'Agent policy settings API operations on Essentials', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [ diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete.cy.ts index 73a091462b679..83a70c84a2307 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete.cy.ts @@ -14,7 +14,7 @@ import { getEndpointManagementPageList } from '../../../screens'; describe( 'App Features for Security Complete PLI', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [{ product_line: 'security', product_tier: 'complete' }] }, }, diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete_with_endpoint.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete_with_endpoint.cy.ts index 38fe13ffef995..13ffbfd848e88 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete_with_endpoint.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/complete_with_endpoint.cy.ts @@ -17,7 +17,7 @@ import { describe( 'App Features for Security Complete PLI with Endpoint Complete Addon', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [ diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/components/policy_details_endpoint_complete.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/components/policy_details_endpoint_complete.cy.ts index 3370552129934..98a01b3ec565d 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/components/policy_details_endpoint_complete.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/components/policy_details_endpoint_complete.cy.ts @@ -13,7 +13,7 @@ import { APP_POLICIES_PATH } from '../../../../../../../common/constants'; describe( 'When displaying the Policy Details in Endpoint Essentials PLI', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [ diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials.cy.ts index d0bedfba31cbf..e7400b548debf 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials.cy.ts @@ -14,7 +14,7 @@ import { getEndpointManagementPageList } from '../../../screens'; describe( 'App Features for Security Essential PLI', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [{ product_line: 'security', product_tier: 'essentials' }], diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials_with_endpoint.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials_with_endpoint.cy.ts index 8853cf261e5b4..87d48220be697 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials_with_endpoint.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/feature_access/essentials_with_endpoint.cy.ts @@ -17,7 +17,7 @@ import { describe( 'App Features for Security Essentials PLI with Endpoint Essentials Addon', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [ diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts index 9b89c8d18ff35..36c94c48d67c2 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts @@ -14,7 +14,7 @@ import { APP_POLICIES_PATH } from '../../../../../common/constants'; describe( 'When displaying the Policy Details in Security Essentials PLI', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [{ product_line: 'security', product_tier: 'essentials' }], diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/roles/essentials_with_endpoint.roles.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/roles/essentials_with_endpoint.roles.cy.ts index 03ff413405b53..31f5578ab07c2 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/roles/essentials_with_endpoint.roles.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/roles/essentials_with_endpoint.roles.cy.ts @@ -27,7 +27,7 @@ import { describe.skip( 'Roles for Security Essential PLI with Endpoint Essentials addon', { - tags: ['@serverless'], + tags: ['@serverless', '@skipInServerlessMKI'], env: { ftrConfig: { productTypes: [ diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/common.ts b/x-pack/plugins/security_solution/public/management/cypress/support/common.ts index c356536cc03d4..2364f08b39681 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/common.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/common.ts @@ -25,7 +25,7 @@ export const setupStackServicesUsingCypressConfig = async (config: Cypress.Plugi password: config.env.KIBANA_PASSWORD, esUsername: config.env.ELASTICSEARCH_USERNAME, esPassword: config.env.ELASTICSEARCH_PASSWORD, - asSuperuser: true, + asSuperuser: !config.env.CLOUD_SERVERLESS, }).then(({ log, ...others }) => { return { ...others, diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts b/x-pack/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts index ef28ebc445e2a..85b95c0d5f4a6 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts @@ -5,17 +5,18 @@ * 2.0. */ -import { kibanaPackageJson } from '@kbn/repo-info'; import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; import type { KbnClient } from '@kbn/test/src/kbn_client'; +import { kibanaPackageJson } from '@kbn/repo-info'; import { isFleetServerRunning } from '../../../../scripts/endpoint/common/fleet_server/fleet_server_services'; import type { HostVm } from '../../../../scripts/endpoint/common/types'; import type { BaseVmCreateOptions } from '../../../../scripts/endpoint/common/vm_services'; import { createVm } from '../../../../scripts/endpoint/common/vm_services'; import { fetchAgentPolicyEnrollmentKey, + fetchFleetAvailableVersions, fetchFleetServerUrl, getAgentDownloadUrl, getAgentFileName, @@ -41,6 +42,8 @@ export interface CreateAndEnrollEndpointHostCIOptions hostname?: string; /** If `version` should be exact, or if this is `true`, then the closest version will be used. Defaults to `false` */ useClosestVersionMatch?: boolean; + /** If the environment is MKI */ + isMkiEnvironment?: boolean; } export interface CreateAndEnrollEndpointHostCIResponse { @@ -63,10 +66,17 @@ export const createAndEnrollEndpointHostCI = async ({ hostname, version = kibanaPackageJson.version, useClosestVersionMatch = true, + isMkiEnvironment = false, }: CreateAndEnrollEndpointHostCIOptions): Promise<CreateAndEnrollEndpointHostCIResponse> => { + let agentVersion = version; const vmName = hostname ?? `test-host-${Math.random().toString().substring(2, 6)}`; - const fileNameNoExtension = getAgentFileName(version); + if (isMkiEnvironment) { + // MKI env provides own fleet server. We must be sure that currently deployed FS is compatible with agent version we want to deploy. + agentVersion = await fetchFleetAvailableVersions(kbnClient); + } + + const fileNameNoExtension = getAgentFileName(agentVersion); const agentFileName = `${fileNameNoExtension}.tar.gz`; let agentDownload: DownloadedAgentInfo | undefined; @@ -78,7 +88,7 @@ export const createAndEnrollEndpointHostCI = async ({ log.warning( `There is no agent installer for ${agentFileName} present on disk, trying to download it now.` ); - const { url: agentUrl } = await getAgentDownloadUrl(version, useClosestVersionMatch, log); + const { url: agentUrl } = await getAgentDownloadUrl(agentVersion, useClosestVersionMatch, log); agentDownload = await downloadAndStoreAgent(agentUrl, agentFileName); } diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts b/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts index 356082f7325da..acf0a3af4531a 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts @@ -144,6 +144,7 @@ export const dataLoaders = ( ): void => { // Env. variable is set by `cypress_serverless.config.ts` const isServerless = config.env.IS_SERVERLESS; + const isCloudServerless = Boolean(config.env.CLOUD_SERVERLESS); const stackServicesPromise = setupStackServicesUsingCypressConfig(config); const roleAndUserLoaderPromise: Promise<TestRoleAndUserLoader> = stackServicesPromise.then( ({ kbnClient, log }) => { @@ -277,8 +278,8 @@ export const dataLoaders = ( }: { endpointAgentIds: string[]; }): Promise<DeleteAllEndpointDataResponse> => { - const { esClient } = await stackServicesPromise; - return deleteAllEndpointData(esClient, endpointAgentIds); + const { esClient, log } = await stackServicesPromise; + return deleteAllEndpointData(esClient, log, endpointAgentIds, !isCloudServerless); }, /** @@ -305,6 +306,8 @@ export const dataLoadersForRealEndpoints = ( config: Cypress.PluginConfigOptions ): void => { const stackServicesPromise = setupStackServicesUsingCypressConfig(config); + const isServerless = Boolean(config.env.IS_SERVERLESS); + const isCloudServerless = Boolean(config.env.CLOUD_SERVERLESS); on('task', { createSentinelOneHost: async () => { @@ -392,7 +395,7 @@ ${s1Info.status} options: Omit<CreateAndEnrollEndpointHostCIOptions, 'log' | 'kbnClient'> ): Promise<CreateAndEnrollEndpointHostCIResponse> => { const { kbnClient, log, esClient } = await stackServicesPromise; - + const isMkiEnvironment = isServerless && isCloudServerless; let retryAttempt = 0; const attemptCreateEndpointHost = async (): Promise<CreateAndEnrollEndpointHostCIResponse> => { @@ -401,6 +404,7 @@ ${s1Info.status} const newHost = process.env.CI ? await createAndEnrollEndpointHostCI({ useClosestVersionMatch: true, + isMkiEnvironment, ...options, log, kbnClient, diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/e2e.ts b/x-pack/plugins/security_solution/public/management/cypress/support/e2e.ts index bf17548cb2984..edc45658e86e7 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/e2e.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/e2e.ts @@ -102,7 +102,7 @@ Cypress.Commands.add( Cypress.on('uncaught:exception', () => false); -// Login as a SOC_MANAGER to properly initialize Security Solution App +// Before any tests runs, Login and visit the Alerts page so that it properly initializes the Security Solution App before(() => { login(ROLE.soc_manager); loadPage('/app/security/alerts'); diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/plugin_handlers/endpoint_data_loader.ts b/x-pack/plugins/security_solution/public/management/cypress/support/plugin_handlers/endpoint_data_loader.ts index 6b74d4c8b3ee3..f89dedad7bff9 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/plugin_handlers/endpoint_data_loader.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/plugin_handlers/endpoint_data_loader.ts @@ -10,6 +10,7 @@ import type { KbnClient } from '@kbn/test'; import pRetry from 'p-retry'; import { kibanaPackageJson } from '@kbn/repo-info'; import type { ToolingLog } from '@kbn/tooling-log'; +import { dump } from '../../../../../scripts/endpoint/common/utils'; import { STARTED_TRANSFORM_STATES } from '../../../../../common/constants'; import { ENDPOINT_ALERTS_INDEX, @@ -81,10 +82,10 @@ export const cyLoadEndpointDataHandler = async ( if (waitUntilTransformed) { // need this before indexing docs so that the united transform doesn't // create a checkpoint with a timestamp after the doc timestamps - await stopTransform(esClient, metadataTransformPrefix); - await stopTransform(esClient, METADATA_CURRENT_TRANSFORM_V2); - await stopTransform(esClient, METADATA_UNITED_TRANSFORM); - await stopTransform(esClient, METADATA_UNITED_TRANSFORM_V2); + await stopTransform(esClient, log, metadataTransformPrefix); + await stopTransform(esClient, log, METADATA_CURRENT_TRANSFORM_V2); + await stopTransform(esClient, log, METADATA_UNITED_TRANSFORM); + await stopTransform(esClient, log, METADATA_UNITED_TRANSFORM_V2); } // load data into the system @@ -127,13 +128,23 @@ export const cyLoadEndpointDataHandler = async ( return indexedData; }; -const stopTransform = async (esClient: Client, transformId: string): Promise<void> => { - await esClient.transform.stopTransform({ - transform_id: `${transformId}*`, - force: true, - wait_for_completion: true, - allow_no_match: true, - }); +const stopTransform = async ( + esClient: Client, + log: ToolingLog, + transformId: string +): Promise<void> => { + await esClient.transform + .stopTransform({ + transform_id: `${transformId}*`, + force: true, + wait_for_completion: true, + allow_no_match: true, + }) + .catch((e) => { + Error.captureStackTrace(e); + log.verbose(dump(e, 8)); + throw e; + }); }; const startTransform = async (esClient: Client, transformId: string): Promise<void> => { diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/saml_authentication.ts b/x-pack/plugins/security_solution/public/management/cypress/support/saml_authentication.ts new file mode 100644 index 0000000000000..4eb38df188b3c --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/support/saml_authentication.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ToolingLog } from '@kbn/tooling-log'; + +import type { HostOptions } from '@kbn/test'; +import { SamlSessionManager } from '@kbn/test'; +import type { SecurityRoleName } from '../../../../common/test'; + +export const samlAuthentication = async ( + on: Cypress.PluginEvents, + config: Cypress.PluginConfigOptions +): Promise<void> => { + const log = new ToolingLog({ level: 'verbose', writeTo: process.stdout }); + + const kbnHost = config.env.KIBANA_URL || config.env.BASE_URL; + + const kbnUrl = new URL(kbnHost); + + const hostOptions: HostOptions = { + protocol: kbnUrl.protocol as 'http' | 'https', + hostname: kbnUrl.hostname, + port: parseInt(kbnUrl.port, 10), + username: config.env.ELASTICSEARCH_USERNAME, + password: config.env.ELASTICSEARCH_PASSWORD, + }; + + on('task', { + getSessionCookie: async ( + role: string | SecurityRoleName + ): Promise<{ cookie: string; username: string; password: string }> => { + // If config.env.PROXY_ORG is set, it means that proxy service is used to create projects. Define the proxy org filename to override the roles. + const rolesFilename = config.env.PROXY_ORG ? `${config.env.PROXY_ORG}.json` : undefined; + const sessionManager = new SamlSessionManager( + { + hostOptions, + log, + isCloud: config.env.CLOUD_SERVERLESS, + }, + rolesFilename + ); + return sessionManager.getSessionCookieForRole(role).then((cookie) => { + return { + cookie, + username: hostOptions.username, + password: hostOptions.password, + }; + }); + }, + }); +}; diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts index a15d01c54049d..fc95d174c4dd7 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts @@ -48,8 +48,28 @@ export const login: CyLoginTask = ( ): ReturnType<typeof sendApiLoginRequest> => { let username = Cypress.env('KIBANA_USERNAME'); let password = Cypress.env('KIBANA_PASSWORD'); + const isServerless = Cypress.env('IS_SERVERLESS'); + const isCloudServerless = Cypress.env('CLOUD_SERVERLESS'); - if (user) { + if (isServerless && isCloudServerless) { + // MKI QA Cloud Serverless + return cy + .task('getSessionCookie', user) + .then((result) => { + username = result.username; + password = result.password; + // Set cookie asynchronously + return cy.setCookie('sid', result.cookie as string); + }) + .then(() => { + // Visit URL after setting cookie + return cy.visit('/'); + }) + .then(() => { + // Return username and password + return { username, password }; + }); + } else if (user) { return cy.task('loadUserAndRole', { name: user }).then((loadedUser) => { username = loadedUser.username; password = loadedUser.password; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx index 56c0e2b9b11a2..a19bea940adfc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx @@ -10,9 +10,9 @@ import type { Action, Reducer } from 'redux'; import type { RenderOptions } from '@testing-library/react'; // eslint-disable-next-line import/no-extraneous-dependencies import { render as reactRender } from '@testing-library/react'; -import { I18nProvider } from '@kbn/i18n-react'; import type { PackageInfo } from '@kbn/fleet-plugin/common/types'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { deepFreeze } from '@kbn/std'; import type { AppContextTestRender, UiRender } from '../../../../../common/mock/endpoint'; @@ -99,8 +99,8 @@ export const createFleetContextRendererMock = (): AppContextTestRender => { }); return ( - <I18nProvider> - <EuiThemeProvider> + <EuiThemeProvider> + <KibanaRenderContextProvider {...coreStart}> <KibanaContextProvider services={startServices}> <RenderContextProviders store={store} @@ -111,8 +111,8 @@ export const createFleetContextRendererMock = (): AppContextTestRender => { {children} </RenderContextProviders> </KibanaContextProvider> - </EuiThemeProvider> - </I18nProvider> + </KibanaRenderContextProvider> + </EuiThemeProvider> ); }; diff --git a/x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx b/x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx index 0ec00c1a0a691..43afb4bd9054f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx @@ -602,7 +602,7 @@ describe('Response actions history page', () => { } }); - expect(history.location.search).toEqual('?agentTypes=endpoint%2Csentinel_one'); + expect(history.location.search).toEqual('?agentTypes=endpoint%2Csentinel_one%2Ccrowdstrike'); }); }); @@ -687,7 +687,7 @@ describe('Response actions history page', () => { }); expect(history.location.search).toEqual( - '?agentTypes=endpoint%2Csentinel_one&types=automated%2Cmanual' + '?agentTypes=endpoint%2Csentinel_one%2Ccrowdstrike&types=automated%2Cmanual' ); const clearAllButton = getByTestId(`${testPrefix}-${filterPrefix}-clearAllButton`); diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 9152bea18c363..dfadc74330281 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -148,7 +148,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S const subPlugins = await this.startSubPlugins(this.storage, coreStart, startPlugins); const store = await this.store(coreStart, startPlugins, subPlugins); const services = await this.services.generateServices(coreStart, startPlugins); - await this.registerActions(store, params.history, services); + await this.registerActions(store, params.history, core, services); const { renderApp } = await this.lazyApplicationDependencies(); const { ManagementSettings } = await this.lazyAssistantSettingsManagement(); @@ -175,7 +175,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S const { renderApp } = await this.lazyApplicationDependencies(); const { getSubPluginRoutesByCapabilities } = await this.lazyHelpersForRoutes(); - await this.registerActions(store, params.history, services); + await this.registerActions(store, params.history, core, services); await this.registerAlertsTableConfiguration(triggersActionsUi); const subPluginRoutes = getSubPluginRoutesByCapabilities(subPlugins, services); @@ -201,7 +201,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S appRoute: 'app/siem', title: 'SIEM', visibleIn: [], - mount: async (params: AppMountParameters) => { + mount: async (_params: AppMountParameters) => { const [coreStart] = await core.getStartServices(); const { manageOldSiemRoutes } = await this.lazyHelpersForRoutes(); @@ -304,8 +304,8 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S if (!this._subPlugins) { const { subPluginClasses } = await this.lazySubPlugins(); this._subPlugins = { - aiInsights: new subPluginClasses.AiInsights(), alerts: new subPluginClasses.Detections(), + attackDiscovery: new subPluginClasses.AttackDiscovery(), rules: new subPluginClasses.Rules(), exceptions: new subPluginClasses.Exceptions(), cases: new subPluginClasses.Cases(), @@ -337,8 +337,10 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S ): Promise<StartedSubPlugins> { const subPlugins = await this.createSubPlugins(); return { - aiInsights: subPlugins.aiInsights.start(this.experimentalFeatures.assistantAlertsInsights), alerts: subPlugins.alerts.start(storage), + attackDiscovery: subPlugins.attackDiscovery.start( + this.experimentalFeatures.attackDiscoveryEnabled + ), cases: subPlugins.cases.start(), cloudDefend: subPlugins.cloudDefend.start(), cloudSecurityPosture: subPlugins.cloudSecurityPosture.start(), @@ -388,11 +390,12 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S private async registerActions( store: SecurityAppStore, history: H.History, + coreSetup: CoreSetup, services: StartServices ) { if (!this._actionsRegistered) { const { registerActions } = await this.lazyActions(); - registerActions(store, history, services); + registerActions(store, history, coreSetup, services); this._actionsRegistered = true; } } diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx index 7167ab106634a..a419c1cdca0be 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx @@ -22,7 +22,7 @@ import { timelineDefaults } from '../../../store/defaults'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { DetailsPanel as DetailsPanelComponent } from '..'; import { ENABLE_EXPANDABLE_FLYOUT_SETTING } from '../../../../../common/constants'; -import { DocumentDetailsRightPanelKey } from '../../../../flyout/document_details/right'; +import { DocumentDetailsRightPanelKey } from '../../../../flyout/document_details/shared/constants/panel_keys'; export interface UseDetailPanelConfig { entityType?: EntityType; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx index 0cd34f01fed33..d95bd56182848 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx @@ -12,7 +12,7 @@ import { isEventBuildingBlockType } from '@kbn/securitysolution-data-table'; import { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; -import { DocumentDetailsRightPanelKey } from '../../../../../flyout/document_details/right'; +import { DocumentDetailsRightPanelKey } from '../../../../../flyout/document_details/shared/constants/panel_keys'; import { ENABLE_EXPANDABLE_FLYOUT_SETTING } from '../../../../../../common/constants'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; import type { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx index 6f402316c1c96..1caac50d1475e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx @@ -9,7 +9,7 @@ import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; -import { isNumber, isEmpty } from 'lodash/fp'; +import { isEmpty, isNumber } from 'lodash/fp'; import React from 'react'; import { css } from '@emotion/css'; @@ -32,21 +32,21 @@ import { Port } from '../../../../../explore/network/components/port'; import { PORT_NAMES } from '../../../../../explore/network/components/port/helpers'; import { TruncatableText } from '../../../../../common/components/truncatable_text'; import { + AGENT_STATUS_FIELD_NAME, DATE_FIELD_TYPE, + EVENT_MODULE_FIELD_NAME, + EVENT_URL_FIELD_NAME, + GEO_FIELD_TYPE, HOST_NAME_FIELD_NAME, - USER_NAME_FIELD_NAME, IP_FIELD_TYPE, MESSAGE_FIELD_NAME, - EVENT_MODULE_FIELD_NAME, + REFERENCE_URL_FIELD_NAME, RULE_REFERENCE_FIELD_NAME, SIGNAL_RULE_NAME_FIELD_NAME, - REFERENCE_URL_FIELD_NAME, - EVENT_URL_FIELD_NAME, SIGNAL_STATUS_FIELD_NAME, - AGENT_STATUS_FIELD_NAME, - GEO_FIELD_TYPE, + USER_NAME_FIELD_NAME, } from './constants'; -import { RenderRuleName, renderEventModule, renderUrl } from './formatted_field_helpers'; +import { renderEventModule, RenderRuleName, renderUrl } from './formatted_field_helpers'; import { RuleStatus } from './rule_status'; import { HostName } from './host_name'; import { UserName } from './user_name'; @@ -270,7 +270,7 @@ const FormattedFieldValueComponent: React.FC<{ /> ); } else if ( - fieldName === SENTINEL_ONE_AGENT_ID_FIELD || + fieldName === AGENT_STATUS_FIELD_NAME && fieldFromBrowserField?.name === SENTINEL_ONE_AGENT_ID_FIELD ) { return <SentinelOneAgentStatus agentId={String(value ?? '')} />; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx index 4ba340cb9f5cd..121fbf8010eb9 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx @@ -29,38 +29,34 @@ export const EqlTabHeader = memo( <> <EuiFlexItem grow={false}> <StyledEuiFlyoutHeader data-test-subj={`${activeTab}-tab-flyout-header`} hasBorder={false}> - <TabHeaderContainer data-test-subj="timelineHeader"> - <EuiFlexGroup - className="euiScrollBar" - alignItems="flexStart" - gutterSize="s" - data-test-subj="timeline-date-picker-container" - responsive={false} - > - {timelineFullScreen && setTimelineFullScreen != null && ( - <ExitFullScreen - fullScreen={timelineFullScreen} - setFullScreen={setTimelineFullScreen} - /> - )} - <EuiFlexItem grow={false}> - {activeTab === TimelineTabs.eql && ( - <Sourcerer scope={SourcererScopeName.timeline} /> - )} - </EuiFlexItem> - <EuiFlexItem> - <SuperDatePicker width="auto" id={InputsModelId.timeline} timelineId={timelineId} /> - </EuiFlexItem> - <EuiFlexItem grow={false}> - <TimelineDatePickerLock /> - </EuiFlexItem> - </EuiFlexGroup> - </TabHeaderContainer> + <EuiFlexGroup + className="euiScrollBar" + alignItems="flexStart" + gutterSize="s" + data-test-subj="timeline-date-picker-container" + responsive={false} + > + {timelineFullScreen && setTimelineFullScreen != null && ( + <ExitFullScreen + fullScreen={timelineFullScreen} + setFullScreen={setTimelineFullScreen} + /> + )} + <EuiFlexItem grow={false}> + {activeTab === TimelineTabs.eql && <Sourcerer scope={SourcererScopeName.timeline} />} + </EuiFlexItem> + <EuiFlexItem> + <SuperDatePicker width="auto" id={InputsModelId.timeline} timelineId={timelineId} /> + </EuiFlexItem> + <EuiFlexItem grow={false}> + <TimelineDatePickerLock /> + </EuiFlexItem> + </EuiFlexGroup> </StyledEuiFlyoutHeader> </EuiFlexItem> - <EuiFlexItem grow={false}> + <TabHeaderContainer data-test-subj="timelineHeader"> <EqlQueryBarTimeline timelineId={timelineId} /> - </EuiFlexItem> + </TabHeaderContainer> </> ) ); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx index 83a7487212e61..0519cf7b06d9c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFlexGroup } from '@elastic/eui'; import { isEmpty } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo } from 'react'; import type { Dispatch } from 'redux'; @@ -213,62 +213,58 @@ export const EqlTabContentComponent: React.FC<Props> = ({ /> <FullWidthFlexGroup> <ScrollableFlexItem grow={2}> - <EuiFlexGroup gutterSize="s" direction="column"> - <EqlTabHeader - activeTab={activeTab} - setTimelineFullScreen={setTimelineFullScreen} - timelineFullScreen={timelineFullScreen} - timelineId={timelineId} - /> - <EuiFlexItem grow={true}> - <EventDetailsWidthProvider> - <StyledEuiFlyoutBody - data-test-subj={`${TimelineTabs.eql}-tab-flyout-body`} - className="timeline-flyout-body" - > - <StatefulBody - activePage={pageInfo.activePage} - browserFields={browserFields} - data={isBlankTimeline ? TIMELINE_EMPTY_EVENTS : events} - id={timelineId} - refetch={refetch} - renderCellValue={renderCellValue} - rowRenderers={rowRenderers} - sort={TIMELINE_NO_SORTING} - tabType={TimelineTabs.eql} - totalPages={calculateTotalPages({ - itemsCount: totalCount, - itemsPerPage, - })} - leadingControlColumns={leadingControlColumns} - trailingControlColumns={timelineEmptyTrailingControlColumns} - /> - </StyledEuiFlyoutBody> + <EqlTabHeader + activeTab={activeTab} + setTimelineFullScreen={setTimelineFullScreen} + timelineFullScreen={timelineFullScreen} + timelineId={timelineId} + /> + <EventDetailsWidthProvider> + <StyledEuiFlyoutBody + data-test-subj={`${TimelineTabs.eql}-tab-flyout-body`} + className="timeline-flyout-body" + > + <StatefulBody + activePage={pageInfo.activePage} + browserFields={browserFields} + data={isBlankTimeline ? TIMELINE_EMPTY_EVENTS : events} + id={timelineId} + refetch={refetch} + renderCellValue={renderCellValue} + rowRenderers={rowRenderers} + sort={TIMELINE_NO_SORTING} + tabType={TimelineTabs.eql} + totalPages={calculateTotalPages({ + itemsCount: totalCount, + itemsPerPage, + })} + leadingControlColumns={leadingControlColumns} + trailingControlColumns={timelineEmptyTrailingControlColumns} + /> + </StyledEuiFlyoutBody> - <StyledEuiFlyoutFooter - data-test-subj={`${TimelineTabs.eql}-tab-flyout-footer`} - className="timeline-flyout-footer" - > - {!isBlankTimeline && ( - <Footer - activePage={pageInfo?.activePage ?? 0} - data-test-subj="timeline-footer" - updatedAt={refreshedAt} - height={footerHeight} - id={timelineId} - isLive={isLive} - isLoading={isQueryLoading || loadingSourcerer} - itemsCount={isBlankTimeline ? 0 : events.length} - itemsPerPage={itemsPerPage} - itemsPerPageOptions={itemsPerPageOptions} - onChangePage={loadPage} - totalCount={isBlankTimeline ? 0 : totalCount} - /> - )} - </StyledEuiFlyoutFooter> - </EventDetailsWidthProvider> - </EuiFlexItem> - </EuiFlexGroup> + <StyledEuiFlyoutFooter + data-test-subj={`${TimelineTabs.eql}-tab-flyout-footer`} + className="timeline-flyout-footer" + > + {!isBlankTimeline && ( + <Footer + activePage={pageInfo?.activePage ?? 0} + data-test-subj="timeline-footer" + updatedAt={refreshedAt} + height={footerHeight} + id={timelineId} + isLive={isLive} + isLoading={isQueryLoading || loadingSourcerer} + itemsCount={isBlankTimeline ? 0 : events.length} + itemsPerPage={itemsPerPage} + itemsPerPageOptions={itemsPerPageOptions} + onChangePage={loadPage} + totalCount={isBlankTimeline ? 0 : totalCount} + /> + )} + </StyledEuiFlyoutFooter> + </EventDetailsWidthProvider> </ScrollableFlexItem> {showExpandedDetails && ( <> diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/layout.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/layout.tsx index a81b6d72c9f8f..f3a8981e70ad2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/layout.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/layout.tsx @@ -16,6 +16,7 @@ import { import styled from 'styled-components'; export const TabHeaderContainer = styled.div` + margin-top: ${(props) => props.theme.eui.euiSizeS}; width: 100%; `; @@ -26,6 +27,7 @@ export const StyledEuiFlyoutHeader = styled(EuiFlyoutHeader)` box-shadow: none; display: flex; flex-direction: column; + padding: 0; &.euiFlyoutHeader { ${({ theme }) => `padding: ${theme.eui.euiSizeS} 0 0 0;`} diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index 3b808fab4ec2b..96f2538f157f7 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -72,7 +72,7 @@ import type { CloudSecurityPosture } from './cloud_security_posture'; import type { CloudDefend } from './cloud_defend'; import type { ThreatIntelligence } from './threat_intelligence'; import type { SecuritySolutionTemplateWrapper } from './app/home/template_wrapper'; -import type { AiInsights } from './ai_insights'; +import type { AttackDiscovery } from './attack_discovery'; import type { Explore } from './explore'; import type { NavigationLink } from './common/links'; import type { EntityAnalytics } from './entity_analytics'; @@ -186,6 +186,16 @@ export type StartServices = CoreStart & timelineFilterManager: FilterManager; }; +export type StartRenderServices = Pick< + CoreStart, + // Used extensively in rendering Security Solution UI + | 'notifications' + // Needed for rendering Shared React modules + | 'analytics' + | 'i18n' + | 'theme' +>; + export interface PluginSetup { resolver: () => Promise<ResolverPluginSetup>; experimentalFeatures: ExperimentalFeatures; @@ -207,8 +217,8 @@ export const CASES_SUB_PLUGIN_KEY = 'cases'; export interface SubPlugins { [CASES_SUB_PLUGIN_KEY]: Cases; - aiInsights: AiInsights; alerts: Detections; + attackDiscovery: AttackDiscovery; cloudDefend: CloudDefend; cloudSecurityPosture: CloudSecurityPosture; dashboards: Dashboards; @@ -229,8 +239,8 @@ export interface SubPlugins { // TODO: find a better way to defined these types export interface StartedSubPlugins { [CASES_SUB_PLUGIN_KEY]: ReturnType<Cases['start']>; - aiInsights: ReturnType<AiInsights['start']>; alerts: ReturnType<Detections['start']>; + attackDiscovery: ReturnType<AttackDiscovery['start']>; cloudDefend: ReturnType<CloudDefend['start']>; cloudSecurityPosture: ReturnType<CloudSecurityPosture['start']>; dashboards: ReturnType<Dashboards['start']>; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/delete_all_endpoint_data.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/delete_all_endpoint_data.ts index 9877fbd906a67..5cbcc3d010ec2 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/delete_all_endpoint_data.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/delete_all_endpoint_data.ts @@ -7,7 +7,9 @@ import type { Client, estypes } from '@elastic/elasticsearch'; import assert from 'assert'; +import type { ToolingLog } from '@kbn/tooling-log'; import { createEsClient, isServerlessKibanaFlavor } from './stack_services'; +import type { CreatedSecuritySuperuser } from './security_user_services'; import { createSecuritySuperuser } from './security_user_services'; export interface DeleteAllEndpointDataResponse { @@ -22,24 +24,49 @@ export interface DeleteAllEndpointDataResponse { * **NOTE:** This utility will create a new role and user that has elevated privileges and access to system indexes. * * @param esClient + * @param log * @param endpointAgentIds + * @param asSuperuser */ export const deleteAllEndpointData = async ( esClient: Client, - endpointAgentIds: string[] + log: ToolingLog, + endpointAgentIds: string[], + /** If true, then a new user will be created that has full privileges to indexes (especially system indexes) */ + asSuperuser: boolean = true ): Promise<DeleteAllEndpointDataResponse> => { assert(endpointAgentIds.length > 0, 'At least one endpoint agent id must be defined'); - const isServerless = await isServerlessKibanaFlavor(esClient); - const unrestrictedUser = isServerless - ? { password: 'changeme', username: 'system_indices_superuser', created: false } - : await createSecuritySuperuser(esClient, 'super_superuser'); - const esUrl = getEsUrlFromClient(esClient); - const esClientUnrestricted = createEsClient({ - url: esUrl, - username: unrestrictedUser.username, - password: unrestrictedUser.password, - }); + let esClientUnrestricted = esClient; + + if (asSuperuser) { + log.debug(`Looking to use a superuser type of account`); + + const isServerless = await isServerlessKibanaFlavor(esClient); + let unrestrictedUser: CreatedSecuritySuperuser | undefined; + + if (isServerless) { + log.debug(`In serverless mode. Creating new ES Client using 'system_indices_superuser'`); + + unrestrictedUser = { + password: 'changeme', + username: 'system_indices_superuser', + created: false, + }; + } else { + log.debug(`Creating new superuser account [super_superuser]`); + unrestrictedUser = await createSecuritySuperuser(esClient, 'super_superuser'); + } + + if (unrestrictedUser) { + const esUrl = getEsUrlFromClient(esClient); + esClientUnrestricted = createEsClient({ + url: esUrl, + username: unrestrictedUser.username, + password: unrestrictedUser.password, + }); + } + } const queryString = endpointAgentIds.map((id) => `(${id})`).join(' OR '); @@ -56,6 +83,8 @@ export const deleteAllEndpointData = async ( conflicts: 'proceed', }); + log.verbose(`All deleted documents:\n`, deleteResponse); + return { count: deleteResponse.deleted ?? 0, query: queryString, diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts index c9d5b84eb167b..ae518420531fd 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_server/fleet_server_services.ts @@ -42,7 +42,7 @@ import { import { maybeCreateDockerNetwork, SERVERLESS_NODES, verifyDockerInstalled } from '@kbn/es'; import { resolve } from 'path'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { captureCallingStack, prefixedOutputLogger } from '../utils'; +import { captureCallingStack, dump, prefixedOutputLogger } from '../utils'; import { createToolingLogger, RETRYABLE_TRANSIENT_ERRORS, @@ -62,7 +62,6 @@ import { getFleetElasticsearchOutputHost, waitForHostToEnroll, } from '../fleet_services'; -import { dump } from '../../endpoint_agent_runner/utils'; import { getLocalhostRealIp } from '../network_services'; import { isLocalhost } from '../is_localhost'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts index 5a99dcc8322db..8d1d2f5e61f49 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts @@ -395,11 +395,22 @@ export const fetchIntegrationPolicyList = async ( * Returns the Agent Version that matches the current stack version. Will use `SNAPSHOT` if * appropriate too. * @param kbnClient + * @param log */ export const getAgentVersionMatchingCurrentStack = async ( - kbnClient: KbnClient + kbnClient: KbnClient, + log: ToolingLog = createToolingLogger() ): Promise<string> => { const kbnStatus = await fetchKibanaStatus(kbnClient); + + log.debug(`Kibana status:\n`, kbnStatus); + + if (!kbnStatus.version) { + throw new Error( + `Kibana status api response did not include 'version' information - possibly due to invalid credentials` + ); + } + const agentVersions = await axios .get('https://artifacts-api.elastic.co/v1/versions') .then((response) => @@ -506,6 +517,24 @@ export const getAgentDownloadUrl = async ( }; }; +/** + * Fetches the latest version of the Elastic Agent available for download + * @param kbnClient + */ + +export const fetchFleetAvailableVersions = async (kbnClient: KbnClient): Promise<string> => { + return kbnClient + .request<{ items: string[] }>({ + method: 'GET', + path: AGENT_API_ROUTES.AVAILABLE_VERSIONS_PATTERN, + headers: { + 'elastic-api-version': '2023-10-31', + }, + }) + .then((response) => response.data.items[0]) + .catch(catchAxiosErrorFormatAndThrow); +}; + /** * Given a stack version number, function will return the closest Agent download version available * for download. THis could be the actual version passed in or lower. diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts index f17bf7b514f21..b3ce8e220dbeb 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts @@ -8,11 +8,17 @@ import type { Client } from '@elastic/elasticsearch'; import { userInfo } from 'os'; +export interface CreatedSecuritySuperuser { + username: string; + password: string; + created: boolean; +} + export const createSecuritySuperuser = async ( esClient: Client, username: string = userInfo().username, password: string = 'changeme' -): Promise<{ username: string; password: string; created: boolean }> => { +): Promise<CreatedSecuritySuperuser> => { if (!username || !password) { throw new Error(`username and password require values.`); } diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts index f95ee808408ed..a7dc1b7ecfe39 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/stack_services.ts @@ -16,6 +16,7 @@ import { type AxiosResponse } from 'axios'; import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; import fs from 'fs'; import { CA_CERT_PATH } from '@kbn/dev-utils'; +import { omit } from 'lodash'; import { createToolingLogger } from '../../../common/endpoint/data_loaders/utils'; import { catchAxiosErrorFormatAndThrow } from '../../../common/endpoint/format_axios_error'; import { isLocalhost } from './is_localhost'; @@ -107,15 +108,16 @@ export const createRuntimeServices = async ({ username: _username, password: _password, apiKey, - esUsername, - esPassword, - log: _log, + esUsername: _esUsername, + esPassword: _esPassword, + log = createToolingLogger(), asSuperuser = false, noCertForSsl, }: CreateRuntimeServicesOptions): Promise<RuntimeServices> => { - const log = _log ?? createToolingLogger(); let username = _username; let password = _password; + let esUsername = _esUsername; + let esPassword = _esPassword; if (asSuperuser) { const tmpKbnClient = createKbnClient({ @@ -131,12 +133,15 @@ export const createRuntimeServices = async ({ if (isServerlessEs) { log?.warning( - 'Creating Security Superuser is not supported in current environment. ES is running in serverless mode. ' + + 'Creating Security Superuser is not supported in current environment.\nES is running in serverless mode. ' + 'Will use username [system_indices_superuser] instead.' ); username = 'system_indices_superuser'; password = 'changeme'; + + esUsername = 'system_indices_superuser'; + esPassword = 'changeme'; } else { const superuserResponse = await createSecuritySuperuser( createEsClient({ @@ -243,7 +248,12 @@ export const createEsClient = ({ } if (log) { - log.verbose(`Creating Elasticsearch client options: ${JSON.stringify(clientOptions)}`); + log.verbose( + `Creating Elasticsearch client options: ${JSON.stringify({ + ...omit(clientOptions, 'tls'), + ...(clientOptions.tls ? { tls: { ca: [typeof clientOptions.tls.ca] } } : {}), + })}` + ); } return new Client(clientOptions); diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/utils.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/utils.ts index 3c8e227c89271..72a59743d4435 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/utils.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/utils.ts @@ -9,6 +9,7 @@ import type { ToolingLog } from '@kbn/tooling-log'; import chalk from 'chalk'; +import { inspect } from 'util'; /** * Capture and return the calling stack for the context that called this utility. @@ -61,3 +62,12 @@ export const prefixedOutputLogger = (prefix: string, log: ToolingLog): ToolingLo return proxy; }; + +/** + * Safely traverse some content (object, array, etc) and stringify it + * @param content + * @param depth + */ +export const dump = (content: any, depth: number = 5): string => { + return inspect(content, { depth }); +}; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/elastic_endpoint.ts b/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/elastic_endpoint.ts index e569580eb7357..42aa3610a0124 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/elastic_endpoint.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/elastic_endpoint.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { dump } from '../common/utils'; import { generateVmName } from '../common/vm_services'; import { createAndEnrollEndpointHost } from '../common/endpoint_host_services'; import { @@ -12,7 +13,6 @@ import { getOrCreateDefaultAgentPolicy, } from '../common/fleet_services'; import { getRuntimeServices } from './runtime'; -import { dump } from './utils'; export const enrollEndpointHost = async (): Promise<string | undefined> => { let vmName; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/utils.ts b/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/utils.ts deleted file mode 100644 index 669d5f830c08e..0000000000000 --- a/x-pack/plugins/security_solution/scripts/endpoint/endpoint_agent_runner/utils.ts +++ /dev/null @@ -1,17 +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 { inspect } from 'util'; - -/** - * Safely traverse some content (object, array, etc) and stringify it - * @param content - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const dump = (content: any): string => { - return inspect(content, { depth: 5 }); -}; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts index f366bd7c17f51..3bce0126fbf29 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/sentinelone_host/common.ts @@ -10,8 +10,8 @@ import type { AxiosRequestConfig } from 'axios'; import axios from 'axios'; import type { KbnClient } from '@kbn/test'; import { SENTINELONE_CONNECTOR_ID } from '@kbn/stack-connectors-plugin/common/sentinelone/constants'; +import { dump } from '../common/utils'; import { type RuleResponse } from '../../../common/api/detection_engine'; -import { dump } from '../endpoint_agent_runner/utils'; import { createToolingLogger } from '../../../common/endpoint/data_loaders/utils'; import type { S1SitesListApiResponse, diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts index 8c3f13eefffce..0790601d8614c 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts @@ -16,6 +16,7 @@ import cypress from 'cypress'; import grep from '@cypress/grep/src/plugin'; import crypto from 'crypto'; import fs from 'fs'; +import { exec } from 'child_process'; import { createFailError } from '@kbn/dev-cli-errors'; import axios, { AxiosError } from 'axios'; import path from 'path'; @@ -24,9 +25,11 @@ import pRetry from 'p-retry'; import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common'; import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants'; -import { exec } from 'child_process'; +import { catchAxiosErrorFormatAndThrow } from '../../common/endpoint/format_axios_error'; +import { createToolingLogger } from '../../common/endpoint/data_loaders/utils'; import { renderSummaryTable } from './print_run'; import { parseTestFileConfig, retrieveIntegrations } from './utils'; +import { prefixedOutputLogger } from '../endpoint/common/utils'; import type { ProductType, Credentials, ProjectHandler } from './project_handler/project_handler'; import { CloudHandler } from './project_handler/cloud_project_handler'; @@ -90,11 +93,13 @@ function waitForEsStatusGreen(esUrl: string, auth: string, runnerId: string): Pr const fetchHealthStatusAttempt = async (attemptNum: number) => { log.info(`Retry number ${attemptNum} to check if Elasticsearch is green.`); - const response = await axios.get(`${esUrl}/_cluster/health?wait_for_status=green&timeout=50s`, { - headers: { - Authorization: `Basic ${auth}`, - }, - }); + const response = await axios + .get(`${esUrl}/_cluster/health?wait_for_status=green&timeout=50s`, { + headers: { + Authorization: `Basic ${auth}`, + }, + }) + .catch(catchAxiosErrorFormatAndThrow); log.info(`${runnerId}: Elasticsearch is ready with status ${response.data.status}.`); }; @@ -118,11 +123,13 @@ function waitForEsStatusGreen(esUrl: string, auth: string, runnerId: string): Pr function waitForKibanaAvailable(kbUrl: string, auth: string, runnerId: string): Promise<void> { const fetchKibanaStatusAttempt = async (attemptNum: number) => { log.info(`Retry number ${attemptNum} to check if kibana is available.`); - const response = await axios.get(`${kbUrl}/api/status`, { - headers: { - Authorization: `Basic ${auth}`, - }, - }); + const response = await axios + .get(`${kbUrl}/api/status`, { + headers: { + Authorization: `Basic ${auth}`, + }, + }) + .catch(catchAxiosErrorFormatAndThrow); if (response.data.status.overall.level !== 'available') { throw new Error(`${runnerId}: Kibana is not available. A retry will be triggered soon...`); } else { @@ -151,11 +158,13 @@ function waitForEsAccess(esUrl: string, auth: string, runnerId: string): Promise const fetchEsAccessAttempt = async (attemptNum: number) => { log.info(`Retry number ${attemptNum} to check if can be accessed.`); - await axios.get(`${esUrl}`, { - headers: { - Authorization: `Basic ${auth}`, - }, - }); + await axios + .get(`${esUrl}`, { + headers: { + Authorization: `Basic ${auth}`, + }, + }) + .catch(catchAxiosErrorFormatAndThrow); }; const retryOptions = { onFailedAttempt: (error: Error | AxiosError) => { @@ -183,9 +192,11 @@ function waitForKibanaLogin(kbUrl: string, credentials: Credentials): Promise<vo const fetchLoginStatusAttempt = async (attemptNum: number) => { log.info(`Retry number ${attemptNum} to check if login can be performed.`); - axios.post(`${kbUrl}/internal/security/login`, body, { - headers: API_HEADERS, - }); + axios + .post(`${kbUrl}/internal/security/login`, body, { + headers: API_HEADERS, + }) + .catch(catchAxiosErrorFormatAndThrow); }; const retryOptions = { onFailedAttempt: (error: Error | AxiosError) => { @@ -234,6 +245,7 @@ export const cli = () => { }); // Checking if API key is either provided via env variable or in ~/.elastic.cloud.json + // This works for either local executions or fallback in case proxy service is unavailable. if (!process.env.CLOUD_QA_API_KEY && !getApiKeyFromElasticCloudJsonFile()) { log.error('The API key for the environment needs to be provided with the env var API_KEY.'); log.error( @@ -251,10 +263,17 @@ export const cli = () => { ? process.env.CLOUD_QA_API_KEY : getApiKeyFromElasticCloudJsonFile(); + log.info(`PROXY_URL is defined : ${PROXY_URL !== undefined}`); + log.info(`PROXY_CLIENT_ID is defined : ${PROXY_CLIENT_ID !== undefined}`); + log.info(`PROXY_SECRET is defined : ${PROXY_SECRET !== undefined}`); + log.info(`API_KEY is defined : ${API_KEY !== undefined}`); + let cloudHandler: ProjectHandler; if (PROXY_URL && PROXY_CLIENT_ID && PROXY_SECRET && (await proxyHealthcheck(PROXY_URL))) { + log.info('Proxy service is up and running, so the tests will run using the proxyHandler.'); cloudHandler = new ProxyHandler(PROXY_URL, PROXY_CLIENT_ID, PROXY_SECRET); } else if (API_KEY) { + log.info('Proxy service is unavailable, so the tests will run using the cloudHandler.'); cloudHandler = new CloudHandler(API_KEY, BASE_ENV_URL); } else { log.info('PROXY_URL or API KEY which are needed to create project could not be retrieved.'); @@ -330,6 +349,12 @@ ${JSON.stringify(argv, null, 2)} cypressConfigFile.env.grepTags = '@serverlessQA --@skipInServerless --@skipInServerlessMKI'; } + if (cypressConfigFile.env?.TOOLING_LOG_LEVEL) { + createToolingLogger.defaultLogLevel = cypressConfigFile.env.TOOLING_LOG_LEVEL; + } + // eslint-disable-next-line require-atomic-updates + log = prefixedOutputLogger('cy.parallel(svl)', createToolingLogger()); + const tier: string = argv.tier; const endpointAddon: boolean = argv.endpointAddon; const cloudAddon: boolean = argv.cloudAddon; @@ -411,6 +436,7 @@ ${JSON.stringify(cypressConfigFile, null, 2)} ? getProductTypes(tier, endpointAddon, cloudAddon) : (parseTestFileConfig(filePath).productTypes as ProductType[]); + log.info(`Running spec file: ${filePath}`); log.info(`${id}: Creating project ${PROJECT_NAME}...`); // Creating project for the test to run const project = await cloudHandler.createSecurityProject( @@ -420,7 +446,7 @@ ${JSON.stringify(cypressConfigFile, null, 2)} ); if (!project) { - log.info('Failed to create project.'); + log.error('Failed to create project.'); // eslint-disable-next-line no-process-exit return process.exit(1); } @@ -437,7 +463,7 @@ ${JSON.stringify(cypressConfigFile, null, 2)} const credentials = await cloudHandler.resetCredentials(project.id, id); if (!credentials) { - log.info('Credentials could not be reset.'); + log.error('Credentials could not be reset.'); // eslint-disable-next-line no-process-exit return process.exit(1); } @@ -460,16 +486,21 @@ ${JSON.stringify(cypressConfigFile, null, 2)} // Wait until application is ready await waitForKibanaLogin(project.kb_url, credentials); + // Check if proxy service is used to define which org executes the tests. + const proxyOrg = + cloudHandler instanceof ProxyHandler ? project.proxy_org_name : undefined; + log.info(`Proxy Organization used id : ${proxyOrg}`); + // Normalized the set of available env vars in cypress const cyCustomEnv = { - CYPRESS_BASE_URL: project.kb_url, + BASE_URL: project.kb_url, ELASTICSEARCH_URL: project.es_url, ELASTICSEARCH_USERNAME: credentials.username, ELASTICSEARCH_PASSWORD: credentials.password, // Used in order to handle the correct role_users file loading. - PROXY_ORG: PROXY_URL ? project.proxy_org_name : undefined, + PROXY_ORG: proxyOrg, KIBANA_URL: project.kb_url, KIBANA_USERNAME: credentials.username, @@ -478,6 +509,7 @@ ${JSON.stringify(cypressConfigFile, null, 2)} // Both CLOUD_SERVERLESS and IS_SERVERLESS are used by the cypress tests. CLOUD_SERVERLESS: true, IS_SERVERLESS: true, + CLOUD_QA_API_KEY: API_KEY, // TEST_CLOUD is used by SvlUserManagerProvider to define if testing against cloud. TEST_CLOUD: 1, }; diff --git a/x-pack/plugins/security_solution/server/assistant/tools/insights/insights_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/attack_discovery_tool.ts similarity index 71% rename from x-pack/plugins/security_solution/server/assistant/tools/insights/insights_tool.ts rename to x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/attack_discovery_tool.ts index 471377b9c201c..e2b03c5347376 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/insights/insights_tool.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/attack_discovery_tool.ts @@ -16,26 +16,26 @@ import { APP_UI_ID } from '../../../../common'; import { getAnonymizedAlerts } from './get_anonymized_alerts'; import { getOutputParser } from './get_output_parser'; import { sizeIsOutOfRange } from '../open_and_acknowledged_alerts/helpers'; -import { getInsightsPrompt } from './get_insights_prompt'; +import { getAttackDiscoveryPrompt } from './get_attack_discovery_prompt'; -export interface InsightsToolParams extends AssistantToolParams { +export interface AttackDiscoveryToolParams extends AssistantToolParams { alertsIndexPattern: string; size: number; } -export const INSIGHTS_TOOL_DESCRIPTION = - 'Call this for insights containing `markdown` that should be displayed verbatim (with no additional processing).'; +export const ATTACK_DISCOVERY_TOOL_DESCRIPTION = + 'Call this for attack discoveries containing `markdown` that should be displayed verbatim (with no additional processing).'; /** - * Returns a tool for insights from open and acknowledged alerts, or null if - * the request doesn't have all the required parameters. + * Returns a tool for generating attack discoveries from open and acknowledged + * alerts, or null if the request doesn't have all the required parameters. */ -export const INSIGHTS_TOOL: AssistantTool = { - id: 'insights-tool', - name: 'InsightsTool', - description: INSIGHTS_TOOL_DESCRIPTION, +export const ATTACK_DISCOVERY_TOOL: AssistantTool = { + id: 'attack-discovery', + name: 'AttackDiscoveryTool', + description: ATTACK_DISCOVERY_TOOL_DESCRIPTION, sourceRegister: APP_UI_ID, - isSupported: (params: AssistantToolParams): params is InsightsToolParams => { + isSupported: (params: AssistantToolParams): params is AttackDiscoveryToolParams => { const { alertsIndexPattern, llm, request, size } = params; return ( requestHasRequiredAnonymizationParams(request) && @@ -56,14 +56,14 @@ export const INSIGHTS_TOOL: AssistantTool = { onNewReplacements, replacements, size, - } = params as InsightsToolParams; + } = params as AttackDiscoveryToolParams; return new DynamicTool({ - name: 'InsightsTool', - description: INSIGHTS_TOOL_DESCRIPTION, + name: 'AttackDiscoveryTool', + description: ATTACK_DISCOVERY_TOOL_DESCRIPTION, func: async () => { if (llm == null) { - throw new Error('LLM is required for insights'); + throw new Error('LLM is required for attack discoveries'); } const anonymizedAlerts = await getAnonymizedAlerts({ @@ -94,12 +94,12 @@ export const INSIGHTS_TOOL: AssistantTool = { }); const result = await answerFormattingChain.call({ - query: getInsightsPrompt({ anonymizedAlerts }), + query: getAttackDiscoveryPrompt({ anonymizedAlerts }), }); return JSON.stringify(result.records, null, 2); }, - tags: ['insights'], + tags: ['attack-discovery'], }); }, }; diff --git a/x-pack/plugins/security_solution/server/assistant/tools/insights/get_anonymized_alerts.ts b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_anonymized_alerts.ts similarity index 100% rename from x-pack/plugins/security_solution/server/assistant/tools/insights/get_anonymized_alerts.ts rename to x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_anonymized_alerts.ts diff --git a/x-pack/plugins/security_solution/server/assistant/tools/insights/get_insights_prompt.ts b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_attack_discovery_prompt.ts similarity index 91% rename from x-pack/plugins/security_solution/server/assistant/tools/insights/get_insights_prompt.ts rename to x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_attack_discovery_prompt.ts index 30d6254c574c4..df211f0bd0a7d 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/insights/get_insights_prompt.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_attack_discovery_prompt.ts @@ -5,7 +5,8 @@ * 2.0. */ -export const getInsightsPrompt = ({ +// NOTE: we ask the LLM to `provide insights`. We do NOT use the feature name, `AttackDiscovery`, in the prompt. +export const getAttackDiscoveryPrompt = ({ anonymizedAlerts, }: { anonymizedAlerts: string[]; diff --git a/x-pack/plugins/security_solution/server/assistant/tools/insights/get_output_parser.ts b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_output_parser.ts similarity index 96% rename from x-pack/plugins/security_solution/server/assistant/tools/insights/get_output_parser.ts rename to x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_output_parser.ts index 604c0853ee92b..1c839ffc64522 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/insights/get_output_parser.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/get_output_parser.ts @@ -37,6 +37,7 @@ const MITRE_ATTACK_TACTICS = [ EXFILTRATION, ] as const; +// NOTE: we ask the LLM for `insight`s. We do NOT use the feature name, `AttackDiscovery`, in the prompt. export const getOutputParser = () => StructuredOutputParser.fromZodSchema( z @@ -68,7 +69,6 @@ export const getOutputParser = () => .describe(`A markdown summary of insight, using the same ${SYNTAX} syntax`), title: z .string() - .optional() .describe( 'A short, no more than 7 words, title for the insight, NOT formatted with special syntax or markdown. This must be as brief as possible.' ), diff --git a/x-pack/plugins/security_solution/server/assistant/tools/insights/helpers.ts b/x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/server/assistant/tools/insights/helpers.ts rename to x-pack/plugins/security_solution/server/assistant/tools/attack_discovery/helpers.ts diff --git a/x-pack/plugins/security_solution/server/assistant/tools/index.ts b/x-pack/plugins/security_solution/server/assistant/tools/index.ts index a464bf2a58f70..b99c1f6e0cd38 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/index.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/index.ts @@ -10,11 +10,11 @@ import type { AssistantTool } from '@kbn/elastic-assistant-plugin/server'; import { ALERT_COUNTS_TOOL } from './alert_counts/alert_counts_tool'; import { ESQL_KNOWLEDGE_BASE_TOOL } from './esql_language_knowledge_base/esql_language_knowledge_base_tool'; import { OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL } from './open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool'; -import { INSIGHTS_TOOL } from './insights/insights_tool'; +import { ATTACK_DISCOVERY_TOOL } from './attack_discovery/attack_discovery_tool'; export const getAssistantTools = (): AssistantTool[] => [ ALERT_COUNTS_TOOL, - INSIGHTS_TOOL, + ATTACK_DISCOVERY_TOOL, ESQL_KNOWLEDGE_BASE_TOOL, OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL, ]; 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 index 90c392d450adf..14d93a292a573 100644 --- 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 @@ -99,6 +99,12 @@ describe('CompleteExternalTaskRunner class', () => { EndpointActions: expect.any(Object), agent: expect.any(Object), }), + { create: { _index: ENDPOINT_ACTION_RESPONSES_INDEX } }, + expect.objectContaining({ + '@timestamp': expect.any(String), + EndpointActions: expect.any(Object), + agent: expect.any(Object), + }), ], }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index 82cf8eeb10311..54af1f4716607 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -299,8 +299,10 @@ function responseActionRequestHandler<T extends EndpointActionDataParameterTypes // `getter` function), we need to include this additional validation here, since // `agent_type` is included in the schema independent of the feature flag if ( - req.body.agent_type === 'sentinel_one' && - !endpointContext.experimentalFeatures.responseActionsSentinelOneV1Enabled + (req.body.agent_type === 'sentinel_one' && + !endpointContext.experimentalFeatures.responseActionsSentinelOneV1Enabled) || + (req.body.agent_type === 'crowdstrike' && + !endpointContext.experimentalFeatures.responseActionsCrowdstrikeManualHostIsolationEnabled) ) { return errorHandler( logger, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/agent/agent_status_handler.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/agent/agent_status_handler.test.ts index de16e0003fe63..d60c04b58886b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/agent/agent_status_handler.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/agent/agent_status_handler.test.ts @@ -43,6 +43,7 @@ describe('Agent Status API route handler', () => { apiTestSetup.endpointAppContextMock.experimentalFeatures = { ...apiTestSetup.endpointAppContextMock.experimentalFeatures, responseActionsSentinelOneV1Enabled: true, + responseActionsCrowdstrikeManualHostIsolationEnabled: false, agentStatusClientEnabled: false, }; @@ -53,6 +54,7 @@ describe('Agent Status API route handler', () => { apiTestSetup.endpointAppContextMock.experimentalFeatures = { ...apiTestSetup.endpointAppContextMock.experimentalFeatures, responseActionsSentinelOneV1Enabled: false, + responseActionsCrowdstrikeManualHostIsolationEnabled: false, }; await apiTestSetup @@ -68,11 +70,19 @@ describe('Agent Status API route handler', () => { it.each(RESPONSE_ACTION_AGENT_TYPE)('should accept agent type of %s', async (agentType) => { // @ts-expect-error `query.*` is not mutable httpRequestMock.query.agentType = agentType; - await apiTestSetup - .getRegisteredVersionedRoute('get', AGENT_STATUS_ROUTE, '1') - .routeHandler(httpHandlerContextMock, httpRequestMock, httpResponseMock); - - expect(httpResponseMock.ok).toHaveBeenCalled(); + // TODO TC: Temporary workaround to catch thrown error while Crowdstrike status is not yet supported + try { + await apiTestSetup + .getRegisteredVersionedRoute('get', AGENT_STATUS_ROUTE, '1') + .routeHandler(httpHandlerContextMock, httpRequestMock, httpResponseMock); + } catch (error) { + if (agentType === 'crowdstrike') { + expect(error.message).toBe('Agent type [crowdstrike] does not support agent status'); + } + } + if (agentType !== 'crowdstrike') { + expect(httpResponseMock.ok).toHaveBeenCalled(); + } }); it('should accept agent type of `endpoint` when FF is disabled', async () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.test.ts new file mode 100644 index 0000000000000..99274f83240c2 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.test.ts @@ -0,0 +1,229 @@ +/* + * Copyright 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 { ResponseActionsClient } from '../lib/types'; +import { responseActionsClientMock } from '../mocks'; +import { CrowdstrikeActionsClient } from './crowdstrike_actions_client'; +import { getActionDetailsById as _getActionDetailsById } from '../../action_details_by_id'; +import { ResponseActionsNotSupportedError } from '../errors'; +import type { CrowdstrikeActionsClientOptionsMock } from './mocks'; +import { CrowdstrikeMock } from './mocks'; + +import { ENDPOINT_ACTIONS_INDEX } from '../../../../../../common/endpoint/constants'; +import { SUB_ACTION } from '@kbn/stack-connectors-plugin/common/crowdstrike/constants'; +import type { NormalizedExternalConnectorClient } from '../../..'; +jest.mock('../../action_details_by_id', () => { + const originalMod = jest.requireActual('../../action_details_by_id'); + + return { + ...originalMod, + getActionDetailsById: jest.fn(originalMod.getActionDetailsById), + }; +}); + +const getActionDetailsByIdMock = _getActionDetailsById as jest.Mock; + +describe('CrowdstrikeActionsClient class', () => { + let classConstructorOptions: CrowdstrikeActionsClientOptionsMock; + let crowdstrikeActionsClient: ResponseActionsClient; + let connectorActionsMock: NormalizedExternalConnectorClient; + + const createCrowdstrikeIsolationOptions = ( + overrides: Omit< + Parameters<typeof responseActionsClientMock.createIsolateOptions>[0], + 'agent_type' + > = {} + ) => responseActionsClientMock.createIsolateOptions({ ...overrides, agent_type: 'crowdstrike' }); + + beforeEach(() => { + classConstructorOptions = CrowdstrikeMock.createConstructorOptions(); + connectorActionsMock = classConstructorOptions.connectorActions; + crowdstrikeActionsClient = new CrowdstrikeActionsClient(classConstructorOptions); + classConstructorOptions.esClient.search.mockResolvedValueOnce( + CrowdstrikeMock.createEventSearchResponse() + ); + }); + + it.each([ + 'killProcess', + 'suspendProcess', + 'runningProcesses', + 'getFile', + 'execute', + 'upload', + ] as Array<keyof ResponseActionsClient>)( + 'should throw an un-supported error for %s', + async (methodName) => { + // @ts-expect-error Purposely passing in empty object for options + await expect(crowdstrikeActionsClient[methodName]({})).rejects.toBeInstanceOf( + ResponseActionsNotSupportedError + ); + } + ); + + it('should error if multiple agent ids are received', async () => { + const payload = createCrowdstrikeIsolationOptions(); + payload.endpoint_ids.push('second-host-id'); + + await expect(crowdstrikeActionsClient.isolate(payload)).rejects.toMatchObject({ + message: `[body.endpoint_ids]: Multiple agents IDs not currently supported for Crowdstrike`, + statusCode: 400, + }); + }); + + describe(`#isolate()`, () => { + it('should send action to Crowdstrike', async () => { + await crowdstrikeActionsClient.isolate( + createCrowdstrikeIsolationOptions({ actionId: '123-345-456' }) + ); + + expect(connectorActionsMock.execute as jest.Mock).toHaveBeenCalledWith({ + params: { + subAction: SUB_ACTION.HOST_ACTIONS, + subActionParams: { + actionParameters: { + comment: + 'Action triggered from Elastic Security by user foo for action 123-345-456: test comment', + }, + command: 'contain', + ids: ['1-2-3'], + }, + }, + }); + }); + + it('should write action request to endpoint indexes', async () => { + await crowdstrikeActionsClient.isolate(createCrowdstrikeIsolationOptions()); + + // we do not write response to es yet + expect(classConstructorOptions.esClient.index).toHaveBeenCalledTimes(1); + expect(classConstructorOptions.esClient.index).toHaveBeenNthCalledWith( + 1, + { + document: { + '@timestamp': expect.any(String), + EndpointActions: { + action_id: expect.any(String), + data: { + command: 'isolate', + comment: 'test comment', + parameters: undefined, + hosts: { + '1-2-3': { + name: 'Crowdstrike-1460', + }, + }, + }, + expiration: expect.any(String), + input_type: 'crowdstrike', + type: 'INPUT_ACTION', + }, + agent: { id: ['1-2-3'] }, + meta: { + hostName: 'Crowdstrike-1460', + }, + user: { id: 'foo' }, + }, + index: ENDPOINT_ACTIONS_INDEX, + refresh: 'wait_for', + }, + { meta: true } + ); + }); + + it('should return action details', async () => { + await crowdstrikeActionsClient.isolate(createCrowdstrikeIsolationOptions()); + + expect(getActionDetailsByIdMock).toHaveBeenCalled(); + }); + + it('should update cases', async () => { + await crowdstrikeActionsClient.isolate( + createCrowdstrikeIsolationOptions({ + case_ids: ['case-1'], + }) + ); + + expect(classConstructorOptions.casesClient?.attachments.bulkCreate).toHaveBeenCalled(); + }); + }); + + describe('#release()', () => { + it('should send action to Crowdstrike', async () => { + await crowdstrikeActionsClient.release( + createCrowdstrikeIsolationOptions({ actionId: '123-345-456' }) + ); + + expect(connectorActionsMock.execute as jest.Mock).toHaveBeenCalledWith({ + params: { + subAction: SUB_ACTION.HOST_ACTIONS, + subActionParams: { + command: 'lift_containment', + ids: ['1-2-3'], + comment: + 'Action triggered from Elastic Security by user foo for action 123-345-456: test comment', + }, + }, + }); + }); + + it('should write action request to endpoint indexes', async () => { + await crowdstrikeActionsClient.release(createCrowdstrikeIsolationOptions()); + + // we do not write response to es yet + expect(classConstructorOptions.esClient.index).toHaveBeenCalledTimes(1); + expect(classConstructorOptions.esClient.index).toHaveBeenNthCalledWith( + 1, + { + document: { + '@timestamp': expect.any(String), + EndpointActions: { + action_id: expect.any(String), + data: { + command: 'unisolate', + comment: 'test comment', + parameters: undefined, + hosts: { + '1-2-3': { + name: 'Crowdstrike-1460', + }, + }, + }, + expiration: expect.any(String), + input_type: 'crowdstrike', + type: 'INPUT_ACTION', + }, + agent: { id: ['1-2-3'] }, + meta: { + hostName: 'Crowdstrike-1460', + }, + user: { id: 'foo' }, + }, + index: ENDPOINT_ACTIONS_INDEX, + refresh: 'wait_for', + }, + { meta: true } + ); + }); + + it('should return action details', async () => { + await crowdstrikeActionsClient.release(createCrowdstrikeIsolationOptions()); + + expect(getActionDetailsByIdMock).toHaveBeenCalled(); + }); + + it('should update cases', async () => { + await crowdstrikeActionsClient.release( + createCrowdstrikeIsolationOptions({ + case_ids: ['case-1'], + }) + ); + + expect(classConstructorOptions.casesClient?.attachments.bulkCreate).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts new file mode 100644 index 0000000000000..3e90ee30572c3 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts @@ -0,0 +1,333 @@ +/* + * Copyright 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 { ActionTypeExecutorResult } from '@kbn/actions-plugin/common'; +import { + SUB_ACTION, + CROWDSTRIKE_CONNECTOR_ID, +} from '@kbn/stack-connectors-plugin/common/crowdstrike/constants'; +import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { CrowdstrikeActionRequestCommonMeta } from '../../../../../../common/endpoint/types/crowdstrike'; +import type { + CommonResponseActionMethodOptions, + ProcessPendingActionsMethodOptions, +} from '../../..'; +import type { ResponseActionAgentType } from '../../../../../../common/endpoint/service/response_actions/constants'; +import { stringify } from '../../../../utils/stringify'; +import { ResponseActionsClientError } from '../errors'; +import type { + ActionDetails, + EndpointActionDataParameterTypes, + EndpointActionResponseDataOutput, + LogsEndpointAction, +} from '../../../../../../common/endpoint/types'; +import type { IsolationRouteRequestBody } from '../../../../../../common/api/endpoint'; +import type { + ResponseActionsClientOptions, + ResponseActionsClientWriteActionRequestToEndpointIndexOptions, + ResponseActionsClientValidateRequestResponse, +} from '../lib/base_response_actions_client'; +import { ResponseActionsClientImpl } from '../lib/base_response_actions_client'; +import type { + NormalizedExternalConnectorClient, + NormalizedExternalConnectorClientExecuteOptions, +} from '../lib/normalized_external_connector_client'; +import { ELASTIC_RESPONSE_ACTION_MESSAGE } from '../../utils'; + +export type CrowdstrikeActionsClientOptions = ResponseActionsClientOptions & { + connectorActions: NormalizedExternalConnectorClient; +}; + +export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { + protected readonly agentType: ResponseActionAgentType = 'crowdstrike'; + private readonly connectorActionsClient: NormalizedExternalConnectorClient; + + constructor({ connectorActions, ...options }: CrowdstrikeActionsClientOptions) { + super(options); + this.connectorActionsClient = connectorActions; + connectorActions.setup(CROWDSTRIKE_CONNECTOR_ID); + } + + protected async writeActionRequestToEndpointIndex< + TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes, + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} + >( + actionRequest: ResponseActionsClientWriteActionRequestToEndpointIndexOptions< + TParameters, + TOutputContent, + TMeta + > + ): Promise< + LogsEndpointAction<TParameters, TOutputContent, TMeta & CrowdstrikeActionRequestCommonMeta> + > { + const agentId = actionRequest.endpoint_ids[0]; + const eventDetails = await this.getEventDetailsById(agentId); + + const hostname = eventDetails.crowdstrike.event.HostName; + return super.writeActionRequestToEndpointIndex({ + ...actionRequest, + hosts: { + [agentId]: { name: hostname }, + }, + meta: { + hostName: hostname, + ...(actionRequest.meta ?? {}), + } as TMeta & CrowdstrikeActionRequestCommonMeta, + }); + } + + /** + * Sends actions to Crowdstrike directly (via Connector) + * @private + */ + private async sendAction( + actionType: SUB_ACTION, + actionParams: object + ): Promise<ActionTypeExecutorResult<unknown>> { + const executeOptions: NormalizedExternalConnectorClientExecuteOptions = { + params: { + subAction: actionType, + subActionParams: actionParams, + }, + }; + + this.log.debug( + `calling connector actions 'execute()' for Crowdstrike with:\n${stringify(executeOptions)}` + ); + + const actionSendResponse = await this.connectorActionsClient.execute(executeOptions); + + if (actionSendResponse.status === 'error') { + this.log.error(stringify(actionSendResponse)); + + throw new ResponseActionsClientError( + `Attempt to send [${actionType}] to Crowdstrike failed: ${ + actionSendResponse.serviceMessage || actionSendResponse.message + }`, + 500, + actionSendResponse + ); + } else { + this.log.debug(`Response:\n${stringify(actionSendResponse)}`); + } + + return actionSendResponse; + } + + private async getEventDetailsById(agentId: string): Promise<{ + crowdstrike: { event: { HostName: string } }; + }> { + const search = { + index: ['logs-crowdstrike.fdr*', 'logs-crowdstrike.falcon*'], + size: 1, + _source: ['crowdstrike.event.HostName'], + body: { + query: { + bool: { + filter: [{ term: { 'crowdstrike.event.DeviceId': agentId } }], + }, + }, + }, + }; + const result: SearchResponse<{ crowdstrike: { event: { HostName: string } } }> = + await this.options.esClient + .search<{ crowdstrike: { event: { HostName: string } } }>(search, { + ignore: [404], + }) + .catch((err) => { + throw new ResponseActionsClientError( + `Failed to fetch event document: ${err.message}`, + err.statusCode ?? 500, + err + ); + }); + + return result.hits.hits?.[0]?._source as { crowdstrike: { event: { HostName: string } } }; + } + + // TODO TC: uncomment when working on agent status support + // private async getAgentDetails( + // id: string + // ): Promise<CrowdstrikeGetAgentsResponse['resources'][number]> { + // const executeOptions: NormalizedExternalConnectorClientExecuteOptions< + // CrowdstrikeGetAgentsParams, + // SUB_ACTION + // > = { + // params: { + // subAction: SUB_ACTION.GET_AGENT_DETAILS, + // subActionParams: { + // ids: [id], + // }, + // }, + // }; + + // let crowdstrikeApiResponse: CrowdstrikeGetAgentsResponse | undefined; + + // try { + // const response = await this.connectorActionsClient.execute(executeOptions); + + // this.log.debug(`Response for Crowdstrike agent id [${id}] returned:\n${stringify(response)}`); + + // crowdstrikeApiResponse = response.data; + // } catch (err) { + // throw new ResponseActionsClientError( + // `Error while attempting to retrieve Crowdstrike host with agent id [${id}]`, + // 500, + // err + // ); + // } + + // if (!crowdstrikeApiResponse || !crowdstrikeApiResponse.resources[0]) { + // throw new ResponseActionsClientError(`Crowdstrike agent id [${id}] not found`, 404); + // } + + // return crowdstrikeApiResponse.resources[0]; + // } + + protected async validateRequest( + payload: ResponseActionsClientWriteActionRequestToEndpointIndexOptions + ): Promise<ResponseActionsClientValidateRequestResponse> { + // TODO:PT support multiple agents + if (payload.endpoint_ids.length > 1) { + return { + isValid: false, + error: new ResponseActionsClientError( + `[body.endpoint_ids]: Multiple agents IDs not currently supported for Crowdstrike`, + 400 + ), + }; + } + + return super.validateRequest(payload); + } + + async isolate( + actionRequest: IsolationRouteRequestBody, + options: CommonResponseActionMethodOptions = {} + ): Promise<ActionDetails> { + const reqIndexOptions: ResponseActionsClientWriteActionRequestToEndpointIndexOptions = { + ...actionRequest, + ...this.getMethodOptions(options), + command: 'isolate', + }; + + if (!reqIndexOptions.error) { + let error = (await this.validateRequest(reqIndexOptions)).error; + const actionCommentMessage = ELASTIC_RESPONSE_ACTION_MESSAGE( + this.options.username, + reqIndexOptions.actionId + ); + + if (!error) { + try { + await this.sendAction(SUB_ACTION.HOST_ACTIONS, { + ids: actionRequest.endpoint_ids, + actionParameters: { + comment: reqIndexOptions.comment + ? `${actionCommentMessage}: ${reqIndexOptions.comment}` + : actionCommentMessage, + }, + command: 'contain', + }); + } catch (err) { + error = err; + } + } + + reqIndexOptions.error = error?.message; + + if (!this.options.isAutomated && error) { + throw error; + } + } + + const actionRequestDoc = await this.writeActionRequestToEndpointIndex(reqIndexOptions); + + await this.updateCases({ + command: reqIndexOptions.command, + caseIds: reqIndexOptions.case_ids, + alertIds: reqIndexOptions.alert_ids, + actionId: actionRequestDoc.EndpointActions.action_id, + hosts: actionRequest.endpoint_ids.map((agentId) => { + return { + hostId: agentId, + hostname: actionRequestDoc.EndpointActions.data.hosts?.[agentId].name ?? '', + }; + }), + comment: reqIndexOptions.comment, + }); + + return this.fetchActionDetails(actionRequestDoc.EndpointActions.action_id); + } + + async release( + actionRequest: IsolationRouteRequestBody, + options: CommonResponseActionMethodOptions = {} + ): Promise<ActionDetails> { + const reqIndexOptions: ResponseActionsClientWriteActionRequestToEndpointIndexOptions = { + ...actionRequest, + ...this.getMethodOptions(options), + command: 'unisolate', + }; + + if (!reqIndexOptions.error) { + let error = (await this.validateRequest(reqIndexOptions)).error; + const actionCommentMessage = ELASTIC_RESPONSE_ACTION_MESSAGE( + this.options.username, + reqIndexOptions.actionId + ); + if (!error) { + try { + await this.sendAction(SUB_ACTION.HOST_ACTIONS, { + ids: actionRequest.endpoint_ids, + command: 'lift_containment', + comment: reqIndexOptions.comment + ? `${actionCommentMessage}: ${reqIndexOptions.comment}` + : actionCommentMessage, + }); + } catch (err) { + error = err; + } + } + + reqIndexOptions.error = error?.message; + + if (!this.options.isAutomated && error) { + throw error; + } + } + + const actionRequestDoc = await this.writeActionRequestToEndpointIndex(reqIndexOptions); + + await this.updateCases({ + command: reqIndexOptions.command, + caseIds: reqIndexOptions.case_ids, + alertIds: reqIndexOptions.alert_ids, + actionId: actionRequestDoc.EndpointActions.action_id, + hosts: actionRequest.endpoint_ids.map((agentId) => { + return { + hostId: agentId, + hostname: actionRequestDoc.EndpointActions.data.hosts?.[agentId].name ?? '', + }; + }), + comment: reqIndexOptions.comment, + }); + + return this.fetchActionDetails(actionRequestDoc.EndpointActions.action_id); + } + + async processPendingActions({ + abortSignal, + addToQueue, + }: ProcessPendingActionsMethodOptions): Promise<void> { + // TODO:PT implement resolving of pending crowdstrike actions + // if (abortSignal.aborted) { + // return; + // } + } +} diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/mocks.ts new file mode 100644 index 0000000000000..e24eedb7ddf57 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/mocks.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 type { CrowdstrikeGetAgentsResponse } from '@kbn/stack-connectors-plugin/common/crowdstrike/types'; +import { + CROWDSTRIKE_CONNECTOR_ID, + SUB_ACTION, +} from '@kbn/stack-connectors-plugin/common/crowdstrike/constants'; +import type { ActionsClientMock } from '@kbn/actions-plugin/server/actions_client/actions_client.mock'; +import type { ConnectorWithExtraFindData } from '@kbn/actions-plugin/server/application/connector/types'; +import { merge } from 'lodash'; +import type { ResponseActionsClientOptionsMock } from '../mocks'; +import { responseActionsClientMock } from '../mocks'; +import type { NormalizedExternalConnectorClient } from '../../..'; + +export interface CrowdstrikeActionsClientOptionsMock extends ResponseActionsClientOptionsMock { + connectorActions: NormalizedExternalConnectorClient; +} + +const createCrowdstrikeAgentDetailsMock = ( + overrides: Partial<CrowdstrikeGetAgentsResponse['resources'][number][number]> = {} +): CrowdstrikeGetAgentsResponse['resources'][number][number] => { + return merge( + { + device_id: '123456789', + cid: '234567890', + agent_load_flags: '0', + agent_local_time: '2024-03-18T22:21:00.173Z', + agent_version: '7.07.16206.0', + bios_manufacturer: 'Amazon EC2', + bios_version: '1.0', + config_id_base: '65994753', + config_id_build: '16206', + config_id_platform: '8', + cpu_signature: '8392466', + cpu_vendor: '1', + external_ip: '18.157.150.216', + mac_address: '03-f4-f4-f4-f4', + instance_id: 'i-456789', + service_provider: 'AWS_EC2_V2', + service_provider_account_id: '23456789', + hostname: 'Crowdstrike-1460', + first_seen: '2024-03-15T13:18:56Z', + last_login_timestamp: '2024-03-15T22:11:47Z', + last_login_user: 'testuser', + last_login_uid: '1002', + last_seen: '2024-03-20T07:19:01Z', + local_ip: '172.31.200.45', + major_version: '5', + minor_version: '14', + os_version: 'RHEL 9.3', + platform_id: '3', + platform_name: 'Linux', + policies: [ + { + policy_type: 'prevention', + policy_id: '234234234234', + applied: true, + settings_hash: 'f0e04444', + assigned_date: '2024-03-15T13:20:02.25821602Z', + applied_date: '2024-03-15T13:20:16.804783955Z', + rule_groups: [], + }, + ], + reduced_functionality_mode: 'no', + device_policies: { + prevention: { + policy_type: 'prevention', + policy_id: '234234234234', + applied: true, + settings_hash: 'f0e04444', + assigned_date: '2024-03-15T13:20:02.25821602Z', + applied_date: '2024-03-15T13:20:16.804783955Z', + rule_groups: [], + }, + sensor_update: { + policy_type: 'sensor-update', + policy_id: '234234234234', + applied: true, + settings_hash: 'tagged|5;', + assigned_date: '2024-03-15T13:20:02.258765734Z', + applied_date: '2024-03-15T13:23:53.773752711Z', + uninstall_protection: 'UNKNOWN', + }, + global_config: { + policy_type: 'globalconfig', + policy_id: '234234234234', + applied: true, + settings_hash: 'f0e04444', + assigned_date: '2024-03-18T22:21:01.50638371Z', + applied_date: '2024-03-18T22:21:30.565040189Z', + }, + remote_response: { + policy_type: 'remote-response', + policy_id: '234234234234', + applied: true, + settings_hash: 'f0e04444', + assigned_date: '2024-03-15T13:20:02.258285018Z', + applied_date: '2024-03-15T13:20:17.016591803Z', + }, + }, + groups: [], + group_hash: '45678909876545678', + product_type_desc: 'Server', + provision_status: 'NotProvisioned', + serial_number: '345678765-35d6-e704-1723-423423432', + status: 'normal', + system_manufacturer: 'Amazon EC2', + system_product_name: 't3a.medium', + tags: [], + modified_timestamp: '2024-03-20T07:19:45Z', + meta: { + version: '484', + version_string: '9:33384301139', + }, + zone_group: 'eu-central-1a', + kernel_version: '5.14.0-234234el9_3.x86_64', + chassis_type: '1', + chassis_type_desc: 'Other', + connection_ip: '172.31.200.45', + default_gateway_ip: '172.31.200.1', + connection_mac_address: '02-e8-f1-0e-b7-c4', + linux_sensor_mode: 'Kernel Mode', + deployment_type: 'Standard', + }, + overrides + ); +}; + +const createCrowdstrikeGetAgentsApiResponseMock = ( + data: CrowdstrikeGetAgentsResponse['resources'][number] = [createCrowdstrikeAgentDetailsMock()] +): CrowdstrikeGetAgentsResponse => { + return { + meta: { + query_time: 0.001831479, + powered_by: 'device-api', + trace_id: '4567898765-432423432432-42342342', + }, + errors: null, + resources: [data], + }; +}; + +const createConnectorActionsClientMock = (): ActionsClientMock => { + const client = responseActionsClientMock.createConnectorActionsClient(); + + (client.getAll as jest.Mock).mockImplementation(async () => { + const result: ConnectorWithExtraFindData[] = [ + // Crowdstrike connector + responseActionsClientMock.createConnector({ + actionTypeId: CROWDSTRIKE_CONNECTOR_ID, + id: 'crowdstrike-connector-instance-id', + }), + ]; + + return result; + }); + + (client.execute as jest.Mock).mockImplementation( + async (options: Parameters<typeof client.execute>[0]) => { + const subAction = options.params.subAction; + + switch (subAction) { + case SUB_ACTION.GET_AGENT_DETAILS: + return responseActionsClientMock.createConnectorActionExecuteResponse({ + data: createCrowdstrikeGetAgentsApiResponseMock(), + }); + + default: + return responseActionsClientMock.createConnectorActionExecuteResponse(); + } + } + ); + + return client; +}; + +const createConstructorOptionsMock = (): CrowdstrikeActionsClientOptionsMock => { + return { + ...responseActionsClientMock.createConstructorOptions(), + connectorActions: responseActionsClientMock.createNormalizedExternalConnectorClient( + createConnectorActionsClientMock() + ), + }; +}; + +interface CrowdstrikeEventSearchResponseMock { + hits: { + hits: Array<{ + _id: string; + _index: string; + _source: Record<string, unknown>; + }>; + }; + _shards: { total: number; successful: number; failed: number }; + took: number; + timed_out: boolean; +} + +const createEventSearchResponseMock = (): CrowdstrikeEventSearchResponseMock => ({ + hits: { + hits: [ + { + _id: '1-2-3', + _index: 'logs-crowdstrike.fdr-default', + _source: { + crowdstrike: { + event: { + HostName: 'Crowdstrike-1460', + }, + }, + }, + }, + ], + }, + _shards: { total: 1, successful: 1, failed: 0 }, + took: 1, + timed_out: false, +}); + +export const CrowdstrikeMock = { + createGetAgentsResponse: createCrowdstrikeGetAgentsApiResponseMock, + createCrowdstrikeAgentDetails: createCrowdstrikeAgentDetailsMock, + createConnectorActionsClient: createConnectorActionsClientMock, + createConstructorOptions: createConstructorOptionsMock, + createEventSearchResponse: createEventSearchResponseMock, +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/get_response_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/get_response_actions_client.ts index 9e170572b26bf..1304ec1db29e6 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/get_response_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/get_response_actions_client.ts @@ -12,9 +12,12 @@ import { EndpointActionsClient } from './endpoint/endpoint_actions_client'; import { SentinelOneActionsClient } from './sentinelone/sentinel_one_actions_client'; import { UnsupportedResponseActionsAgentTypeError } from './errors'; import type { ResponseActionAgentType } from '../../../../../common/endpoint/service/response_actions/constants'; +import type { CrowdstrikeActionsClientOptions } from './crowdstrike/crowdstrike_actions_client'; +import { CrowdstrikeActionsClient } from './crowdstrike/crowdstrike_actions_client'; export type GetResponseActionsClientConstructorOptions = ResponseActionsClientOptions & - SentinelOneActionsClientOptions; + SentinelOneActionsClientOptions & + CrowdstrikeActionsClientOptions; /** * Retrieve a response actions client for an agent type @@ -32,6 +35,8 @@ export const getResponseActionsClient = ( return new EndpointActionsClient(constructorOptions); case 'sentinel_one': return new SentinelOneActionsClient(constructorOptions); + case 'crowdstrike': + return new CrowdstrikeActionsClient(constructorOptions); default: throw new UnsupportedResponseActionsAgentTypeError( `Agent type [${agentType}] does not support response actions` diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts index 00a84b5495464..9c0e60ec837fe 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts @@ -19,7 +19,7 @@ import { } from '../../../../../../common/endpoint/constants'; import type { NormalizedExternalConnectorClient } from '../../..'; import { applyEsClientSearchMock } from '../../../../mocks/utils.mock'; -import { SENTINEL_ONE_ACTIVITY_INDEX } from '../../../../../../common'; +import { SENTINEL_ONE_ACTIVITY_INDEX_PATTERN } from '../../../../../../common'; import { SentinelOneDataGenerator } from '../../../../../../common/endpoint/data_generators/sentinelone_data_generator'; import type { EndpointActionResponse, @@ -407,7 +407,7 @@ describe('SentinelOneActionsClient class', () => { applyEsClientSearchMock({ esClientMock: classConstructorOptions.esClient, - index: SENTINEL_ONE_ACTIVITY_INDEX, + index: SENTINEL_ONE_ACTIVITY_INDEX_PATTERN, response: s1ActivitySearchResponse, }); }); @@ -488,7 +488,7 @@ describe('SentinelOneActionsClient class', () => { sort: [{ 'sentinel_one.activity.updated_at': 'asc' }], }, }, - index: SENTINEL_ONE_ACTIVITY_INDEX, + index: SENTINEL_ONE_ACTIVITY_INDEX_PATTERN, query: { bool: { minimum_should_match: 1, @@ -528,7 +528,7 @@ describe('SentinelOneActionsClient class', () => { sort: [{ 'sentinel_one.activity.updated_at': 'asc' }], }, }, - index: SENTINEL_ONE_ACTIVITY_INDEX, + index: SENTINEL_ONE_ACTIVITY_INDEX_PATTERN, query: { bool: { minimum_should_match: 1, 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 bf2c04940a549..89d35353ed1d0 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 @@ -27,7 +27,7 @@ import type { NormalizedExternalConnectorClient, NormalizedExternalConnectorClientExecuteOptions, } from '../lib/normalized_external_connector_client'; -import { SENTINEL_ONE_ACTIVITY_INDEX } from '../../../../../../common'; +import { SENTINEL_ONE_ACTIVITY_INDEX_PATTERN } from '../../../../../../common'; import { catchAndWrapError } from '../../../../utils'; import type { CommonResponseActionMethodOptions, @@ -601,7 +601,7 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; const searchRequestOptions: SearchRequest = { - index: SENTINEL_ONE_ACTIVITY_INDEX, + index: SENTINEL_ONE_ACTIVITY_INDEX_PATTERN, query, // There may be many documents for each host/agent, so we collapse it and only get back the // first one that came in after the isolate request was sent @@ -621,7 +621,7 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; this.log.debug( - `searching for ${command} responses from [${SENTINEL_ONE_ACTIVITY_INDEX}] index with:\n${stringify( + `searching for ${command} responses from [${SENTINEL_ONE_ACTIVITY_INDEX_PATTERN}] index with:\n${stringify( searchRequestOptions, 15 )}` diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts index df07a46fb14f8..856c1ede8b218 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts @@ -9,6 +9,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { EcsError } from '@elastic/ecs'; import moment from 'moment/moment'; +import { i18n } from '@kbn/i18n'; import type { ResponseActionAgentType, ResponseActionsApiCommandNames, @@ -598,3 +599,12 @@ export const createActionDetailsRecord = <T extends ActionDetails = ActionDetail export const getActionRequestExpiration = (): string => { return moment().add(2, 'weeks').toISOString(); }; + +export const ELASTIC_RESPONSE_ACTION_MESSAGE = ( + username: string = 'system', + responseActionId: string = 'response-action-id' // I believe actionId exists always and there is a mismatch in types, but this default is just a safety net +): string => + i18n.translate('xpack.securitySolution.responseActions.comment.message', { + values: { username, responseActionId }, + defaultMessage: `Action triggered from Elastic Security by user {username} for action {responseActionId}`, + }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/get_agent_status_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/get_agent_status_client.ts index 0290542a5387f..9c337d997c49c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/get_agent_status_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/get_agent_status_client.ts @@ -27,6 +27,8 @@ export const getAgentStatusClient = ( return new EndpointAgentStatusClient(constructorOptions); case 'sentinel_one': return new SentinelOneAgentStatusClient(constructorOptions); + // case 'crowdstrike': + // // TODO TC: Currently we do not support CrowdStrike agent status - will be done in a follow up PR default: throw new UnsupportedAgentTypeError( `Agent type [${agentType}] does not support agent status` diff --git a/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/sentinel_one/sentinel_one_agent_status_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/sentinel_one/sentinel_one_agent_status_client.ts index 0fdf57d873443..2335cff5db8d3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/sentinel_one/sentinel_one_agent_status_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/agent/clients/sentinel_one/sentinel_one_agent_status_client.ts @@ -13,7 +13,7 @@ import type { ResponseActionAgentType } from '../../../../../../common/endpoint/ import { AgentStatusClient } from '../lib/base_agent_status_client'; import { AgentStatusClientError } from '../errors'; -const SENTINEL_ONE_AGENT_INDEX = `logs-sentinel_one.agent-default`; +const SENTINEL_ONE_AGENT_INDEX_PATTERN = `logs-sentinel_one.agent-*`; enum SENTINEL_ONE_NETWORK_STATUS { CONNECTING = 'connecting', @@ -52,7 +52,7 @@ export class SentinelOneAgentStatusClient extends AgentStatusClient { const [searchResponse, allPendingActions] = await Promise.all([ esClient.search( { - index: SENTINEL_ONE_AGENT_INDEX, + index: SENTINEL_ONE_AGENT_INDEX_PATTERN, from: 0, size: 10000, query, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts index 0db1b348e91b2..81971feeecfc1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts @@ -103,7 +103,6 @@ export const createEqlAlertType = ( }); const isNonSeqAlertSuppressionActive = await getIsAlertSuppressionActive({ alertSuppression: completeRule.ruleParams.alertSuppression, - isFeatureDisabled: !experimentalFeatures.alertSuppressionForNonSequenceEqlRuleEnabled, licensing, }); const result = await eqlExecutor({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/create_new_terms_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/create_new_terms_alert_type.ts index f75b4e229f3d8..74c7d9437851e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/create_new_terms_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/create_new_terms_alert_type.ts @@ -147,7 +147,6 @@ export const createNewTermsAlertType = ( const isAlertSuppressionActive = await getIsAlertSuppressionActive({ alertSuppression: params.alertSuppression, licensing, - isFeatureDisabled: !experimentalFeatures?.alertSuppressionForNewTermsRuleEnabled, }); let afterKey; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts index 846fddb46b90e..5ab06db3043af 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts @@ -13,7 +13,7 @@ import type { AlertSuppressionCamel } from '../../../../../common/api/detection_ interface GetIsAlertSuppressionActiveParams { alertSuppression: AlertSuppressionCamel | undefined; - isFeatureDisabled: boolean | undefined; + isFeatureDisabled?: boolean | undefined; licensing: LicensingPluginSetup; } diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts index 6398c2ec56e3a..3e460b3f4e543 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts @@ -7,13 +7,18 @@ import type { Logger } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { ASSET_CRITICALITY_URL, APP_ID } from '../../../../../common/constants'; +import { + ASSET_CRITICALITY_URL, + APP_ID, + ENABLE_ASSET_CRITICALITY_SETTING, +} from '../../../../../common/constants'; import { checkAndInitAssetCriticalityResources } from '../check_and_init_asset_criticality_resources'; import { buildRouteValidationWithZod } from '../../../../utils/build_validation/route_validation'; -import { CreateAssetCriticalityRecord } from '../../../../../common/api/entity_analytics/asset_criticality'; +import { CreateAssetCriticalityRecord } from '../../../../../common/api/entity_analytics'; import type { EntityAnalyticsRoutesDeps } from '../../types'; import { AssetCriticalityAuditActions } from '../audit'; import { AUDIT_CATEGORY, AUDIT_OUTCOME, AUDIT_TYPE } from '../../audit'; +import { assertAdvancedSettingsEnabled } from '../../utils/assert_advanced_setting_enabled'; export const assetCriticalityUpsertRoute = ( router: EntityAnalyticsRoutesDeps['router'], logger: Logger @@ -38,6 +43,7 @@ export const assetCriticalityUpsertRoute = ( async (context, request, response) => { const siemResponse = buildSiemResponse(response); try { + await assertAdvancedSettingsEnabled(await context.core, ENABLE_ASSET_CRITICALITY_SETTING); await checkAndInitAssetCriticalityResources(context, logger); const securitySolution = await context.securitySolution; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_privileges.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_privileges.ts index df7914e5b242b..573f8147f8b90 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_privileges.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_privileges.ts @@ -82,17 +82,17 @@ export const _getMissingPrivilegesMessage = (riskEnginePrivileges: EntityAnalyti * @param getStartServices - Kibana's start services accessor * @param handler - The route handler to wrap **/ -export const withRiskEnginePrivilegeCheck = ( +export const withRiskEnginePrivilegeCheck = <P, Q, B>( getStartServices: StartServicesAccessor<SecuritySolutionPluginStartDependencies, unknown>, handler: ( context: SecuritySolutionRequestHandlerContext, - request: KibanaRequest, + request: KibanaRequest<P, Q, B>, response: KibanaResponseFactory ) => Promise<IKibanaResponse> ) => { return async ( context: SecuritySolutionRequestHandlerContext, - request: KibanaRequest, + request: KibanaRequest<P, Q, B>, response: KibanaResponseFactory ) => { const [_, { security }] = await getStartServices(); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/audit.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/audit.ts index 012b55cf4f325..92a77645347c3 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/audit.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/audit.ts @@ -9,5 +9,6 @@ export enum RiskScoreAuditActions { RISK_ENGINE_INSTALL = 'risk_engine_install', RISK_ENGINE_PRIVILEGES_GET = 'risk_engine_privileges_get', RISK_ENGINE_MANUAL_SCORING = 'risk_engine_manual_scoring', + RISK_ENGINE_ENTITY_MANUAL_SCORING = 'risk_engine_entity_manual_scoring', RISK_ENGINE_PREVIEW = 'risk_engine_preview', } diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts index 58eedb35699ed..09fe204fe69e1 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts @@ -21,7 +21,7 @@ export const calculateAndPersistRiskScores = async ( riskScoreDataClient: RiskScoreDataClient; } ): Promise<CalculateAndPersistScoresResponse> => { - const { riskScoreDataClient, spaceId, ...rest } = params; + const { riskScoreDataClient, spaceId, returnScores, ...rest } = params; const writer = await riskScoreDataClient.getWriter({ namespace: spaceId, @@ -42,5 +42,7 @@ export const calculateAndPersistRiskScores = async ( const { errors, docs_written: scoresWritten } = await writer.bulk(scores); - return { after_keys: afterKeys, errors, scores_written: scoresWritten }; + const result = { after_keys: afterKeys, errors, scores_written: scoresWritten }; + + return returnScores ? { ...result, scores } : result; }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts index 86d0d3cfd2294..c4ac061d259fb 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts @@ -34,7 +34,7 @@ import { getCriticalityModifier, normalize, } from '../asset_criticality/helpers'; -import { getAfterKeyForIdentifierType, getFieldForIdentifierAgg } from './helpers'; +import { getAfterKeyForIdentifierType, getFieldForIdentifier } from './helpers'; import { buildCategoryCountDeclarations, buildCategoryAssignment, @@ -177,7 +177,7 @@ const buildIdentifierTypeAggregation = ({ alertSampleSizePerShard: number; }): AggregationsAggregationContainer => { const globalIdentifierTypeWeight = getGlobalWeightForIdentifierType({ identifierType, weights }); - const identifierField = getFieldForIdentifierAgg(identifierType); + const identifierField = getFieldForIdentifier(identifierType); return { composite: { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts index 59b8b0535f97d..f5df6ef1b80ee 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts @@ -12,7 +12,7 @@ import type { } from '../../../../common/entity_analytics/risk_engine'; import type { CalculateAndPersistScoresResponse } from '../types'; -export const getFieldForIdentifierAgg = (identifierType: IdentifierType): string => +export const getFieldForIdentifier = (identifierType: IdentifierType): string => identifierType === 'host' ? 'host.name' : 'user.name'; export const getAfterKeyForIdentifierType = ({ diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts index 62d08d89b169a..bfc86643a6fd0 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts @@ -22,7 +22,7 @@ import type { RiskScoreDataClient } from './risk_score_data_client'; import type { RiskInputsIndexResponse } from './get_risk_inputs_index'; import { scheduleLatestTransformNow } from '../utils/transforms'; -type RiskEngineConfigurationWithDefaults = RiskEngineConfiguration & { +export type RiskEngineConfigurationWithDefaults = RiskEngineConfiguration & { alertSampleSizePerShard: number; }; export interface RiskScoreService { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts index b303eaaf407d5..210d792ded720 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts @@ -15,12 +15,11 @@ import { } from '../../../../../common/constants'; import { riskScoreCalculationRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_calculation/request_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { assetCriticalityServiceFactory } from '../../asset_criticality'; -import { riskScoreServiceFactory } from '../risk_score_service'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; import type { EntityAnalyticsRoutesDeps } from '../../types'; import { RiskScoreAuditActions } from '../audit'; import { AUDIT_CATEGORY, AUDIT_OUTCOME, AUDIT_TYPE } from '../../audit'; +import { buildRiskScoreServiceForRequest } from './helpers'; export const riskScoreCalculationRoute = ( router: EntityAnalyticsRoutesDeps['router'], @@ -54,26 +53,14 @@ export const riskScoreCalculationRoute = ( const siemResponse = buildSiemResponse(response); const coreContext = await context.core; - const esClient = coreContext.elasticsearch.client.asCurrentUser; const soClient = coreContext.savedObjects.client; - const spaceId = securityContext.getSpaceId(); - const riskEngineDataClient = securityContext.getRiskEngineDataClient(); - const riskScoreDataClient = securityContext.getRiskScoreDataClient(); - const assetCriticalityDataClient = securityContext.getAssetCriticalityDataClient(); const securityConfig = await securityContext.getConfig(); - const assetCriticalityService = assetCriticalityServiceFactory({ - assetCriticalityDataClient, - uiSettingsClient: coreContext.uiSettings.client, - }); - const riskScoreService = riskScoreServiceFactory({ - assetCriticalityService, - esClient, - logger, - riskEngineDataClient, - riskScoreDataClient, - spaceId, - }); + const riskScoreService = buildRiskScoreServiceForRequest( + securityContext, + coreContext, + logger + ); const { after_keys: userAfterKeys, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts new file mode 100644 index 0000000000000..1ba609e885dda --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.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 { loggerMock } from '@kbn/logging-mocks'; +import { RISK_SCORE_ENTITY_CALCULATION_URL } from '../../../../../common/constants'; +import { + serverMock, + requestContextMock, + requestMock, +} from '../../../detection_engine/routes/__mocks__'; +import type { RiskEngineConfigurationWithDefaults } from '../risk_score_service'; +import { riskScoreServiceFactory } from '../risk_score_service'; +import { riskScoreServiceMock } from '../risk_score_service.mock'; +import { getRiskInputsIndex } from '../get_risk_inputs_index'; +import { calculateAndPersistRiskScoresMock } from '../calculate_and_persist_risk_scores.mock'; +import { riskScoreEntityCalculationRoute } from './entity_calculation'; +import { riskEnginePrivilegesMock } from '../../risk_engine/routes/risk_engine_privileges.mock'; + +jest.mock('../get_risk_inputs_index'); +jest.mock('../risk_score_service'); + +describe('entity risk score calculation route', () => { + let server: ReturnType<typeof serverMock.create>; + let { clients, context } = requestContextMock.createTools(); + let logger: ReturnType<typeof loggerMock.create>; + let mockRiskScoreService: ReturnType<typeof riskScoreServiceMock.create>; + const entityAnalyticsConfig = { + alertSampleSizePerShard: 10_000, + enabled: true, + range: { start: 'now-30d', end: 'now' }, + } as unknown as RiskEngineConfigurationWithDefaults; + let getStartServicesMock: jest.Mock; + + beforeEach(() => { + jest.resetAllMocks(); + + getStartServicesMock = jest.fn().mockResolvedValue([ + {}, + { + security: riskEnginePrivilegesMock.createMockSecurityStartWithFullRiskEngineAccess(), + }, + ]); + + server = serverMock.create(); + logger = loggerMock.create(); + ({ clients, context } = requestContextMock.createTools()); + mockRiskScoreService = riskScoreServiceMock.create(); + mockRiskScoreService.getConfigurationWithDefaults.mockResolvedValue(entityAnalyticsConfig); + mockRiskScoreService.calculateAndPersistScores.mockResolvedValue( + calculateAndPersistRiskScoresMock.buildResponse() + ); + + (getRiskInputsIndex as jest.Mock).mockResolvedValue({ + index: 'default-dataview-index', + runtimeMappings: {}, + }); + clients.appClient.getAlertsIndex.mockReturnValue('default-alerts-index'); + (riskScoreServiceFactory as jest.Mock).mockReturnValue(mockRiskScoreService); + + riskScoreEntityCalculationRoute(server.router, getStartServicesMock, logger); + }); + + const buildRequest = (overrides: object = {}) => { + const defaults = { + identifier: 'test-host-name', + identifier_type: 'host', + }; + + return requestMock.create({ + method: 'post', + path: RISK_SCORE_ENTITY_CALCULATION_URL, + body: { ...defaults, ...overrides }, + }); + }; + + it('should return 200 when risk score calculation is successful', async () => { + const request = buildRequest(); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(200); + }); + + it('should call "calculateAndPersistScores" with entity filter', async () => { + const request = buildRequest(); + + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(200); + expect(mockRiskScoreService.calculateAndPersistScores).toHaveBeenCalledWith( + expect.objectContaining({ filter: [{ term: { 'host.name': 'test-host-name' } }] }) + ); + }); + + describe('validation', () => { + it('requires a parameter for the identifier type', async () => { + const request = buildRequest({ identifier_type: undefined }); + const result = await server.validate(request); + + expect(result.badRequest).toHaveBeenCalledWith('identifier_type: Required'); + }); + + it('requires a parameter for the entity identifier', async () => { + const request = buildRequest({ identifier: undefined }); + const result = await server.validate(request); + + expect(result.badRequest).toHaveBeenCalledWith('identifier: Required'); + }); + + it('returns an error if no entity analytics configuration is found', async () => { + mockRiskScoreService.getConfigurationWithDefaults.mockResolvedValue(null); + const request = buildRequest(); + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.body).toEqual({ + message: 'No Risk engine configuration found', + status_code: 405, + }); + expect(response.status).toEqual(405); + }); + + it('returns an error if the risk engine is disabled', async () => { + mockRiskScoreService.getConfigurationWithDefaults.mockResolvedValue({ + ...entityAnalyticsConfig, + enabled: false, + }); + const request = buildRequest(); + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.body).toEqual({ + message: 'Risk engine is disabled', + status_code: 405, + }); + expect(response.status).toEqual(405); + }); + + it('filter by user provided filter when it is defined', async () => { + const userFilter = { term: { 'test.filter': 'test-value' } }; + mockRiskScoreService.getConfigurationWithDefaults.mockResolvedValue({ + ...entityAnalyticsConfig, + filter: userFilter, + }); + const request = buildRequest(); + const response = await server.inject(request, requestContextMock.convertContext(context)); + + expect(response.status).toEqual(200); + expect(mockRiskScoreService.calculateAndPersistScores).toHaveBeenCalledWith( + expect.objectContaining({ filter: expect.arrayContaining([userFilter]) }) + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts new file mode 100644 index 0000000000000..497e9ac189100 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.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 type { Logger } from '@kbn/core/server'; +import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; +import { transformError } from '@kbn/securitysolution-es-utils'; + +import { isEmpty } from 'lodash/fp'; +import { RiskScoresEntityCalculationRequest } from '../../../../../common/api/entity_analytics/risk_engine/entity_calculation_route.gen'; +import { APP_ID, RISK_SCORE_ENTITY_CALCULATION_URL } from '../../../../../common/constants'; +import type { AfterKeys } from '../../../../../common/entity_analytics/risk_engine'; +import { buildRouteValidationWithZod } from '../../../../utils/build_validation/route_validation'; +import { getRiskInputsIndex } from '../get_risk_inputs_index'; +import type { CalculateAndPersistScoresResponse, EntityAnalyticsRoutesDeps } from '../../types'; +import { RiskScoreAuditActions } from '../audit'; +import { AUDIT_CATEGORY, AUDIT_OUTCOME, AUDIT_TYPE } from '../../audit'; +import { convertRangeToISO } from '../tasks/helpers'; +import { buildRiskScoreServiceForRequest } from './helpers'; +import { getFieldForIdentifier } from '../helpers'; +import { withRiskEnginePrivilegeCheck } from '../../risk_engine/risk_engine_privileges'; + +export const riskScoreEntityCalculationRoute = ( + router: EntityAnalyticsRoutesDeps['router'], + getStartServices: EntityAnalyticsRoutesDeps['getStartServices'], + logger: Logger +) => { + router.versioned + .post({ + path: RISK_SCORE_ENTITY_CALCULATION_URL, + access: 'internal', + options: { + tags: ['access:securitySolution', `access:${APP_ID}-entity-analytics`], + }, + }) + .addVersion( + { + version: '1', + validate: { + request: { + body: buildRouteValidationWithZod(RiskScoresEntityCalculationRequest), + }, + }, + }, + withRiskEnginePrivilegeCheck(getStartServices, async (context, request, response) => { + const securityContext = await context.securitySolution; + + securityContext.getAuditLogger()?.log({ + message: 'User triggered custom manual scoring', + event: { + action: RiskScoreAuditActions.RISK_ENGINE_ENTITY_MANUAL_SCORING, + category: AUDIT_CATEGORY.DATABASE, + type: AUDIT_TYPE.CHANGE, + outcome: AUDIT_OUTCOME.UNKNOWN, + }, + }); + + const coreContext = await context.core; + const securityConfig = await securityContext.getConfig(); + const siemResponse = buildSiemResponse(response); + const soClient = coreContext.savedObjects.client; + + const riskScoreService = buildRiskScoreServiceForRequest( + securityContext, + coreContext, + logger + ); + + const { identifier_type: identifierType, identifier } = request.body; + + try { + const entityAnalyticsConfig = await riskScoreService.getConfigurationWithDefaults( + securityConfig.entityAnalytics + ); + + if (entityAnalyticsConfig == null) { + return siemResponse.error({ + statusCode: 405, + body: 'No Risk engine configuration found', + }); + } + + const { + dataViewId, + enabled, + range: configuredRange, + pageSize, + alertSampleSizePerShard, + filter: userFilter, + } = entityAnalyticsConfig; + + if (!enabled) { + return siemResponse.error({ + statusCode: 405, + body: 'Risk engine is disabled', + }); + } + + const { index, runtimeMappings } = await getRiskInputsIndex({ + dataViewId, + logger, + soClient, + }); + + const range = convertRangeToISO(configuredRange); + + const afterKeys: AfterKeys = {}; + + const identifierFilter = { + term: { [getFieldForIdentifier(identifierType)]: identifier }, + }; + const filter = isEmpty(userFilter) ? [identifierFilter] : [userFilter, identifierFilter]; + + const result: CalculateAndPersistScoresResponse = + await riskScoreService.calculateAndPersistScores({ + pageSize, + identifierType, + index, + filter, + range, + runtimeMappings, + weights: [], + alertSampleSizePerShard, + afterKeys, + returnScores: true, + }); + + if (result.errors.length) { + return siemResponse.error({ + statusCode: 500, + body: { + message: 'Error calculating the risk score for an entity.', + full_error: JSON.stringify(result.errors), + }, + bypassErrorFormat: true, + }); + } + + const score = + result.scores_written === 1 ? result.scores?.[identifierType]?.[0] : undefined; + + return response.ok({ + body: { + success: true, + score, + }, + }); + } catch (e) { + const error = transformError(e); + + return siemResponse.error({ + statusCode: error.statusCode, + body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, + }); + } + }) + ); +}; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/helpers.ts new file mode 100644 index 0000000000000..41145f799eb43 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/helpers.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { Logger } from '@kbn/core/server'; +import type { SecuritySolutionApiRequestHandlerContext } from '../../../..'; +import { assetCriticalityServiceFactory } from '../../asset_criticality'; +import { riskScoreServiceFactory } from '../risk_score_service'; + +export function buildRiskScoreServiceForRequest( + securityContext: SecuritySolutionApiRequestHandlerContext, + coreContext: CoreRequestHandlerContext, + logger: Logger +) { + const esClient = coreContext.elasticsearch.client.asCurrentUser; + const spaceId = securityContext.getSpaceId(); + const assetCriticalityDataClient = securityContext.getAssetCriticalityDataClient(); + const assetCriticalityService = assetCriticalityServiceFactory({ + assetCriticalityDataClient, + uiSettingsClient: coreContext.uiSettings.client, + }); + const riskEngineDataClient = securityContext.getRiskEngineDataClient(); + const riskScoreDataClient = securityContext.getRiskScoreDataClient(); + + return riskScoreServiceFactory({ + assetCriticalityService, + esClient, + logger, + riskEngineDataClient, + riskScoreDataClient, + spaceId, + }); +} diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts index d0a083cf2a5a2..b592f3a8a48c8 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts @@ -16,12 +16,11 @@ import { } from '../../../../../common/constants'; import { riskScorePreviewRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { assetCriticalityServiceFactory } from '../../asset_criticality'; -import { riskScoreServiceFactory } from '../risk_score_service'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; import type { EntityAnalyticsRoutesDeps } from '../../types'; import { RiskScoreAuditActions } from '../audit'; import { AUDIT_CATEGORY, AUDIT_OUTCOME, AUDIT_TYPE } from '../../audit'; +import { buildRiskScoreServiceForRequest } from './helpers'; export const riskScorePreviewRoute = ( router: EntityAnalyticsRoutesDeps['router'], @@ -44,27 +43,14 @@ export const riskScorePreviewRoute = ( const siemResponse = buildSiemResponse(response); const securityContext = await context.securitySolution; const coreContext = await context.core; - const esClient = coreContext.elasticsearch.client.asCurrentUser; const soClient = coreContext.savedObjects.client; - const spaceId = securityContext.getSpaceId(); - const riskEngineDataClient = securityContext.getRiskEngineDataClient(); - const riskScoreDataClient = securityContext.getRiskScoreDataClient(); - const assetCriticalityDataClient = securityContext.getAssetCriticalityDataClient(); const securityConfig = await securityContext.getConfig(); - const assetCriticalityService = assetCriticalityServiceFactory({ - assetCriticalityDataClient, - uiSettingsClient: coreContext.uiSettings.client, - }); - - const riskScoreService = riskScoreServiceFactory({ - assetCriticalityService, - esClient, - logger, - riskEngineDataClient, - riskScoreDataClient, - spaceId, - }); + const riskScoreService = buildRiskScoreServiceForRequest( + securityContext, + coreContext, + logger + ); const { after_keys: userAfterKeys, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/register_risk_score_routes.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/register_risk_score_routes.ts index 28cab1cdca397..015b12c5d8ee1 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/register_risk_score_routes.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/register_risk_score_routes.ts @@ -7,8 +7,14 @@ import { riskScorePreviewRoute } from './preview'; import { riskScoreCalculationRoute } from './calculation'; import type { EntityAnalyticsRoutesDeps } from '../../types'; +import { riskScoreEntityCalculationRoute } from './entity_calculation'; -export const registerRiskScoreRoutes = ({ router, logger }: EntityAnalyticsRoutesDeps) => { +export const registerRiskScoreRoutes = ({ + router, + getStartServices, + logger, +}: EntityAnalyticsRoutesDeps) => { riskScorePreviewRoute(router, logger); riskScoreCalculationRoute(router, logger); + riskScoreEntityCalculationRoute(router, getStartServices, logger); }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts index c5a65cb59c5e3..d41edbd215642 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts @@ -51,12 +51,17 @@ export interface CalculateAndPersistScoresParams { runtimeMappings: MappingRuntimeFields; weights?: RiskWeights; alertSampleSizePerShard?: number; + returnScores?: boolean; } export interface CalculateAndPersistScoresResponse { after_keys: AfterKeys; errors: string[]; scores_written: number; + scores?: { + host?: RiskScore[]; + user?: RiskScore[]; + }; } export interface CalculateScoresResponse { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts index 9cefecda1ed2a..f8ce73092a804 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts @@ -458,7 +458,7 @@ describe('saved_object', () => { await getDraftTimeline(mockRequest, TimelineType.default); expect(mockFindSavedObject).toBeCalledWith({ filter: - 'not siem-ui-timeline.attributes.timelineType: template and siem-ui-timeline.attributes.status: draft and not siem-ui-timeline.attributes.status: immutable and siem-ui-timeline.attributes.updatedBy: username and siem-ui-timeline.attributes.createdBy: username', + 'not siem-ui-timeline.attributes.timelineType: template and siem-ui-timeline.attributes.status: draft and not siem-ui-timeline.attributes.status: immutable and siem-ui-timeline.attributes.updatedBy: "username" and siem-ui-timeline.attributes.createdBy: "username"', sortField: 'created', sortOrder: 'desc', perPage: 1, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts index 6044516c49e26..1cad9d3b2672f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts @@ -180,8 +180,8 @@ const combineFilters = (filters: Array<string | null>) => const getTimelinesCreatedAndUpdatedByCurrentUser = ({ request }: { request: FrameworkRequest }) => { const username = request.user?.username ?? UNAUTHENTICATED_USER; - const updatedBy = `siem-ui-timeline.attributes.updatedBy: ${username}`; - const createdBy = `siem-ui-timeline.attributes.createdBy: ${username}`; + const updatedBy = `siem-ui-timeline.attributes.updatedBy: "${username}"`; + const createdBy = `siem-ui-timeline.attributes.createdBy: "${username}"`; return combineFilters([updatedBy, createdBy]); }; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 1b282771a608a..998e02aba56ad 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -559,8 +559,8 @@ export class Plugin implements ISecuritySolutionPlugin { // Assistant Tool and Feature Registration plugins.elasticAssistant.registerTools(APP_UI_ID, getAssistantTools()); plugins.elasticAssistant.registerFeatures(APP_UI_ID, { - assistantAlertsInsights: config.experimentalFeatures.assistantAlertsInsights, assistantModelEvaluation: config.experimentalFeatures.assistantModelEvaluation, + attackDiscoveryEnabled: config.experimentalFeatures.attackDiscoveryEnabled, }); plugins.elasticAssistant.registerFeatures('management', { assistantModelEvaluation: config.experimentalFeatures.assistantModelEvaluation, diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 1a6b87b875580..17a7aea6839c7 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -181,7 +181,6 @@ "@kbn/dom-drag-drop", "@kbn/unified-field-list", "@kbn/resizable-layout", - "@kbn/shared-ux-error-boundary", "@kbn/zod-helpers", "@kbn/core-http-common", "@kbn/search-errors", @@ -200,6 +199,7 @@ "@kbn/core-ui-settings-browser-mocks", "@kbn/management-plugin", "@kbn/security-plugin-types-server", - "@kbn/deeplinks-security" + "@kbn/deeplinks-security", + "@kbn/react-kibana-context-render" ] } diff --git a/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts b/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts index f3b3407e4fb69..4798b4923de96 100644 --- a/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts +++ b/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts @@ -23,6 +23,7 @@ export const PLI_PRODUCT_FEATURES: PliProductFeatures = { ProductFeatureKey.advancedInsights, ProductFeatureKey.assistant, ProductFeatureKey.investigationGuide, + ProductFeatureKey.investigationGuideInteractions, ProductFeatureKey.threatIntelligence, ProductFeatureKey.casesConnectors, ProductFeatureKey.externalRuleActions, diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/register_upsellings.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/register_upsellings.tsx index 1edd2857017f7..a16bb4272f720 100644 --- a/x-pack/plugins/security_solution_serverless/public/upselling/register_upsellings.tsx +++ b/x-pack/plugins/security_solution_serverless/public/upselling/register_upsellings.tsx @@ -14,7 +14,10 @@ import type { } from '@kbn/security-solution-upselling/service/types'; import type { UpsellingService } from '@kbn/security-solution-upselling/service'; import React from 'react'; -import { UPGRADE_INVESTIGATION_GUIDE } from '@kbn/security-solution-upselling/messages'; +import { + UPGRADE_INVESTIGATION_GUIDE, + UPGRADE_INVESTIGATION_GUIDE_INTERACTIONS, +} from '@kbn/security-solution-upselling/messages'; import { ProductFeatureKey } from '@kbn/security-solution-features/keys'; import type { ProductFeatureKeyType } from '@kbn/security-solution-features'; import { @@ -163,4 +166,11 @@ export const upsellingMessages: UpsellingMessages = [ getProductTypeByPLI(ProductFeatureKey.investigationGuide) ?? '' ), }, + { + id: 'investigation_guide_interactions', + pli: ProductFeatureKey.investigationGuideInteractions, + message: UPGRADE_INVESTIGATION_GUIDE_INTERACTIONS( + getProductTypeByPLI(ProductFeatureKey.investigationGuideInteractions) ?? '' + ), + }, ]; diff --git a/x-pack/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts b/x-pack/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts index d306b85938f9d..9871b9e3e4a3c 100644 --- a/x-pack/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts +++ b/x-pack/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts @@ -203,7 +203,6 @@ describe('getSearchQueryByCloudSecuritySolution', () => { { terms: { 'resource.sub_type': [ - 'aws-ebs', 'aws-ec2', 'aws-s3', 'aws-rds', diff --git a/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts b/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts index 66f4a1c0d1f0d..1ea6fea558dad 100644 --- a/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts +++ b/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts @@ -49,7 +49,7 @@ export const BILLABLE_ASSETS_CONFIG = { [CSPM]: { filter_attribute: 'resource.sub_type', values: [ - 'aws-ebs', + // 'aws-ebs', we can't include EBS volumes until https://github.com/elastic/security-team/issues/9283 is resolved 'aws-ec2', 'aws-s3', 'aws-rds', diff --git a/x-pack/plugins/serverless_observability/public/plugin.ts b/x-pack/plugins/serverless_observability/public/plugin.ts index 76c278f9e374a..4910b7de92a44 100644 --- a/x-pack/plugins/serverless_observability/public/plugin.ts +++ b/x-pack/plugins/serverless_observability/public/plugin.ts @@ -42,8 +42,6 @@ export class ServerlessObservabilityPlugin }) ); - setupDeps.discover.showInlineTopNav({ showLogsExplorerTabs: true }); - return {}; } diff --git a/x-pack/plugins/serverless_search/public/navigation_tree.ts b/x-pack/plugins/serverless_search/public/navigation_tree.ts index 56d1709967580..5878031d99dc3 100644 --- a/x-pack/plugins/serverless_search/public/navigation_tree.ts +++ b/x-pack/plugins/serverless_search/public/navigation_tree.ts @@ -11,7 +11,6 @@ import { CONNECTORS_LABEL } from '../common/i18n_string'; export const navigationTree: NavigationTreeDefinition = { body: [ - { type: 'recentlyAccessed' }, { type: 'navGroup', id: 'search_project_nav', @@ -38,61 +37,66 @@ export const navigationTree: NavigationTreeDefinition = { getIsActive: ({ pathNameSerialized, prepend }) => { return pathNameSerialized.startsWith(prepend('/app/dev_tools')); }, - spaceBefore: 'm', - }, - { - link: 'discover', - spaceBefore: 'm', - }, - { - link: 'dashboards', - getIsActive: ({ pathNameSerialized, prepend }) => { - return pathNameSerialized.startsWith(prepend('/app/dashboards')); - }, }, { - link: 'management:triggersActions', - title: i18n.translate('xpack.serverlessSearch.nav.alerts', { - defaultMessage: 'Alerts', + id: 'kibana', + title: i18n.translate('xpack.serverlessSearch.nav.kibana', { + defaultMessage: 'Kibana', }), + spaceBefore: 'm', + children: [ + { + link: 'discover', + }, + { + link: 'dashboards', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/dashboards')); + }, + }, + ], }, { - title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { - defaultMessage: 'Index Management', + id: 'content', + title: i18n.translate('xpack.serverlessSearch.nav.content', { + defaultMessage: 'Content', }), - link: 'management:index_management', - breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, spaceBefore: 'm', + children: [ + { + title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { + defaultMessage: 'Index Management', + }), + link: 'management:index_management', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: CONNECTORS_LABEL, + link: 'serverlessConnectors', + }, + ], }, { - title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', { - defaultMessage: 'Pipelines', + id: 'build', + title: i18n.translate('xpack.serverlessSearch.nav.build', { + defaultMessage: 'Build', }), - link: 'management:ingest_pipelines', - breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - { - title: CONNECTORS_LABEL, - link: 'serverlessConnectors', - }, - { - link: 'management:api_keys', - breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, spaceBefore: 'm', + children: [ + { + id: 'searchPlayground', + title: i18n.translate('xpack.serverlessSearch.nav.build.searchPlayground', { + defaultMessage: 'Playground', + }), + link: 'searchPlayground', + }, + ], }, ], }, ], footer: [ - { - type: 'navItem', - id: 'search_getting_started', - title: i18n.translate('xpack.serverlessSearch.nav.gettingStarted', { - defaultMessage: 'Get started', - }), - icon: 'launch', - link: 'serverlessElasticsearch', - }, { type: 'navGroup', id: 'project_settings_project_nav', diff --git a/x-pack/plugins/serverless_search/public/types.ts b/x-pack/plugins/serverless_search/public/types.ts index e50d7bfedae28..5b502eb4f0d9e 100644 --- a/x-pack/plugins/serverless_search/public/types.ts +++ b/x-pack/plugins/serverless_search/public/types.ts @@ -7,6 +7,7 @@ import { CloudSetup, CloudStart } from '@kbn/cloud-plugin/public'; import { ConsolePluginStart } from '@kbn/console-plugin/public'; +import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public'; import { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'; import { SecurityPluginStart } from '@kbn/security-plugin/public'; import { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public'; @@ -30,6 +31,7 @@ export interface ServerlessSearchPluginSetupDependencies { export interface ServerlessSearchPluginStartDependencies { cloud: CloudStart; console: ConsolePluginStart; + searchPlayground: SearchPlaygroundPluginStart; management: ManagementStart; security: SecurityPluginStart; serverless: ServerlessPluginStart; diff --git a/x-pack/plugins/serverless_search/tsconfig.json b/x-pack/plugins/serverless_search/tsconfig.json index aa44436594273..f7d7fb3444554 100644 --- a/x-pack/plugins/serverless_search/tsconfig.json +++ b/x-pack/plugins/serverless_search/tsconfig.json @@ -48,5 +48,6 @@ "@kbn/search-connectors-plugin", "@kbn/index-management", "@kbn/react-kibana-context-render", + "@kbn/search-playground", ] } 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 92b2fe958b1b3..d5d51671fafc6 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 @@ -120,6 +120,7 @@ describe('createAggregator', () => { value: { success: 1, total: 1, + total_errors: 0, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -129,6 +130,7 @@ describe('createAggregator', () => { value: { success: 2, total: 2, + total_errors: 0, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }, @@ -138,6 +140,7 @@ describe('createAggregator', () => { value: { success: 3, total: 3, + total_errors: 0, duration: { counts: [3], values: [100] }, duration_values: [10, 10, 10], }, @@ -147,6 +150,7 @@ describe('createAggregator', () => { value: { success: 4, total: 4, + total_errors: 0, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -156,6 +160,7 @@ describe('createAggregator', () => { value: { success: 4, total: 5, + total_errors: 1, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -165,6 +170,7 @@ describe('createAggregator', () => { value: { success: 5, total: 6, + total_errors: 1, duration: { counts: [5], values: [100] }, duration_values: [10, 10, 10, 10, 10], }, @@ -174,6 +180,7 @@ describe('createAggregator', () => { value: { success: 6, total: 7, + total_errors: 1, duration: { counts: [6], values: [100] }, duration_values: [10, 10, 10, 10, 10, 10], }, @@ -183,6 +190,7 @@ describe('createAggregator', () => { value: { success: 7, total: 8, + total_errors: 1, duration: { counts: [7], values: [100] }, duration_values: [10, 10, 10, 10, 10, 10, 10], }, @@ -192,6 +200,7 @@ describe('createAggregator', () => { value: { success: 8, total: 9, + total_errors: 1, duration: { counts: [8], values: [100] }, duration_values: [10, 10, 10, 10, 10, 10, 10, 10], }, @@ -201,6 +210,7 @@ describe('createAggregator', () => { value: { success: 8, total: 10, + total_errors: 2, duration: { counts: [8], values: [100] }, duration_values: [10, 10, 10, 10, 10, 10, 10, 10], }, @@ -210,6 +220,7 @@ describe('createAggregator', () => { value: { success: 9, total: 11, + total_errors: 2, duration: { counts: [9], values: [100] }, duration_values: [10, 10, 10, 10, 10, 10, 10, 10, 10], }, @@ -267,6 +278,7 @@ describe('createAggregator', () => { value: { success: 1, total: 1, + total_errors: 0, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -276,6 +288,7 @@ describe('createAggregator', () => { value: { success: 2, total: 2, + total_errors: 0, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }, @@ -285,6 +298,7 @@ describe('createAggregator', () => { value: { success: 3, total: 3, + total_errors: 0, duration: { counts: [3], values: [100] }, duration_values: [10, 10, 10], }, @@ -294,6 +308,7 @@ describe('createAggregator', () => { value: { success: 4, total: 4, + total_errors: 0, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -303,6 +318,7 @@ describe('createAggregator', () => { value: { success: 4, total: 5, + total_errors: 1, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -312,6 +328,7 @@ describe('createAggregator', () => { value: { success: 5, total: 6, + total_errors: 1, duration: { counts: [5], values: [100] }, duration_values: [10, 10, 10, 10, 10], }, @@ -322,6 +339,7 @@ describe('createAggregator', () => { value: { success: 1, total: 1, + total_errors: 0, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -331,6 +349,7 @@ describe('createAggregator', () => { value: { success: 1, total: 2, + total_errors: 1, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -340,6 +359,7 @@ describe('createAggregator', () => { value: { success: 1, total: 3, + total_errors: 2, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -349,6 +369,7 @@ describe('createAggregator', () => { value: { success: 2, total: 4, + total_errors: 2, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }, @@ -358,6 +379,7 @@ describe('createAggregator', () => { value: { success: 3, total: 5, + total_errors: 2, duration: { counts: [3], values: [100] }, duration_values: [10, 10, 10], }, @@ -423,6 +445,7 @@ describe('createAggregator', () => { value: { success: 1, total: 1, + total_errors: 0, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -432,6 +455,7 @@ describe('createAggregator', () => { value: { success: 2, total: 2, + total_errors: 0, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }, @@ -441,6 +465,7 @@ describe('createAggregator', () => { value: { success: 3, total: 3, + total_errors: 0, duration: { counts: [3], values: [100] }, duration_values: [10, 10, 10], }, @@ -450,6 +475,7 @@ describe('createAggregator', () => { value: { success: 4, total: 4, + total_errors: 0, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -459,6 +485,7 @@ describe('createAggregator', () => { value: { success: 4, total: 5, + total_errors: 1, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }, @@ -468,6 +495,7 @@ describe('createAggregator', () => { value: { success: 5, total: 6, + total_errors: 1, duration: { counts: [5], values: [100] }, duration_values: [10, 10, 10, 10, 10], }, @@ -478,6 +506,7 @@ describe('createAggregator', () => { value: { success: 1, total: 1, + total_errors: 0, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -487,6 +516,7 @@ describe('createAggregator', () => { value: { success: 1, total: 2, + total_errors: 1, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -496,6 +526,7 @@ describe('createAggregator', () => { value: { success: 1, total: 3, + total_errors: 2, duration: { counts: [1], values: [100] }, duration_values: [10], }, @@ -505,6 +536,7 @@ describe('createAggregator', () => { value: { success: 2, total: 4, + total_errors: 2, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }, @@ -514,6 +546,7 @@ describe('createAggregator', () => { value: { success: 3, total: 5, + total_errors: 2, duration: { counts: [3], values: [100] }, duration_values: [10, 10, 10], }, diff --git a/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.test.ts b/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.test.ts index 0874940675287..cfad963b20a65 100644 --- a/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.test.ts +++ b/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.test.ts @@ -46,6 +46,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.collect()).toEqual({ success: 0, total: 0, + total_errors: 0, duration: { counts: [], values: [] }, duration_values: [], }); @@ -55,6 +56,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.initialMetric()).toEqual({ success: 0, total: 0, + total_errors: 0, duration: { counts: [], values: [] }, duration_values: [], }); @@ -66,6 +68,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.collect()).toEqual({ success: 2, total: 2, + total_errors: 0, duration: { counts: [2], values: [100] }, duration_values: [10, 10], }); @@ -77,6 +80,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.collect()).toEqual({ success: 0, total: 2, + total_errors: 2, duration: { counts: [], values: [] }, duration_values: [], }); @@ -93,6 +97,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.collect()).toEqual({ success: 4, total: 7, + total_errors: 3, duration: { counts: [4], values: [100] }, duration_values: [10, 10, 10, 10], }); @@ -101,6 +106,7 @@ describe('TaskClaimMetricsAggregator', () => { expect(taskClaimMetricsAggregator.collect()).toEqual({ success: 0, total: 0, + total_errors: 0, duration: { counts: [], values: [] }, duration_values: [], }); diff --git a/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.ts b/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.ts index 486a3f9aa5fd7..104565def0daa 100644 --- a/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.ts +++ b/x-pack/plugins/task_manager/server/metrics/task_claim_metrics_aggregator.ts @@ -18,6 +18,7 @@ const HDR_HISTOGRAM_BUCKET_SIZE = 100; // 100 millis enum TaskClaimKeys { SUCCESS = 'success', TOTAL = 'total', + TOTAL_ERRORS = 'total_errors', } interface TaskClaimCounts extends JsonObject { [TaskClaimKeys.SUCCESS]: number; @@ -59,6 +60,8 @@ export class TaskClaimMetricsAggregator implements ITaskMetricsAggregator<TaskCl const success = isOk((taskEvent as TaskRun).event); if (success) { this.counter.increment(TaskClaimKeys.SUCCESS); + } else { + this.counter.increment(TaskClaimKeys.TOTAL_ERRORS); } this.counter.increment(TaskClaimKeys.TOTAL); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5c0ce959f3e47..60c21cfc74cdd 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -2896,7 +2896,6 @@ "expressionPartitionVis.reusable.functions.args.ariaLabelHelpText": "Spécifie l'attribut aria-label du graphique.", "expressionPartitionVis.tooltipActions.emptyFilterSelection": "Sélectionner au moins une série à filtrer", "expressionPartitionVis.waffle.function.args.bucketHelpText": "Configuration des dimensions de compartiment", - "expressionPartitionVis.waffle.function.args.showValuesInLegendHelpText": "Afficher les valeurs dans la légende", "expressionRepeatImage.error.repeatImage.missingMaxArgument": "{maxArgument} doit être défini si un {emptyImageArgument} est fourni.", "expressionRepeatImage.functions.repeatImage.args.emptyImageHelpText": "Comble la différence entre les paramètres {CONTEXT} et {maxArg} pour l'élément avec cette image. Spécifiez une ressource d'image sous la forme d'une {URL} de données {BASE64}, ou saisissez une sous-expression.", "expressionRepeatImage.functions.repeatImage.args.imageHelpText": "L'image à répéter. Spécifiez une ressource d'image sous la forme d'une {URL} de données {BASE64}, ou saisissez une sous-expression.", @@ -3167,7 +3166,6 @@ "expressionXY.xyVis.splitColumnAccessor.help": "Spécifie la colonne fractionnée du graphique xy", "expressionXY.xyVis.splitRowAccessor.help": "Spécifie la ligne fractionnée du graphique xy", "expressionXY.xyVis.valueLabels.help": "Mode des étiquettes de valeur", - "expressionXY.xyVis.valuesInLegend.help": "Afficher les valeurs dans la légende", "expressionXY.xyVis.xAxisConfig.help": "Spécifie la configuration de l'axe x", "expressionXY.xyVis.xAxisInterval.help": "Spécifie l'intervalle minimal pour le graphique temporel à barres", "expressionXY.xyVis.yAxisConfigs.help": "Spécifie les configurations des axes y", @@ -13182,8 +13180,6 @@ "xpack.customBranding.settings.subscriptionRequiredLink.text": "Abonnement requis.", "xpack.customBranding.uiSettings.validate.customLogo.badFile": "Désolé, ce fichier ne convient pas. Veuillez essayer un autre fichier image.", "xpack.customBranding.uiSettings.validate.customLogo.tooLarge": "Désolé, ce fichier est trop volumineux. Le fichier image doit être inférieur à 200 kilo-octets.", - "xpack.datasetQuality.degradedDocsColumnTooltip": "Le pourcentage de documents dégradés – des documents avec la propriété {ignoredProperty} – dans votre ensemble de données. {visualQueue}", - "xpack.datasetQuality.degradedDocsQualityDescription": "plus grand que {minimimPercentage} %", "xpack.datasetQuality.tableSummary": "Affichage de {items} ensembles de données", "xpack.datasetQuality.actionsColumnName": "Actions", "xpack.datasetQuality.appTitle": "Ensembles de données", @@ -24138,7 +24134,6 @@ "xpack.logsExplorer.flyoutDetail.accordion.title.cloud": "Cloud", "xpack.logsExplorer.flyoutDetail.accordion.title.other": "Autre", "xpack.logsExplorer.flyoutDetail.accordion.title.serviceInfra": "Service et Infrastructure", - "xpack.logsExplorer.flyoutDetail.docViews.overview": "Aperçu", "xpack.logsExplorer.flyoutDetail.label.cloudAvailabilityZone": "Zone de disponibilité du cloud", "xpack.logsExplorer.flyoutDetail.label.cloudInstanceId": "ID d'instance du cloud", "xpack.logsExplorer.flyoutDetail.label.cloudProjectId": "ID de projet du cloud", @@ -25933,8 +25928,6 @@ "xpack.ml.components.jobAnomalyScoreEmbeddable.displayName": "Couloir d'anomalie", "xpack.ml.components.mlAnomalyExplorerEmbeddable.description": "Affichez les résultats de détection des anomalies dans un graphique.", "xpack.ml.components.mlAnomalyExplorerEmbeddable.displayName": "Graphique d'anomalie", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.description": "Affichez dans un graphique les résultats d'indicateurs uniques de détection des anomalies.", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.displayName": "Visionneuse d’indicateur unique", "xpack.ml.controls.checkboxShowCharts.showChartsCheckboxLabel": "Afficher les graphiques", "xpack.ml.controls.selectInterval.ariaLabel": "Sélectionner l'intervalle", "xpack.ml.controls.selectInterval.autoLabel": "Auto", @@ -37263,11 +37256,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "Afficher les alertes", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "afficher les alertes", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "afficher les tableaux de bord", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "Réduire", "xpack.securitySolution.onboarding.togglePanel.done.title": "Étape terminée", "xpack.securitySolution.onboarding.togglePanel.empty.description": "Activez une bascule pour poursuivre votre expérience \"Démarrer\" organisée", "xpack.securitySolution.onboarding.togglePanel.empty.title": "Hmm, on dirait qu’il n’y a rien ici", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "Développer", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "Marquer comme terminé", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "Analyse", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "Cloud", @@ -38415,11 +38406,8 @@ "xpack.serverlessSearch.languages.ruby": "Ruby", "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "En savoir plus", - "xpack.serverlessSearch.nav.alerts": "Alertes", "xpack.serverlessSearch.nav.content.indices": "Gestion des index", - "xpack.serverlessSearch.nav.content.pipelines": "Pipelines", "xpack.serverlessSearch.nav.devTools": "Outils de développement", - "xpack.serverlessSearch.nav.gettingStarted": "Démarrer", "xpack.serverlessSearch.nav.home": "Accueil", "xpack.serverlessSearch.nav.mngt": "Gestion", "xpack.serverlessSearch.nav.performance": "Performances", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 8dd33e6a7b04d..6ea7973b93a11 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2890,7 +2890,6 @@ "expressionPartitionVis.reusable.functions.args.ariaLabelHelpText": "グラフのariaラベルを指定します", "expressionPartitionVis.tooltipActions.emptyFilterSelection": "フィルターする1つ以上の系列を選択", "expressionPartitionVis.waffle.function.args.bucketHelpText": "バケットディメンション構成", - "expressionPartitionVis.waffle.function.args.showValuesInLegendHelpText": "凡例に値を表示", "expressionRepeatImage.error.repeatImage.missingMaxArgument": "{emptyImageArgument} を指定する場合は、{maxArgument} を設定する必要があります", "expressionRepeatImage.functions.repeatImage.args.emptyImageHelpText": "この画像のエレメントについて、{CONTEXT}および{maxArg}パラメーターの差異を解消します。画像アセットは{BASE64}データ{URL}として提供するか、部分式で渡します。", "expressionRepeatImage.functions.repeatImage.args.imageHelpText": "繰り返す画像です。画像アセットは{BASE64}データ{URL}として提供するか、部分式で渡します。", @@ -3161,7 +3160,6 @@ "expressionXY.xyVis.splitColumnAccessor.help": "xyグラフの分割列を指定します", "expressionXY.xyVis.splitRowAccessor.help": "xyグラフの分割を行を指定します", "expressionXY.xyVis.valueLabels.help": "値ラベルモード", - "expressionXY.xyVis.valuesInLegend.help": "凡例に値を表示", "expressionXY.xyVis.xAxisConfig.help": "X軸構成を指定します", "expressionXY.xyVis.xAxisInterval.help": "時系列棒グラフの最小間隔を指定します", "expressionXY.xyVis.yAxisConfigs.help": "Y軸構成を指定します", @@ -13162,8 +13160,6 @@ "xpack.customBranding.settings.subscriptionRequiredLink.text": "サブスクリプションが必要です。", "xpack.customBranding.uiSettings.validate.customLogo.badFile": "このファイルは動作しません。別の画像ファイルを試してください。", "xpack.customBranding.uiSettings.validate.customLogo.tooLarge": "このファイルは大きすぎます。画像ファイルは200キロバイト未満でなければなりません。", - "xpack.datasetQuality.degradedDocsColumnTooltip": "データセットにおける劣化したドキュメント({ignoredProperty}プロパティのドキュメント)の割合。{visualQueue}", - "xpack.datasetQuality.degradedDocsQualityDescription": "{minimimPercentage}%を超える", "xpack.datasetQuality.tableSummary": "{items}データセットを表示中", "xpack.datasetQuality.actionsColumnName": "アクション", "xpack.datasetQuality.appTitle": "データセット", @@ -24113,7 +24109,6 @@ "xpack.logsExplorer.flyoutDetail.accordion.title.cloud": "クラウド", "xpack.logsExplorer.flyoutDetail.accordion.title.other": "その他", "xpack.logsExplorer.flyoutDetail.accordion.title.serviceInfra": "サービスとインフラストラクチャー", - "xpack.logsExplorer.flyoutDetail.docViews.overview": "概要", "xpack.logsExplorer.flyoutDetail.label.cloudAvailabilityZone": "クラウドアベイラビリティゾーン", "xpack.logsExplorer.flyoutDetail.label.cloudInstanceId": "クラウドインスタンスID", "xpack.logsExplorer.flyoutDetail.label.cloudProjectId": "クラウドプロジェクトID", @@ -25906,8 +25901,6 @@ "xpack.ml.components.jobAnomalyScoreEmbeddable.displayName": "異常スイムレーン", "xpack.ml.components.mlAnomalyExplorerEmbeddable.description": "グラフに異常検知結果を表示します。", "xpack.ml.components.mlAnomalyExplorerEmbeddable.displayName": "異常グラフ", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.description": "グラフに異常検知単一メトリック結果を表示します。", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.displayName": "シングルメトリックビューアー", "xpack.ml.controls.checkboxShowCharts.showChartsCheckboxLabel": "チャートを表示", "xpack.ml.controls.selectInterval.ariaLabel": "間隔を選択", "xpack.ml.controls.selectInterval.autoLabel": "自動", @@ -37232,11 +37225,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "アラートを表示", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "アラートを表示", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "ダッシュボードを表示", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "縮小", "xpack.securitySolution.onboarding.togglePanel.done.title": "ステップ完了", "xpack.securitySolution.onboarding.togglePanel.empty.description": "トグルをオンにすると、キュレーションされた「基本操作」エクスペリエンスを続行できます", "xpack.securitySolution.onboarding.togglePanel.empty.title": "何もないようです", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "拡張", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "完了に設定", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "分析", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "クラウド", @@ -38383,11 +38374,8 @@ "xpack.serverlessSearch.languages.ruby": "Ruby", "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "詳細", - "xpack.serverlessSearch.nav.alerts": "アラート", "xpack.serverlessSearch.nav.content.indices": "インデックス管理", - "xpack.serverlessSearch.nav.content.pipelines": "パイプライン", "xpack.serverlessSearch.nav.devTools": "開発ツール", - "xpack.serverlessSearch.nav.gettingStarted": "使ってみる", "xpack.serverlessSearch.nav.home": "ホーム", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "パフォーマンス", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 20f58d01ca68e..4742b2168dc60 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2898,7 +2898,6 @@ "expressionPartitionVis.reusable.functions.args.ariaLabelHelpText": "指定图表的 aria 标签", "expressionPartitionVis.tooltipActions.emptyFilterSelection": "至少选择一个要筛选的序列", "expressionPartitionVis.waffle.function.args.bucketHelpText": "存储桶维度配置", - "expressionPartitionVis.waffle.function.args.showValuesInLegendHelpText": "在图例中显示值", "expressionRepeatImage.error.repeatImage.missingMaxArgument": "如果提供 {emptyImageArgument},则必须设置 {maxArgument}", "expressionRepeatImage.functions.repeatImage.args.emptyImageHelpText": "使用此图像填充元素的 {CONTEXT} 和 {maxArg} 参数之间的差距。以 {BASE64} 数据 {URL} 的形式提供图像资产或传入子表达式。", "expressionRepeatImage.functions.repeatImage.args.imageHelpText": "要重复的图像。以 {BASE64} 数据 {URL} 的形式提供图像资产或传入子表达式。", @@ -3169,7 +3168,6 @@ "expressionXY.xyVis.splitColumnAccessor.help": "指定 xy 散点图的拆分列", "expressionXY.xyVis.splitRowAccessor.help": "指定 xy 散点图的拆分行", "expressionXY.xyVis.valueLabels.help": "值标签模式", - "expressionXY.xyVis.valuesInLegend.help": "在图例中显示值", "expressionXY.xyVis.xAxisConfig.help": "指定 x 轴配置", "expressionXY.xyVis.xAxisInterval.help": "指定时间条形图的最小时间间隔", "expressionXY.xyVis.yAxisConfigs.help": "指定 y 轴配置", @@ -13187,8 +13185,6 @@ "xpack.customBranding.settings.subscriptionRequiredLink.text": "需要订阅。", "xpack.customBranding.uiSettings.validate.customLogo.badFile": "抱歉,该文件无效。请尝试其他图像文件。", "xpack.customBranding.uiSettings.validate.customLogo.tooLarge": "抱歉,该文件过大。图像文件必须小于 200 千字节。", - "xpack.datasetQuality.degradedDocsColumnTooltip": "您的数据集中已降级文档的百分比,即包含 {ignoredProperty} 属性的文档。{visualQueue}", - "xpack.datasetQuality.degradedDocsQualityDescription": "大于 {minimimPercentage}%", "xpack.datasetQuality.tableSummary": "显示 {items} 个数据集", "xpack.datasetQuality.actionsColumnName": "操作", "xpack.datasetQuality.appTitle": "数据集", @@ -24146,7 +24142,6 @@ "xpack.logsExplorer.flyoutDetail.accordion.title.cloud": "云", "xpack.logsExplorer.flyoutDetail.accordion.title.other": "其他", "xpack.logsExplorer.flyoutDetail.accordion.title.serviceInfra": "服务和基础设施", - "xpack.logsExplorer.flyoutDetail.docViews.overview": "概览", "xpack.logsExplorer.flyoutDetail.label.cloudAvailabilityZone": "云可用区", "xpack.logsExplorer.flyoutDetail.label.cloudInstanceId": "云实例 ID", "xpack.logsExplorer.flyoutDetail.label.cloudProjectId": "云项目 ID", @@ -25944,8 +25939,6 @@ "xpack.ml.components.jobAnomalyScoreEmbeddable.displayName": "异常泳道", "xpack.ml.components.mlAnomalyExplorerEmbeddable.description": "在图表中查看异常检测结果。", "xpack.ml.components.mlAnomalyExplorerEmbeddable.displayName": "异常图表", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.description": "在图表中查看异常检测单一指标结果。", - "xpack.ml.components.mlSingleMetricViewerEmbeddable.displayName": "Single Metric Viewer", "xpack.ml.controls.checkboxShowCharts.showChartsCheckboxLabel": "显示图表", "xpack.ml.controls.selectInterval.ariaLabel": "选择时间间隔", "xpack.ml.controls.selectInterval.autoLabel": "自动", @@ -37275,11 +37268,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "查看告警", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "查看告警", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "查看仪表板", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "折叠", "xpack.securitySolution.onboarding.togglePanel.done.title": "步骤已完成", "xpack.securitySolution.onboarding.togglePanel.empty.description": "打开切换按钮,继续您策展的“开始使用”体验", "xpack.securitySolution.onboarding.togglePanel.empty.title": "嗯,那里似乎没有任何内容", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "展开", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "标记为已完成", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "分析", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "云", @@ -38427,11 +38418,8 @@ "xpack.serverlessSearch.languages.ruby": "Ruby", "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "了解详情", - "xpack.serverlessSearch.nav.alerts": "告警", "xpack.serverlessSearch.nav.content.indices": "索引管理", - "xpack.serverlessSearch.nav.content.pipelines": "管道", "xpack.serverlessSearch.nav.devTools": "开发工具", - "xpack.serverlessSearch.nav.gettingStarted": "开始使用", "xpack.serverlessSearch.nav.home": "主页", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "性能", diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts index 5f49b35a29966..4ff89b45b090f 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts @@ -129,7 +129,8 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { for (const scenario of UserAtSpaceScenarios) { const { user, space } = scenario; - describe(scenario.id, () => { + // FLAKY: https://github.com/elastic/kibana/issues/181862 + describe.skip(scenario.id, () => { const apiOptions = { spaceId: space.id, username: user.username, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts index 6a9e0a7194b5c..d100da6bd52bf 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts @@ -86,7 +86,10 @@ export default function getBackfillTests({ getService }: FtrProviderContext) { for (const scenario of UserAtSpaceScenarios) { const { user, space } = scenario; - describe(scenario.id, () => { + // FLAKY: https://github.com/elastic/kibana/issues/181840 + // FLAKY: https://github.com/elastic/kibana/issues/181861 + // FLAKY: https://github.com/elastic/kibana/issues/181875 + describe.skip(scenario.id, () => { const apiOptions = { spaceId: space.id, username: user.username, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts index 0f32a21d64d6d..5369b351037d1 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts @@ -27,7 +27,8 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext const es = getService('es'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - describe('schedule backfill', () => { + // Failing: See https://github.com/elastic/kibana/issues/181778 + describe.skip('schedule backfill', () => { let backfillIds: Array<{ id: string; spaceId: string }> = []; const objectRemover = new ObjectRemover(supertest); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts index a46360b40259b..318b8f99a61e0 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts @@ -80,7 +80,8 @@ export default function ruleTests({ getService }: FtrProviderContext) { `.internal.alerts-transform.health.alerts-default-000001` ); - describe('rule', async () => { + // Failing: See https://github.com/elastic/kibana/issues/177215 + describe.skip('rule', async () => { const objectRemover = new ObjectRemover(supertest); let connectorId: string; const transformId = 'test_transform_01'; diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/install_resources.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/install_resources.ts index e2746257931bc..b4d153d0a760c 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/install_resources.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data/install_resources.ts @@ -13,11 +13,12 @@ import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default function createAlertsAsDataInstallResourcesTest({ getService }: FtrProviderContext) { const es = getService('es'); + const retry = getService('retry'); const frameworkMappings = mappingFromFieldMap(alertFieldMap, 'strict'); const legacyAlertMappings = mappingFromFieldMap(legacyAlertFieldMap, 'strict'); const ecsMappings = mappingFromFieldMap(ecsFieldMap, 'strict'); - // FLAKY: https://github.com/elastic/kibana/issues/181296 + // Failing: See https://github.com/elastic/kibana/issues/181296 describe.skip('install alerts as data resources', () => { it('should install common alerts as data resources on startup', async () => { const ilmPolicyName = '.alerts-ilm-policy'; @@ -174,42 +175,43 @@ export default function createAlertsAsDataInstallResourcesTest({ getService }: F }, }); - const contextIndex = await es.indices.get({ - index: indexName, - }); - - expect(contextIndex[indexName].aliases).to.eql({ - '.alerts-test.patternfiring.alerts-default': { - is_write_index: true, - }, - }); - expect(contextIndex[indexName].mappings?._meta?.managed).to.eql(true); - expect(contextIndex[indexName].mappings?._meta?.namespace).to.eql('default'); - expect(contextIndex[indexName].mappings?._meta?.kibana?.version).to.be.a('string'); - expect(contextIndex[indexName].mappings?.dynamic).to.eql('false'); - expect(contextIndex[indexName].mappings?.properties).to.eql({ - ...contextSpecificMappings, - ...frameworkMappings.properties, - }); - - expect(contextIndex[indexName].settings?.index?.lifecycle).to.eql({ - name: '.alerts-ilm-policy', - rollover_alias: '.alerts-test.patternfiring.alerts-default', - }); + await retry.try(async () => { + const contextIndex = await es.indices.get({ + index: indexName, + }); + expect(contextIndex[indexName].aliases).to.eql({ + '.alerts-test.patternfiring.alerts-default': { + is_write_index: true, + }, + }); + expect(contextIndex[indexName].mappings?._meta?.managed).to.eql(true); + expect(contextIndex[indexName].mappings?._meta?.namespace).to.eql('default'); + expect(contextIndex[indexName].mappings?._meta?.kibana?.version).to.be.a('string'); + expect(contextIndex[indexName].mappings?.dynamic).to.eql('false'); + expect(contextIndex[indexName].mappings?.properties).to.eql({ + ...contextSpecificMappings, + ...frameworkMappings.properties, + }); + + expect(contextIndex[indexName].settings?.index?.lifecycle).to.eql({ + name: '.alerts-ilm-policy', + rollover_alias: '.alerts-test.patternfiring.alerts-default', + }); + + expect(contextIndex[indexName].settings?.index?.mapping).to.eql({ + ignore_malformed: 'true', + total_fields: { + limit: '2500', + }, + }); - expect(contextIndex[indexName].settings?.index?.mapping).to.eql({ - ignore_malformed: 'true', - total_fields: { - limit: '2500', - }, + expect(contextIndex[indexName].settings?.index?.hidden).to.eql('true'); + expect(contextIndex[indexName].settings?.index?.number_of_shards).to.eql(1); + expect(contextIndex[indexName].settings?.index?.auto_expand_replicas).to.eql('0-1'); + expect(contextIndex[indexName].settings?.index?.provided_name).to.eql( + '.internal.alerts-test.patternfiring.alerts-default-000001' + ); }); - - expect(contextIndex[indexName].settings?.index?.hidden).to.eql('true'); - expect(contextIndex[indexName].settings?.index?.number_of_shards).to.eql(1); - expect(contextIndex[indexName].settings?.index?.auto_expand_replicas).to.eql('0-1'); - expect(contextIndex[indexName].settings?.index?.provided_name).to.eql( - '.internal.alerts-test.patternfiring.alerts-default-000001' - ); }); }); } diff --git a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_full_analysis.ts b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_full_analysis.ts index 02086bbfe8b1c..b1a9fe2effb49 100644 --- a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_full_analysis.ts +++ b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_full_analysis.ts @@ -56,7 +56,7 @@ export default ({ getService }: FtrProviderContext) => { expect(typeof d.type).to.be('string'); }); - const addSignificantItemsActions = getAddSignificationItemsActions(data, apiVersion); + const addSignificantItemsActions = getAddSignificationItemsActions(data); expect(addSignificantItemsActions.length).to.greaterThan( 0, 'Expected significant items actions to be greater than 0.' @@ -73,7 +73,7 @@ export default ({ getService }: FtrProviderContext) => { 'Significant items do not match expected values.' ); - const histogramActions = getHistogramActions(data, apiVersion); + const histogramActions = getHistogramActions(data); const histograms = histogramActions.flatMap((d) => d.payload); // for each significant term we should get a histogram expect(histogramActions.length).to.be(significantItems.length); @@ -85,7 +85,7 @@ export default ({ getService }: FtrProviderContext) => { ); }); - const groupActions = getGroupActions(data, apiVersion); + const groupActions = getGroupActions(data); const groups = groupActions.flatMap((d) => d.payload); const actualGroups = orderBy(groups, ['docCount'], ['desc']); @@ -98,7 +98,7 @@ export default ({ getService }: FtrProviderContext) => { )}, got ${JSON.stringify(actualGroups)}` ); - const groupHistogramActions = getGroupHistogramActions(data, apiVersion); + const groupHistogramActions = getGroupHistogramActions(data); const groupHistograms = groupHistogramActions.flatMap((d) => d.payload); // for each significant terms group we should get a histogram expect(groupHistograms.length).to.be(groups.length); diff --git a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts index 340f450a5f717..d3a7aaed19a40 100644 --- a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts +++ b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts @@ -37,24 +37,13 @@ export default ({ getService }: FtrProviderContext) => { getLogRateAnalysisTestData<typeof apiVersion>().forEach((testData) => { let overrides: AiopsLogRateAnalysisSchema<typeof apiVersion>['overrides'] = {}; - if (apiVersion === '1') { - overrides = { - loaded: 0, - remainingFieldCandidates: [], - significantTerms: testData.expected.significantItems, - regroupOnly: true, - } as AiopsLogRateAnalysisSchema<typeof apiVersion>['overrides']; - } - - if (apiVersion === '2') { - overrides = { - loaded: 0, - remainingFieldCandidates: [], - significantItems: testData.expected - .significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], - regroupOnly: true, - } as AiopsLogRateAnalysisSchema<typeof apiVersion>['overrides']; - } + overrides = { + loaded: 0, + remainingFieldCandidates: [], + significantItems: testData.expected + .significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], + regroupOnly: true, + } as AiopsLogRateAnalysisSchema<typeof apiVersion>['overrides']; describe(`with v${apiVersion} - ${testData.testName}`, () => { before(async () => { @@ -78,13 +67,13 @@ export default ({ getService }: FtrProviderContext) => { expect(typeof d.type).to.be('string'); }); - const addSignificantItemsActions = getAddSignificationItemsActions(data, apiVersion); + const addSignificantItemsActions = getAddSignificationItemsActions(data); expect(addSignificantItemsActions.length).to.eql( 0, `Expected significant items actions to be 0, got ${addSignificantItemsActions.length}` ); - const histogramActions = getHistogramActions(data, apiVersion); + const histogramActions = getHistogramActions(data); // for each significant item we should get a histogram expect(histogramActions.length).to.eql( @@ -92,7 +81,7 @@ export default ({ getService }: FtrProviderContext) => { `Expected histogram actions to be 0, got ${histogramActions.length}` ); - const groupActions = getGroupActions(data, apiVersion); + const groupActions = getGroupActions(data); const groups = groupActions.flatMap((d) => d.payload); expect(orderBy(groups, ['docCount'], ['desc'])).to.eql( @@ -102,7 +91,7 @@ export default ({ getService }: FtrProviderContext) => { )}, got ${JSON.stringify(groups)}` ); - const groupHistogramActions = getGroupHistogramActions(data, apiVersion); + const groupHistogramActions = getGroupHistogramActions(data); const groupHistograms = groupHistogramActions.flatMap((d) => d.payload); // for each significant items group we should get a histogram expect(groupHistograms.length).to.be(groups.length); diff --git a/x-pack/test/api_integration/apis/aiops/test_data.ts b/x-pack/test/api_integration/apis/aiops/test_data.ts index 63bf9940d959c..21f628d832c7d 100644 --- a/x-pack/test/api_integration/apis/aiops/test_data.ts +++ b/x-pack/test/api_integration/apis/aiops/test_data.ts @@ -25,7 +25,7 @@ import { import type { TestData } from './types'; -export const API_VERSIONS: ApiVersion[] = ['1', '2']; +export const API_VERSIONS: ApiVersion[] = ['2']; export const getLogRateAnalysisTestData = <T extends ApiVersion>(): Array<TestData<T>> => [ { diff --git a/x-pack/test/api_integration/apis/aiops/test_helpers.ts b/x-pack/test/api_integration/apis/aiops/test_helpers.ts index 5252d14fbb7f7..cf5f1d41ebbce 100644 --- a/x-pack/test/api_integration/apis/aiops/test_helpers.ts +++ b/x-pack/test/api_integration/apis/aiops/test_helpers.ts @@ -5,34 +5,16 @@ * 2.0. */ -import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-log-rate-analysis/api/schema'; +export const getAddSignificationItemsActions = (data: any[]) => + data.filter((d) => d.type === 'add_significant_items'); -export const getAddSignificationItemsActions = (data: any[], apiVersion: ApiVersion) => - data.filter( - (d) => d.type === (apiVersion === '1' ? 'add_significant_terms' : 'add_significant_items') - ); +export const getHistogramActions = (data: any[]) => + data.filter((d) => d.type === 'add_significant_items_histogram'); -export const getHistogramActions = (data: any[], apiVersion: ApiVersion) => - data.filter( - (d) => - d.type === - (apiVersion === '1' ? 'add_significant_terms_histogram' : 'add_significant_items_histogram') - ); +export const getGroupActions = (data: any[]) => + data.filter((d) => d.type === 'add_significant_items_group'); -export const getGroupActions = (data: any[], apiVersion: ApiVersion) => - data.filter( - (d) => - d.type === - (apiVersion === '1' ? 'add_significant_terms_group' : 'add_significant_items_group') - ); - -export const getGroupHistogramActions = (data: any[], apiVersion: ApiVersion) => - data.filter( - (d) => - d.type === - (apiVersion === '1' - ? 'add_significant_terms_group_histogram' - : 'add_significant_items_group_histogram') - ); +export const getGroupHistogramActions = (data: any[]) => + data.filter((d) => d.type === 'add_significant_items_group_histogram'); export const getErrorActions = (data: any[]) => data.filter((d) => d.type === 'add_error'); diff --git a/x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts b/x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts index 71f73f9acb1f3..a8ad78d02ab6f 100644 --- a/x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts +++ b/x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts @@ -8,7 +8,6 @@ import { ApmSynthtraceEsClient, ApmSynthtraceKibanaClient, - AssetsSynthtraceEsClient, createLogger, InfraSynthtraceEsClient, LogLevel, @@ -20,9 +19,6 @@ import { InheritedServices } from './types'; interface AssetManagerConfig { services: InheritedServices & { - assetsSynthtraceEsClient: ( - context: InheritedFtrProviderContext - ) => Promise<AssetsSynthtraceEsClient>; infraSynthtraceEsClient: ( context: InheritedFtrProviderContext ) => Promise<InfraSynthtraceEsClient>; @@ -41,13 +37,6 @@ export default async function createTestConfig({ testFiles: [require.resolve('./tests')], services: { ...services, - assetsSynthtraceEsClient: (context: InheritedFtrProviderContext) => { - return new AssetsSynthtraceEsClient({ - client: context.getService('es'), - logger: createLogger(LogLevel.info), - refreshAfterIndex: true, - }); - }, infraSynthtraceEsClient: (context: InheritedFtrProviderContext) => { return new InfraSynthtraceEsClient({ client: context.getService('es'), diff --git a/x-pack/test/api_integration_basic/apis/aiops/permissions.ts b/x-pack/test/api_integration_basic/apis/aiops/permissions.ts index ed25731ffd5e3..239696215c759 100644 --- a/x-pack/test/api_integration_basic/apis/aiops/permissions.ts +++ b/x-pack/test/api_integration_basic/apis/aiops/permissions.ts @@ -17,7 +17,7 @@ import type { import type { FtrProviderContext } from '../../ftr_provider_context'; -const API_VERSIONS: ApiVersion[] = ['1', '2']; +const API_VERSIONS: ApiVersion[] = ['2']; export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); 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 index a0daafef466b7..c0d92c07811ee 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts @@ -258,7 +258,8 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid await browser.switchTab(0); }); - it('goes to infra hosts for hosts when show all is clicked', async () => { + // Blocked by https://github.com/elastic/kibana/issues/181705 + it.skip('goes to infra hosts for hosts when show all is clicked', async () => { const apacheAccessDatasetHumanName = 'Apache access logs'; await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); @@ -385,13 +386,13 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); await PageObjects.datasetQuality.openIntegrationActionsMenu(); - const action = await PageObjects.datasetQuality.getIntegrationActionButtonByAction( - integrationActions.template - ); + await retry.tryForTime(5000, async () => { + const action = await PageObjects.datasetQuality.getIntegrationActionButtonByAction( + integrationActions.template + ); - await action.click(); + await action.click(); - await retry.tryForTime(5000, async () => { const currentUrl = await browser.getCurrentUrl(); const parsedUrl = new URL(currentUrl); expect(parsedUrl.pathname).to.contain( 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 index f3bbadc0f89f8..99318a63578fe 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts @@ -34,6 +34,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid 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(); @@ -43,7 +44,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const namespaceColCellTexts = await namespaceCol.getCellTexts(); expect(namespaceColCellTexts).to.eql([defaultNamespace, defaultNamespace, defaultNamespace]); - const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsCol = cols['Degraded Docs (%)']; const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); @@ -61,7 +62,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const datasetNameCol = cols['Dataset Name']; await datasetNameCol.sort('ascending'); - const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsCol = cols['Degraded Docs (%)']; const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); @@ -123,8 +124,6 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid 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 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 index eee4cefeb1017..168a0631ec28a 100644 --- 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 @@ -152,5 +152,40 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid expect(namespaceColCellTextsAfterFilter).to.eql([datasetNamespace]); }); + + it('filters for quality', async () => { + const apacheAccessDatasetName = 'apache.access'; + const expectedQuality = 'Poor'; + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ + to: new Date().toISOString(), + count: 10, + dataset: apacheAccessDatasetName, + isMalformed: true, + }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + // Get default quality + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetQuality = cols['Dataset Quality']; + const datasetQualityCellTexts = await datasetQuality.getCellTexts(); + expect(datasetQualityCellTexts).to.contain(expectedQuality); + + // Filter for Poor quality + await PageObjects.datasetQuality.filterForQualities([expectedQuality]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetQualityAfterFilter = colsAfterFilter['Dataset Quality']; + const datasetQualityCellTextsAfterFilter = await datasetQualityAfterFilter.getCellTexts(); + + expect(datasetQualityCellTextsAfterFilter).to.eql([expectedQuality]); + }); }); } diff --git a/x-pack/test/functional/apps/lens/group6/index.ts b/x-pack/test/functional/apps/lens/group6/index.ts index 60b9ce859b07f..470aeb89b66f0 100644 --- a/x-pack/test/functional/apps/lens/group6/index.ts +++ b/x-pack/test/functional/apps/lens/group6/index.ts @@ -23,11 +23,15 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext const remoteIndexPatternString = 'ftr-remote:logstash-*'; const localFixtures = { lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json', + lensLegendStatistics: + 'x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics.json', lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/default', }; const remoteFixtures = { lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/lens_basic.json', + lensLegendStatistics: + 'x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics.json', lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/default', }; let esNode: EsArchiver; @@ -81,6 +85,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext loadTestFile(require.resolve('./error_handling')); // 1m 8s loadTestFile(require.resolve('./lens_tagging')); // 1m 9s loadTestFile(require.resolve('./workspace_size')); + loadTestFile(require.resolve('./legend_statistics')); // keep these last in the group in this order because they are messing with the default saved objects loadTestFile(require.resolve('./lens_reporting')); // 3m loadTestFile(require.resolve('./rollup')); // 1m 30s diff --git a/x-pack/test/functional/apps/lens/group6/legend_statistics.ts b/x-pack/test/functional/apps/lens/group6/legend_statistics.ts new file mode 100644 index 0000000000000..6a7a20516bf08 --- /dev/null +++ b/x-pack/test/functional/apps/lens/group6/legend_statistics.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']); + const find = getService('find'); + const listingTable = getService('listingTable'); + const kibanaServer = getService('kibanaServer'); + + async function loadSavedLens(title: string) { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName(title); + await PageObjects.lens.clickVisualizeListItemTitle(title); + } + + async function expectLegendOneItem(name: string, value?: string) { + const expectedText = value ? `${name}\n${value}` : name; + const legendElement = await find.byCssSelector('.echLegendItem'); + const text = await legendElement.getVisibleText(); + expect(text).to.eql(expectedText); + } + + describe('lens persisted and runtime state differences properties', () => { + before(async () => { + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics' + ); + await kibanaServer.uiSettings.update({ + 'timepicker:timeDefaults': + '{ "from": "2015-09-18T19:37:13.000Z", "to": "2015-09-22T23:30:30.000Z"}', + }); + }); + + after(async () => { + await kibanaServer.uiSettings.unset('timepicker:timeDefaults'); + }); + describe('xy chart', () => { + it('shows values in legend for legacy valuesInLegend===true property and saves it correctly', async () => { + const title = 'xyValuesInLegendTrue'; + await loadSavedLens(title); + await expectLegendOneItem('Count of records', '2'); + await PageObjects.lens.save(title); + await loadSavedLens(title); + await expectLegendOneItem('Count of records', '2'); + }); + + it('does not show values in legend for legacy valuesInLegend===false prop', async () => { + await loadSavedLens('xyValuesInLegendFalse'); + await expectLegendOneItem('Count of records'); + }); + it('shows values in legend for legendStats===["values"] prop', async () => { + await loadSavedLens('xyLegendStats'); + await expectLegendOneItem('Count of records', '2'); + }); + }); + describe('waffle chart', () => { + it('waffleshows values in legend for legacy valuesInLegend===true property', async () => { + await loadSavedLens('waffleValuesInLegendTrue'); + await expectLegendOneItem('Count of records', '14,003'); + }); + it('shows values in legend for legacy showValuesInLegend===false prop', async () => { + await loadSavedLens('waffleValuesInLegendFalse'); + await expectLegendOneItem('Count of records', undefined); + }); + it('shows values in legend for legendStats===["values"] prop', async () => { + await loadSavedLens('waffleLegendStats'); + await expectLegendOneItem('Count of records', '14,003'); + }); + }); + }); +} diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts index 8a0cd091bb85d..67f1739a53d9b 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts @@ -21,7 +21,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const elasticChart = getService('elasticChart'); - describe('Gauge', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/181895 + describe.skip('Gauge', function describeIndexTests() { const isNewChartsLibraryEnabled = true; before(async () => { diff --git a/x-pack/test/functional/apps/observability_logs_explorer/flyout.ts b/x-pack/test/functional/apps/observability_logs_explorer/flyout.ts index c3ef409546b31..22732d9933bbb 100644 --- a/x-pack/test/functional/apps/observability_logs_explorer/flyout.ts +++ b/x-pack/test/functional/apps/observability_logs_explorer/flyout.ts @@ -65,32 +65,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } }); - it('should mount the flyout customization content', async () => { + it('should display the logs overview tab', async () => { await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutDetail'); - }); - - it('should display a timestamp badge', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogTimestamp'); - }); - - it('should display a log level badge when available', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogLevel'); - await dataGrid.closeFlyout(); - - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutLogLevel'); - }); - - it('should display a message code block when available', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogMessage'); - await dataGrid.closeFlyout(); - - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutLogMessage'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); }); }); } diff --git a/x-pack/test/functional/apps/observability_logs_explorer/flyout_highlights.ts b/x-pack/test/functional/apps/observability_logs_explorer/flyout_highlights.ts deleted file mode 100644 index 238d456b5ec54..0000000000000 --- a/x-pack/test/functional/apps/observability_logs_explorer/flyout_highlights.ts +++ /dev/null @@ -1,250 +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 { FtrProviderContext } from '../../ftr_provider_context'; - -const DATASET_NAME = 'flyout'; -const NAMESPACE = 'default'; -const DATA_STREAM_NAME = `logs-${DATASET_NAME}-${NAMESPACE}`; -const NOW = Date.now(); - -const sharedDoc = { - time: NOW + 1000, - logFilepath: '/flyout.log', - serviceName: 'frontend-node', - datasetName: DATASET_NAME, - namespace: NAMESPACE, - message: 'full document', - logLevel: 'info', - traceId: 'abcdef', - hostName: 'gke-edge-oblt-pool', - orchestratorClusterId: 'my-cluster-id', - orchestratorClusterName: 'my-cluster-id', - orchestratorResourceId: 'orchestratorResourceId', - cloudProvider: 'gcp', - cloudRegion: 'us-central-1', - cloudAz: 'us-central-1a', - cloudProjectId: 'elastic-project', - cloudInstanceId: 'BgfderflkjTheUiGuy', - agentName: 'node', -}; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const dataGrid = getService('dataGrid'); - const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['observabilityLogsExplorer']); - - describe('Flyout highlight customization', () => { - let cleanupDataStreamSetup: () => Promise<void>; - - describe('Service & Infrastructure container', () => { - const { - serviceName, - traceId, - hostName, - orchestratorClusterName, - orchestratorResourceId, - ...rest - } = sharedDoc; - const docWithoutServiceName = { - ...rest, - traceId, - hostName, - orchestratorClusterName, - orchestratorResourceId, - time: NOW - 1000, - }; - const docWithoutServiceInfraContainer = { ...rest, time: NOW - 4000 }; - - const docs = [sharedDoc, docWithoutServiceName, docWithoutServiceInfraContainer]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - }); - - after('clean up DataStream', async () => { - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the service container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await testSubjects.existOrFail('logsExplorerFlyoutService'); - await testSubjects.existOrFail('logsExplorerFlyoutTrace'); - await testSubjects.existOrFail('logsExplorerFlyoutHostName'); - await testSubjects.existOrFail('logsExplorerFlyoutClusterName'); - await testSubjects.existOrFail('logsExplorerFlyoutResourceId'); - await dataGrid.closeFlyout(); - }); - - it('should load the service container even when 1 field is missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await testSubjects.missingOrFail('logsExplorerFlyoutService'); - await testSubjects.existOrFail('logsExplorerFlyoutTrace'); - await testSubjects.existOrFail('logsExplorerFlyoutHostName'); - await testSubjects.existOrFail('logsExplorerFlyoutClusterName'); - await testSubjects.existOrFail('logsExplorerFlyoutResourceId'); - await dataGrid.closeFlyout(); - }); - - it('should not load the service container if all fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 2, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await dataGrid.closeFlyout(); - }); - }); - - describe('Cloud container', () => { - const { cloudProvider, cloudInstanceId, cloudProjectId, cloudRegion, cloudAz, ...rest } = - sharedDoc; - const docWithoutCloudProviderAndInstanceId = { - ...rest, - cloudProjectId, - cloudRegion, - cloudAz, - time: NOW - 1000, - }; - const docWithoutCloudContainer = { ...rest, time: NOW - 2000 }; - - const docs = [sharedDoc, docWithoutCloudProviderAndInstanceId, docWithoutCloudContainer]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - }); - - after('clean up DataStream', async () => { - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the cloud container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionCloud'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProjectId'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudInstanceId'); - await dataGrid.closeFlyout(); - }); - - it('should load the cloud container even when some fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionCloud'); - - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudInstanceId'); - - await testSubjects.existOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProjectId'); - await dataGrid.closeFlyout(); - }); - - it('should not load the cloud container if all fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 2, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutHighlightSectionCloud'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProjectId'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudInstanceId'); - await dataGrid.closeFlyout(); - }); - }); - - describe('Other container', () => { - const { logFilepath, agentName, ...rest } = sharedDoc; - const docWithoutLogPathAndAgentName = { - ...rest, - time: NOW - 1000, - }; - - const docs = [sharedDoc, docWithoutLogPathAndAgentName]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - }); - - after('clean up DataStream', async () => { - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the other container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionOther'); - await testSubjects.existOrFail('logsExplorerFlyoutLogPathFile'); - await testSubjects.existOrFail('logsExplorerFlyoutNamespace'); - await testSubjects.existOrFail('logsExplorerFlyoutDataset'); - await testSubjects.existOrFail('logsExplorerFlyoutLogShipper'); - await dataGrid.closeFlyout(); - }); - - it('should load the other container even when some fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionOther'); - - await testSubjects.missingOrFail('logsExplorerFlyoutLogPathFile'); - await testSubjects.missingOrFail('logsExplorerFlyoutLogShipper'); - - await testSubjects.existOrFail('logsExplorerFlyoutNamespace'); - await testSubjects.existOrFail('logsExplorerFlyoutDataset'); - await dataGrid.closeFlyout(); - }); - }); - }); -} diff --git a/x-pack/test/functional/apps/observability_logs_explorer/index.ts b/x-pack/test/functional/apps/observability_logs_explorer/index.ts index 640f552317f21..6683fb8d7d26d 100644 --- a/x-pack/test/functional/apps/observability_logs_explorer/index.ts +++ b/x-pack/test/functional/apps/observability_logs_explorer/index.ts @@ -11,13 +11,12 @@ export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Logs Explorer', function () { loadTestFile(require.resolve('./app')); loadTestFile(require.resolve('./columns_selection')); + loadTestFile(require.resolve('./custom_control_columns')); loadTestFile(require.resolve('./data_source_selection_state')); loadTestFile(require.resolve('./data_source_selector')); + loadTestFile(require.resolve('./field_list')); loadTestFile(require.resolve('./filter_controls')); loadTestFile(require.resolve('./flyout')); loadTestFile(require.resolve('./header_menu')); - loadTestFile(require.resolve('./flyout_highlights')); - loadTestFile(require.resolve('./custom_control_columns')); - loadTestFile(require.resolve('./field_list')); }); } diff --git a/x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts b/x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts new file mode 100644 index 0000000000000..3418c4325f503 --- /dev/null +++ b/x-pack/test/functional/apps/spaces/in_solution_navigation/config.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 { 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'), + '--xpack.cloud_integrations.experiments.enabled=true', + '--xpack.cloud_integrations.experiments.launch_darkly.sdk_key=a_string', + '--xpack.cloud_integrations.experiments.launch_darkly.client_id=a_string', + '--xpack.cloud_integrations.experiments.flag_overrides.solutionNavEnabled=true', + '--navigation.solutionNavigation.enabled=true', + // 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', + ], + }, + }; +} diff --git a/x-pack/test/functional/apps/spaces/in_solution_navigation/index.ts b/x-pack/test/functional/apps/spaces/in_solution_navigation/index.ts new file mode 100644 index 0000000000000..b7252d5d5ef3e --- /dev/null +++ b/x-pack/test/functional/apps/spaces/in_solution_navigation/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function spacesApp({ loadTestFile }: FtrProviderContext) { + describe('Spaces app - solution navigation', function spacesAppTestSuite() { + loadTestFile(require.resolve('./spaces_selection')); + }); +} diff --git a/x-pack/test/functional/apps/spaces/in_solution_navigation/spaces_selection.ts b/x-pack/test/functional/apps/spaces/in_solution_navigation/spaces_selection.ts new file mode 100644 index 0000000000000..9b44ab3d4738c --- /dev/null +++ b/x-pack/test/functional/apps/spaces/in_solution_navigation/spaces_selection.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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function spaceSelectorFunctionalTests({ + getService, + getPageObjects, +}: FtrProviderContext) { + const PageObjects = getPageObjects([ + 'common', + 'dashboard', + 'header', + 'home', + 'security', + 'spaceSelector', + ]); + const spacesService = getService('spaces'); + + // NOTE: Those tests have been copied over from the parent folder "spaces_selection.ts" + // We want to test that under the (upcoming) solution navigation, the spaces selector works as expected + // Once the solution navigation becomes the default we can remove this "in_solution_navigation" folder + // and rely only on the tests in the parent folder. + describe('Spaces', function () { + const testSpacesIds = ['another-space', ...Array.from('123456789', (idx) => `space-${idx}`)]; + before(async () => { + for (const testSpaceId of testSpacesIds) { + await spacesService.create({ id: testSpaceId, name: `${testSpaceId} name` }); + } + }); + after(async () => { + for (const testSpaceId of testSpacesIds) { + await spacesService.delete(testSpaceId); + } + }); + + describe('Space Navigation Menu', () => { + before(async () => { + await PageObjects.security.forceLogout(); + await PageObjects.security.login(undefined, undefined, { + expectSpaceSelector: true, + }); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + it('allows user to navigate to different spaces', async () => { + const anotherSpaceId = 'another-space'; + const defaultSpaceId = 'default'; + const space5Id = 'space-5'; + + await PageObjects.spaceSelector.clickSpaceCard(defaultSpaceId); + await PageObjects.spaceSelector.expectHomePage(defaultSpaceId); + + // change spaces with nav menu + await PageObjects.spaceSelector.openSpacesNav(); + await PageObjects.spaceSelector.goToSpecificSpace(space5Id); + await PageObjects.spaceSelector.expectHomePage(space5Id); + + await PageObjects.spaceSelector.openSpacesNav(); + await PageObjects.spaceSelector.goToSpecificSpace(anotherSpaceId); + await PageObjects.spaceSelector.expectHomePage(anotherSpaceId); + + await PageObjects.spaceSelector.openSpacesNav(); + await PageObjects.spaceSelector.goToSpecificSpace(defaultSpaceId); + await PageObjects.spaceSelector.expectHomePage(defaultSpaceId); + }); + }); + + describe('Search spaces in popover', function () { + const spaceId = 'default'; + before(async () => { + await PageObjects.security.forceLogout(); + await PageObjects.security.login(undefined, undefined, { + expectSpaceSelector: true, + }); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + it('allows user to search for spaces', async () => { + await PageObjects.spaceSelector.clickSpaceCard(spaceId); + await PageObjects.spaceSelector.expectHomePage(spaceId); + await PageObjects.spaceSelector.openSpacesNav(); + await PageObjects.spaceSelector.expectSearchBoxInSpacesSelector(); + }); + + it('search for "ce-1 name" and find one space', async () => { + await PageObjects.spaceSelector.setSearchBoxInSpacesSelector('ce-1 name'); + await PageObjects.spaceSelector.expectToFindThatManySpace(1); + }); + + it('search for "dog" and find NO space', async () => { + await PageObjects.spaceSelector.setSearchBoxInSpacesSelector('dog'); + await PageObjects.spaceSelector.expectToFindThatManySpace(0); + await PageObjects.spaceSelector.expectNoSpacesFound(); + }); + }); + }); +} diff --git a/x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics.json b/x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics.json new file mode 100644 index 0000000000000..f7938e92378fb --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/lens/legend_statistics.json @@ -0,0 +1,763 @@ +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea", + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "columns": { + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea": { + "dataType": "date", + "isBucketed": true, + "label": "@timestamp", + "operationType": "date_histogram", + "params": { + "dropPartials": false, + "includeEmptyRows": true, + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea" + } + ], + "legend": { + "isVisible": true, + "position": "right", + "showSingleSeries": true + }, + "valuesInLegend": true, + "preferredSeriesType": "bar_stacked", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide" + } + }, + "title": "xyValuesInLegendTrue", + "visualizationType": "lnsXY" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T13:53:59.791Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "506bcb94-71cc-4acf-8c63-cc2d486af3fb", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T13:53:59.791Z", + "version": "WzEzMywxXQ==" +} + +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea", + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "columns": { + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea": { + "dataType": "date", + "isBucketed": true, + "label": "@timestamp", + "operationType": "date_histogram", + "params": { + "dropPartials": false, + "includeEmptyRows": true, + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea" + } + ], + "legend": { + "isVisible": true, + "position": "right", + "showSingleSeries": true + }, + "valuesInLegend": false, + "preferredSeriesType": "bar_stacked", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide" + } + }, + "title": "xyValuesInLegendFalse", + "visualizationType": "lnsXY" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T13:53:59.791Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "506bcb94-71cc-4acf-8c63-cc2d486s96dc", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T13:53:59.791Z", + "version": "WzEzMywxXQ==" +} + +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea", + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "columns": { + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea": { + "dataType": "date", + "isBucketed": true, + "label": "@timestamp", + "operationType": "date_histogram", + "params": { + "dropPartials": false, + "includeEmptyRows": true, + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "2bc6ebe0-16cc-44a2-b888-9c9932fb89b8" + ], + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "c3d9cb9f-e96f-44dd-b3a5-8441f986b6ea" + } + ], + "legend": { + "isVisible": true, + "position": "right", + "showSingleSeries": true, + "legendStats": [ + "values" + ] + }, + "preferredSeriesType": "bar_stacked", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide" + } + }, + "title": "xyLegendStats", + "visualizationType": "lnsXY" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T13:53:59.791Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "506bcb94-71cc-4acf-8c63-ee6c486s96dc", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T13:53:59.791Z", + "version": "WzEzMywxXQ==" +} + + + +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "columns": { + "b997b7b4-14e1-49bf-a289-345fff2f8a54": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "legendDisplay": "default", + "metrics": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "nestedLegend": false, + "numberDisplay": "percent", + "primaryGroups": [], + "showValuesInLegend": true + } + ], + "shape": "waffle" + } + }, + "title": "waffleValuesInLegendTrue", + "visualizationType": "lnsPie" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T14:13:02.458Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "7d70df7d-f73f-42eb-9970-df1473e7eedc", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T14:13:02.458Z", + "version": "WzEzNiwxXQ==" +} + + +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "columns": { + "b997b7b4-14e1-49bf-a289-345fff2f8a54": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "legendDisplay": "default", + "metrics": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "nestedLegend": false, + "numberDisplay": "percent", + "primaryGroups": [], + "showValuesInLegend": false + } + ], + "shape": "waffle" + } + }, + "title": "waffleValuesInLegendFalse", + "visualizationType": "lnsPie" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T14:13:02.458Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "7d70df7d-f73f-42eb-9970-df1473e7aaf4", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T14:13:02.458Z", + "version": "WzEzNiwxXQ==" +} + + +{ + "attributes": { + "description": "", + "state": { + "adHocDataViews": {}, + "datasourceStates": { + "formBased": { + "layers": { + "c61a8afb-a185-4fae-a064-fb3846f6c451": { + "columnOrder": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "columns": { + "b997b7b4-14e1-49bf-a289-345fff2f8a54": { + "dataType": "number", + "isBucketed": false, + "label": "Count of records", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {}, + "sampling": 1 + } + } + }, + "indexpattern": { + "layers": {} + }, + "textBased": { + "layers": {} + } + }, + "filters": [], + "internalReferences": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "colorMapping": { + "assignments": [], + "colorMode": { + "type": "categorical" + }, + "paletteId": "eui_amsterdam_color_blind", + "specialAssignments": [ + { + "color": { + "type": "loop" + }, + "rule": { + "type": "other" + }, + "touched": false + } + ] + }, + "layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451", + "layerType": "data", + "legendDisplay": "default", + "metrics": [ + "b997b7b4-14e1-49bf-a289-345fff2f8a54" + ], + "nestedLegend": false, + "numberDisplay": "percent", + "primaryGroups": [], + "legendStats": [ + "values" + ] + } + ], + "shape": "waffle" + } + }, + "title": "waffleLegendStats", + "visualizationType": "lnsPie" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-04-18T14:13:02.458Z", + "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", + "id": "7d70df7d-f73f-42eb-9970-df1590e1aaf4", + "managed": false, + "references": [ + { + "id": "logstash-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451", + "type": "index-pattern" + } + ], + "type": "lens", + "typeMigrationVersion": "8.9.0", + "updated_at": "2024-04-18T14:13:02.458Z", + "version": "WzEzNiwxXQ==" +} \ No newline at end of file diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index 39c361c834b1f..45dfca75faf9a 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -70,6 +70,8 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv datasetQualityIntegrationsSelectableButton: 'datasetQualityIntegrationsSelectableButton', datasetQualityNamespacesSelectable: 'datasetQualityNamespacesSelectable', datasetQualityNamespacesSelectableButton: 'datasetQualityNamespacesSelectableButton', + datasetQualityQualitiesSelectable: 'datasetQualityQualitiesSelectable', + datasetQualityQualitiesSelectableButton: 'datasetQualityQualitiesSelectableButton', datasetQualityDatasetHealthKpi: 'datasetQualityDatasetHealthKpi', datasetQualityFlyoutKpiValue: 'datasetQualityFlyoutKpiValue', datasetQualityFlyoutKpiLink: 'datasetQualityFlyoutKpiLink', @@ -179,7 +181,8 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv 'Dataset Name', 'Namespace', 'Size', - 'Degraded Docs', + 'Dataset Quality', + 'Degraded Docs (%)', 'Last Activity', 'Actions', ]); @@ -201,6 +204,14 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv ); }, + async filterForQualities(qualities: string[]) { + return euiSelectable.selectOnlyOptionsWithText( + testSubjectSelectors.datasetQualityQualitiesSelectableButton, + testSubjectSelectors.datasetQualityQualitiesSelectable, + qualities + ); + }, + async toggleShowInactiveDatasets() { return find.clickByCssSelector(selectors.showInactiveDatasetsNamesSwitch); }, diff --git a/x-pack/test/functional/page_objects/observability_logs_explorer.ts b/x-pack/test/functional/page_objects/observability_logs_explorer.ts index d78f38735cd7a..832d4caf0e83e 100644 --- a/x-pack/test/functional/page_objects/observability_logs_explorer.ts +++ b/x-pack/test/functional/page_objects/observability_logs_explorer.ts @@ -119,7 +119,6 @@ export function ObservabilityLogsExplorerPageObject({ getService, }: FtrProviderContext) { const PageObjects = getPageObjects(['common']); - const dataGrid = getService('dataGrid'); const es = getService('es'); const log = getService('log'); const queryBar = getService('queryBar'); @@ -335,11 +334,6 @@ export function ObservabilityLogsExplorerPageObject({ return testSubjects.find('unmanagedDatasets'); }, - async getFlyoutDetail(rowIndex: number = 0) { - await dataGrid.clickRowToggle({ rowIndex }); - return testSubjects.find('logsExplorerFlyoutDetail'); - }, - async getIntegrations() { const menu = await this.getIntegrationsContextMenu(); diff --git a/x-pack/test/functional/services/ml/dashboard_embeddables.ts b/x-pack/test/functional/services/ml/dashboard_embeddables.ts index 7ebd7b9e74e47..685a1a5755b18 100644 --- a/x-pack/test/functional/services/ml/dashboard_embeddables.ts +++ b/x-pack/test/functional/services/ml/dashboard_embeddables.ts @@ -130,7 +130,12 @@ export function MachineLearningDashboardEmbeddablesProvider( await testSubjects.existOrFail('dashboardEditorContextMenu', { timeout: 2000 }); await dashboardAddPanel.clickEmbeddableFactoryGroupButton('ml'); - await dashboardAddPanel.clickAddNewEmbeddableLink(mlEmbeddableType); + + if (mlEmbeddableType === 'ml_single_metric_viewer') { + await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Single metric viewer'); + } else { + await dashboardAddPanel.clickAddNewEmbeddableLink(mlEmbeddableType); + } await mlDashboardJobSelectionTable.assertJobSelectionTableExists(); }); diff --git a/x-pack/test/security_solution_api_integration/config/ess/config.base.ts b/x-pack/test/security_solution_api_integration/config/ess/config.base.ts index fc25abe814400..c2fe5a723627f 100644 --- a/x-pack/test/security_solution_api_integration/config/ess/config.base.ts +++ b/x-pack/test/security_solution_api_integration/config/ess/config.base.ts @@ -79,11 +79,9 @@ export function createTestConfig(options: CreateTestConfigOptions, testFiles?: s '--xpack.ruleRegistry.unsafe.indexUpgrade.enabled=true', '--xpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled=true', `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNewTermsRuleEnabled', 'previewTelemetryUrlEnabled', 'riskScoringPersistence', 'riskScoringRoutesEnabled', - 'alertSuppressionForNonSequenceEqlRuleEnabled', ])}`, '--xpack.task_manager.poll_interval=1000', `--xpack.actions.preconfigured=${JSON.stringify(PRECONFIGURED_ACTION_CONNECTORS)}`, diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts index 563e2e8129975..137ee1f67b9b3 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts @@ -17,9 +17,5 @@ export default createTestConfig({ 'testing_ignored.constant', '/testing_regex*/', ])}`, // See tests within the file "ignore_fields.ts" which use these values in "alertIgnoreFields" - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - 'alertSuppressionForNewTermsRuleEnabled', - ])}`, ], }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts index 7f4a9714be640..7a7f50c5741ec 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts @@ -13,6 +13,7 @@ import { getAssetCriticalityDoc, getAssetCriticalityIndex, enableAssetCriticalityAdvancedSetting, + disableAssetCriticalityAdvancedSetting, } from '../../utils'; import { FtrProviderContext } from '../../../../ftr_provider_context'; @@ -27,7 +28,7 @@ export default ({ getService }: FtrProviderContext) => { beforeEach(async () => { await cleanRiskEngine({ kibanaServer, es, log }); await cleanAssetCriticality({ log, es }); - enableAssetCriticalityAdvancedSetting(kibanaServer, log); + await enableAssetCriticalityAdvancedSetting(kibanaServer, log); }); afterEach(async () => { @@ -36,7 +37,7 @@ export default ({ getService }: FtrProviderContext) => { }); describe('initialisation of resources', () => { - it('should has index installed on status api call', async () => { + it('should have index installed on status api call', async () => { let assetCriticalityIndexExist; try { @@ -127,6 +128,20 @@ export default ({ getService }: FtrProviderContext) => { expectStatusCode: 400, }); }); + + it('should return 403 if the advanced setting is disabled', async () => { + await disableAssetCriticalityAdvancedSetting(kibanaServer, log); + + const validAssetCriticality = { + id_field: 'host.name', + id_value: 'host-01', + criticality_level: 'high_impact', + }; + + await assetCriticalityRoutes.upsert(validAssetCriticality, { + expectStatusCode: 403, + }); + }); }); describe('read', () => { @@ -152,6 +167,14 @@ export default ({ getService }: FtrProviderContext) => { expectStatusCode: 400, }); }); + + it('should return 403 if the advanced setting is disabled', async () => { + await disableAssetCriticalityAdvancedSetting(kibanaServer, log); + + await assetCriticalityRoutes.get('host.name', 'doesnt-matter', { + expectStatusCode: 403, + }); + }); }); describe('update', () => { @@ -202,6 +225,14 @@ export default ({ getService }: FtrProviderContext) => { expect(doc).to.eql(undefined); }); + + it('should return 403 if the advanced setting is disabled', async () => { + await disableAssetCriticalityAdvancedSetting(kibanaServer, log); + + await assetCriticalityRoutes.delete('host.name', 'doesnt-matter', { + expectStatusCode: 403, + }); + }); }); }); }; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts index 35ebebcfa3b1a..35accff6b3a90 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts @@ -6,7 +6,10 @@ */ import expect from '@kbn/expect'; import { ROLES as SERVERLESS_USERNAMES } from '@kbn/security-solution-plugin/common/test'; -import { assetCriticalityRouteHelpersFactoryNoAuth } from '../../utils'; +import { + assetCriticalityRouteHelpersFactoryNoAuth, + enableAssetCriticalityAdvancedSetting, +} from '../../utils'; import { FtrProviderContext } from '../../../../ftr_provider_context'; import { usersAndRolesFactory } from '../../utils/users_and_roles'; @@ -64,6 +67,9 @@ const USERNAME_TO_ROLES = { }; export default ({ getService }: FtrProviderContext) => { + const kibanaServer = getService('kibanaServer'); + const log = getService('log'); + describe('Entity Analytics - Asset Criticality Privileges API', () => { describe('@ess Asset Criticality Privileges API', () => { const supertestWithoutAuth = getService('supertestWithoutAuth'); @@ -89,6 +95,7 @@ export default ({ getService }: FtrProviderContext) => { }); before(async () => { await createPrivilegeTestUsers(); + await enableAssetCriticalityAdvancedSetting(kibanaServer, log); }); describe('Asset Criticality privileges API', () => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts new file mode 100644 index 0000000000000..2e1b3a4406571 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts @@ -0,0 +1,209 @@ +/* + * Copyright 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 { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; + +import { RISK_SCORE_ENTITY_CALCULATION_URL } from '@kbn/security-solution-plugin/common/constants'; +import type { RiskScore } from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; +import { v4 as uuidv4 } from 'uuid'; +import { dataGeneratorFactory } from '../../../detections_response/utils'; +import { deleteAllAlerts, deleteAllRules } from '../../../../../common/utils/security_solution'; +import { + buildDocument, + createAndSyncRuleAndAlertsFactory, + deleteAllRiskScores, + readRiskScores, + normalizeScores, + waitForRiskScoresToBePresent, + assetCriticalityRouteHelpersFactory, + cleanAssetCriticality, + waitForAssetCriticalityToBePresent, + riskEngineRouteHelpersFactory, + cleanRiskEngine, + enableAssetCriticalityAdvancedSetting, + sanitizeScores, +} from '../../utils'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + + const esArchiver = getService('esArchiver'); + const es = getService('es'); + const log = getService('log'); + const kibanaServer = getService('kibanaServer'); + + const riskEngineRoutes = riskEngineRouteHelpersFactory(supertest); + + const createAndSyncRuleAndAlerts = createAndSyncRuleAndAlertsFactory({ supertest, log }); + + const calculateEntityRiskScores = async ({ + body, + }: { + body: object; + }): Promise<{ score: RiskScore; success: boolean }> => { + const { body: result } = await supertest + .post(RISK_SCORE_ENTITY_CALCULATION_URL) + .set('kbn-xsrf', 'true') + .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(body) + .expect(200); + return result; + }; + + const calculateEntityRiskScoreAfterRuleCreationAndExecution = async ( + documentId: string, + identifier: string, + { + alerts = 1, + riskScore = 21, + maxSignals = 100, + }: { alerts?: number; riskScore?: number; maxSignals?: number } = {} + ) => { + await createAndSyncRuleAndAlerts({ query: `id: ${documentId}`, alerts, riskScore, maxSignals }); + + return await calculateEntityRiskScores({ + body: { + identifier_type: 'host', + identifier, + }, + }); + }; + + describe('@ess @serverless Risk Scoring Entity Calculation API', () => { + before(async () => { + enableAssetCriticalityAdvancedSetting(kibanaServer, log); + }); + + context('with auditbeat data', () => { + const { indexListOfDocuments } = dataGeneratorFactory({ + es, + index: 'ecs_compliant', + log, + }); + + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/security_solution/ecs_compliant'); + }); + + after(async () => { + await esArchiver.unload( + 'x-pack/test/functional/es_archives/security_solution/ecs_compliant' + ); + }); + + beforeEach(async () => { + await deleteAllAlerts(supertest, log, es); + await deleteAllRules(supertest, log); + + await cleanRiskEngine({ kibanaServer, es, log }); + await riskEngineRoutes.init(); + }); + + afterEach(async () => { + await deleteAllRiskScores(log, es); + await deleteAllAlerts(supertest, log, es); + await deleteAllRules(supertest, log); + + await cleanRiskEngine({ kibanaServer, es, log }); + }); + + it('calculates and persists risk score for entity', async () => { + const documentId = uuidv4(); + await indexListOfDocuments([buildDocument({ host: { name: 'host-1' } }, documentId)]); + + const results = await calculateEntityRiskScoreAfterRuleCreationAndExecution( + documentId, + 'host-1' + ); + + const expectedScore = { + calculated_level: 'Unknown', + calculated_score: 21, + calculated_score_norm: 8.039816232771823, + category_1_score: 8.039816232771821, + category_1_count: 1, + id_field: 'host.name', + id_value: 'host-1', + }; + + const [score] = sanitizeScores([results.score]); + + expect(score).to.eql(expectedScore); + expect(results.success).to.be(true); + + await waitForRiskScoresToBePresent({ es, log }); + const persistedScores = await readRiskScores(es); + + expect(persistedScores.length).to.eql(1); + const [persistedScore] = normalizeScores(persistedScores); + + expect(persistedScore).to.eql(expectedScore); + }); + + describe('with asset criticality data', () => { + const assetCriticalityRoutes = assetCriticalityRouteHelpersFactory(supertest); + + beforeEach(async () => { + await assetCriticalityRoutes.upsert({ + id_field: 'host.name', + id_value: 'host-1', + criticality_level: 'high_impact', + }); + }); + + afterEach(async () => { + await cleanAssetCriticality({ log, es }); + }); + + it('calculates and persists risk scores with additional criticality metadata and modifiers', async () => { + const documentId = uuidv4(); + await indexListOfDocuments([buildDocument({ host: { name: 'host-1' } }, documentId)]); + await waitForAssetCriticalityToBePresent({ es, log }); + + const results = await calculateEntityRiskScoreAfterRuleCreationAndExecution( + documentId, + 'host-1' + ); + const expectedScore = { + criticality_level: 'high_impact', + criticality_modifier: 1.5, + calculated_level: 'Unknown', + calculated_score: 21, + calculated_score_norm: 11.59366948840633, + category_1_score: 8.039816232771821, + category_1_count: 1, + id_field: 'host.name', + id_value: 'host-1', + }; + + const [score] = sanitizeScores([results.score]); + expect(results.success).to.be(true); + expect(score).to.eql(expectedScore); + + await waitForRiskScoresToBePresent({ es, log }); + const persistedScores = await readRiskScores(es); + expect(persistedScores.length).to.eql(1); + + const [persistedScore] = normalizeScores(persistedScores); + + expect(persistedScore).to.eql(expectedScore); + const [rawScore] = persistedScores; + + expect( + rawScore.host?.risk.category_1_score! + rawScore.host?.risk.category_2_score! + ).to.be.within( + persistedScore.calculated_score_norm! - 0.000000000000001, + persistedScore.calculated_score_norm! + 0.000000000000001 + ); + }); + }); + }); + }); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts index df8ef48b5cd5b..6f13a84504e1d 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts @@ -126,7 +126,11 @@ export const assetCriticalityRouteHelpersFactory = ( .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(body) .expect(expectStatusCode), - delete: async (idField: string, idValue: string) => { + delete: async ( + idField: string, + idValue: string, + { expectStatusCode }: { expectStatusCode: number } = { expectStatusCode: 200 } + ) => { const qs = querystring.stringify({ id_field: idField, id_value: idValue }); const route = `${routeWithNamespace(ASSET_CRITICALITY_URL, namespace)}?${qs}`; return supertest @@ -134,7 +138,7 @@ export const assetCriticalityRouteHelpersFactory = ( .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .expect(200); + .expect(expectStatusCode); }, get: async ( idField: string, diff --git a/x-pack/test/security_solution_api_integration/test_suites/genai/nlp_cleanup_task/basic_license_essentials_tier/task_execution.ts b/x-pack/test/security_solution_api_integration/test_suites/genai/nlp_cleanup_task/basic_license_essentials_tier/task_execution.ts index 4101599b679cd..c560c1db035ac 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/genai/nlp_cleanup_task/basic_license_essentials_tier/task_execution.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/genai/nlp_cleanup_task/basic_license_essentials_tier/task_execution.ts @@ -10,6 +10,7 @@ import { TaskStatus } from '@kbn/task-manager-plugin/server'; import type { MlGetTrainedModelsResponse } from '@elastic/elasticsearch/lib/api/types'; import { FtrProviderContext } from '../../../../ftr_provider_context'; import { waitFor } from '../../../../../common/utils/security_solution'; +import { SUPPORTED_TRAINED_MODELS } from '../../../../../functional/services/ml/api'; export default ({ getService }: FtrProviderContext): void => { const esSupertest = getService('esSupertest'); @@ -19,8 +20,12 @@ export default ({ getService }: FtrProviderContext): void => { const TASK_ID = 'serverless-security:nlp-cleanup-task:1.0.0'; - // Failing: See https://github.com/elastic/kibana/issues/180703 - describe.skip('@serverless NLP Cleanup Task in Essentials Tier', () => { + const TINY_ELSER = { + ...SUPPORTED_TRAINED_MODELS.TINY_ELSER, + id: SUPPORTED_TRAINED_MODELS.TINY_ELSER.name, + }; + + describe('@serverless NLP Cleanup Task in Essentials Tier', () => { describe('New Essentials Deployment', () => { it('registers and enables NLP Cleanup Task', async () => { const task = await kibanaServer.savedObjects.get({ @@ -30,64 +35,76 @@ export default ({ getService }: FtrProviderContext): void => { expect(task.attributes.enabled).to.eql(true); }); + describe('Model Loading', () => { + before(async () => { + // Make sure the .ml-stats index is created in advance, see https://github.com/elastic/elasticsearch/issues/65846 + await ml.api.assureMlStatsIndexExists(); + // Create a light-weight model that has a `model_type` of `pytorch` + await ml.api.importTrainedModel(TINY_ELSER.name, TINY_ELSER.id); + }); - it('executes NLP Cleanup Task and successfully cleans up only pytorch models', async () => { - // Create a light-weight model that has a `model_type` of `pytorch` - await ml.api.importTrainedModel('pt_tiny_fill_mask', 'pt_tiny_fill_mask'); + after(async () => { + await ml.api.stopAllTrainedModelDeploymentsES(); + await ml.api.deleteAllTrainedModelsES(); + await ml.api.cleanMlIndices(); + await ml.testResources.cleanMLSavedObjects(); + }); - // Poll for model to be imported, this can fail with a 404 till the model is imported - let m1: MlGetTrainedModelsResponse = { count: 0, trained_model_configs: [] }; - await waitFor( - async () => { - const { body, status } = await esSupertest.get(`/_ml/trained_models`); - m1 = body; - return status === 200 && m1.count > 0; - }, - 'waitForModelToBeImported', - logger - ); + it('executes NLP Cleanup Task and successfully cleans up only pytorch models', async () => { + // Poll for model to be imported, this can fail with a 404 till the model is imported + let m1: MlGetTrainedModelsResponse = { count: 0, trained_model_configs: [] }; + await waitFor( + async () => { + const { body, status } = await esSupertest.get(`/_ml/trained_models`); + m1 = body; + return status === 200 && m1.count > 1; + }, + 'waitForModelToBeImported', + logger + ); - // Verify model was created, and default non-pytorch model already exists - expect(m1?.trained_model_configs.some((m) => m.model_type === 'pytorch')).to.eql(true); - expect(m1?.trained_model_configs.some((m) => m.model_type === 'lang_ident')).to.eql(true); + // Verify model was created, and default non-pytorch model already exists + expect(m1?.trained_model_configs.some((m) => m.model_type === 'pytorch')).to.eql(true); + expect(m1?.trained_model_configs.some((m) => m.model_type === 'lang_ident')).to.eql(true); - // Grab the task SO so we can update it to 'run_soon' - // Note: Can't go directly through TaskManager in Serverless at the moment, see: https://github.com/elastic/kibana/issues/179303 - const task = await kibanaServer.savedObjects.get({ - type: 'task', - id: TASK_ID, - }); + // Grab the task SO so we can update it to 'run_soon' + // Note: Can't go directly through TaskManager in Serverless at the moment, see: https://github.com/elastic/kibana/issues/179303 + const task = await kibanaServer.savedObjects.get({ + type: 'task', + id: TASK_ID, + }); - // Update task to 'run_soon', 1s from now - const runAt = new Date(Date.now() + 1000).toISOString(); - await kibanaServer.savedObjects.update({ - type: 'task', - id: 'serverless-security:nlp-cleanup-task:1.0.0', - attributes: { - ...task.attributes, - runAt, - scheduledAt: runAt, - status: TaskStatus.Idle, - }, - }); + // Update task to 'run_soon', 1s from now + const runAt = new Date(Date.now() + 1000).toISOString(); + await kibanaServer.savedObjects.update({ + type: 'task', + id: 'serverless-security:nlp-cleanup-task:1.0.0', + attributes: { + ...task.attributes, + runAt, + scheduledAt: runAt, + status: TaskStatus.Idle, + }, + }); - // Let's wait and see... - let m2: MlGetTrainedModelsResponse = { count: 0, trained_model_configs: [] }; - await waitFor( - async () => { - const { body, status } = await esSupertest.get(`/_ml/trained_models`); - m2 = body; - return ( - status === 200 && !m2.trained_model_configs.some((m) => m.model_type === 'pytorch') - ); - }, - 'waitForModelToBeDeleted', - logger - ); + // Let's wait and see... + let m2: MlGetTrainedModelsResponse = { count: 0, trained_model_configs: [] }; + await waitFor( + async () => { + const { body, status } = await esSupertest.get(`/_ml/trained_models`); + m2 = body; + return ( + status === 200 && !m2.trained_model_configs.some((m) => m.model_type === 'pytorch') + ); + }, + 'waitForModelToBeDeleted', + logger + ); - // Verify model was cleaned up, and non-pytorch model was not cleaned up - expect(m2?.trained_model_configs.some((m) => m.model_type === 'pytorch')).to.eql(false); - expect(m2?.trained_model_configs.some((m) => m.model_type === 'lang_ident')).to.eql(true); + // Verify model was cleaned up, and non-pytorch model was not cleaned up + expect(m2?.trained_model_configs.some((m) => m.model_type === 'pytorch')).to.eql(false); + expect(m2?.trained_model_configs.some((m) => m.model_type === 'lang_ident')).to.eql(true); + }); }); }); }); diff --git a/x-pack/test/security_solution_cypress/config.ts b/x-pack/test/security_solution_cypress/config.ts index 6af7c865f2757..2a7dad8cd8559 100644 --- a/x-pack/test/security_solution_cypress/config.ts +++ b/x-pack/test/security_solution_cypress/config.ts @@ -44,10 +44,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { // See https://github.com/elastic/kibana/pull/125396 for details '--xpack.alerting.rules.minimumScheduleInterval.value=1s', '--xpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled=true', - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNewTermsRuleEnabled', - 'alertSuppressionForNonSequenceEqlRuleEnabled', - ])}`, // mock cloud to enable the guided onboarding tour in e2e tests '--xpack.cloud.id=test', `--home.disableWelcomeScreen=true`, diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 965d4a3cee13c..b3190e1fe4cdc 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -37,7 +37,7 @@ Before considering adding a new Cypress tests, please make sure you have added u is to test that the user interface operates as expected, hence, you should not be using this tool to test REST API or data contracts. First take a look to the [**Development Best Practices**](#development-best-practices) section. -Then check check [**Folder structure**](#folder-structure) section to know where is the best place to put your test, [**Test data**](#test-data) section if you need to create any type +Then check [**Folder structure**](#folder-structure) section to know where is the best place to put your test, [**Test data**](#test-data) section if you need to create any type of data for your test, [**Running the tests**](#running-the-tests) to know how to execute the tests and [**Debugging your test**](#debugging-your-test) to debug your test if needed. Please, before opening a PR with the new test, please make sure that the test fails. If you never see your test fail you don’t know if your test is actually testing the right thing, or testing anything at all. @@ -45,7 +45,7 @@ Please, before opening a PR with the new test, please make sure that the test fa Note that we use tags in order to select which tests we want to execute: - `@serverless` includes a test in the Serverless test suite for PRs (the so-called first quality gate) and QA environment for the periodic pipeline. You need to explicitly add this tag to any test you want to run in CI for serverless. -- `@serverlessQA` includes a test in the Serverless test suite for the Kibana release process of serverless. You need to explicitly add this tag to any test you want yo run in CI for the second quality gate. These tests should be stable, otherviswe they will be blocking the release pipeline. They should be alsy critical enough, so that when they fail, there's a high chance of an SDH or blocker issue to be reported. +- `@serverlessQA` includes a test in the Serverless test suite for the Kibana release process of serverless. You need to explicitly add this tag to any test you want you run in CI for the second quality gate. These tests should be stable, otherwise they will be blocking the release pipeline. They should be also critical enough, so that when they fail, there's a high chance of an SDH or blocker issue to be reported. - `@ess` includes a test in the normal, non-Serverless test suite. You need to explicitly add this tag to any test you want to run against a non-Serverless environment. - `@skipInEss` excludes a test from the non-Serverless test suite. The test will not be executed as part for the PR process. All the skipped tests should have a link to a ticket describing the reason why the test got skipped. - `@skipInServerlessMKI` excludes a test from the execution on any MKI environment (even if it's tagged as `@serverless` or `@serverlessQA`). Could indicate many things, e.g. "the test is flaky in Serverless MKI", "the test has been temporarily excluded, see the comment above why". All the skipped tests should have a link to a ticket describing the reason why the test got skipped. @@ -115,7 +115,8 @@ describe( }, }, }, - ... + // ... +); ``` Note that this configuration doesn't work for local development. In this case, you need to update the configuration files: `../config` and `../serverless_config`, but you shouldn't commit these changes. @@ -245,7 +246,7 @@ 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('esArchiverLoad', { archiveName: 'security_solution/alias', type: 'ftr'}); cy.task('esArchiverUnload', { archiveName: 'security_solution/alias', type:'ftr'}); ``` @@ -294,7 +295,7 @@ describe( ], }, }, - }, + }); ``` Per the way we set the environment during the execution process on CI, the above configuration is going to be valid when the test is executed on headless mode. @@ -431,7 +432,7 @@ describe( ], }, }, - }, + }); ``` For test developing or test debugging purposes on QA, you have avaialable the following options: diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/common_flows_suppression_serverless_essentials.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/common_flows_suppression_serverless_essentials.cy.ts index 8cba636ea76c5..62a406cd9d466 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/common_flows_suppression_serverless_essentials.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/common_flows_suppression_serverless_essentials.cy.ts @@ -28,12 +28,6 @@ describe( { product_line: 'security', product_tier: 'essentials' }, { product_line: 'endpoint', product_tier: 'essentials' }, ], - // alertSuppressionForNewTermsRuleEnabled feature flag is also enabled in a global config - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNewTermsRuleEnabled', - ])}`, - ], }, }, }, diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression.cy.ts index 5b8482a91c2c2..b24d9fc709d6e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression.cy.ts @@ -37,17 +37,7 @@ const SUPPRESS_BY_FIELDS = ['agent.type']; describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression', { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], - // alertSuppressionForNonSequenceEqlRuleEnabled feature flag is also enabled in a global config - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - ])}`, - ], - }, - }, + tags: ['@ess', '@serverless'], }, () => { describe('with non-sequence queries', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_ess_basic.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_ess_basic.cy.ts index f5d8b1c8c4c4c..a9ebc451c3e08 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_ess_basic.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_ess_basic.cy.ts @@ -35,16 +35,6 @@ describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression - Basic License', { tags: ['@ess'], - // alertSuppressionForNonSequenceEqlRuleEnabled feature flag is also enabled in a global config - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - ])}`, - ], - }, - }, }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_sequence.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_sequence.cy.ts index 947198e032fac..8f07781b7732c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_sequence.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_sequence.cy.ts @@ -21,17 +21,7 @@ import { describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression', { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], - // alertSuppressionForNonSequenceEqlRuleEnabled feature flag is also enabled in a global config - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - ])}`, - ], - }, - }, + tags: ['@ess', '@serverless'], }, () => { describe('with sequence queries ', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_serverless_essentials.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_serverless_essentials.cy.ts index b26b72c9e2ef9..6c0241f94c1f5 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_serverless_essentials.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule_suppression_serverless_essentials.cy.ts @@ -28,19 +28,13 @@ const SUPPRESS_BY_FIELDS = ['agent.type']; describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression - Serverless Essentials License', { - tags: ['@serverless', '@skipInServerlessMKI'], - // alertSuppressionForNonSequenceEqlRuleEnabled feature flag is also enabled in a global config + tags: ['@serverless'], env: { ftrConfig: { productTypes: [ { product_line: 'security', product_tier: 'essentials' }, { product_line: 'endpoint', product_tier: 'essentials' }, ], - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - ])}`, - ], }, }, }, diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/new_terms_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/new_terms_rule.cy.ts index 7b087e222f262..18675ed9b84a1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/new_terms_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/new_terms_rule.cy.ts @@ -74,15 +74,7 @@ import { openRuleManagementPageViaBreadcrumbs } from '../../../../tasks/rules_ma describe( 'New Terms rules', { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], - env: { - // alertSuppressionForNewTermsRuleEnabled feature flag is also enabled in a global config - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNewTermsRuleEnabled', - ])}`, - ], - }, + tags: ['@ess', '@serverless'], }, () => { describe('Detection rules, New Terms', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts index 70254c3bbe6d5..521c786bcbb21 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/new_terms_rule.cy.ts @@ -44,15 +44,7 @@ const rule = getNewTermsRule(); describe( 'Detection rules, New terms, Edit', { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], - env: { - // alertSuppressionForNewTermsRuleEnabled feature flag is also enabled in a global config - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNewTermsRuleEnabled', - ])}`, - ], - }, + tags: ['@ess', '@serverless'], }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts index 1e3a8685e1204..1bbbaca6660c9 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts @@ -19,7 +19,6 @@ import { OPTION_LIST_VALUES, OPTION_SELECTABLE, OPTION_SELECTABLE_COUNT, - FILTER_GROUP_CONTROL_ACTION_EDIT, FILTER_GROUP_EDIT_CONTROL_PANEL_ITEMS, } from '../../../screens/common/filter_group'; import { createRule } from '../../../tasks/api_calls/rules'; @@ -27,25 +26,25 @@ import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { ALERTS_URL, CASES_URL } from '../../../urls/navigation'; import { - closePageFilterPopover, markAcknowledgedFirstAlert, openPageFilterPopover, resetFilters, selectCountTable, + selectPageFilterValue, togglePageFilterPopover, visitAlertsPageWithCustomFilters, waitForAlerts, waitForPageFilters, } from '../../../tasks/alerts'; -import { ALERTS_COUNT, ALERTS_REFRESH_BTN, EMPTY_ALERT_TABLE } from '../../../screens/alerts'; -import { kqlSearch } from '../../../tasks/security_header'; +import { ALERTS_COUNT, EMPTY_ALERT_TABLE } from '../../../screens/alerts'; +import { kqlSearch, refreshPage } from '../../../tasks/security_header'; import { addNewFilterGroupControlValues, - cancelFieldEditing, deleteFilterGroupControl, discardFilterGroupControls, editFilterGroupControl, - editFilterGroupControls, + switchFilterGroupControlsToEditMode, + editSingleFilterControl, saveFilterGroupControls, } from '../../../tasks/common/filter_group'; import { TOASTER } from '../../../screens/alerts_detection_rules'; @@ -106,36 +105,35 @@ const assertFilterControlsWithFilterObject = ( }); }; -// FLAKY: https://github.com/elastic/kibana/issues/171890 +// FLAKY: https://github.com/elastic/kibana/issues/181977 describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { deleteAlertsAndRules(); - createRule(getNewRule({ rule_id: 'custom_rule_filters' })); + createRule(getNewRule()); login(); visitWithTimeRange(ALERTS_URL); waitForAlerts(); }); - it('Default page filters are populated when nothing is provided in the URL', () => { + it('should populate page filters with default values when nothing is provided in the URL', () => { assertFilterControlsWithFilterObject(); }); context('Alert Page Filters Customization ', () => { - it('should be able to delete Controls', () => { - waitForPageFilters(); - editFilterGroupControls(); + it('should be able to customize Controls', () => { + const fieldName = 'event.module'; + const label = 'EventModule'; + switchFilterGroupControlsToEditMode(); + cy.log('should be able delete an existing control'); deleteFilterGroupControl(3); cy.get(CONTROL_FRAMES).should((sub) => { expect(sub.length).lt(4); }); - discardFilterGroupControls(); - }); - it('should be able to add new Controls', () => { - const fieldName = 'event.module'; - const label = 'EventModule'; - editFilterGroupControls(); - deleteFilterGroupControl(3); + // ================================================ + cy.log('should be able to add a new control'); + // ================================================ + addNewFilterGroupControlValues({ fieldName, label, @@ -143,12 +141,12 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(CONTROL_FRAME_TITLE).should('contain.text', label); discardFilterGroupControls(); cy.get(CONTROL_FRAME_TITLE).should('not.contain.text', label); - }); - it('should be able to edit Controls', () => { - const fieldName = 'event.module'; - const label = 'EventModule'; - editFilterGroupControls(); + // ================================================ + cy.log('should be able to edit an existing control'); + // ================================================ + + switchFilterGroupControlsToEditMode(); editFilterGroupControl({ idx: 3, fieldName, label }); cy.get(CONTROL_FRAME_TITLE).should('contain.text', label); discardFilterGroupControls(); @@ -157,7 +155,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () it('should not sync to the URL in edit mode but only in view mode', () => { cy.url().then((urlString) => { - editFilterGroupControls(); + switchFilterGroupControlsToEditMode(); deleteFilterGroupControl(3); addNewFilterGroupControlValues({ fieldName: 'event.module', label: 'Event Module' }); cy.url().should('eq', urlString); @@ -167,7 +165,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () }); }); - it('Page filters are loaded with custom values provided in the URL', () => { + it('should load page filters with custom values provided in the URL', () => { const NEW_FILTERS = DEFAULT_DETECTION_PAGE_FILTERS.filter((item) => item.persist).map( (filter) => { return { @@ -188,7 +186,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () }); }); - it('Page filters are loaded with custom filters and values', () => { + it('should load page filters with custom filters and values', () => { const CUSTOM_URL_FILTER = [ { title: 'Process', @@ -220,35 +218,47 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(FILTER_GROUP_CHANGED_BANNER).should('be.visible'); }); - context('with data modificiation', () => { - it(`Alert list is updated when the alerts are updated`, () => { - // mark status of one alert to be acknowledged - selectCountTable(); - cy.get(ALERTS_COUNT) - .invoke('text') - .then((noOfAlerts) => { - const originalAlertCount = noOfAlerts.split(' ')[0]; - markAcknowledgedFirstAlert(); - waitForAlerts(); - cy.get(OPTION_LIST_VALUES(0)).click(); - cy.get(OPTION_SELECTABLE(0, 'acknowledged')).should('be.visible').trigger('click'); - cy.get(ALERTS_COUNT) - .invoke('text') - .should((newAlertCount) => { - expect(newAlertCount.split(' ')[0]).eq(String(parseInt(originalAlertCount, 10))); - }); - }); - }); + context('with data modification', () => { + /* + * + * default scrollBehavior is true, which scrolls the element into view automatically without any scroll Margin + * if an element has some hover actions above the element, they get hidden on top of the window. + * So, we need to set scrollBehavior to false to avoid scrolling the element into view and we can scroll ourselves + * when needed. + * + * Ref : https://docs.cypress.io/guides/core-concepts/interacting-with-elements#Scrolling + */ + it( + `should update alert status list when the alerts are updated`, + { + scrollBehavior: false, + }, + () => { + // mark status of one alert to be acknowledged + selectCountTable(); + cy.get(ALERTS_COUNT) + .invoke('text') + .then((noOfAlerts) => { + const originalAlertCount = noOfAlerts.split(' ')[0]; + markAcknowledgedFirstAlert(); + waitForAlerts(); + selectPageFilterValue(0, 'acknowledged'); + cy.get(ALERTS_COUNT) + .invoke('text') + .should((newAlertCount) => { + expect(newAlertCount.split(' ')[0]).eq(String(parseInt(originalAlertCount, 10))); + }); + }); + } + ); }); - it(`URL is updated when filters are updated`, () => { - openPageFilterPopover(1); - cy.get(OPTION_SELECTABLE(1, 'high')).should('be.visible'); - cy.get(OPTION_SELECTABLE(1, 'high')).click(); - closePageFilterPopover(1); + it(`should update URL when filters are updated`, () => { + selectPageFilterValue(1, 'high'); const NEW_FILTERS = DEFAULT_DETECTION_PAGE_FILTERS.map((filter) => { return { + hideActionBar: false, ...filter, selectedOptions: filter.title === 'Severity' ? ['high'] : filter.selectedOptions, }; @@ -257,12 +267,10 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.url().should('include', expectedVal); }); - it(`Filters are restored from localstorage when user navigates back to the page.`, () => { - cy.get(OPTION_LIST_VALUES(1)).click(); - cy.get(OPTION_SELECTABLE(1, 'high')).should('be.visible'); - cy.get(OPTION_SELECTABLE(1, 'high')).click({}); + it(`should restore Filters from localstorage when user navigates back to the page.`, () => { + selectPageFilterValue(1, 'high'); - // high should be scuccessfully selected. + // high should be successfully selected. cy.get(OPTION_LIST_VALUES(1)).contains('high'); waitForPageFilters(); @@ -275,7 +283,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(OPTION_LIST_VALUES(1)).contains('high'); // severity should be low as previously selected }); - it('Custom filters from URLS are populated & changed banner is displayed', () => { + it('should populate Custom filters & display the changed banner', () => { visitAlertsPageWithCustomFilters(customFilters); waitForPageFilters(); @@ -284,7 +292,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(FILTER_GROUP_CHANGED_BANNER).should('be.visible'); }); - it('Changed banner should hide on saving changes', () => { + it('should hide Changed banner on saving changes', () => { visitAlertsPageWithCustomFilters(customFilters); waitForPageFilters(); cy.get(FILTER_GROUP_CHANGED_BANNER).should('be.visible'); @@ -292,7 +300,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(FILTER_GROUP_CHANGED_BANNER).should('not.exist'); }); - it('Changed banner should hide on discarding changes', () => { + it('should hide Changed banner on discarding changes', () => { visitAlertsPageWithCustomFilters(customFilters); waitForPageFilters(); cy.get(FILTER_GROUP_CHANGED_BANNER).should('be.visible'); @@ -300,7 +308,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(FILTER_GROUP_CHANGED_BANNER).should('not.exist'); }); - it('Changed banner should hide on Reset', () => { + it('should hide Changed banner on Reset', () => { visitAlertsPageWithCustomFilters(customFilters); waitForPageFilters(); resetFilters(); @@ -310,9 +318,8 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () context('Impact of inputs', () => { it('should recover from invalid kql Query result', () => { // do an invalid search - // kqlSearch('\\'); - cy.get(ALERTS_REFRESH_BTN).click(); + refreshPage(); waitForPageFilters(); cy.get(TOASTER).should('contain.text', 'KQLSyntaxError'); togglePageFilterPopover(0); @@ -323,7 +330,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () it('should take kqlQuery into account', () => { kqlSearch('kibana.alert.workflow_status: "nothing"'); - cy.get(ALERTS_REFRESH_BTN).trigger('click'); + refreshPage(); waitForPageFilters(); togglePageFilterPopover(0); cy.get(CONTROL_POPOVER(0)).should('contain.text', 'No options found'); @@ -342,31 +349,28 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () cy.get(CONTROL_POPOVER(0)).should('contain.text', 'No options found'); cy.get(EMPTY_ALERT_TABLE).should('be.visible'); }); + it('should take timeRange into account', () => { - const startDateWithZeroAlerts = 'Jan 1, 2002 @ 00:00:00.000'; - const endDateWithZeroAlerts = 'Jan 1, 2010 @ 00:00:00.000'; - setStartDate(startDateWithZeroAlerts); - setEndDate(endDateWithZeroAlerts); + const dateRangeWithZeroAlerts = ['Jan 1, 2002 @ 00:00:00.000', 'Jan 1, 2002 @ 00:00:00.000']; + setStartDate(dateRangeWithZeroAlerts[0]); + setEndDate(dateRangeWithZeroAlerts[1]); - cy.get(ALERTS_REFRESH_BTN).trigger('click'); + refreshPage(); waitForPageFilters(); togglePageFilterPopover(0); cy.get(CONTROL_POPOVER(0)).should('contain.text', 'No options found'); cy.get(EMPTY_ALERT_TABLE).should('be.visible'); }); }); - it('Number fields are not visible in field edit panel', () => { + it('should not show number fields are not visible in field edit panel', () => { const idx = 3; const { FILTER_FIELD_TYPE, FIELD_TYPES } = FILTER_GROUP_EDIT_CONTROL_PANEL_ITEMS; - editFilterGroupControls(); - cy.get(CONTROL_FRAME_TITLE).eq(idx).realHover(); - cy.get(FILTER_GROUP_CONTROL_ACTION_EDIT(idx)).click(); + switchFilterGroupControlsToEditMode(); + editSingleFilterControl(idx); cy.get(FILTER_FIELD_TYPE).click(); cy.get(FIELD_TYPES.STRING).should('be.visible'); cy.get(FIELD_TYPES.BOOLEAN).should('be.visible'); cy.get(FIELD_TYPES.IP).should('be.visible'); cy.get(FIELD_TYPES.NUMBER).should('not.exist'); - cancelFieldEditing(); - discardFilterGroupControls(); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unified_components/query_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unified_components/query_tab.cy.ts index 36469de82ff4d..93a42c6796090 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unified_components/query_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unified_components/query_tab.cy.ts @@ -25,7 +25,8 @@ import { openTimelineUsingToggle } from '../../../../tasks/security_main'; import { createNewTimeline, executeTimelineSearch } from '../../../../tasks/timeline'; import { ALERTS_URL } from '../../../../urls/navigation'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/181882 +describe.skip( 'Unsaved Timeline query tab', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'], diff --git a/x-pack/test/security_solution_cypress/cypress/screens/alerts.ts b/x-pack/test/security_solution_cypress/cypress/screens/alerts.ts index f45dbc3f9078b..e21d7fe46fea7 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/alerts.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/alerts.ts @@ -7,7 +7,6 @@ import { IS_SERVERLESS, CLOUD_SERVERLESS } from '../env_var_names_constants'; import { getDataTestSubjectSelector } from '../helpers/common'; -import { GLOBAL_FILTERS_CONTAINER } from './date_picker'; export const ADD_EXCEPTION_BTN = '[data-test-subj="add-exception-menu-item"]'; @@ -59,8 +58,6 @@ export const CLOSE_FLYOUT = '[data-test-subj="euiFlyoutCloseButton"]'; export const MARK_ALERT_ACKNOWLEDGED_BTN = '[data-test-subj="acknowledged-alert-status"]'; -export const ALERTS_REFRESH_BTN = `${GLOBAL_FILTERS_CONTAINER} [data-test-subj="querySubmitButton"]`; - export const ALERTS_HISTOGRAM_PANEL_LOADER = '[data-test-subj="loadingPanelAlertsHistogram"]'; export const OPEN_ALERT_BTN = '[data-test-subj="open-alert-status"]'; diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts index 0ffc54bf1f537..1760b6b56582f 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts @@ -65,7 +65,6 @@ import { } from '../screens/alerts_details'; import { FIELD_INPUT } from '../screens/exceptions'; import { - CONTROL_FRAME_TITLE, DETECTION_PAGE_FILTERS_LOADING, DETECTION_PAGE_FILTER_GROUP_LOADING, DETECTION_PAGE_FILTER_GROUP_RESET_BUTTON, @@ -74,7 +73,6 @@ import { OPTION_LIST_VALUES, OPTION_LIST_CLEAR_BTN, OPTION_SELECTABLE, - CONTROL_GROUP, } from '../screens/common/filter_group'; import { LOADING_SPINNER } from '../screens/common/page'; import { ALERTS_URL } from '../urls/navigation'; @@ -172,7 +170,7 @@ export const setEnrichmentDates = (from?: string, to?: string) => { export const refreshAlertPageFilter = () => { // Currently, system keeps the cache of option List for 1 minute so as to avoid - // lot of unncessary traffic. Cypress is too fast and we cannot wait for a minute + // lot of unnecessary traffic. Cypress is too fast and we cannot wait for a minute // to trigger a reload of Page Filters. // It is faster to refresh the page which will reload the Page Filter values // cy.reload(); @@ -198,15 +196,8 @@ export const closePageFilterPopover = (filterIndex: number) => { }; export const clearAllSelections = (filterIndex: number) => { - cy.get(CONTROL_GROUP).scrollIntoView(); - recurse( - () => { - cy.get(CONTROL_FRAME_TITLE).eq(filterIndex).realHover(); - return cy.get(OPTION_LIST_CLEAR_BTN).eq(filterIndex); - }, - ($el) => $el.is(':visible') - ); - cy.get(OPTION_LIST_CLEAR_BTN).eq(filterIndex).should('be.visible').trigger('click'); + cy.get(OPTION_LIST_VALUES(filterIndex)).realHover(); + cy.get(OPTION_LIST_CLEAR_BTN).eq(filterIndex).click(); }; export const selectPageFilterValue = (filterIndex: number, ...values: string[]) => { @@ -214,7 +205,7 @@ export const selectPageFilterValue = (filterIndex: number, ...values: string[]) clearAllSelections(filterIndex); openPageFilterPopover(filterIndex); values.forEach((value) => { - cy.get(OPTION_SELECTABLE(filterIndex, value)).click({ force: true }); + cy.get(OPTION_SELECTABLE(filterIndex, value)).click(); }); closePageFilterPopover(filterIndex); waitForAlerts(); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/common/filter_group.ts b/x-pack/test/security_solution_cypress/cypress/tasks/common/filter_group.ts index fb57aa7329ab0..04d8b0fb1f1cf 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/common/filter_group.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/common/filter_group.ts @@ -16,7 +16,6 @@ import { FILTER_GROUP_SAVE_CHANGES, CONTROL_FRAME_TITLE, FILTER_GROUP_CONTROL_ACTION_DELETE, - FILTER_GROUP_CONTROL_CONFIRM_DIALOG, FILTER_GROUP_CONTROL_CONFIRM_BTN, DETECTION_PAGE_FILTER_GROUP_WRAPPER, DETECTION_PAGE_FILTER_GROUP_LOADING, @@ -53,11 +52,16 @@ export const resetFilterGroup = () => { cy.get(DETECTION_PAGE_FILTER_GROUP_RESET_BUTTON).click(); }; -export const editFilterGroupControls = () => { +export const switchFilterGroupControlsToEditMode = () => { openFilterGroupContextMenu(); cy.get(FILTER_GROUP_CONTEXT_EDIT_CONTROLS).click(); }; +export const editSingleFilterControl = (idx: number) => { + cy.get(CONTROL_FRAME_TITLE).eq(idx).realHover(); + cy.get(FILTER_GROUP_CONTROL_ACTION_EDIT(idx)).click(); +}; + export const cancelFieldEditing = () => { cy.get(FILTER_GROUP_EDIT_CONTROLS_PANEL).should('be.visible'); cy.get(FILTER_GROUP_EDIT_CONTROL_PANEL_ITEMS.CANCEL).click(); @@ -106,7 +110,6 @@ export const addNewFilterGroupControlValues = ({ export const deleteFilterGroupControl = (idx: number) => { cy.get(CONTROL_FRAME_TITLE).eq(idx).realHover(); cy.get(FILTER_GROUP_CONTROL_ACTION_DELETE(idx)).click(); - cy.get(FILTER_GROUP_CONTROL_CONFIRM_DIALOG).should('be.visible'); cy.get(FILTER_GROUP_CONTROL_CONFIRM_BTN).click(); }; diff --git a/x-pack/test/security_solution_cypress/serverless_config.ts b/x-pack/test/security_solution_cypress/serverless_config.ts index 1823e8ac846a0..d0ee1613f6e4c 100644 --- a/x-pack/test/security_solution_cypress/serverless_config.ts +++ b/x-pack/test/security_solution_cypress/serverless_config.ts @@ -34,10 +34,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { { product_line: 'endpoint', product_tier: 'complete' }, { product_line: 'cloud', product_tier: 'complete' }, ])}`, - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForNonSequenceEqlRuleEnabled', - 'alertSuppressionForNewTermsRuleEnabled', - ])}`, ], }, testRunner: SecuritySolutionConfigurableCypressTestRunner, diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts index 6786f82a6fabe..58e1eec24b423 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts @@ -16,7 +16,8 @@ import { export default function (providerContext: FtrProviderContext) { const { loadTestFile, getService, getPageObjects } = providerContext; - describe('endpoint', function () { + // FLAKY: https://github.com/elastic/kibana/issues/180401 + describe.skip('endpoint', function () { const ingestManager = getService('ingestManager'); const log = getService('log'); const endpointTestResources = getService('endpointTestResources'); diff --git a/x-pack/test/ui_capabilities/security_and_spaces/scenarios.ts b/x-pack/test/ui_capabilities/security_and_spaces/scenarios.ts index 7ed14214d23b4..de3160cd9c479 100644 --- a/x-pack/test/ui_capabilities/security_and_spaces/scenarios.ts +++ b/x-pack/test/ui_capabilities/security_and_spaces/scenarios.ts @@ -24,7 +24,7 @@ const NoKibanaPrivileges: User = { }, }; -const Superuser: User = { +export const Superuser: User = { username: 'superuser', fullName: 'superuser', password: 'superuser-password', @@ -96,7 +96,7 @@ const DualPrivilegesRead: User = { }, }; -const GlobalAll: User = { +export const GlobalAll: User = { username: 'global_all', fullName: 'global_all', password: 'global_all-password', @@ -227,6 +227,43 @@ const NothingSpaceRead: User = { }, }; +export const ReadSecurity: User = { + username: 'read_security', + fullName: 'read_security', + password: 'read_security-password', + role: { + name: 'read_security_role', + kibana: [ + { + base: ['all'], + spaces: ['*'], + }, + ], + elasticsearch: { + cluster: ['read_security'], + indices: [], + }, + }, +}; + +export const ManageSecurity: User = { + username: 'manage_security', + fullName: 'manage_security', + password: 'manage_security-password', + role: { + name: 'manage_security_role', + kibana: [ + { + base: ['all'], + spaces: ['*'], + }, + ], + elasticsearch: { + cluster: ['manage_security'], + }, + }, +}; + export const Users: User[] = [ NoKibanaPrivileges, Superuser, @@ -241,6 +278,8 @@ export const Users: User[] = [ EverythingSpaceRead, NothingSpaceAll, NothingSpaceRead, + ReadSecurity, + ManageSecurity, ]; const EverythingSpace: Space = { diff --git a/x-pack/test/ui_capabilities/security_and_spaces/tests/index.ts b/x-pack/test/ui_capabilities/security_and_spaces/tests/index.ts index 77619157c615f..f9452966e671d 100644 --- a/x-pack/test/ui_capabilities/security_and_spaces/tests/index.ts +++ b/x-pack/test/ui_capabilities/security_and_spaces/tests/index.ts @@ -40,6 +40,7 @@ export default function uiCapabilitiesTests({ loadTestFile, getService }: FtrPro if (isCustomRoleSpecification(role)) { await securityService.role.create(role.name, { kibana: role.kibana, + ...(role.elasticsearch ? { elasticsearch: role.elasticsearch } : {}), }); } } @@ -66,5 +67,6 @@ export default function uiCapabilitiesTests({ loadTestFile, getService }: FtrPro loadTestFile(require.resolve('./catalogue')); loadTestFile(require.resolve('./foo')); loadTestFile(require.resolve('./nav_links')); + loadTestFile(require.resolve('./roles')); }); } diff --git a/x-pack/test/ui_capabilities/security_and_spaces/tests/roles.ts b/x-pack/test/ui_capabilities/security_and_spaces/tests/roles.ts new file mode 100644 index 0000000000000..fd2474686e648 --- /dev/null +++ b/x-pack/test/ui_capabilities/security_and_spaces/tests/roles.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { UICapabilitiesService } from '../../common/services/ui_capabilities'; +import { + GlobalAll as GlobalAllUser, + Superuser, + ReadSecurity as ReadSecurityRoleUser, + ManageSecurity as ManageSecurityRoleUser, +} from '../scenarios'; + +export default function fooTests({ getService }: FtrProviderContext) { + const uiCapabilitiesService: UICapabilitiesService = getService('uiCapabilities'); + + describe('role management', () => { + it('Superuser role capabilities should have all role capabilities set to true', async () => { + const uiCapabilities = await uiCapabilitiesService.get({ + credentials: { username: Superuser.username, password: Superuser.password }, + }); + + expect(uiCapabilities.value!.roles).to.eql({ + view: true, + save: true, + }); + }); + + it('User without cluster privilages should have all role capabilities set to false', async () => { + const uiCapabilities = await uiCapabilitiesService.get({ + credentials: { username: GlobalAllUser.username, password: GlobalAllUser.password }, + }); + + expect(uiCapabilities.value!.roles).to.eql({ + view: false, + save: false, + }); + }); + + it('user with read_security cluster privilege should have view role capabilities set to true', async () => { + const uiCapabilities = await uiCapabilitiesService.get({ + credentials: { + username: ReadSecurityRoleUser.username, + password: ReadSecurityRoleUser.password, + }, + }); + + expect(uiCapabilities.value!.roles).to.eql({ + view: true, + save: false, + }); + }); + + it('user with manage_security cluster privilege should have view/save role capabilities set to true', async () => { + const uiCapabilities = await uiCapabilitiesService.get({ + credentials: { + username: ManageSecurityRoleUser.username, + password: ManageSecurityRoleUser.password, + }, + }); + + expect(uiCapabilities.value!.roles).to.eql({ + view: true, + save: true, + }); + }); + }); +} diff --git a/x-pack/test_serverless/functional/page_objects/svl_management_page.ts b/x-pack/test_serverless/functional/page_objects/svl_management_page.ts index 0bf05dd198b49..fe78ec9bc07d9 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_management_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_management_page.ts @@ -43,5 +43,10 @@ export function SvlManagementPageProvider({ getService }: FtrProviderContext) { async clickOrgMembersManagementCard() { await testSubjects.click('app-card-organization_members'); }, + + // Ingest Pipelines + async clickIngestPipelinesManagementCard() { + await testSubjects.click('app-card-ingest_pipelines'); + }, }; } diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/embeddable/_saved_search_embeddable.ts b/x-pack/test_serverless/functional/test_suites/common/discover/embeddable/_saved_search_embeddable.ts index 14c4417da4c31..2cd16b00feb6a 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/embeddable/_saved_search_embeddable.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/embeddable/_saved_search_embeddable.ts @@ -133,9 +133,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); const embeddableError = await testSubjects.find('embeddableError'); const errorMessage = await embeddableError.findByTestSubject('errorMessageMarkdown'); - expect(await errorMessage.getVisibleText()).to.equal( - 'Expected AND, OR, end of input, whitespace but "n" found.\nthis < is not : a valid > query\n----------^' - ); + const errorText = await errorMessage.getVisibleText(); + expect(errorText).to.match(/Expected[\S\s]+but "n" found/); }); it('should not show the full screen button', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/spaces/index.ts b/x-pack/test_serverless/functional/test_suites/common/spaces/index.ts new file mode 100644 index 0000000000000..cc28dbd04a463 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/common/spaces/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default ({ loadTestFile }: FtrProviderContext) => { + describe('Spaces', function () { + loadTestFile(require.resolve('./spaces_selection.ts')); + }); +}; diff --git a/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts new file mode 100644 index 0000000000000..3d1ce81e6b99c --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getPageObject, getService }: FtrProviderContext) { + const svlCommonPage = getPageObject('svlCommonPage'); + const svlCommonNavigation = getService('svlCommonNavigation'); + const testSubjects = getService('testSubjects'); + + describe('space selection', function () { + before(async () => { + await svlCommonPage.loginWithRole('viewer'); + }); + + it('does not have the space selection menu in header', async () => { + await svlCommonNavigation.navigateToKibanaHome(); + await svlCommonPage.assertProjectHeaderExists(); + + await testSubjects.missingOrFail('spacesNavSelector'); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts b/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts index 62f34915d6f15..c75e2aa19be75 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts @@ -21,6 +21,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../../common/grok_debugger'), require.resolve('../../common/console'), require.resolve('../../common/painless_lab'), + require.resolve('../../common/spaces'), ], junit: { reportName: 'Serverless Observability Functional Tests - Common Group 1', 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 index fa5243ec03ef7..cee810ad12356 100644 --- 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 @@ -274,7 +274,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.switchTab(0); }); - it('goes to infra hosts for hosts when show all is clicked', async () => { + // Blocked by https://github.com/elastic/kibana/issues/181705 + it.skip('goes to infra hosts for hosts when show all is clicked', async () => { const apacheAccessDatasetHumanName = 'Apache access logs'; await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); @@ -401,13 +402,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); await PageObjects.datasetQuality.openIntegrationActionsMenu(); - const action = await PageObjects.datasetQuality.getIntegrationActionButtonByAction( - integrationActions.template - ); + await retry.tryForTime(5000, async () => { + const action = await PageObjects.datasetQuality.getIntegrationActionButtonByAction( + integrationActions.template + ); - await action.click(); + await action.click(); - await retry.tryForTime(5000, async () => { const currentUrl = await browser.getCurrentUrl(); const parsedUrl = new URL(currentUrl); expect(parsedUrl.pathname).to.contain( 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 index 475984c4873ea..04145eb3a0641 100644 --- 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 @@ -46,7 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const namespaceColCellTexts = await namespaceCol.getCellTexts(); expect(namespaceColCellTexts).to.eql([defaultNamespace, defaultNamespace, defaultNamespace]); - const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsCol = cols['Degraded Docs (%)']; const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); @@ -64,7 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const datasetNameCol = cols['Dataset Name']; await datasetNameCol.sort('ascending'); - const degradedDocsCol = cols['Degraded Docs']; + const degradedDocsCol = cols['Degraded Docs (%)']; const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%']); @@ -126,8 +126,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 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 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 index 220be569349b2..f0832846e546f 100644 --- 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 @@ -154,5 +154,40 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(namespaceColCellTextsAfterFilter).to.eql([datasetNamespace]); }); + + it('filters for quality', async () => { + const apacheAccessDatasetName = 'apache.access'; + const expectedQuality = 'Poor'; + + // Add initial integrations + await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); + + // Index 10 logs for `logs-apache.access` dataset + await synthtrace.index( + getLogsForDataset({ + to: new Date().toISOString(), + count: 10, + dataset: apacheAccessDatasetName, + isMalformed: true, + }) + ); + + await PageObjects.datasetQuality.navigateTo(); + + // Get default quality + const cols = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetQuality = cols['Dataset Quality']; + const datasetQualityCellTexts = await datasetQuality.getCellTexts(); + expect(datasetQualityCellTexts).to.contain(expectedQuality); + + // Filter for Poor quality + await PageObjects.datasetQuality.filterForQualities([expectedQuality]); + + const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); + const datasetQualityAfterFilter = colsAfterFilter['Dataset Quality']; + const datasetQualityCellTextsAfterFilter = await datasetQualityAfterFilter.getCellTexts(); + + expect(datasetQualityCellTextsAfterFilter).to.eql([expectedQuality]); + }); }); } diff --git a/x-pack/test_serverless/functional/test_suites/observability/navigation.ts b/x-pack/test_serverless/functional/test_suites/observability/navigation.ts index 302a786286ae5..eb2597f38db20 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/navigation.ts @@ -9,7 +9,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getPageObject, getService }: FtrProviderContext) { - const svlObltOnboardingPage = getPageObject('svlObltOnboardingPage'); const svlObltNavigation = getService('svlObltNavigation'); const svlCommonPage = getPageObject('svlCommonPage'); const svlCommonNavigation = getPageObject('svlCommonNavigation'); @@ -32,7 +31,6 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { // check serverless search side nav exists await svlCommonNavigation.expectExists(); await svlCommonNavigation.breadcrumbs.expectExists(); - await svlObltOnboardingPage.assertQuickstartBadgeExists(); // check side nav links await svlCommonNavigation.sidenav.expectSectionOpen('observability_project_nav'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout.ts index e952294c2cda1..8758ca590a515 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout.ts @@ -67,32 +67,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } }); - it('should mount the flyout customization content', async () => { + it('should display the logs overview tab', async () => { await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutDetail'); - }); - - it('should display a timestamp badge', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogTimestamp'); - }); - - it('should display a log level badge when available', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogLevel'); - await dataGrid.closeFlyout(); - - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutLogLevel'); - }); - - it('should display a message code block when available', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutLogMessage'); - await dataGrid.closeFlyout(); - - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutLogMessage'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); }); }); } diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout_highlights.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout_highlights.ts deleted file mode 100644 index b143d59e96cad..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/flyout_highlights.ts +++ /dev/null @@ -1,256 +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 { FtrProviderContext } from '../../../ftr_provider_context'; - -const DATASET_NAME = 'flyout'; -const NAMESPACE = 'default'; -const DATA_STREAM_NAME = `logs-${DATASET_NAME}-${NAMESPACE}`; -const NOW = Date.now(); - -const sharedDoc = { - time: NOW + 1000, - logFilepath: '/flyout.log', - serviceName: 'frontend-node', - datasetName: DATASET_NAME, - namespace: NAMESPACE, - message: 'full document', - logLevel: 'info', - traceId: 'abcdef', - hostName: 'gke-edge-oblt-pool', - orchestratorClusterId: 'my-cluster-id', - orchestratorClusterName: 'my-cluster-id', - orchestratorResourceId: 'orchestratorResourceId', - cloudProvider: 'gcp', - cloudRegion: 'us-central-1', - cloudAz: 'us-central-1a', - cloudProjectId: 'elastic-project', - cloudInstanceId: 'BgfderflkjTheUiGuy', - agentName: 'node', -}; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const dataGrid = getService('dataGrid'); - const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['observabilityLogsExplorer', 'svlCommonPage']); - - describe('Flyout highlight customization', () => { - let cleanupDataStreamSetup: () => Promise<void>; - - describe('Service & Infrastructure container', () => { - const { - serviceName, - traceId, - hostName, - orchestratorClusterName, - orchestratorResourceId, - ...rest - } = sharedDoc; - const docWithoutServiceName = { - ...rest, - traceId, - hostName, - orchestratorClusterName, - orchestratorResourceId, - time: NOW - 1000, - }; - const docWithoutServiceInfraContainer = { ...rest, time: NOW - 4000 }; - - const docs = [sharedDoc, docWithoutServiceName, docWithoutServiceInfraContainer]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - await PageObjects.svlCommonPage.login(); - }); - - after('clean up DataStream', async () => { - await PageObjects.svlCommonPage.forceLogout(); - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the service container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await testSubjects.existOrFail('logsExplorerFlyoutService'); - await testSubjects.existOrFail('logsExplorerFlyoutTrace'); - await testSubjects.existOrFail('logsExplorerFlyoutHostName'); - await testSubjects.existOrFail('logsExplorerFlyoutClusterName'); - await testSubjects.existOrFail('logsExplorerFlyoutResourceId'); - await dataGrid.closeFlyout(); - }); - - it('should load the service container even when 1 field is missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await testSubjects.missingOrFail('logsExplorerFlyoutService'); - await testSubjects.existOrFail('logsExplorerFlyoutTrace'); - await testSubjects.existOrFail('logsExplorerFlyoutHostName'); - await testSubjects.existOrFail('logsExplorerFlyoutClusterName'); - await testSubjects.existOrFail('logsExplorerFlyoutResourceId'); - await dataGrid.closeFlyout(); - }); - - it('should not load the service container if all fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 2, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutHighlightSectionServiceInfra'); - await dataGrid.closeFlyout(); - }); - }); - - describe('Cloud container', () => { - const { cloudProvider, cloudInstanceId, cloudProjectId, cloudRegion, cloudAz, ...rest } = - sharedDoc; - const docWithoutCloudProviderAndInstanceId = { - ...rest, - cloudProjectId, - cloudRegion, - cloudAz, - time: NOW - 1000, - }; - const docWithoutCloudContainer = { ...rest, time: NOW - 2000 }; - - const docs = [sharedDoc, docWithoutCloudProviderAndInstanceId, docWithoutCloudContainer]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - await PageObjects.svlCommonPage.login(); - }); - - after('clean up DataStream', async () => { - await PageObjects.svlCommonPage.forceLogout(); - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the cloud container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionCloud'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProjectId'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudInstanceId'); - await dataGrid.closeFlyout(); - }); - - it('should load the cloud container even when some fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionCloud'); - - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudInstanceId'); - - await testSubjects.existOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.existOrFail('logsExplorerFlyoutCloudProjectId'); - await dataGrid.closeFlyout(); - }); - - it('should not load the cloud container if all fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 2, columnIndex: 4 }); - await testSubjects.missingOrFail('logsExplorerFlyoutHighlightSectionCloud'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProvider'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudRegion'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudAz'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudProjectId'); - await testSubjects.missingOrFail('logsExplorerFlyoutCloudInstanceId'); - await dataGrid.closeFlyout(); - }); - }); - - describe('Other container', () => { - const { logFilepath, agentName, ...rest } = sharedDoc; - const docWithoutLogPathAndAgentName = { - ...rest, - time: NOW - 1000, - }; - - const docs = [sharedDoc, docWithoutLogPathAndAgentName]; - before('setup DataStream', async () => { - cleanupDataStreamSetup = await PageObjects.observabilityLogsExplorer.setupDataStream( - DATASET_NAME, - NAMESPACE - ); - await PageObjects.observabilityLogsExplorer.ingestLogEntries(DATA_STREAM_NAME, docs); - await PageObjects.svlCommonPage.login(); - }); - - after('clean up DataStream', async () => { - await PageObjects.svlCommonPage.forceLogout(); - if (cleanupDataStreamSetup) { - await cleanupDataStreamSetup(); - } - }); - - beforeEach(async () => { - await PageObjects.observabilityLogsExplorer.navigateTo({ - pageState: { - time: { - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), - mode: 'absolute', - }, - }, - }); - }); - - it('should load the other container with all fields', async () => { - await dataGrid.clickRowToggle({ columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionOther'); - await testSubjects.existOrFail('logsExplorerFlyoutLogPathFile'); - await testSubjects.existOrFail('logsExplorerFlyoutNamespace'); - await testSubjects.existOrFail('logsExplorerFlyoutDataset'); - await testSubjects.existOrFail('logsExplorerFlyoutLogShipper'); - await dataGrid.closeFlyout(); - }); - - it('should load the other container even when some fields are missing', async () => { - await dataGrid.clickRowToggle({ rowIndex: 1, columnIndex: 4 }); - await testSubjects.existOrFail('logsExplorerFlyoutHighlightSectionOther'); - - await testSubjects.missingOrFail('logsExplorerFlyoutLogPathFile'); - await testSubjects.missingOrFail('logsExplorerFlyoutLogShipper'); - - await testSubjects.existOrFail('logsExplorerFlyoutNamespace'); - await testSubjects.existOrFail('logsExplorerFlyoutDataset'); - await dataGrid.closeFlyout(); - }); - }); - }); -} diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts index e445761dd6c19..1f49779be0f27 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts @@ -11,13 +11,12 @@ export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Logs Explorer', function () { loadTestFile(require.resolve('./app')); loadTestFile(require.resolve('./columns_selection')); + loadTestFile(require.resolve('./custom_control_columns')); loadTestFile(require.resolve('./data_source_selection_state')); loadTestFile(require.resolve('./data_source_selector')); + loadTestFile(require.resolve('./field_list')); loadTestFile(require.resolve('./filter_controls')); loadTestFile(require.resolve('./flyout')); loadTestFile(require.resolve('./header_menu')); - loadTestFile(require.resolve('./flyout_highlights')); - loadTestFile(require.resolve('./custom_control_columns')); - loadTestFile(require.resolve('./field_list')); }); } diff --git a/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts b/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts index 848aec3f340f5..3b0991b3b1fe9 100644 --- a/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts +++ b/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts @@ -19,6 +19,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../../common/platform_security'), require.resolve('../../common/reporting'), require.resolve('../../common/console'), + require.resolve('../../common/spaces'), ], junit: { reportName: 'Serverless Search Functional Tests - Common Group 1', diff --git a/x-pack/test_serverless/functional/test_suites/search/navigation.ts b/x-pack/test_serverless/functional/test_suites/search/navigation.ts index bfa31544f7d0b..a8af6692be57f 100644 --- a/x-pack/test_serverless/functional/test_suites/search/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/search/navigation.ts @@ -71,17 +71,12 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { }); it("management apps from the sidenav hide the 'stack management' root from the breadcrumbs", async () => { - await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:triggersActions' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Alerts', 'Rules']); - await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:index_management' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Index Management', 'Indices']); - - await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:ingest_pipelines' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Ingest Pipelines']); - - await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:api_keys' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['API keys']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([ + 'Content', + 'Index Management', + 'Indices', + ]); }); it('navigate management', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/search/pipelines.ts b/x-pack/test_serverless/functional/test_suites/search/pipelines.ts index 4ad1b685edf2a..c2e324edbbfae 100644 --- a/x-pack/test_serverless/functional/test_suites/search/pipelines.ts +++ b/x-pack/test_serverless/functional/test_suites/search/pipelines.ts @@ -13,13 +13,14 @@ export default function ({ getPageObjects }: FtrProviderContext) { 'svlCommonNavigation', 'common', 'svlIngestPipelines', + 'svlManagementPage', ]); describe('ingest pipelines', function () { before(async () => { await pageObjects.svlCommonPage.login(); - await pageObjects.svlCommonNavigation.sidenav.clickLink({ - deepLinkId: 'management:ingest_pipelines', - }); + await pageObjects.svlCommonNavigation.sidenav.openSection('project_settings_project_nav'); + await pageObjects.svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management' }); + await pageObjects.svlManagementPage.clickIngestPipelinesManagementCard(); }); after(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts b/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts index 120359a8903b3..8adac3b9c4a6e 100644 --- a/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts +++ b/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts @@ -21,6 +21,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../../common/grok_debugger'), require.resolve('../../common/console'), require.resolve('../../common/painless_lab'), + require.resolve('../../common/spaces'), ], junit: { reportName: 'Serverless Security Functional Tests - Common Group 1',